1. 16 Feb, 2016 2 commits
  2. 15 Feb, 2016 5 commits
  3. 12 Feb, 2016 2 commits
    • bmeurer's avatar
      [runtime] Kill %Arguments and %ArgumentsLength. · 98aec4a7
      bmeurer authored
      This removes support for the %Arguments and %ArgumentsLength runtime
      entries and their intrinsic counterparts. If you need variable arguments
      in any builtin, either use (strict) arguments object or rest parameters,
      which are both compositional across inlining (in TurboFan), and not that
      much slower compared to the %_Arguments hackery.
      
      R=jarin@chromium.org
      
      Review URL: https://codereview.chromium.org/1688163004
      
      Cr-Commit-Position: refs/heads/master@{#33943}
      98aec4a7
    • bmeurer's avatar
      [runtime] Introduce FastNewStrictArgumentsStub to optimize strict arguments. · 09d84535
      bmeurer authored
      The FastNewStrictArgumentsStub is very similar to the recently added
      FastNewRestParameterStub, it's actually almost a copy of it, except that
      it doesn't have the fast case we have for the empty rest parameter. This
      patch improves strict arguments in TurboFan and fullcodegen by up to 10x
      compared to the previous version.
      
      Also introduce proper JSSloppyArgumentsObject and JSStrictArgumentsObject
      for the in-object properties instead of having them as constants in the
      Heap class.
      
      Drive-by-fix: Use this stub and the FastNewRestParameterStub in the
      interpreter to avoid the runtime call overhead for strict arguments
      and rest parameter creation.
      
      R=jarin@chromium.org
      TBR=mstarzinger@chromium.org
      
      Review URL: https://codereview.chromium.org/1693513002
      
      Cr-Commit-Position: refs/heads/master@{#33925}
      09d84535
  4. 11 Feb, 2016 4 commits
  5. 10 Feb, 2016 5 commits
    • rmcilroy's avatar
      [Interpreter] Make InterpreterAssembler a subclass of CodeStubAssembler. · d1c28849
      rmcilroy authored
      Moves InterpreterAssembler out of the compiler directory and into the
      interpreter directory. Makes InterpreterAssembler as subclass of
      CodeStubAssembler.
      
      As part of this change, the special bytecode dispatch linkage type
      is removed and instead we use a InterfaceDispatchDescriptor and
      a normal CodeStub linkage type.
      
      Removes a bunch of duplicated logic in InterpreterAssembler and
      instead uses the CodeStubAssembler logic. Refactors Interpreter
      with these changes.
      
      Modifies CodeStubAssembler to add the extra operations required
      by the Interpreter (extra call types, raw memory access and some extra
      binary ops). Also adds the ability for subclasses to add extra
      prologue and epilogue operations around calls, which is required
      for the Interpreter.
      
      BUG=v8:4280
      LOG=N
      
      Review URL: https://codereview.chromium.org/1673333004
      
      Cr-Commit-Position: refs/heads/master@{#33873}
      d1c28849
    • yangguo's avatar
      [debugger] introduce abstract interface for break location. · 24b40f35
      yangguo authored
      The break location heavily relies on relocation info. This change
      abstracts that away. Currently there is only one implementation for
      this interface, for JIT code. Future changes will introduce an
      implementation to iterate bytecode arrays.
      
      R=rmcilroy@chromium.org, vogelheim@chromium.org
      BUG=v8:4690
      LOG=N
      
      Review URL: https://codereview.chromium.org/1682853003
      
      Cr-Commit-Position: refs/heads/master@{#33869}
      24b40f35
    • mvstanton's avatar
      Preserve argument count for calls. · 5de27c34
      mvstanton authored
      Calls use registers for target, new_target and argument count.
      We don't always respect argument count. It didn't bite us in the past
      because the code paths where we clobbered it never used it, though
      in future it could be an issue.
      
      BUG=
      R=mstarzinger@chromium.org
      
      Review URL: https://codereview.chromium.org/1683593003
      
      Cr-Commit-Position: refs/heads/master@{#33865}
      5de27c34
    • verwaest's avatar
      Mark null and undefined as undetectable, and use it to handle abstract... · 3ce9e808
      verwaest authored
      Mark null and undefined as undetectable, and use it to handle abstract equality comparison in the generic compare ic
      
      Marking as undetectable makes abstract equality of null, undefined, and
      other undetectable objects easier. Supporting it in the generic compare
      IC significantly speeds up dynamic comparison between those values and
      JSReceivers by not falling back to the runtime.
      
      MIPS port contributed by Balazs Kilvady <balazs.kilvady@imgtec.com>
      
      Review URL: https://codereview.chromium.org/1683643002
      
      Cr-Commit-Position: refs/heads/master@{#33858}
      3ce9e808
    • mlippautz's avatar
      [heap] Move to page lookups for SemiSpace, NewSpace, and Heap containment methods · cfbd2561
      mlippautz authored
      Preparing the young generation for (real) non-contiguous backing memory, this
      change removes object masks that are used to compute containment in semi and new
      space. The masks are replaced by lookups for object tags and page headers, where
      possible.
      
      Details:
      - Use the fast checks (page header lookups) for containment in regular code.
      - Use the slow version that masks out the page start adress and iterates all
        pages of a space for debugging/verification.
      - The slow version works for off-heap/unmapped memory.
      - Encapsulate all checks for the old->new barrier in Heap::RecordWrite().
      
      BUG=chromium:581412
      LOG=N
      
      Review URL: https://codereview.chromium.org/1632913003
      
      Cr-Commit-Position: refs/heads/master@{#33857}
      cfbd2561
  6. 09 Feb, 2016 1 commit
  7. 08 Feb, 2016 6 commits
    • mstarzinger's avatar
      Remove --stop-at flag from several backends. · 664110f8
      mstarzinger authored
      The flag in question is a debug-only flag supported by full-codegen and
      Crankshaft only. In it's current form there are some unresolved issues:
      - The flag is defeated by inlining in Crankshaft.
      - The flag is not supported by TurboFan.
      - The flag is not supported by Ignition.
      
      Instead of addressing the above issues and increasing maintenance cost
      for all backends and also given the "slim" test coverage, this CL fully
      removes the support from all backends.
      
      R=bmeurer@chromium.org,jkummerow@chromium.org
      
      Review URL: https://codereview.chromium.org/1676263002
      
      Cr-Commit-Position: refs/heads/master@{#33817}
      664110f8
    • verwaest's avatar
      Mark maps having a hidden prototype rather than maps of hidden prototypes. · d2503c4d
      verwaest authored
      Generally we only care whether the next object is a hidden prototype.
      It's simpler to check whether the current object has a hidden prototype
      instead of walking to the next prototype and checking its map.
      
      BUG=
      
      Review URL: https://codereview.chromium.org/1675223002
      
      Cr-Commit-Position: refs/heads/master@{#33816}
      d2503c4d
    • machenbach's avatar
      Revert of Do not eagerly instantiate accessors' JSFunction. (patchset #9... · 0e6f0964
      machenbach authored
      Revert of Do not eagerly instantiate accessors' JSFunction. (patchset #9 id:180001 of https://codereview.chromium.org/1609233002/ )
      
      Reason for revert:
      [Sheriff] Breaks gcmole:
      https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20gcmole/builds/6260
      
      Original issue's description:
      > Do not eagerly instantiate accessors' JSFunction.
      >
      > BUG=
      >
      > Committed: https://crrev.com/4d46b510caf534d770ce19a01a11b8796304471b
      > Cr-Commit-Position: refs/heads/master@{#33812}
      
      TBR=verwaest@chromium.org,epertoso@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/1679683004
      
      Cr-Commit-Position: refs/heads/master@{#33814}
      0e6f0964
    • epertoso's avatar
      Do not eagerly instantiate accessors' JSFunction. · 4d46b510
      epertoso authored
      BUG=
      
      Review URL: https://codereview.chromium.org/1609233002
      
      Cr-Commit-Position: refs/heads/master@{#33812}
      4d46b510
    • bmeurer's avatar
      [runtime] Optimize and unify rest parameters. · 3ef573e9
      bmeurer authored
      Replace the somewhat awkward RestParamAccessStub, which would always
      call into the runtime anyway with a proper FastNewRestParameterStub,
      which is basically based on the code that was already there for strict
      arguments object materialization. But for rest parameters we could
      optimize even further (leading to 8-10x improvements for functions with
      rest parameters), by fixing the internal formal parameter count:
      
      Every SharedFunctionInfo has a formal_parameter_count field, which
      specifies the number of formal parameters, and is used to decide whether
      we need to create an arguments adaptor frame when calling a function
      (i.e. if there's a mismatch between the actual and expected parameters).
      Previously the formal_parameter_count included the rest parameter, which
      was sort of unfortunate, as that meant that calling a function with only
      the non-rest parameters still required an arguments adaptor (plus some
      other oddities). Now with this CL we fix, so that we do no longer
      include the rest parameter in that count. Thereby checking for rest
      parameters is very efficient, as we only need to check whether there is
      an arguments adaptor frame, and if not create an empty array, otherwise
      check whether the arguments adaptor frame has more parameters than
      specified by the formal_parameter_count.
      
      The FastNewRestParameterStub is written in a way that it can be directly
      used by Ignition as well, and with some tweaks to the TurboFan backends
      and the CodeStubAssembler, we should be able to rewrite it as
      TurboFanCodeStub in the near future.
      
      Drive-by-fix: Refactor and unify the CreateArgumentsType which was
      different in TurboFan and Ignition; now we have a single enum class
      which is used in both TurboFan and Ignition.
      
      R=jarin@chromium.org, rmcilroy@chromium.org
      TBR=rossberg@chromium.org
      BUG=v8:2159
      LOG=n
      
      Review URL: https://codereview.chromium.org/1676883002
      
      Cr-Commit-Position: refs/heads/master@{#33809}
      3ef573e9
    • ulan's avatar
      New page local store buffer. · bb883395
      ulan authored
      This replaces the global remembered set with per-page remembered sets.
      
      Each page in the old space, map space, and large object space keeps track of
      the set of slots in the page pointing to the new space.
      
      The data structure for storing slot sets is a two-level bitmap, which allows
      us to remove the store buffer overflow and SCAN_ON_SCAVENGE logic.
      
      Design doc: https://goo.gl/sMKCf7
      
      BUG=chromium:578883
      LOG=NO
      
      Review URL: https://codereview.chromium.org/1608583002
      
      Cr-Commit-Position: refs/heads/master@{#33806}
      bb883395
  8. 06 Feb, 2016 1 commit
    • ishell's avatar
      [api] Make ObjectTemplate::SetNativeDataProperty() work even if the... · da213b6e
      ishell authored
      [api] Make ObjectTemplate::SetNativeDataProperty() work even if the ObjectTemplate does not have a constructor.
      
      Previously ObjectTemplate::New() logic relied on the fact that all the accessor properties are already installed in the initial map of the function object of the constructor FunctionTemplate.
      When the FunctionTemplate were instantiated the accessors of the instance templates from the whole inheritance chain were accumulated and added to the initial map.
      ObjectTemplate::SetSetAccessor() used to explicitly ensure that the ObjectTemplate has a constructor and therefore an initial map to add all accessors to.
      
      The new approach is to add all the accessors and data properties to the object exactly when the ObjectTemplate is instantiated. In order to keep it fast we now cache the object boilerplates in the Isolate::template_instantiations_cache (the former function_cache), so the object creation turns to be a deep copying of the boilerplate object.
      
      BUG=chromium:579009
      LOG=Y
      
      Committed: https://crrev.com/6a118774244d087b5979e9291d628a994f21d59d
      Cr-Commit-Position: refs/heads/master@{#33674}
      
      Review URL: https://codereview.chromium.org/1642223003
      
      Cr-Commit-Position: refs/heads/master@{#33798}
      da213b6e
  9. 05 Feb, 2016 4 commits
    • balazs.kilvady's avatar
      MIPS: Fix FPU min, max, mina, maxa in simulator. · a58c750c
      balazs.kilvady authored
      BUG=
      TEST=cctest/test-assembler-mips/min_max, cctest/test-assembler-mips/mina_maxa, cctest/test-assembler-mips64/min_max, cctest/test-assembler-mips64/mina_maxa
      
      Review URL: https://codereview.chromium.org/1668143002
      
      Cr-Commit-Position: refs/heads/master@{#33790}
      a58c750c
    • yangguo's avatar
      [interpreter] move the dispatch table off heap. · 91009c50
      yangguo authored
      This makes the dispatch table similar to the builtins code list and makes
      sure that the dispatch table does not move.
      
      R=mstarzinger@chromium.org, rmcilroy@chromium.org
      
      Review URL: https://codereview.chromium.org/1671813003
      
      Cr-Commit-Position: refs/heads/master@{#33781}
      91009c50
    • cbruni's avatar
      [telemetry] Counter Cleanups · d037e6d6
      cbruni authored
      - remove unused counters
      - add "ic" prefix to all ic-counters
      - add more counter: maps-created, global deopts (not used yet)
      
      BUG=
      
      Review URL: https://codereview.chromium.org/1553523002
      
      Cr-Commit-Position: refs/heads/master@{#33768}
      d037e6d6
    • mvstanton's avatar
      Revert of Type Feedback Vector lives in the closure (patchset #2 id:40001 of... · 3f36e658
      mvstanton authored
      Revert of Type Feedback Vector lives in the closure (patchset #2 id:40001 of https://codereview.chromium.org/1668103002/ )
      
      Reason for revert:
      Must revert for now due to chromium api natives issues.
      
      Original issue's description:
      > Type Feedback Vector lives in the closure
      >
      > (RELAND: the problem before was a missing write barrier for adding the code
      > entry to the new closure. It's been addressed with a new macro instruction
      > and test. The only change to this CL is the addition of two calls to
      > __ RecordWriteCodeEntryField() in the platform CompileLazy builtin.)
      >
      > We get less "pollution" of type feedback if we have one vector per native
      > context, rather than one for the whole system. This CL moves the vector
      > appropriately.
      >
      > We rely more heavily on the Optimized Code Map in the SharedFunctionInfo. The
      > vector actually lives in the first slot of the literals array (indeed there is
      > great commonality between those arrays, they can be thought of as the same
      > thing). So we make greater effort to ensure there is a valid literals array
      > after compilation.
      >
      > This meant, for performance reasons, that we needed to extend
      > FastNewClosureStub to support creating closures with literals. And ultimately,
      > it drove us to move the optimized code map lookup out of FastNewClosureStub
      > and into the compile lazy builtin.
      >
      > The heap change is trivial so I TBR Hannes for it...
      > Also, Yang has had a look at the debugger changes already and approved 'em. So he is TBR style too.
      > And Benedikt reviewed it as well.
      >
      > TBR=hpayer@chromium.org, yangguo@chromium.org, bmeurer@chromium.org
      >
      > BUG=
      >
      > Committed: https://crrev.com/bb31db3ad6de16f86a61f6c7bbfd3274e3d957b5
      > Cr-Commit-Position: refs/heads/master@{#33741}
      
      TBR=bmeurer@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/1670813005
      
      Cr-Commit-Position: refs/heads/master@{#33766}
      3f36e658
  10. 04 Feb, 2016 3 commits
    • mvstanton's avatar
      Type Feedback Vector lives in the closure · bb31db3a
      mvstanton authored
      (RELAND: the problem before was a missing write barrier for adding the code
      entry to the new closure. It's been addressed with a new macro instruction
      and test. The only change to this CL is the addition of two calls to
      __ RecordWriteCodeEntryField() in the platform CompileLazy builtin.)
      
      We get less "pollution" of type feedback if we have one vector per native
      context, rather than one for the whole system. This CL moves the vector
      appropriately.
      
      We rely more heavily on the Optimized Code Map in the SharedFunctionInfo. The
      vector actually lives in the first slot of the literals array (indeed there is
      great commonality between those arrays, they can be thought of as the same
      thing). So we make greater effort to ensure there is a valid literals array
      after compilation.
      
      This meant, for performance reasons, that we needed to extend
      FastNewClosureStub to support creating closures with literals. And ultimately,
      it drove us to move the optimized code map lookup out of FastNewClosureStub
      and into the compile lazy builtin.
      
      The heap change is trivial so I TBR Hannes for it...
      Also, Yang has had a look at the debugger changes already and approved 'em. So he is TBR style too.
      And Benedikt reviewed it as well.
      
      TBR=hpayer@chromium.org, yangguo@chromium.org, bmeurer@chromium.org
      
      BUG=
      
      Review URL: https://codereview.chromium.org/1668103002
      
      Cr-Commit-Position: refs/heads/master@{#33741}
      bb31db3a
    • rmcilroy's avatar
      [Interpreter] Add explicit StackCheck bytecodes on function entry and back branches. · 1ce720f2
      rmcilroy authored
      Moves the stack check from the function entry trampoline to instead be
      after function activation using an explicit StackCheck bytecode. Also
      add stack checks on back edges of loops.
      
      BUG=v8:4280,v8:4678
      LOG=N
      
      Review URL: https://codereview.chromium.org/1665853002
      
      Cr-Commit-Position: refs/heads/master@{#33730}
      1ce720f2
    • mvstanton's avatar
      Write barrier for storing a code entry, and usage in CompileLazy builtin. · 477e1336
      mvstanton authored
      BUG=
      
      Review URL: https://codereview.chromium.org/1647123002
      
      Cr-Commit-Position: refs/heads/master@{#33718}
      477e1336
  11. 03 Feb, 2016 2 commits
    • balazs.kilvady's avatar
      MIPS: Use PC relative instructions on r6. · ebac85c0
      balazs.kilvady authored
      BUG=
      
      Review URL: https://codereview.chromium.org/1628453002
      
      Cr-Commit-Position: refs/heads/master@{#33703}
      ebac85c0
    • hablich's avatar
      Revert of [api] Make ObjectTemplate::SetNativeDataProperty() work even if the... · db47a31f
      hablich authored
      Revert of [api] Make ObjectTemplate::SetNativeDataProperty() work even if the ObjectTemplate does not have a … (patchset #3 id:80001 of https://codereview.chromium.org/1642223003/ )
      
      Reason for revert:
      Fails a lot of layout tests and blocks the roll. Can be easily reproduced with a local Chromium checkout.
      
      Reference: https://codereview.chromium.org/1652413003/
      
      Original issue's description:
      > [api] Make ObjectTemplate::SetNativeDataProperty() work even if the ObjectTemplate does not have a constructor.
      >
      > Previously ObjectTemplate::New() logic relied on the fact that all the accessor properties are already installed in the initial map of the function object of the constructor FunctionTemplate.
      > When the FunctionTemplate were instantiated the accessors of the instance templates from the whole inheritance chain were accumulated and added to the initial map.
      > ObjectTemplate::SetSetAccessor() used to explicitly ensure that the ObjectTemplate has a constructor and therefore an initial map to add all accessors to.
      >
      > The new approach is to add all the accessors and data properties to the object exactly when the ObjectTemplate is instantiated. In order to keep it fast we now cache the object boilerplates in the Isolate::template_instantiations_cache (the former function_cache), so the object creation turns to be a deep copying of the boilerplate object.
      >
      > This CL also prohibits non-primitive properties in ObjectTemplate to avoid potential cross-context leaks.
      >
      > BUG=chromium:579009
      > LOG=Y
      >
      > Committed: https://crrev.com/6a118774244d087b5979e9291d628a994f21d59d
      > Cr-Commit-Position: refs/heads/master@{#33674}
      
      TBR=verwaest@chromium.org,ishell@chromium.org
      # Skipping CQ checks because original CL landed less than 1 days ago.
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=chromium:579009
      
      Review URL: https://codereview.chromium.org/1660263003
      
      Cr-Commit-Position: refs/heads/master@{#33698}
      db47a31f
  12. 02 Feb, 2016 2 commits
    • hpayer's avatar
      Call RecordWriteIntoCode when storing the target object in the reloc info on ARM and MIPS. · 44ec23ac
      hpayer authored
      BUG=chromium:561449
      LOG=n
      
      Review URL: https://codereview.chromium.org/1654263004
      
      Cr-Commit-Position: refs/heads/master@{#33687}
      44ec23ac
    • ishell's avatar
      [api] Make ObjectTemplate::SetNativeDataProperty() work even if the... · 6a118774
      ishell authored
      [api] Make ObjectTemplate::SetNativeDataProperty() work even if the ObjectTemplate does not have a constructor.
      
      Previously ObjectTemplate::New() logic relied on the fact that all the accessor properties are already installed in the initial map of the function object of the constructor FunctionTemplate.
      When the FunctionTemplate were instantiated the accessors of the instance templates from the whole inheritance chain were accumulated and added to the initial map.
      ObjectTemplate::SetSetAccessor() used to explicitly ensure that the ObjectTemplate has a constructor and therefore an initial map to add all accessors to.
      
      The new approach is to add all the accessors and data properties to the object exactly when the ObjectTemplate is instantiated. In order to keep it fast we now cache the object boilerplates in the Isolate::template_instantiations_cache (the former function_cache), so the object creation turns to be a deep copying of the boilerplate object.
      
      This CL also prohibits non-primitive properties in ObjectTemplate to avoid potential cross-context leaks.
      
      BUG=chromium:579009
      LOG=Y
      
      Review URL: https://codereview.chromium.org/1642223003
      
      Cr-Commit-Position: refs/heads/master@{#33674}
      6a118774
  13. 29 Jan, 2016 1 commit
    • balazs.kilvady's avatar
      MIPS: Fix '[builtins] Make Math.max and Math.min fast by default.' · b35a7aaf
      balazs.kilvady authored
      Port cb9b8010
      
      Original commit message:
      The previous versions of Math.max and Math.min made it difficult to
      optimize those (that's why we already have custom code in Crankshaft),
      and due to lack of ideas what to do about the variable number of
      arguments, we will probably need to stick in special code in TurboFan
      as well; so inlining those builtins is off the table, hence there's no
      real advantage in having them around as "not quite JS" with extra work
      necessary in the optimizing compilers to still make those builtins
      somewhat fast in cases where we cannot inline them (also there's a
      tricky deopt loop in Crankshaft related to Math.min and Math.max, but
      that will be dealt with later).
      
      So to sum up: Instead of trying to make Math.max and Math.min semi-fast
      in the optimizing compilers with weird work-arounds support %_Arguments
      %_ArgumentsLength, we do provide the optimal code as native builtins
      instead and call it a day (which gives a nice performance boost on some
      benchmarks).
      
      BUG=
      
      Review URL: https://codereview.chromium.org/1643973002
      
      Cr-Commit-Position: refs/heads/master@{#33611}
      b35a7aaf
  14. 28 Jan, 2016 2 commits