Boo
  1. Boo
  2. BOO-101

optimize true closures shared variables

    Details

    • Type: Improvement Improvement
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 0.9
    • Fix Version/s: 0.9.5
    • Component/s: Compiler
    • Labels:
      None
    • Number of attachments :
      0

      Description

      The current implementation will create a class/object to hold "shared"
      variables between methods and closures even when they are not really
      "shared". Take the following example for instance:

      <snip>

      def adder(amount as int):
      return <value as int | return amount+value>

      </snip>

      The compiler will create a shared state object to hold the amount
      parameter even though it's never accessed outside the closure (and thus
      not properly "shared").

        Activity

        Hide
        Mark Friedman added a comment -

        FYI, there is a lot of work from the Lisp/Scheme community on closure optimizations.

        Show
        Mark Friedman added a comment - FYI, there is a lot of work from the Lisp/Scheme community on closure optimizations.

          People

          • Assignee:
            Unassigned
            Reporter:
            Rodrigo B. de Oliveira
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: