1. 24 Jun, 2014 1 commit
  2. 23 Jun, 2014 5 commits
  3. 20 Jun, 2014 1 commit
  4. 19 Jun, 2014 3 commits
    • Marius Wachtler's avatar
      GC: Register None · eb04bcde
      Marius Wachtler authored
      eb04bcde
    • Marius Wachtler's avatar
      Implement chained comparisons · 8580c891
      Marius Wachtler authored
      8580c891
    • Kevin Modzelewski's avatar
      Implement closures · ddabda9a
      Kevin Modzelewski authored
      Implementation is pretty straightforward for now:
      - find all names that get accessed from a nested function
      - if any, create a closure object at function entry
      - any time we set a name accessed from a nested function,
        update its value in the closure
      - when evaluating a functiondef that needs a closure, attach
        the created closure to the created function object.
      
      Closures are currently passed as an extra argument before any
      python-level args, which I'm not convinced is the right strategy.
      It's works out fine but it feels messy to say that functions
      can have different C-level calling conventions.
      It felt worse to include the closure as part of the python-level arg
      passing.
      Maybe it should be passed after all the other arguments?
      
      Closures are currently just simple objects, on which we set and get
      Python-level attributes.  The performance (which I haven't tested)
      relies on attribute access being made fast through the hidden-class
      inline caches.
      
      There are a number of ways that this could be improved:
      - be smarter about when we create the closure object, or when we
        update it.
      - not create empty pass-through closures
      - give the closures a pre-defined shape, since we know at irgen-time
        what names can get set.  could probably avoid the inline cache
        machinery and also have better code.
      ddabda9a
  5. 18 Jun, 2014 5 commits
  6. 17 Jun, 2014 9 commits
  7. 11 Jun, 2014 4 commits
  8. 10 Jun, 2014 4 commits
  9. 09 Jun, 2014 6 commits
  10. 08 Jun, 2014 1 commit
  11. 07 Jun, 2014 1 commit
    • Kevin Modzelewski's avatar
      Implement defaults, keywords, varargs and kwargs · 6acfb996
      Kevin Modzelewski authored
      Not all exposed to python code yet
      
      This commit is pretty large because it contains two separate but interrelated changes:
      - Rewrite the function argument handling code (callCompiledFunction and resolveCLFunc)
        into a single callFunc that does its own rewriting, and support the new features.
      -- this required a change of data representations, so instead of having each function
         consist of variants with unrelated signatures, we can only have a single signature,
         but multiple type specializations of that signature
      - To do that, had to rewrite all of the stdlib functions that used signature-variation
        (ex range1 + range2 + range3) to be a single function that took default arguments, and
        then took action appropriately.
      6acfb996