1. 03 Jun, 2015 10 commits
    • Kevin Modzelewski's avatar
      Convert several classes to tp_richcompare · 9cb2b9f1
      Kevin Modzelewski authored
      int, long, str, tuple, type
      
      int and long are implemented using tp_compare in CPython,
      which is the old-style comparison method.  I don't really understand
      its semantics which rely on type coercion, and we don't have the
      methods it needs, so just implement it as tp_richcompare for now.
      I think this is still an overall compatibility improvement.
      
      str_richcompare is very odd where we have to do some weird things
      to convince the compiler to produce the best code it can.
      9cb2b9f1
    • Kevin Modzelewski's avatar
      Switch to calling tp_richcompare · 0554a034
      Kevin Modzelewski authored
      The notable places that are changed are PyEq, PyLt, and
      compare/compareInternal.
      
      The old codepaths are still in there (though thankfully
      now with reduced duplication with cpython), since for anything
      that defines a Python-level __lt__, it's better to call that
      with our rewriting support, rather than calling it through
      slot_tp_richcompare.
      
      The control flow is kind of messy, since I don't think we
      know what the right long-term organization is for these kinds of
      things.  But basically, it's:
      - if we can't rewrite, just call the C slot
      - if we can rewrite, and we think calling tp_richcompare is profitable
        (ie it's not slot_tp_richcompare), we call that and emit a call to
        it in the patchpoint
      - otherwise, we try calling the python attribute
      
      Actual conversion of our attributes to tp_richcompare in the next commit.
      0554a034
    • Kevin Modzelewski's avatar
      Merge pull request #579 from kmod/string_allocs · 24140771
      Kevin Modzelewski authored
      Reduce string allocations
      24140771
    • Kevin Modzelewski's avatar
      Minor compareInternal optimization · abd87d35
      Kevin Modzelewski authored
      abd87d35
    • Kevin Modzelewski's avatar
      Get rid of boxString overloads · c44e4dab
      Kevin Modzelewski authored
      and have the compiler pick the best way to convert to StringRef
      
      I was running into some cases where we had StringRefs but would call
      boxString which takes an std::string.  So hopefully this change
      makes things cleaner and (slightly) faster.
      c44e4dab
    • Kevin Modzelewski's avatar
      Switch some more runtime functions to taking StringRefs · a2fe70c2
      Kevin Modzelewski authored
      The motivating one was classLookup(), since this happened
      extremely frequently (once for every old-style instance
      lookup), but I decided to go through and get some others.
      a2fe70c2
    • Kevin Modzelewski's avatar
      I guess sre_parse.parse is slow · c510bb9e
      Kevin Modzelewski authored
      c510bb9e
    • Kevin Modzelewski's avatar
      Merge pull request #578 from toshok/getattr-default-exc · 412730c4
      Kevin Modzelewski authored
      for getattrFunc use getattrInternal instead of getattr
      412730c4
    • Kevin Modzelewski's avatar
      Merge pull request #549 from tjhance/float_pow · 2be06383
      Kevin Modzelewski authored
      Float pow
      2be06383
    • Chris Toshok's avatar
      for getattrFunc use getattrInternal instead of getattr · 1603542c
      Chris Toshok authored
      getattr throws an exception if the attribute is not present.  getattrFunc already throws the same exception (if there isn't a default value passed in).
      1603542c
  2. 02 Jun, 2015 5 commits
    • Kevin Modzelewski's avatar
      Merge pull request #574 from kmod/linkorder · 1eb99619
      Kevin Modzelewski authored
      Add a section-ordering script
      1eb99619
    • Kevin Modzelewski's avatar
      Add some more 'hot functions' · d8e5b7f6
      Kevin Modzelewski authored
      d8e5b7f6
    • Kevin Modzelewski's avatar
      Add a section-ordering script · df5d6491
      Kevin Modzelewski authored
      I think this lets us specify that certain functions should be
      put together at the end of the text segment.
      
      This is inspired by a similar feature of HHVM's build, though the goal
      for us for now is just to improve performance consistency rather
      than overall performance.  Hopefully soon/eventually we can do
      profile-guided sorting like they do.
      df5d6491
    • Kevin Modzelewski's avatar
      Merge pull request #575 from kmod/libunwind_build · c4c58d0d
      Kevin Modzelewski authored
      Fix some issues with the way we build libunwind
      c4c58d0d
    • Kevin Modzelewski's avatar
      Fix some issues with the way we build libunwind · c4063b2e
      Kevin Modzelewski authored
      First, that we would only apply our patchset once.  If we ever revert the
      patches (I'm not sure under what conditions that happens), we previously would
      never apply them again.  Attempted to fix this by adding a special patch that
      adds a new file that CMake looks for; if the file doesn't exist, cmake runs the
      patches again.
      
      Second, that we didn't rebuild libunwind if we apply new patches.
      I'm not sure if there's a good general solution to this, but I was able
      to figure out how to force libunwind to rebuild if we need to rerun the
      patch command.  It took some hacking since CMake doesn't track dependencies
      on external projects, so we have to add some custom dependencies.
      c4063b2e
  3. 01 Jun, 2015 10 commits
  4. 29 May, 2015 11 commits
  5. 28 May, 2015 4 commits