1. 07 Feb, 2015 1 commit
  2. 06 Feb, 2015 13 commits
    • Kevin Modzelewski's avatar
      Basic 'traceback' object support · e22da6f3
      Kevin Modzelewski authored
      Previously we were just passing around a vector<> of LineInfos; now, they
      get encapsulated in a BoxedTraceback object.  This has a couple benefits:
      1) they can participate in the existing sys.exc_info passing+handling
      2) we can enable a basic form of the traceback module.
      
      2 means that we can finally test our tracebacks support, since I was constantly
      fixing one issue only to break it in another place.
      
      1 means that we now generate the right traceback for the current exception!
      Before this change, the traceback we would generate was determined using a different
      system than the exc_info-based exception raising, so sometimes they would diverge
      and be horribly confusing.
      
      There's a pretty big limitation with the current implementation: our tracebacks
      don't span the right stack frames.  In CPython, a traceback spans the stack frames
      between the raise and the catch, but in Pyston the traceback includes all stack frames.
      It's not easy to provide this behavior, since the tracebacks are supposed to get updated
      as they get rethrown through each stack frame.
      
      We could do some complicated stuff in irgen to make sure this happens.  I think the better
      but more complicated approach is for us to create the custom exception unwinder we've been
      wanting.  This would let us add custom traceback-handling support as we unwound the stack.
      
      Another limitation is that tracebacks are supposed to automatically include a reference
      to the entire frame stack (tb.tb_frame.f_back.f_back.f_back....).  In Pyston, we're not
      automatically generating those frame objects, so we would either need to do that and take
      a perf hit, or (more likely?) generate the frame objects on-demand when they're needed.
      
      It's not really clear that they're actually needed for traceback objects, so I implemented
      a different traceback object API and changed the traceback.py library, under the assumption
      that almost-noone actually deals with the traceback object internals.
      e22da6f3
    • Kevin Modzelewski's avatar
      Merge pull request #285 from tjhance/builtin-functions · ee448c5f
      Kevin Modzelewski authored
      builtin functions
      ee448c5f
    • Kevin Modzelewski's avatar
      Merge pull request #286 from undingen/remove_pic · 5cc8ea87
      Kevin Modzelewski authored
      Remove -fPIC
      5cc8ea87
    • Travis Hance's avatar
      builtin functions · 128cb7c7
      Travis Hance authored
      128cb7c7
    • Kevin Modzelewski's avatar
      Merge pull request #281 from undingen/array · 2781d28c
      Kevin Modzelewski authored
      add the array module
      2781d28c
    • Marius Wachtler's avatar
      Remove -fPIC · 032be99e
      Marius Wachtler authored
      032be99e
    • Marius Wachtler's avatar
      add array module · f17535bc
      Marius Wachtler authored
      f17535bc
    • Kevin Modzelewski's avatar
      Fix a codegen bug · 4a7bcfbb
      Kevin Modzelewski authored
      If we could statically determine that an object doesn't have a __nonzero__ method,
      we would previously say that it had an undefined truth value (and then crash).
      4a7bcfbb
    • Kevin Modzelewski's avatar
      Merge pull request #284 from toshok/benchmarks · ba5d093c
      Kevin Modzelewski authored
      add richards.py and deltablue.py minibenchmarks
      ba5d093c
    • Kevin Modzelewski's avatar
      Merge branch 'file' · 77746e34
      Kevin Modzelewski authored
      Migrate to (a subset of) CPython's file implementation instead of our own.
      77746e34
    • Kevin Modzelewski's avatar
      Convert all of our file methods to the CPython implementations · 2deb1958
      Kevin Modzelewski authored
      There's some low-hanging optimization fruit in here if we want to
      (unnecessary crossings between Pyston and CAPI environments)
      but we'll see.
      2deb1958
    • Kevin Modzelewski's avatar
      Add file_readlines · 6bba2b53
      Kevin Modzelewski authored
      6bba2b53
    • Kevin Modzelewski's avatar
      Migrate to the CPython file object format · b1e0937b
      Kevin Modzelewski authored
      Trying to patch up our file support so that we match CPython's behavior and
      functionality more closely; this is the first step.
      b1e0937b
  3. 05 Feb, 2015 9 commits
  4. 04 Feb, 2015 9 commits
  5. 03 Feb, 2015 4 commits
    • Kevin Modzelewski's avatar
      Identify + fix codegen bug · d3ba142d
      Kevin Modzelewski authored
      In certain cases we wouldn't do well if we were sure that a type error
      would occur (ex indexing into what we know is None) -- we would error in
      codegen instead of generating the code to throw the error at runtime.
      
      (sneak in another travis.yml attempt)
      d3ba142d
    • Kevin Modzelewski's avatar
      whoops · 17fa11b0
      Kevin Modzelewski authored
      I'm sure there's a better way to test the travis build than committing to master,
      but why bother when this time will obviously work!
      17fa11b0
    • Kevin Modzelewski's avatar
      26f0e34d
    • Kevin Modzelewski's avatar
      Try to fix the Travis-CI build · da15429c
      Kevin Modzelewski authored
      Our previous travis build steps had a circular dependency between cmake and llvm:
      we need to run cmake to update llvm to our picked revision, but we need to be on
      our specific llvm revision in order to run cmake (newer LLVM's are incompatible
      with our build scripts).
      
      Break the dependency by manually calling git_svn_gotorev.py
      Hopefully this syntax works
      da15429c
  6. 02 Feb, 2015 4 commits
    • Kevin Modzelewski's avatar
      Merge branch 'deopt' · e69673e4
      Kevin Modzelewski authored
      e69673e4
    • Kevin Modzelewski's avatar
      Need to always filter out !-names · 58cdce54
      Kevin Modzelewski authored
      58cdce54
    • Kevin Modzelewski's avatar
      Remove function versions that fail their speculations · b4094e4e
      Kevin Modzelewski authored
      The goal is to not continually call functions that deopt every time,
      since the deopt is expensive.
      
      Right now the threshold is simple: if a function deopts 4 (configurable)
      times, then mark that function version as invalid and force a recompilation
      on the next call.
      b4094e4e
    • Kevin Modzelewski's avatar
      Basic (new) deopt support · 25ac9de4
      Kevin Modzelewski authored
      Old deopt worked by compiling two copies of every BB, one with
      speculations and one without, and stitching the two together.
      This has a number of issues:
      - doubles the amount of code LLVM has to jit
      - can't ever get back on the optimized path
      - doesn't support 'deopt if branch taken'
      - horrifically complex
      - doesn't support deopt from within try blocks
      
      We actually ran into that last issue (see test from previous commit).  So
      rather than wade in and try to fix old-deopt, just start switching to new-deopt.
      
      (new) deopt works by using the frame introspection features, gathering up all
      the locals, and passing them to the interpreter.
      25ac9de4