1. 01 Jul, 2016 17 commits
    • titzer's avatar
      [wasm] Dont ship by default. · ac4fdca6
      titzer authored
      R=mstarzinger@chromium.org,bradnelson@chromium.org
      BUG=
      
      Review-Url: https://codereview.chromium.org/2118733003
      Cr-Commit-Position: refs/heads/master@{#37478}
      ac4fdca6
    • danno's avatar
      [turbofan]: Support using push instructions for setting up tail call parameters · bd0d9e7d
      danno authored
      This optimizes the passing of stack parameters in function calls.
      
      For some architectures (ia32/x64), using pushes when possible instead
      of bumping the stack and then storing parameters generates much
      smaller code, and in some cases is faster (e.g. when a push of a memory
      location can implement a memory-to-memory copy and thus elide an
      intermediate load. On others (e.g. ARM), the benefit is smaller, where
      it's only possible to elide direct stack pointer adjustment in certain cases
      or combine multiple register stores into a single instruction in other limited
      situations. On yet other platforms (ARM64, MIPS), there are no push instructions,
      and this optimization isn't used at all.
      
      Ideally, this mechanism would be used for both tail calls and normal calls,
      but "normal" calls are currently pretty efficient, and tail calls are very
      inefficient, so this CL sets the bar low for building a new mechanism to
      handle parameter pushing that only needs to raise the bar on tail calls for now.
      
      The key aspect of this change is that adjustment to the stack pointer
      for tail calls (and perhaps later real calls) is an explicit step separate from
      instruction selection and gap resolution, but aware of both, making it possible
      to safely recognize gap moves that are actually pushes.
      
      Review-Url: https://codereview.chromium.org/2082263002
      Cr-Commit-Position: refs/heads/master@{#37477}
      bd0d9e7d
    • bmeurer's avatar
      [builtins] Unify most of the remaining Math builtins. · 0a0fe8fb
      bmeurer authored
      Import fdlibm versions of acos, acosh, asin and asinh, which are more
      precise and produce the same result across platforms (we were using
      libm versions for asin and acos so far, where both speed and precision
      depended on the operating system so far). Introduce appropriate TurboFan
      operators for these functions and use them both for inlining and for the
      generic builtin.
      
      Also migrate the Math.imul and Math.fround builtins to TurboFan builtins
      to ensure that their behavior is always exactly the same as the inlined
      TurboFan version (i.e. C++ truncation semantics for double to float
      don't necessarily meet the JavaScript semantics).
      
      For completeness, also migrate Math.sign, which can even get some nice
      love in TurboFan.
      
      Drive-by-fix: Some alpha-sorting on the Math related functions, and
      cleanup the list of Math intrinsics that we have to export via the
      native context currently.
      
      BUG=v8:3266,v8:3496,v8:3509,v8:3952,v8:5169,v8:5170,v8:5171,v8:5172
      TBR=rossberg@chromium.org
      R=franzih@chromium.org
      
      Review-Url: https://codereview.chromium.org/2116753002
      Cr-Commit-Position: refs/heads/master@{#37476}
      0a0fe8fb
    • mstarzinger's avatar
      [turbofan] Fix eager bailout point after comma expression. · 920bc17c
      mstarzinger authored
      This ensures no eager bailout point is emitted after a comma expression
      in test context where the right-hand side omitted an eager bailout point
      as well. This is to stay in sync with full-codegen.
      
      R=jarin@chromium.org
      TEST=mjsunit/regress/regress-crbug-624919
      BUG=chromium:624919
      
      Review-Url: https://codereview.chromium.org/2113893004
      Cr-Commit-Position: refs/heads/master@{#37475}
      920bc17c
    • neis's avatar
      [modules] Refactor parsing of anonymous declarations in default exports. · 9f5f3180
      neis authored
      BUG=
      
      Review-Url: https://codereview.chromium.org/2111153002
      Cr-Commit-Position: refs/heads/master@{#37474}
      9f5f3180
    • franzih's avatar
      [builtins] Migrate Math.hypot() to C++ builtins. · fe1a07fe
      franzih authored
      Migrate Math.hypot() from JS to C++ builtins. Use normalization and
      Kahan summation to avoid overflow and rounding errors.
      
      R=bmeurer@chromium.org
      BUG=v8:5165, v8:5086
      LOG=n
      
      Review-Url: https://codereview.chromium.org/2102223005
      Cr-Commit-Position: refs/heads/master@{#37473}
      fe1a07fe
    • zhengxing.li's avatar
      [x87] Enable test cases which failed at know issue that x87 change sNaN to qNaN by default. · 5a2f5c12
      zhengxing.li authored
        Since the workaround (CL 36697 : 22a73e0d) for sNaN issue works, enable those test cases.
      
      BUG=
      
      Review-Url: https://codereview.chromium.org/2114853002
      Cr-Commit-Position: refs/heads/master@{#37472}
      5a2f5c12
    • jgruber's avatar
      [builtins] Fix MathMaxMin on arm and arm64 · b86ac0e0
      jgruber authored
      Both of these were broken in different ways:
      * On arm, the loop counter was passed as argc on the stack.
      * On arm64, we passed argc + 1 instead of argc.
      
      The result in both cases was an incorrect receiver for the builtin frame
      when generating stack traces.
      
      BUG=v8:4815
      R=bmeurer@chromium.org
      
      Review-Url: https://codereview.chromium.org/2112883002
      Cr-Commit-Position: refs/heads/master@{#37471}
      b86ac0e0
    • bradnelson's avatar
      Hooking up asm-wasm conversion. · f20323dc
      bradnelson authored
      Directs 'use asm' traffic through asm-wasm conversion when --validate-asm is passed.
      
      Adds a builtin that handles the fallback to JS.
      
      BUG= https://bugs.chromium.org/p/v8/issues/detail?id=4203
      TEST=asm-wasm
      R=mstarzinger@chromium.org,titzer@chromium.org
      LOG=N
      
      Review-Url: https://codereview.chromium.org/2057403003
      Cr-Commit-Position: refs/heads/master@{#37470}
      f20323dc
    • zhengxing.li's avatar
      X87: [ia32] Fixes a bug in cmpw. · d781b956
      zhengxing.li authored
        port 588e15c0 (r37345)
      
        original commit message:
        The opcodes for 'cmpw r/m16, r16' and 'cmpw r16, r/m16' were swapped, causing a few issues when less than/greater than comparison were performed.
      
        Adds a regression test.
      
      BUG=
      
      Review-Url: https://codereview.chromium.org/2119793002
      Cr-Commit-Position: refs/heads/master@{#37469}
      d781b956
    • zhengxing.li's avatar
      X87: [turbofan] Introduce Float64Pow and NumberPow operators. · 727266fc
      zhengxing.li authored
        port e607e12e (r37323)
      
        original commit message:
        Introduce a new machine operator Float64Pow that for now is backed by
        the existing MathPowStub to start the unification of Math.pow, and at
        the same time address the main performance issue that TurboFan still has
        with the imaging-darkroom benchmark in Kraken.
      
        Also migrate the Math.pow builtin itself to a TurboFan builtin and
        remove a few hundred lines of hand-written platform code for special
        handling of the fullcodegen Math.pow version.
      
      BUG=
      
      Review-Url: https://codereview.chromium.org/2119773003
      Cr-Commit-Position: refs/heads/master@{#37468}
      727266fc
    • v8-autoroll's avatar
      Update V8 DEPS. · 1c1cd34f
      v8-autoroll authored
      Rolling v8/build to c80c063b314ab9cc6c3c5955c7444c2fa514bcec
      
      Rolling v8/buildtools to 454e53abae6e4d68ee992b0a93a4174b75519393
      
      Rolling v8/tools/mb to ea4154b4daca60a5f5c04ef764b7eaf50362250c
      
      TBR=machenbach@chromium.org,vogelheim@chromium.org,hablich@chromium.org
      
      Review-Url: https://codereview.chromium.org/2113243002
      Cr-Commit-Position: refs/heads/master@{#37467}
      1c1cd34f
    • zhengxing.li's avatar
      X87: Reland [heap] Avoid the use of cells to point from code to new-space objects. · 35f3143c
      zhengxing.li authored
        port 5e058540 (r37325)
      
        original commit message:
        The reason for reverting is: This breaks gc-stress bot:
        https://chromegw.corp.google.com/i/client.v8/builders/V8%20Linux64%20GC%20Stress%20-%20custom%20snapshot
      
        Abortion of compaction could cause duplicate entries in the typed-old-to-new remembered set. These duplicates could cause a DCHECK to trigger which checks that slots recorded in the remembered set neve
      
        Original issue's description:
      
        Cells were needed originally because there was no typed remembered set to
        record direct pointers from code space to new space. A previous
        CL (https://codereview.chromium.org/2003553002/) already introduced
        the remembered set, this CL uses it.
      
        This CL
        * stores direct pointers in code objects, even if the target is in new space,
        * records the slot of the pointer in typed-old-to-new remembered set,
        * adds a list which stores weak code-to-new-space references,
        * adds a test to test-heap.cc for weak code-to-new-space references,
        * removes prints in tail-call-megatest.js
      
      BUG=
      
      Review-Url: https://codereview.chromium.org/2112193002
      Cr-Commit-Position: refs/heads/master@{#37466}
      35f3143c
    • bjaideep's avatar
      PPC/s390: [builtins] Unify Cosh, Sinh and Tanh as exports from flibm · ba61ce5b
      bjaideep authored
      Port cede9ce5
      
      R=mvstanton@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com
      
      BUG=v8:5086
      LOG=N
      
      Review-Url: https://codereview.chromium.org/2113193002
      Cr-Commit-Position: refs/heads/master@{#37465}
      ba61ce5b
    • bakkot's avatar
      Revert of Add errors for declarations which conflict with catch parameters.... · 8834d5ec
      bakkot authored
      Revert of Add errors for declarations which conflict with catch parameters. (patchset #6 id:100001 of https://codereview.chromium.org/2109733003/ )
      
      Reason for revert:
      Fuzzer claims `try {  \"\" ; } catch(x) { let x1 = [1,,], x = x; }` causes a crash.
      
      Original issue's description:
      > Add errors for declarations which conflict with catch parameters.
      >
      > Catch parameters are largely treated as lexical declarations in the
      > block which contains their body for the purposes of early syntax errors,
      > with some exceptions outlined in B.3.5. This patch introduces most of
      > those errors, except those from `eval('for (var e of ...);')` inside of
      > a catch with a simple parameter named 'e'.
      >
      > Note that annex B.3.5 allows var declarations to conflict with simple
      > catch parameters, except when the variable declaration is the init of a
      > for-of statement.
      >
      > BUG=v8:5112,v8:4231
      >
      > Committed: https://crrev.com/2907c726b2bb5cf20b2bec639ca9e6a521585406
      > Cr-Commit-Position: refs/heads/master@{#37462}
      
      TBR=littledan@chromium.org
      # Skipping CQ checks because original CL landed less than 1 days ago.
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=v8:5112,v8:4231
      
      Review-Url: https://codereview.chromium.org/2112223002
      Cr-Commit-Position: refs/heads/master@{#37464}
      8834d5ec
    • bbudge's avatar
      [Turbofan] Merge SpillRanges by byte_width rather than kind. · 55841409
      bbudge authored
      - Uses byte_width() to determine if spill ranges can be merged.
      - Modifies InstructionOperand canonicalization to ignore representation for stack slots.
      
      LOG=N
      BUG=v8:4124
      
      Review-Url: https://codereview.chromium.org/2074323002
      Cr-Commit-Position: refs/heads/master@{#37463}
      55841409
    • bakkot's avatar
      Add errors for declarations which conflict with catch parameters. · 2907c726
      bakkot authored
      Catch parameters are largely treated as lexical declarations in the
      block which contains their body for the purposes of early syntax errors,
      with some exceptions outlined in B.3.5. This patch introduces most of
      those errors, except those from `eval('for (var e of ...);')` inside of
      a catch with a simple parameter named 'e'.
      
      Note that annex B.3.5 allows var declarations to conflict with simple
      catch parameters, except when the variable declaration is the init of a
      for-of statement.
      
      BUG=v8:5112,v8:4231
      
      Review-Url: https://codereview.chromium.org/2109733003
      Cr-Commit-Position: refs/heads/master@{#37462}
      2907c726
  2. 30 Jun, 2016 23 commits