1. 09 Feb, 2017 1 commit
    • bmeurer's avatar
      [turbofan] Utilize the fact that empty string is canonicalized. · cd9724d4
      bmeurer authored
      Since the empty string is canonical HeapObject now, we can use
      this fact to optimize
      
        - strict equality comparisons with the empty string to a
          simple ReferenceEqual operation, and
        - optimize ToBoolean to avoid instance type checks completely.
      
      Drive-by-fix: Allow InternalizedString for Type::HeapConstant
      in the type system. This is safe, since InternalizedStrings
      can be compared to other heap constants by reference (except
      for non-InternalizedStrings, which are excluded from the
      HeapConstant type).
      
      BUG=v8:5267
      R=yangguo@chromium.org
      
      Review-Url: https://codereview.chromium.org/2681273002
      Cr-Commit-Position: refs/heads/master@{#43050}
      cd9724d4
  2. 01 Feb, 2017 2 commits
  3. 30 Jan, 2017 1 commit
  4. 27 Jan, 2017 2 commits
    • bmeurer's avatar
      [turbofan] Introduce dedicated StringIndexOf operator. · b975441e
      bmeurer authored
      The StringIndexOf operation is pure on the JS level, but the actual stub
      call must be in the effect chain later so that the Scheduler doesn't
      place it inside some allocation region (The %StringIndexOf runtime
      function may trigger a GC for string flattening).
      
      BUG=chromium:685580
      R=jarin@chromium.org
      
      Review-Url: https://codereview.chromium.org/2657243002
      Cr-Commit-Position: refs/heads/master@{#42736}
      b975441e
    • yangguo's avatar
      [liveedit] reimplement frame restarting. · 3f47c63d
      yangguo authored
      Previously, when restarting a frame, we would rewrite all frames
      between the debugger activation and the frame to restart to squash
      them, and replace the return address with that of a builtin to
      leave that rewritten frame, and restart the function by calling it.
      
      We now simply remember the frame to drop to, and upon returning
      from the debugger, we check whether to drop the frame, load the
      new FP, and restart the function.
      
      R=jgruber@chromium.org, mstarzinger@chromium.org
      BUG=v8:5587
      
      Review-Url: https://codereview.chromium.org/2636913002
      Cr-Commit-Position: refs/heads/master@{#42725}
      3f47c63d
  5. 26 Jan, 2017 2 commits
    • bmeurer's avatar
      [turbofan] Assign proper type to Object.prototype.toString(). · ec00a78f
      bmeurer authored
      BUG=v8:5267
      R=jarin@chromium.org
      
      Review-Url: https://codereview.chromium.org/2652273003
      Cr-Commit-Position: refs/heads/master@{#42691}
      ec00a78f
    • bmeurer's avatar
      [turbofan] Introduce JSCallForwardVarargs operator. · 69747e26
      bmeurer authored
      We turn a JSCallFunction node for
      
        f.apply(receiver, arguments)
      
      into a JSCallForwardVarargs node, when the arguments refers to the
      arguments of the outermost optimized code object, i.e. not an inlined
      arguments, and the apply method refers to Function.prototype.apply,
      and there's no other user of arguments except in frame states.
      
      We also replace the arguments node in the graph with a marker for
      the Deoptimizer similar to Crankshaft to make sure we don't materialize
      unused arguments just for the sake of deoptimization. We plan to replace
      this with a saner EscapeAnalysis based solution soon.
      
      R=jarin@chromium.org
      BUG=v8:5267,v8:5726
      
      Review-Url: https://codereview.chromium.org/2655233002
      Cr-Commit-Position: refs/heads/master@{#42680}
      69747e26
  6. 23 Jan, 2017 1 commit
  7. 20 Jan, 2017 2 commits
    • bmeurer's avatar
      [turbofan] Assign proper types to various builtins. · f23819ef
      bmeurer authored
      Let the Typer assign proper types to Map, Set, WeakMap and WeakSet
      builtins. Also assign a proper type to Array.isArray, Object.assign
      and Object.create.
      
      R=yangguo@chromium.org
      
      Review-Url: https://codereview.chromium.org/2640783006
      Cr-Commit-Position: refs/heads/master@{#42535}
      f23819ef
    • bmeurer's avatar
      [turbofan] Properly implement %_ClassOf intrinsic. · 3e407093
      bmeurer authored
      The %_ClassOf intrinsic roughly corresponds to the deprecated ES5
      [[Class]] internal property, and should not be used anymore ideally.
      However since we still have quite a couple of uses of this intrinsic
      in the self hosted JavaScript builtins, we would tank some builtins
      like Map, Set, WeakMap, WeakSet, etc. quite significantly unless we
      also support this intrinsic until the builtins are all migrated to
      C++/CSA builtins.
      
      R=yangguo@chromium.org
      BUG=v8:5267
      
      Review-Url: https://codereview.chromium.org/2647833004
      Cr-Commit-Position: refs/heads/master@{#42530}
      3e407093
  8. 19 Jan, 2017 2 commits
  9. 18 Jan, 2017 1 commit
  10. 02 Jan, 2017 1 commit
  11. 22 Dec, 2016 1 commit
    • bmeurer's avatar
      [turbofan] Introduce a dedicated StringCharAt operator. · 05f5ebce
      bmeurer authored
      Previously String element access and String.prototype.charAt were
      lowered to a subgraph StringFromCharCode(StringCharCodeAt(s, k)),
      however that can be fairly expensive both runtime and compile time
      wise. The dedicated StringCharAt operator is implemented via a call
      to a builtin that does exactly this.
      
      R=yangguo@chromium.org
      
      Review-Url: https://codereview.chromium.org/2599683002
      Cr-Commit-Position: refs/heads/master@{#41909}
      05f5ebce
  12. 19 Dec, 2016 1 commit
  13. 15 Dec, 2016 1 commit
    • ahaas's avatar
      [wasm] Introduce the TrapIf and TrapUnless operators to generate trap code. · 7bd61b60
      ahaas authored
      Some instructions in WebAssembly trap for some inputs, which means that the
      execution is terminated and (at least at the moment) a JavaScript exception is
      thrown. Examples for traps are out-of-bounds memory accesses, or integer
      divisions by zero.
      
      Without the TrapIf and TrapUnless operators trap check in WebAssembly introduces 5
      TurboFan nodes (branch, if_true, if_false, trap-reason constant, trap-position
      constant), in addition to the trap condition itself. Additionally, each
      WebAssembly function has four TurboFan nodes (merge, effect_phi, 2 phis) whose
      number of inputs is linear to the number of trap checks in the function.
      Especially for functions with high numbers of trap checks we observe a
      significant slowdown in compilation time, down to 0.22 MiB/s in the sqlite
      benchmark instead of the average of 3 MiB/s in other benchmarks. By introducing
      a TrapIf common operator only a single node is necessary per trap check, in
      addition to the trap condition. Also the nodes which are shared between trap
      checks (merge, effect_phi, 2 phis) would disappear. First measurements suggest a
      speedup of 30-50% on average.
      
      This CL only implements TrapIf and TrapUnless on x64. The implementation is also
      hidden behind the --wasm-trap-if flag.
      
      Please take a special look at how the source position is transfered from the
      instruction selector to the code generator, and at the context that is used for
      the runtime call.
      
      R=titzer@chromium.org
      
      Review-Url: https://codereview.chromium.org/2562393002
      Cr-Commit-Position: refs/heads/master@{#41720}
      7bd61b60
  14. 12 Dec, 2016 1 commit
  15. 08 Dec, 2016 1 commit
  16. 29 Nov, 2016 1 commit
    • bmeurer's avatar
      [turbofan] Add appropriate types to express Callable. · 777e142c
      bmeurer authored
      This introduces three new types OtherCallable, CallableProxy (and OtherProxy),
      and BoundFunction to make it possible to express Callable in the Type system.
      It also forces all undetectable receivers to be Callable, which matches the
      use case for undetectable, namely document.all (guarded by proper checks and
      tests).
      
      It also uses these new types to properly optimize instanceof (indirectly via
      OrdinaryHasInstance) based on the type of the constructor and the object. So
      we are able to constant-fold certain instanceof expressions based on types
      and completely avoid the builtin call.
      
      R=jarin@chromium.org
      BUG=v8:5267
      
      Review-Url: https://codereview.chromium.org/2535753004
      Cr-Commit-Position: refs/heads/master@{#41345}
      777e142c
  17. 28 Nov, 2016 1 commit
  18. 27 Nov, 2016 1 commit
  19. 24 Nov, 2016 2 commits
  20. 21 Nov, 2016 2 commits
  21. 18 Nov, 2016 2 commits
  22. 14 Nov, 2016 1 commit
  23. 11 Nov, 2016 1 commit
    • bmeurer's avatar
      [turbofan] Introduce an ExternalPointer type. · 7d24f1ae
      bmeurer authored
      This adds a new ExternalPointer type, which is an Internal type that is
      used for ExternalReferences and other pointer values, like the pointers
      into the asm.js heap. It also adds a PointerConstant operator, which we
      use to represents these raw constants (we can probably remove that
      particular operator again once WebAssembly ships with the validator).
      
      R=mvstanton@chromium.org
      BUG=v8:5267,v8:5270
      
      Review-Url: https://codereview.chromium.org/2494753003
      Cr-Commit-Position: refs/heads/master@{#40923}
      7d24f1ae
  24. 10 Nov, 2016 2 commits
  25. 08 Nov, 2016 1 commit
    • bmeurer's avatar
      [turbofan] Introduce TypedObjectState common operator. · a5d251de
      bmeurer authored
      This adds a new TypedObjectState operator, which is a version of
      ObjectState that carries along MachineTypes for the inputs, so we
      can tell the deoptimizer how to interpret the inputs, instead of
      having to force everything to Tagged.
      
      Drive-by-fix: Remove the unused id parameter from ObjectState.
      
      R=tebbi@chromium.org
      BUG=v8:5609
      
      Review-Url: https://codereview.chromium.org/2488623002
      Cr-Commit-Position: refs/heads/master@{#40832}
      a5d251de
  26. 02 Nov, 2016 1 commit
  27. 25 Oct, 2016 1 commit
    • jgruber's avatar
      [regexp] Remove unused code · 77ddcfb3
      jgruber authored
      This CL removes code that is now unused since the port of regexp.js has been
      completed. Removed functions / classes are:
      
      * regexp.js (GetSubstitution moved to string.js)
      * RegExpConstructResult stub
      * RegExpFlags intrinsic
      * RegExpSource intrinsic
      * RegExpInitializeAndCompile runtime function
      
      BUG=v8:5339
      
      Review-Url: https://codereview.chromium.org/2448463002
      Cr-Commit-Position: refs/heads/master@{#40547}
      77ddcfb3
  28. 18 Oct, 2016 2 commits
  29. 13 Oct, 2016 1 commit
  30. 11 Oct, 2016 1 commit