1. 02 Dec, 2015 1 commit
    • danno's avatar
      [stubs] A new approach to TF stubs · 3e7e3ed7
      danno authored
      * Add a sibling interface to InterpreterAssembler called
        CodeStubAssembler which provides a wrapper around the
        RawMachineAssembler and is intented to make it easy to build
        efficient cross-platform code stubs. Much of the implementation
        of CodeStubAssembler is shamelessly stolen from the
        InterpreterAssembler, and the idea is to eventually merge the
        two interfaces somehow, probably moving the
        InterpreterAssembler interface over to use the
        CodeStubAssembler. Short-term, however, the two interfaces
        shall remain decoupled to increase our velocity developing the
        two systems in parallel.
      * Implement the StringLength stub in TurboFan with the new
        CodeStubAssembler. Replace and remove the old Hydrogen-stub
        version.
      * Remove a whole slew of machinery to support JavaScript-style
        code stub generation, since it ultimately proved unwieldy,
        brittle and baroque. This cleanup includes removing the shared
        code stub context, several example stubs and a tangle of build
        file changes.
      
      BUG=v8:4587
      LOG=n
      
      Review URL: https://codereview.chromium.org/1475953002
      
      Cr-Commit-Position: refs/heads/master@{#32508}
      3e7e3ed7
  2. 01 Dec, 2015 1 commit
  3. 25 Nov, 2015 1 commit
    • bmeurer's avatar
      [runtime] First step to sanitize regexp literal creation. · 09b44428
      bmeurer authored
      This is the initial step towards refactoring the regexp literation
      creation code to make it less obscure and more similar to the mechanism
      we use to create array and object literals.  There's now a new runtime
      entry %CreateRegExpLiteral with the same interface as the entries for
      array and object literals, except that we still pass the flags as
      string.
      
      Instead of embedding the hand written native to clone JSRegExp instances
      we now have a FastCloneRegExpStub, which behaves similar to the other
      FastCloneShallowArrayStub and FastCloneShallowObjectStub that we already
      had.
      
      R=mlippautz@chromium.org, yangguo@chromium.org
      
      Review URL: https://codereview.chromium.org/1475823003
      
      Cr-Commit-Position: refs/heads/master@{#32255}
      09b44428
  4. 23 Nov, 2015 1 commit
    • bmeurer's avatar
      [builtins] Sanitize the machinery around Construct calls. · 374b6ea2
      bmeurer authored
      There's no point in collecting feedback for super constructor calls,
      because in all (interesting) cases we can gather (better) feedback from
      other sources (i.e. via inlining or via using a LOAD_IC to get to the
      [[Prototype]] of the target).  So CallConstructStub is now only used
      for new Foo(...args) sites where we want to collect feedback in the
      baseline compiler.  The optimizing compilers, Reflect.construct and
      super constructor calls use the Construct builtin directly, which allows
      us to remove some weird code from the CallConstructStub (and opens the
      possibility for more code sharing with the CallICStub, maybe even going
      for a ConstructICStub).
      
      Also remove the 100% redundant HCallNew instruction, which is just a
      wrapper for the Construct builtin anyway (indirectly via the
      CallConstructStub).
      
      Drive-by-fix: Drop unused has_function_cache bit on Code objects.
      
      R=mstarzinger@chromium.org, yangguo@chromium.org
      BUG=v8:4413, v8:4430
      LOG=n
      
      Review URL: https://codereview.chromium.org/1469793002
      
      Cr-Commit-Position: refs/heads/master@{#32172}
      374b6ea2
  5. 19 Nov, 2015 1 commit
    • mstarzinger's avatar
      [turbofan] Pass new.target to arguments adaptor trampoline. · c0356f1f
      mstarzinger authored
      This changes the interface descriptor for the arguments adaptor to also
      contain an explicit register for the new.target value. Note that the
      stub still clobbers the register for now.
      
      This is a preparatory CL to allows us passing new.target in a register
      instead of via a side-channel through the construct stub frame.
      
      R=bmeurer@chromium.org
      BUG=v8:4544
      LOG=n
      
      Review URL: https://codereview.chromium.org/1457313002
      
      Cr-Commit-Position: refs/heads/master@{#32117}
      c0356f1f
  6. 17 Nov, 2015 1 commit
  7. 19 Oct, 2015 1 commit
  8. 16 Oct, 2015 1 commit
  9. 15 Oct, 2015 3 commits
  10. 12 Oct, 2015 1 commit
  11. 02 Oct, 2015 5 commits
    • rmcilroy's avatar
      [Interpreter] Add CallRuntime support to the interpreter. · 75f6ad74
      rmcilroy authored
      Adds support for calling runtime functions from the interpreter. Adds the
      CallRuntime bytecode which takes a Runtime::FunctionId of the function to call
      and the arguments in sequential registers. Adds a InterpreterCEntry builtin
      to enable the interpreter to enter C++ code based on the functionId.
      
      Also renames Builtin::PushArgsAndCall to Builtin::InterpreterPushArgsAndCall
      and groups all the interpreter builtins together.
      
      BUG=v8:4280
      LOG=N
      
      Review URL: https://codereview.chromium.org/1362383002
      
      Cr-Commit-Position: refs/heads/master@{#31089}
      75f6ad74
    • rmcilroy's avatar
      Revert of [Interpreter] Add CallRuntime support to the interpreter. (patchset... · b4a2f656
      rmcilroy authored
      Revert of [Interpreter] Add CallRuntime support to the interpreter. (patchset #8 id:220001 of https://codereview.chromium.org/1362383002/ )
      
      Reason for revert:
      Now breaking arm32 debug bot (worked locally even with --debug-code, so I'll need to figure out what's different on the bot)
      
      Original issue's description:
      > [Interpreter] Add CallRuntime support to the interpreter.
      >
      > Adds support for calling runtime functions from the interpreter. Adds the
      > CallRuntime bytecode which takes a Runtime::FunctionId of the function to call
      > and the arguments in sequential registers. Adds a InterpreterCEntry builtin
      > to enable the interpreter to enter C++ code based on the functionId.
      >
      > Also renames Builtin::PushArgsAndCall to Builtin::InterpreterPushArgsAndCall
      > and groups all the interpreter builtins together.
      >
      > BUG=v8:4280
      > LOG=N
      >
      
      TBR=bmeurer@chromium.org,oth@chromium.org,mstarzinger@chromium.org
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=v8:4280
      
      Review URL: https://codereview.chromium.org/1379933003
      
      Cr-Commit-Position: refs/heads/master@{#31078}
      b4a2f656
    • rmcilroy's avatar
      [Interpreter] Add CallRuntime support to the interpreter. · c991d8f3
      rmcilroy authored
      Adds support for calling runtime functions from the interpreter. Adds the
      CallRuntime bytecode which takes a Runtime::FunctionId of the function to call
      and the arguments in sequential registers. Adds a InterpreterCEntry builtin
      to enable the interpreter to enter C++ code based on the functionId.
      
      Also renames Builtin::PushArgsAndCall to Builtin::InterpreterPushArgsAndCall
      and groups all the interpreter builtins together.
      
      BUG=v8:4280
      LOG=N
      
      Committed: https://crrev.com/40e8424b744f8b6e3e1d93e20f23487419911dfc
      Cr-Commit-Position: refs/heads/master@{#31064}
      
      Review URL: https://codereview.chromium.org/1362383002
      
      Cr-Commit-Position: refs/heads/master@{#31076}
      c991d8f3
    • rmcilroy's avatar
      Revert of [Interpreter] Add CallRuntime support to the interpreter. (patchset... · 90f69d16
      rmcilroy authored
      Revert of [Interpreter] Add CallRuntime support to the interpreter. (patchset #6 id:180001 of https://codereview.chromium.org/1362383002/ )
      
      Reason for revert:
      Broke Arm64 bot (CEntry stub is trying to pop arguments off stack when argv_in_reg, so I need to fix this).
      
      Original issue's description:
      > [Interpreter] Add CallRuntime support to the interpreter.
      >
      > Adds support for calling runtime functions from the interpreter. Adds the
      > CallRuntime bytecode which takes a Runtime::FunctionId of the function to call
      > and the arguments in sequential registers. Adds a InterpreterCEntry builtin
      > to enable the interpreter to enter C++ code based on the functionId.
      >
      > Also renames Builtin::PushArgsAndCall to Builtin::InterpreterPushArgsAndCall
      > and groups all the interpreter builtins together.
      >
      > BUG=v8:4280
      > LOG=N
      >
      > Committed: https://crrev.com/40e8424b744f8b6e3e1d93e20f23487419911dfc
      > Cr-Commit-Position: refs/heads/master@{#31064}
      
      TBR=bmeurer@chromium.org,oth@chromium.org,mstarzinger@chromium.org
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=v8:4280
      
      Review URL: https://codereview.chromium.org/1387543002
      
      Cr-Commit-Position: refs/heads/master@{#31066}
      90f69d16
    • rmcilroy's avatar
      [Interpreter] Add CallRuntime support to the interpreter. · 40e8424b
      rmcilroy authored
      Adds support for calling runtime functions from the interpreter. Adds the
      CallRuntime bytecode which takes a Runtime::FunctionId of the function to call
      and the arguments in sequential registers. Adds a InterpreterCEntry builtin
      to enable the interpreter to enter C++ code based on the functionId.
      
      Also renames Builtin::PushArgsAndCall to Builtin::InterpreterPushArgsAndCall
      and groups all the interpreter builtins together.
      
      BUG=v8:4280
      LOG=N
      
      Review URL: https://codereview.chromium.org/1362383002
      
      Cr-Commit-Position: refs/heads/master@{#31064}
      40e8424b
  12. 24 Sep, 2015 1 commit
  13. 18 Sep, 2015 1 commit
    • bmeurer's avatar
      [stubs] Refactor StringCompareStub and use it for HStringCompareAndBranch. · 8016547c
      bmeurer authored
      The StringCompareStub used to take its parameters on the (JavaScript)
      stack, which made it impossible to use in TurboFan. Actually
      StringCompareStub was currently completely unused. This changes the
      calling convention to something TurboFan compatible and introduces a
      CallInterfaceDescriptor for StringCompareStub. It also changes
      HStringCompareAndBranch to use the StringCompareStub instead of using
      the full blown CompareICStub for a stupid string comparison.
      
      R=jarin@chromium.org
      
      Review URL: https://codereview.chromium.org/1347913003
      
      Cr-Commit-Position: refs/heads/master@{#30818}
      8016547c
  14. 14 Sep, 2015 1 commit
  15. 08 Sep, 2015 1 commit
    • bmeurer's avatar
      [runtime] Replace many buggy uses of %_CallFunction with %_Call. · db2ba190
      bmeurer authored
      The semantics of the %_CallFunction intrinsic seem to be very unclear,
      which resulted in a lot of bugs. Especially the combination with
      %IsSloppyModeFunction is always a bug, because the receiver would be
      wrapped in the wrong context. So the %IsSloppyModeFunction helper is
      gone now, and many of the buggy uses of %_CallFunction are also
      eliminated.
      
      If you ever need to call something with a different receiver, then
      %_Call is your friend now. It does what you want and implements the
      call sequence fully (and correct).
      
      BUG=v8:4413
      LOG=n
      
      Review URL: https://codereview.chromium.org/1325573004
      
      Cr-Commit-Position: refs/heads/master@{#30634}
      db2ba190
  16. 28 Aug, 2015 1 commit
  17. 25 Aug, 2015 1 commit
    • bmeurer's avatar
      Correctify instanceof and make it optimizable. · 5d875a57
      bmeurer authored
      The previous hack with HInstanceOfKnownGlobal was not only slower,
      but also very brittle and required a lot of weird hacks to support it. And
      what's even more important it wasn't even correct (because a map check
      on the lhs is never enough for instanceof).
      
      The new implementation provides a sane runtime implementation
      for InstanceOf plus a fast case in the InstanceOfStub, combined with
      a proper specialization in the case of a known global in CrankShaft,
      which does only the prototype chain walk (coupled with a code
      dependency on the known global).
      
      As a drive-by-fix: Also fix the incorrect Object.prototype.isPrototypeOf
      implementation.
      
      BUG=v8:4376
      LOG=y
      
      Review URL: https://codereview.chromium.org/1304633002
      
      Cr-Commit-Position: refs/heads/master@{#30342}
      5d875a57
  18. 21 Aug, 2015 1 commit
  19. 17 Aug, 2015 1 commit
  20. 31 Jul, 2015 1 commit
    • bmeurer's avatar
      [stubs] Unify (and optimize) implementation of ToObject. · 4fc6f547
      bmeurer authored
      This is the initial (big) step towards a more uniform implementation of
      the ToObject abstract operation (ES6 7.1.13), where we have a fallback
      implementation in JSReceiver::ToObject() and a fast (hydrogen) CodeStub
      to deal with the fast case (we should be able to do more cleanup on this
      in a followup CL).  For natives we expose the abstract operation via a
      %_ToObject intrinsic, also exposed via a macro TO_OBJECT, that unifies
      the previous confusion with TO_OBJECT_INLINE, ToObject, TO_OBJECT,
      $toObject and %$toObject.  Now the whole implementation of the abstract
      operation is context independent, meaning we don't need any magic in the
      builtins object nor the native context.
      
      R=mvstanton@chromium.org,yangguo@chromium.org
      
      Review URL: https://codereview.chromium.org/1266013006
      
      Cr-Commit-Position: refs/heads/master@{#29953}
      4fc6f547
  21. 28 Jul, 2015 1 commit
  22. 24 Jul, 2015 1 commit
  23. 23 Jul, 2015 1 commit
  24. 22 Jul, 2015 1 commit
  25. 15 Jul, 2015 1 commit
  26. 13 Jul, 2015 1 commit
  27. 08 Jul, 2015 3 commits
    • danno's avatar
      Reland: Add unoptimized/optimized variants of MathFloor TF code stub · 737b8573
      danno authored
      - Add a TurboFanIC class, derived from TurboFanCodeStub, that
        automatically distinguishes between versions of the IC called from
        optimized and unoptimized code.
      - Add appropriate InterfaceDescriptors for both the versions of the
        stub called from unoptimized and optimized code
      - Change the MathFloor TF stub generator to output either the
        for-optimized or for-unoptimized version based on the minor_key
        parameter.
      
      Committed: https://crrev.com/8f13b655b8a10dae2116dd18b32f09337bb2d410
      Cr-Commit-Position: refs/heads/master@{#29534}
      
      Review URL: https://codereview.chromium.org/1225943002
      
      Cr-Commit-Position: refs/heads/master@{#29539}
      737b8573
    • danno's avatar
      Revert of Add unoptimized/optimized variants of MathFloor TF code stub... · 7fc183af
      danno authored
      Revert of Add unoptimized/optimized variants of MathFloor TF code stub (patchset #4 id:60001 of https://codereview.chromium.org/1225943002/)
      
      Reason for revert:
      Failure on compiling runtime.js on windows
      
      Original issue's description:
      > Add unoptimized/optimized variants of MathFloor TF code stub
      >
      > - Add a TurboFanIC class, derived from TurboFanCodeStub, that
      >   automatically distinguishes between versions of the IC called from
      >   optimized and unoptimized code.
      > - Add appropriate InterfaceDescriptors for both the versions of the
      >   stub called from unoptimized and optimized code
      > - Change the MathFloor TF stub generator to output either the
      >   for-optimized or for-unoptimized version based on the minor_key
      >   parameter.
      >
      > Committed: https://crrev.com/8f13b655b8a10dae2116dd18b32f09337bb2d410
      > Cr-Commit-Position: refs/heads/master@{#29534}
      
      TBR=mvstanton@chromium.org,bmeurer@chromium.org
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      
      Review URL: https://codereview.chromium.org/1220783006
      
      Cr-Commit-Position: refs/heads/master@{#29535}
      7fc183af
    • danno's avatar
      Add unoptimized/optimized variants of MathFloor TF code stub · 8f13b655
      danno authored
      - Add a TurboFanIC class, derived from TurboFanCodeStub, that
        automatically distinguishes between versions of the IC called from
        optimized and unoptimized code.
      - Add appropriate InterfaceDescriptors for both the versions of the
        stub called from unoptimized and optimized code
      - Change the MathFloor TF stub generator to output either the
        for-optimized or for-unoptimized version based on the minor_key
        parameter.
      
      Review URL: https://codereview.chromium.org/1225943002
      
      Cr-Commit-Position: refs/heads/master@{#29534}
      8f13b655
  28. 01 Jul, 2015 1 commit
    • danno's avatar
      Make context register implicit for CallInterfaceDescriptors · 7015fd20
      danno authored
      Up until now the context register was listed explicitly in each stub's
      CallInterfaceDescriptor. This was problematic, because it was listed
      first in the list of register parameters--which is fine for Crankshaft,
      which is more or less built to handle the context as the first
      parameter-- but not ideal for TurboFan, which adds the context at
      the end of all function parameters. Now the context register is no
      longer in the register list and can be handled appropriately by both
      compilers. Specifically, this allows the FunctionType specified for
      each CallInterfaceDescriptor to exactly match the parameter register
      list.
      
      Review URL: https://codereview.chromium.org/1211333003
      
      Cr-Commit-Position: refs/heads/master@{#29402}
      7015fd20
  29. 24 Jun, 2015 1 commit
    • danno's avatar
      Use big-boy Types to annotate interface descriptor parameters · c019d7f4
      danno authored
      - Thread Type::FunctionType through stubs and the TF pipeline.
      - Augment Typer to decorate parameter nodes with types from
        a Type::FunctionType associated with interface descriptors.
      - Factor interface descriptors into platform-specific and
        platform-independent components so that all descriptors share
        a common Type::FunctionType for all platforms.
      
      Review URL: https://codereview.chromium.org/1197703002
      
      Cr-Commit-Position: refs/heads/master@{#29248}
      c019d7f4
  30. 01 Jun, 2015 1 commit
  31. 22 May, 2015 1 commit
  32. 20 May, 2015 1 commit