1. 10 Mar, 2016 6 commits
    • ahaas's avatar
      [turbofan] Change the way nodes with multiple outputs are verified. · d30af81e
      ahaas authored
      With the original implementation nodes which were not reachable from end
      could cause the verification to fail.
      
      R=titzer@chromium.org, mstarzinger@chromium.org
      
      Review URL: https://codereview.chromium.org/1782863002
      
      Cr-Commit-Position: refs/heads/master@{#34683}
      d30af81e
    • mstarzinger's avatar
      [compiler] Sidestep optimizing of generator resumers. · 85517653
      mstarzinger authored
      This ensures our optimizing compilers as well as the interpreter are
      never tasked with compiling the generator-resuming builtin methods. The
      corresponding intrinsics for those methods are not supported and it is
      not possible to provide a C++ reference implementation for them. We do
      this by assigning builtin function ids to them that we can recognize
      during the compiler dispatch.
      
      Note that this also affects the interpreter, because methods having a
      builtin function id assigned are not interpreted ({function_data} field
      is overlapping). If this ever changes we can still do an early check in
      the compiler dispatch (similar to the optimizing compilers) easily.
      
      This applies to the following methods:
      - Generator.prototype.next (calls Runtime_GeneratorNext).
      - Generator.prototype.return (calls Runtime_GeneratorReturn).
      - Generator.prototype.throw (calls Runtime_GeneratorThrow).
      
      R=neis@chromium.org
      BUG=v8:4681
      LOG=n
      
      Review URL: https://codereview.chromium.org/1779123003
      
      Cr-Commit-Position: refs/heads/master@{#34675}
      85517653
    • rossberg's avatar
      [strong] Remove all remainders of strong mode · 4614c7ca
      rossberg authored
      R=mstarzinger@chromium.org,bmeurer@chromium.org,adamk@chromium.org
      BUG=v8:3956
      LOG=Y
      
      Review URL: https://codereview.chromium.org/1773653002
      
      Cr-Commit-Position: refs/heads/master@{#34669}
      4614c7ca
    • epertoso's avatar
      Marks the label associated with the runtime call in CodeStubAssembler::Allocate as deferred. · 7fea25f0
      epertoso authored
      BUG=593359
      LOG=y
      
      Review URL: https://codereview.chromium.org/1779713005
      
      Cr-Commit-Position: refs/heads/master@{#34666}
      7fea25f0
    • zhengxing.li's avatar
      X87: [wasm] Int64Lowering of I64ShrU and I64ShrS on ia32. · 25279332
      zhengxing.li authored
        port 240b7db9 (r34630)
      
        original commit message:
        I implemented I64ShrU and I64ShrS the same as I64Shl in https://codereview.chromium.org/1756863002
      
      BUG=
      
      Review URL: https://codereview.chromium.org/1783703003
      
      Cr-Commit-Position: refs/heads/master@{#34656}
      25279332
    • zhengxing.li's avatar
      X87: [runtime] Unify and simplify how frames are marked. · 7a51f8c8
      zhengxing.li authored
        port 9dcd0857 (r34571)
      
        original commit message:
        Before this CL, various code stubs used different techniques
        for marking their frames to enable stack-crawling and other
        access to data in the frame. All of them were based on a abuse
        of the "standard" frame representation, e.g. storing the a
        context pointer immediately below the frame's fp, and a
        function pointer after that. Although functional, this approach
        tends to make stubs and builtins do an awkward, unnecessary
        dance to appear like standard frames, even if they have
        nothing to do with JavaScript execution.
      
        This CL attempts to improve this by:
      
        * Ensuring that there are only two fundamentally different
          types of frames, a "standard" frame and a "typed" frame.
          Standard frames, as before, contain both a context and
          function pointer. Typed frames contain only a minimum
          of a smi marker in the position immediately below the fp
          where the context is in standard frames.
        * Only interpreted, full codegen, and optimized Crankshaft and
          TurboFan JavaScript frames use the "standard" format. All
          other frames use the type frame format with an explicit
          marker.
        * Typed frames can contain one or more values below the
          type marker. There is new magic macro machinery in
          frames.h that simplifies defining the offsets of these fields
          in typed frames.
        * A new flag in the CallDescriptor enables specifying whether
          a frame is a standard frame or a typed frame. Secondary
          register location spilling is now only enabled for standard
          frames.
        * A zillion places in the code have been updated to deal with
          the fact that most code stubs and internal frames use the
          typed frame format. This includes changes in the
          deoptimizer, debugger, and liveedit.
        * StandardFrameConstants::kMarkerOffset is deprecated,
          (CommonFrameConstants::kContextOrFrameTypeOffset
          and StandardFrameConstants::kFrameOffset are now used
          in its stead).
      
      BUG=
      
      Review URL: https://codereview.chromium.org/1774353002
      
      Cr-Commit-Position: refs/heads/master@{#34648}
      7a51f8c8
  2. 09 Mar, 2016 10 commits
    • mbrandy's avatar
      PPC: [runtime] Unify and simplify how frames are marked · 4445c095
      mbrandy authored
      Port 9dcd0857
      
      Original commit message:
          Before this CL, various code stubs used different techniques
          for marking their frames to enable stack-crawling and other
          access to data in the frame. All of them were based on a abuse
          of the "standard" frame representation, e.g. storing the a
          context pointer immediately below the frame's fp, and a
          function pointer after that. Although functional, this approach
          tends to make stubs and builtins do an awkward, unnecessary
          dance to appear like standard frames, even if they have
          nothing to do with JavaScript execution.
      
          This CL attempts to improve this by:
      
          * Ensuring that there are only two fundamentally different
            types of frames, a "standard" frame and a "typed" frame.
            Standard frames, as before, contain both a context and
            function pointer. Typed frames contain only a minimum
            of a smi marker in the position immediately below the fp
            where the context is in standard frames.
          * Only interpreted, full codegen, and optimized Crankshaft and
            TurboFan JavaScript frames use the "standard" format. All
            other frames use the type frame format with an explicit
            marker.
          * Typed frames can contain one or more values below the
            type marker. There is new magic macro machinery in
            frames.h that simplifies defining the offsets of these fields
            in typed frames.
          * A new flag in the CallDescriptor enables specifying whether
            a frame is a standard frame or a typed frame. Secondary
            register location spilling is now only enabled for standard
            frames.
          * A zillion places in the code have been updated to deal with
            the fact that most code stubs and internal frames use the
            typed frame format. This includes changes in the
            deoptimizer, debugger, and liveedit.
          * StandardFrameConstants::kMarkerOffset is deprecated,
            (CommonFrameConstants::kContextOrFrameTypeOffset
            and StandardFrameConstants::kFrameOffset are now used
            in its stead).
      
      R=danno@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
      BUG=
      
      Review URL: https://codereview.chromium.org/1778713002
      
      Cr-Commit-Position: refs/heads/master@{#34643}
      4445c095
    • binji's avatar
      [wasm] All strings are length-prefixed and inline · ca0dbaec
      binji authored
      R=titzer@chromium.org
      
      Review URL: https://codereview.chromium.org/1781523002
      
      Cr-Commit-Position: refs/heads/master@{#34637}
      ca0dbaec
    • ahaas's avatar
      [wasm] Int64Lowering of I64ShrU and I64ShrS on ia32. · 240b7db9
      ahaas authored
      I implemented I64ShrU and I64ShrS the same as I64Shl in https://codereview.chromium.org/1756863002
      
      R=titzer@chromium.org
      
      Review URL: https://codereview.chromium.org/1768233002
      
      Cr-Commit-Position: refs/heads/master@{#34630}
      240b7db9
    • ahaas's avatar
      [wasm] Int64Lowering of I64XConvertI32. · d7ddd35c
      ahaas authored
      R=titzer@chromium.org
      
      Review URL: https://codereview.chromium.org/1776613002
      
      Cr-Commit-Position: refs/heads/master@{#34629}
      d7ddd35c
    • vogelheim's avatar
      Rework CallApi*Stubs. · 5096492f
      vogelheim authored
      - Eliminate stubs with a variable number of arguments.
        (That only worked due to their very limited use. These
         stubs' interface descriptors were basically lying
         about their number of args, which will fail when used
         generically.)
      - Fix all CallApi*Stubs' interface descriptors to no
        longer lie about their arguments.
      - Unify CallApi*Stub, for * in Function, Accessor,
        FunctionWithFixedArgs.
        (Since these are now all doing the same thing.)
      - Rename the unified stub (and interface descriptors) to
        *ApiCallback*, since that's really what they're doing.
      - Refuse inlining an API callback if its number of
        parameters exceeds the supported number of args.
      
      BUG=
      
      Committed: https://crrev.com/d238b953a474272c0e3ea22ef6a9b63fa9729340
      Cr-Commit-Position: refs/heads/master@{#34614}
      
      Review URL: https://codereview.chromium.org/1748123003
      
      Cr-Commit-Position: refs/heads/master@{#34627}
      5096492f
    • vogelheim's avatar
      Revert of Rework CallApi*Stubs. (patchset #5 id:100001 of... · 52a741d1
      vogelheim authored
      Revert of Rework CallApi*Stubs. (patchset #5 id:100001 of https://codereview.chromium.org/1748123003/ )
      
      Reason for revert:
      Breaks Chromium.
      
      Original issue's description:
      > Rework CallApi*Stubs.
      >
      > - Eliminate stubs with a variable number of arguments.
      >   (That only worked due to their very limited use. These
      >    stubs' interface descriptors were basically lying
      >    about their number of args, which will fail when used
      >    generically.)
      > - Fix all CallApi*Stubs' interface descriptors to no
      >   longer lie about their arguments.
      > - Unify CallApi*Stub, for * in Function, Accessor,
      >   FunctionWithFixedArgs.
      >   (Since these are now all doing the same thing.)
      > - Rename the unified stub (and interface descriptors) to
      >   *ApiCallback*, since that's really what they're doing.
      > - Refuse inlining an API callback if its number of
      >   parameters exceeds the supported number of args.
      >
      > BUG=
      >
      > Committed: https://crrev.com/d238b953a474272c0e3ea22ef6a9b63fa9729340
      > Cr-Commit-Position: refs/heads/master@{#34614}
      
      TBR=danno@chromium.org,jkummerow@chromium.org,mstarzinger@chromium.org
      # Skipping CQ checks because original CL landed less than 1 days ago.
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=
      
      Review URL: https://codereview.chromium.org/1775933005
      
      Cr-Commit-Position: refs/heads/master@{#34624}
      52a741d1
    • jarin's avatar
      [turbofan] Fix deoptimization stack layout for fast literal comparisons. · 69c84fe4
      jarin authored
      BUG=chromium:592341
      LOG=n
      
      Review URL: https://codereview.chromium.org/1776013002
      
      Cr-Commit-Position: refs/heads/master@{#34615}
      69c84fe4
    • vogelheim's avatar
      Rework CallApi*Stubs. · d238b953
      vogelheim authored
      - Eliminate stubs with a variable number of arguments.
        (That only worked due to their very limited use. These
         stubs' interface descriptors were basically lying
         about their number of args, which will fail when used
         generically.)
      - Fix all CallApi*Stubs' interface descriptors to no
        longer lie about their arguments.
      - Unify CallApi*Stub, for * in Function, Accessor,
        FunctionWithFixedArgs.
        (Since these are now all doing the same thing.)
      - Rename the unified stub (and interface descriptors) to
        *ApiCallback*, since that's really what they're doing.
      - Refuse inlining an API callback if its number of
        parameters exceeds the supported number of args.
      
      BUG=
      
      Review URL: https://codereview.chromium.org/1748123003
      
      Cr-Commit-Position: refs/heads/master@{#34614}
      d238b953
    • ishell's avatar
      [turbofan] [deoptimizer] Support inlining of ES6 tail calls. · c29a4560
      ishell authored
      In case when F was called with incompatible number of arguments (and therefore
      the arguments adator frame was created), F inlines a tail call of G which then
      deopts the deoptimizer should also remove the arguments adaptor frame for F.
      
      This CL adds required machinery to the deoptimizer.
      
      BUG=v8:4698
      LOG=N
      
      Review URL: https://codereview.chromium.org/1768263004
      
      Cr-Commit-Position: refs/heads/master@{#34610}
      c29a4560
    • jarin's avatar
      [turbofan] Fix register constraint for memory barrier. · 9867a8a2
      jarin authored
      After fixing the memory barrier for maps (https://codereview.chromium.org/1714513003), we are using a temp register for the map case. The temp register should not be aliased with the stored value (otherwise we perform the mem barrier check with a wrong value). This CL makes sure it is not aliased.
      
      BUG=chromium:590074
      LOG=n
      
      Review URL: https://codereview.chromium.org/1775083002
      
      Cr-Commit-Position: refs/heads/master@{#34607}
      9867a8a2
  3. 08 Mar, 2016 11 commits
    • verwaest's avatar
      Don't do any special normalization if a boilerplate contains function literals. · fd405704
      verwaest authored
      This mechanism was used to ensure that functions ended up as constants on the map of prototypes defined using object literals, e.g.,:
      
      function.prototype = {
        method: function() { ... }
      }
      
      Nowadays we treat prototypes specially, and make all their functions constants when an object turns prototype. Hence this special custom code isn't necessary anymore.
      
      This also affects boilerplates that do not become prototypes. Their functions will not be constants but fields instead. Calling their methods will slow down. However, multiple instances of the same boilerplate will stay monomorphic. We'll have to see what the impact is for such objects, but preliminary benchmarks do not show this as an important regression.
      
      BUG=chromium:593008
      LOG=n
      
      Review URL: https://codereview.chromium.org/1772423002
      
      Cr-Commit-Position: refs/heads/master@{#34602}
      fd405704
    • titzer's avatar
      [wasm] Support a two-level namespace for imports. · d61a0c5a
      titzer authored
      R=binji@chromium.org,dschuff@chromium.org
      BUG=
      
      Review URL: https://codereview.chromium.org/1780483002
      
      Cr-Commit-Position: refs/heads/master@{#34600}
      d61a0c5a
    • mstarzinger's avatar
      [turbofan] Thread through object boilerplate length. · f7934b64
      mstarzinger authored
      This adds the number of properties to be expected within the boilerplate
      object for object literals to the TurboFan IR. The reason is that this
      length can no longer be easily inferred from just the constants array.
      The length is potentially non-zero for empty object literals and might
      also diverge in the presence of constant functions or duplicate property
      names.
      
      For future safety and for symmetry reasons, the same change was applied
      to array literals as well, even though inferring the length from the
      constant elements is still possible there.
      
      R=verwaest@chromium.org
      BUG=chromium:593008
      LOG=n
      
      Review URL: https://codereview.chromium.org/1772803003
      
      Cr-Commit-Position: refs/heads/master@{#34594}
      f7934b64
    • zhengxing.li's avatar
      X87: [turbofan] Further fixing ES6 tail call elimination in Turbofan. · 26abfc50
      zhengxing.li authored
        port 2aae579c (r34566)
      
        original commit message:
        In case when F tail calls G we should also remove the potential arguments adaptor frame for F.
      
        This CL introduces two new machine instructions ArchTailCallCodeObjectFromJSFunction and ArchTailCallJSFunctionFromJSFunction which (unlike existing ArchTailCallCodeObject and ArchTailCallJSFunction)
        also drop arguments adaptor frame if it exists right before jumping to the target function.
      
      BUG=
      
      Review URL: https://codereview.chromium.org/1777563002
      
      Cr-Commit-Position: refs/heads/master@{#34593}
      26abfc50
    • zhengxing.li's avatar
      X87: [wasm] Int64Lowering of I64Shl on ia32. · 8f506ac6
      zhengxing.li authored
        port ddc626e1 (r34546)
      
        original commit message:
        I64Shl is lowered to a new turbofan operator, WasmWord64Shl. The new
        operator takes 3 inputs, the low-word input, the high-word input, and
        the shift, and produces 2 output, the low-word output and the high-word
        output.
      
        At the moment I implemented the lowering only for ia32, but I think the
        CL is already big enough. I will add the other platforms in separate
        CLs.
      
      BUG=
      
      Review URL: https://codereview.chromium.org/1773083002
      
      Cr-Commit-Position: refs/heads/master@{#34591}
      8f506ac6
    • mbrandy's avatar
      PPC: [turbofan] Further fixing ES6 tail call elimination in Turbofan. · fcaa643d
      mbrandy authored
      Port 2aae579c
      
      Original commit message:
          In case when F tail calls G we should also remove the potential arguments adaptor frame for F.
      
          This CL introduces two new machine instructions ArchTailCallCodeObjectFromJSFunction and
          ArchTailCallJSFunctionFromJSFunction which (unlike existing ArchTailCallCodeObject and
          ArchTailCallJSFunction) also drop arguments adaptor frame if it exists right before jumping
          to the target function.
      
      R=ishell@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
      BUG=v8:4698
      LOG=N
      
      Review URL: https://codereview.chromium.org/1773053002
      
      Cr-Commit-Position: refs/heads/master@{#34589}
      fcaa643d
    • mbrandy's avatar
      PPC: [wasm] Int64Lowering of I64Shl. · e36eba88
      mbrandy authored
      Port ddc626e1
      
      Original commit message:
          I64Shl is lowered to a new turbofan operator, WasmWord64Shl. The new
          operator takes 3 inputs, the low-word input, the high-word input, and
          the shift, and produces 2 output, the low-word output and the high-word
          output.
      
      R=ahaas@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
      BUG=
      
      Review URL: https://codereview.chromium.org/1765383004
      
      Cr-Commit-Position: refs/heads/master@{#34588}
      e36eba88
    • ahaas's avatar
      [wasm] Some cleanup in the Int64Lowering. · 7634d1aa
      ahaas authored
      I removed some stale comments and added a missing unit test.
      
      R=titzer@chromium.org
      
      Review URL: https://codereview.chromium.org/1772843003
      
      Cr-Commit-Position: refs/heads/master@{#34586}
      7634d1aa
    • ahaas's avatar
      [wasm] Use MachineOperatorBuilder::word() instead of kPointerSize to determine the word size. · 4122df26
      ahaas authored
      R=titzer@chromium.org
      
      Review URL: https://codereview.chromium.org/1770333002
      
      Cr-Commit-Position: refs/heads/master@{#34581}
      4122df26
    • danno's avatar
      [runtime] Unify and simplify how frames are marked · 9dcd0857
      danno authored
      Before this CL, various code stubs used different techniques
      for marking their frames to enable stack-crawling and other
      access to data in the frame. All of them were based on a abuse
      of the "standard" frame representation, e.g. storing the a
      context pointer immediately below the frame's fp, and a
      function pointer after that. Although functional, this approach
      tends to make stubs and builtins do an awkward, unnecessary
      dance to appear like standard frames, even if they have
      nothing to do with JavaScript execution.
      
      This CL attempts to improve this by:
      
      * Ensuring that there are only two fundamentally different
        types of frames, a "standard" frame and a "typed" frame.
        Standard frames, as before, contain both a context and
        function pointer. Typed frames contain only a minimum
        of a smi marker in the position immediately below the fp
        where the context is in standard frames.
      * Only interpreted, full codegen, and optimized Crankshaft and
        TurboFan JavaScript frames use the "standard" format. All
        other frames use the type frame format with an explicit
        marker.
      * Typed frames can contain one or more values below the
        type marker. There is new magic macro machinery in
        frames.h that simplifies defining the offsets of these fields
        in typed frames.
      * A new flag in the CallDescriptor enables specifying whether
        a frame is a standard frame or a typed frame. Secondary
        register location spilling is now only enabled for standard
        frames.
      * A zillion places in the code have been updated to deal with
        the fact that most code stubs and internal frames use the
        typed frame format. This includes changes in the
        deoptimizer, debugger, and liveedit.
      * StandardFrameConstants::kMarkerOffset is deprecated,
        (CommonFrameConstants::kContextOrFrameTypeOffset
        and StandardFrameConstants::kFrameOffset are now used
        in its stead).
      
      LOG=N
      
      Review URL: https://codereview.chromium.org/1696043002
      
      Cr-Commit-Position: refs/heads/master@{#34571}
      9dcd0857
    • ishell's avatar
      [turbofan] Further fixing ES6 tail call elimination in Turbofan. · 2aae579c
      ishell authored
      In case when F tail calls G we should also remove the potential arguments adaptor frame for F.
      
      This CL introduces two new machine instructions ArchTailCallCodeObjectFromJSFunction and ArchTailCallJSFunctionFromJSFunction which (unlike existing ArchTailCallCodeObject and ArchTailCallJSFunction) also drop arguments adaptor frame if it exists right before jumping to the target function.
      
      BUG=v8:4698
      LOG=N
      
      Review URL: https://codereview.chromium.org/1702423002
      
      Cr-Commit-Position: refs/heads/master@{#34566}
      2aae579c
  4. 07 Mar, 2016 4 commits
  5. 04 Mar, 2016 8 commits
  6. 03 Mar, 2016 1 commit
    • bmeurer's avatar
      [compiler] Initial TurboFan code stubs for abstract relational comparison. · 62bc168d
      bmeurer authored
      This adds new code stubs for abstract relational comparison,
      namely LessThanStub, LessThanOrEqualStub, GreaterThanStub and
      GreaterThanOrEqualStub, and hooks them up for Ignition and TurboFan.
      These stubs implement the full compare operation without any
      unpredictable bailouts. Currently they still go to C++ for string
      comparisons, and also use the %ToPrimitive_Number runtime entry, as
      we still lack a stub for the ToPrimitive operation. These issues
      will be addressed separately in follow-up CLs.
      
      Drive-by-fix: Add support for deferred code in the RawMachineAssembler
      and CodeStubAssembler. A block can be marked as deferred by marking its
      Label as deferred, which will then make the register allocator penalize
      this block and prefer better register assignments for the other blocks.
      
      R=epertoso@chromium.org
      
      Review URL: https://codereview.chromium.org/1759133002
      
      Cr-Commit-Position: refs/heads/master@{#34463}
      62bc168d