Commit Graph

49067 Commits

Author SHA1 Message Date
Clemens Hammacher
916925f33b [wasm] Document {BuildChangeFloat64ToTagged}
It took me a while to understand what this code is doing. This CL just
renames a few local variables and documents the checks that are done.

R=mstarzinger@chromium.org

Bug: v8:7754
Change-Id: I4072c4b1969f8b88d4454c8f3022c9b9de825197
Reviewed-on: https://chromium-review.googlesource.com/1128862
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54325}
2018-07-09 13:58:22 +00:00
Michael Starzinger
231b3e15fc [wasm] Move code generation fully to background task.
This moves the entire code generation phase (including code emission
into the native module) into the background task. The code manager is
fully thread safe by now and there are no Isolate-bound steps anymore.

R=clemensh@chromium.org
BUG=v8:7921

Change-Id: Ie3e8565e126bfdb58bf472291a1f9fbebe7b5431
Reviewed-on: https://chromium-review.googlesource.com/1128743
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54324}
2018-07-09 13:36:09 +00:00
Théotime Grohens
f659efb15c [dataview] Fix JSTests.json
This CL correctly updates the JSTests.json file in test/mjsunit/
to reflect the new DataView Float32/64 performance tests from
commit e14699c520.

Change-Id: I9cbb05ac0cbd37f8d8a0bc66ebb59c1e05298776
Reviewed-on: https://chromium-review.googlesource.com/1128880
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Théotime Grohens <theotime@google.com>
Cr-Commit-Position: refs/heads/master@{#54323}
2018-07-09 12:42:17 +00:00
Georg Neis
299d2b49d9 [turbofan] Brokerize typed optimization.
Bug: v8:7790
Change-Id: Ia9526c507769f8a7f973a9ed7aedd7cc56d169d0
Reviewed-on: https://chromium-review.googlesource.com/1128756
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54322}
2018-07-09 12:22:17 +00:00
Leszek Swirski
084d472f51 [liveedit] Patch changed SFIs' constant pools
When live edit patches a script, it distinguishes between 'changed' and
'unchanged' functions, and unchanged functions have their position and
source script patched to the new script instead of being replaced by a
new SFI.

However, if a 'changed' function has an inner 'unchanged' function, it
also holds a pointer to the inner function in its bytecode constant
pool. This constant pool entry was not being updated for changed
functions (it was for unchanged), and therefore the outer changed
function would compile the redundant new function instead of the old,
patched, unchanged function.

This patch fixes this by patching 'changed' functions' bytecode constant
pools. This is done by swapping the script and script function list
position of the old new and old 'unchanged' function, rather than just
setting the script (and position) on the old one, and using the new
function (now pointing at the old script) to read off the old function
literal id. This could also be done by reading the function_literal_id
off the new function, but we are soon removing that field anyway.

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Ib22078c06539c795b418d29a493d8224ecea182e
Reviewed-on: https://chromium-review.googlesource.com/1127941
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54321}
2018-07-09 11:06:57 +00:00
Sigurd Schneider
23dbb81d8f [turbofan] Use relative calls/jumps on arm for builtins
This CL uses pc-relative jumps and calls (B/BL) for calls from embedded
builtins to embedded builtins. To make this work, the code range size is
limited to 32MB on arm during mksnapshot, which ensures that all builtin
to builtin offsets for jumps/calls fit into the B/BL immediate. At code
generation time, we put a placeholder into the instruction offset which
we resolve to the right code object when the code is copied to the heap.
We use a new relocation mode RELATIVE_CODE_TARGET for these relative jumps.
The relocation mode RELATIVE_CODE_TARGET should never appear after
generating the snapshot.

We modify the target_address/set_target_address methods of RelocInfo
such that they return the absolute target addresses for pc-relative B/BL
instructions. This ensures that the GC can treat RELATIVE_CODE_TARGET in
the same way as code targets. This, however, only matters during
snapshot creation time, and production code never contains
RELATIVE_CODE_TARGET relocations.

Bug: v8:6666
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: If7eab83ad588859ca87c654a5ddc3e37caea884c
Reviewed-on: https://chromium-review.googlesource.com/1117181
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54320}
2018-07-09 10:53:07 +00:00
Leszek Swirski
39e2d97bc4 [sfi] Replace start/end position with UncompiledData
Add new types for function data for SharedFunctionInfo, for uncompiled
functions. UncompiledData holds start/end positions, allowing us to
remove these fields from SFI. Uncompiled functions with pre-parsed
scope data now hold an UncompiledDataWithScope that has a pointer to
PreParsedScopeData -- this allows us to also remove the start/end pos
from PreParsedScopeData.

Bug: chromium:818642
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I56f3c4e62cbf38929babac734a332709f12a8202
Reviewed-on: https://chromium-review.googlesource.com/1126381
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54319}
2018-07-09 10:49:27 +00:00
Andreas Haas
43744b9670 [wasm][anyref] Support decoding of signatures with AnyFunc
With this CL we now also support the decoding of the AnyFunc
type. I will add the type more deeply in subsequent CLs.

R=titzer@chromium.org

Bug: v8:7581
Change-Id: I9f30706a442462f915adfd8f720eb65168b80bb8
Reviewed-on: https://chromium-review.googlesource.com/1014111
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54318}
2018-07-09 09:59:02 +00:00
Jaroslav Sevcik
f695855cf8 [turbofan] Brokerize JSCreateLowering::ReduceJSCreate
Bug: v8:7790
Change-Id: I918af0461e86ce8eacb9155de18954d8b6270ecc
Reviewed-on: https://chromium-review.googlesource.com/1123831
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54317}
2018-07-09 09:05:48 +00:00
Michael Starzinger
d78235e3d6 [wasm] Add separate accounting allocator to {WasmEngine}.
This adds an {AccountingAllocator} to the {WasmEngine}, separate from
the allocator used per Isolate. It is in preparation of being able to
share engines across multiple Isolates. For now we just add up the
stats from both allocators until a public API for the engine becomes
available.

R=ahaas@chromium.org
TEST=cctest/test-wasm-shared-engine/SharedEngineRunImported
BUG=v8:7424

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Ia915a1ae4aa7ebed27073b7b6bd067e31717a6ea
Reviewed-on: https://chromium-review.googlesource.com/1127788
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54316}
2018-07-09 09:04:42 +00:00
Georg Neis
75ad46a4b0 [turbofan] Add Disallow* scopes to type narrowing reducer.
No changes were necessary.

R=jarin@chromium.org

Bug: v8:7790
Change-Id: I8a5c308b9534ee1fb669a901b6626c338883fbf8
Reviewed-on: https://chromium-review.googlesource.com/1128741
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54315}
2018-07-09 08:58:12 +00:00
Georg Neis
8a7812e4dd [turbofan] Brokerize constant folding reducer.
R=jarin@chromium.org

Bug: v8:7790
Change-Id: I42c1208f3555a7e5a3a241860d0a1609b8530b79
Reviewed-on: https://chromium-review.googlesource.com/1128740
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54314}
2018-07-09 08:55:12 +00:00
Georg Neis
e4bfa5a622 [turbofan] Add Disallow* scopes to dead code elimination.
No changes were necessary.

R=jarin@chromium.org

Bug: v8:7790
Change-Id: I70efc56dd07f778dffda3b38f28b9b94d634361e
Reviewed-on: https://chromium-review.googlesource.com/1128739
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54313}
2018-07-09 08:30:22 +00:00
Clemens Hammacher
2683675ce6 [wasm] Reduce size of critical section
This reduces the critical section in {NativeModule::AddOwnedCode} to
not include the memcpy.
It also contains small drive-by fixes.

R=mstarzinger@chromium.org

Bug: v8:7921
Change-Id: Idbed5d1ab5627fe2ab3f60887ec2b31c5525e36c
Reviewed-on: https://chromium-review.googlesource.com/1127025
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54312}
2018-07-09 08:22:49 +00:00
Michael Lippautz
848f989e3d [embedder-tracing] Deprecate NumberOfWrappersToTrace
Deprecates EmbedderHeapTracer::NumberOfWrappersToTrace and replaces it
with EmbedderHeapTracer::IsTracingDone.

V8 only really cares about the final state (emptiness) here and
embedders may choose implementations that have a hard time determinining
exact size for their work queues.

Bug: chromium:843903
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I1e141c47771ef08aab7dbe204e8175cfee99cf92
Reviewed-on: https://chromium-review.googlesource.com/1127599
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54311}
2018-07-09 08:06:49 +00:00
Sathya Gunasekaran
9942994e33 [JSFunction] Undef macro after use
Change-Id: I755f2426d4f0e34115ff0c73e487e47db5290df1
Reviewed-on: https://chromium-review.googlesource.com/1127916
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54310}
2018-07-09 07:11:29 +00:00
Benedikt Meurer
907d7bcd18 [promise] Implement Swallowed Rejection Hook.
This extends the current Promise Rejection Hook with two new events

  kPromiseRejectAfterResolved
  kPromiseResolveAfterResolved

which are used to detect (and signal) misuse of the Promise constructor.
Specifically the common bug like

  new Promise((res, rej) => {
    res(1);
    throw new Error("something")
  });

where the error is silently swallowed by the Promise constructor without
the user ever noticing can be caught via this hook.

Doc: https://goo.gl/2stLUY
Bug: v8:7919
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I890a7e766cdd1be88db94844fb744f72823dba33
Reviewed-on: https://chromium-review.googlesource.com/1126099
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54309}
2018-07-09 06:06:39 +00:00
v8-ci-autoroll-builder
055a139016 Update V8 DEPS.
Rolling v8/build: ec3bd1b..84b1e58

Rolling v8/tools/clang: ebf0d4a..230416c

TBR=machenbach@chromium.org,hablich@chromium.org,sergiyb@chromium.org

Change-Id: Ib8c27d83cb9a23a6e1a2ad747ee95a2bd4142e34
Reviewed-on: https://chromium-review.googlesource.com/1128620
Commit-Queue: V8 Autoroller <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Reviewed-by: V8 Autoroller <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#54308}
2018-07-09 03:52:09 +00:00
jing.bao
054dd559ac [ia32][wasm] Add I32x4SConvertF32x4, I32x4UConvertF32x4
Change-Id: Ic2c4f02d5e451c4a3a6612ae91e5cc8231d62448
Reviewed-on: https://chromium-review.googlesource.com/1119773
Commit-Queue: Jing Bao <jing.bao@intel.com>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54307}
2018-07-09 01:05:59 +00:00
v8-ci-autoroll-builder
a0d8c293d0 Update V8 DEPS.
Rolling v8/build: d0011aa..ec3bd1b

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/8a075d7..9eaedb7

Rolling v8/tools/clang: d8cde7f..ebf0d4a

TBR=machenbach@chromium.org,hablich@chromium.org,sergiyb@chromium.org

Change-Id: Icfa0b58d4e4ece3a60401ef40a517005ecdbcf98
Reviewed-on: https://chromium-review.googlesource.com/1128542
Reviewed-by: V8 Autoroller <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: V8 Autoroller <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#54306}
2018-07-08 03:51:32 +00:00
v8-ci-autoroll-builder
e49ce87727 Update V8 DEPS.
Rolling v8/build: 911a0c5..d0011aa

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/5715e98..8a075d7

Rolling v8/third_party/depot_tools: 5484b86..92745a5

Rolling v8/third_party/jinja2: 45571de..b41863e

TBR=machenbach@chromium.org,hablich@chromium.org,sergiyb@chromium.org

Change-Id: I03d4d4235e8b767e210565891e91ef4bdc2ca2d2
Reviewed-on: https://chromium-review.googlesource.com/1128467
Reviewed-by: V8 Autoroller <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: V8 Autoroller <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#54305}
2018-07-07 03:52:11 +00:00
Jaroslav Sevcik
289729bb6d [turbofan] Brokerize closure creation.
Bug: v8:7790
Change-Id: Iff4f0561901c454fc3facfeb152727d3994b4f98
Reviewed-on: https://chromium-review.googlesource.com/1127947
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54304}
2018-07-06 21:30:20 +00:00
Bill Budge
16de08ea72 [wasm simd] Rework CanonicalizeShuffle for testing
- Refactors most of the logic into a helper CanonicalizeShuffle
  overload that is more easily tested.
- Reorders these methods to be in the order they're used.
- Adds unit tests for this helper.

Bug: v8:6020
Change-Id: Ia7e08bd2ff3ae62b13c9283c6de04e0e1e85086b
Reviewed-on: https://chromium-review.googlesource.com/1118706
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54303}
2018-07-06 21:13:01 +00:00
Bill Budge
09e7d3e036 [wasm simd] Add code generation for byte reversing swizzles
- Adds opcodes for 2x8, 4x4, and 8x2 byte reversing swizzles on ia32.

Bug: v8:6020
Change-Id: I2c5d4ba88b42a17fc75ac0307e80d8c11d1838ba
Reviewed-on: https://chromium-review.googlesource.com/1121956
Commit-Queue: Bill Budge <bbudge@chromium.org>
Reviewed-by: Jing Bao <jing.bao@intel.com>
Cr-Commit-Position: refs/heads/master@{#54302}
2018-07-06 17:31:07 +00:00
Dan Elphick
80e6cc92d6 [explicit isolates] Remove GetHeap/GetIsolate from FixedArray
Change GetHeap() in set methods to Heap::FromWritableHeapObject() since
the object can't be read-only if set is being called on it. Also use the
non-isolate form of set_the_hole to remove one GetIsolate().

Bug: v8:7786
Change-Id: I85cb95c8c7eb3baa9316b4a39eecf21bb13e5958
Reviewed-on: https://chromium-review.googlesource.com/1128081
Commit-Queue: Dan Elphick <delphick@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54301}
2018-07-06 17:17:27 +00:00
Bill Budge
acf2d122dd [wasm simd] Improve code generation for I8x16 Shifts
- Eliminates I8x16SPLAT macro. This generates:

  push eax
  mov  eax, #imm32
  movd xmmDest, eax
  pxor xmmScratch, xmmScratch
  pshufb xmmDest, xmmScratch
  pop eax

- Uses smaller sequence for I8x16Shl and I8x16ShrU that doesn't
  require a temp register.
- Uses punpckbw, psraw, packsswb sequence for I8x16ShrS.

Bug: v8:6020
Change-Id: I1dc4ecaba43b150a3412e9083fe930868d9e5d5d
Reviewed-on: https://chromium-review.googlesource.com/1121045
Reviewed-by: Jing Bao <jing.bao@intel.com>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54300}
2018-07-06 16:21:57 +00:00
Clemens Hammacher
815485244f [wasm] Share code of js-to-wasm wrappers
Instead of creating a separate code object per exported function, we
can share the code per signature, and load the function index from the
{WasmExportedFunction} object which is being passed as an argument
anyway.
This greatly reduces instantiation time for modules with a lot of
exports.
As a next step, we could even share the code across instances, or (with
more work) across isolates.

R=mstarzinger@chromium.org

Bug: chromium:860491
Change-Id: I6438065b2de0df59dce980fb52408a0f475144b3
Reviewed-on: https://chromium-review.googlesource.com/1127660
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54299}
2018-07-06 15:09:47 +00:00
Georg Neis
fa067fb94c Move some helpers to the DependentCode class, where they belong.
R=jarin@chromium.org

Bug: v8:7902
Change-Id: I402b2711b8a5a820b8c95285dc929f2a10c55f98
Reviewed-on: https://chromium-review.googlesource.com/1127883
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54298}
2018-07-06 14:18:27 +00:00
Dan Elphick
08a4fe71ce [heap] Delete Heap read-only root accessors
This is a clean-up to completely remove the Heap accessors for roots
accessible via ReadOnlyRoots. Where previously ReadOnlyRoots called the
Heap accessor, now it accesses the roots array directly using the root
index (since ReadOnlyRoots is a friend of Heap).

Also clean up several cases where private Heap accessors were still
being used by Heap and its friends.

Bug: v8:7786
Change-Id: Iaca2e17b22822b30d395dec6250a4d5ae496c983
Reviewed-on: https://chromium-review.googlesource.com/1127172
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54297}
2018-07-06 13:34:07 +00:00
Hannes Payer
8fe6b87fdd [heap] Tenure large objects based on size (currently 32K).
Bug: chromium:852420
Change-Id: Ibb8cd735036368c5bda83fe60b12b427e8e7ce7f
Reviewed-on: https://chromium-review.googlesource.com/1127887
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54296}
2018-07-06 13:33:05 +00:00
Georg Neis
cf87e94c01 Move CompilationDependencies into compiler.
- Move the CompilationDependencies member of OptimizedCompilationInfo
  to Turbofan's PipelineData (and thus into the compiler namespace).
- Move compilation-dependencies.{cc,h} to the compiler directory.

Bug: v8:7902
Change-Id: I5471d0923daf83abe975357325db5bc5ad0a8571
Reviewed-on: https://chromium-review.googlesource.com/1127793
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54295}
2018-07-06 13:32:02 +00:00
jgruber
30b7345fb0 Unskip debug-stepout-scope-part* on tsan/stress
TBR=machenbach@chromium.org

Bug: v8:7626
Change-Id: I1176d9703306159fed0c08f973104dd9357c9b1a
Reviewed-on: https://chromium-review.googlesource.com/1127882
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54294}
2018-07-06 13:30:57 +00:00
jgruber
fce2a142b8 [builtins] Reduce inlining in RegExp builtins
RegExp builtins were the first to be ported to CSA roughly two years
ago. Back then, we weren't really aware of issues surrounding code
size and CSA inlining, and thus some of these builtins were bigger
than they should be.

This CL adds a few new helper builtins and removes inlined calls to
SubString, RegExpExecInternal, and StringAdd. It significantly
reduces the size of affected builtins. Minor performance regressions
due to call overhead are expected.

Before:
TFS Builtin, RegExpReplace, 20008
TFS Builtin, RegExpSplit, 17340
TFS Builtin, RegExpMatchFast, 17064
TFJ Builtin, RegExpStringIteratorPrototypeNext, 12862

After:
TFS Builtin, RegExpReplace, 5067
TFS Builtin, RegExpSplit, 6329
TFS Builtin, RegExpMatchFast, 8164
TFJ Builtin, RegExpStringIteratorPrototypeNext, 6652

Bug: v8:5737
Change-Id: I1c077a084da85bb73c0c5adb7118b941f488e0ec
Reviewed-on: https://chromium-review.googlesource.com/1127796
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54293}
2018-07-06 13:29:52 +00:00
Hannes Payer
659db1986d [heap] Add new large object space to --trace-gc-verbose.
Bug: chromium:852420
Change-Id: Ibab2798cde017b178bf6db51c92ecff9e81ef641
Reviewed-on: https://chromium-review.googlesource.com/1127787
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54292}
2018-07-06 13:28:47 +00:00
Clemens Hammacher
4174a68e84 [wasm] Fix importing exported function in interpreter
When calling an import which is an exported wasm function, the
interpreter needs to look through the jump table to find the
actual code object.
We already had that logic for indirect calls, but it was missing for
imported calls.

R=ahaas@chromium.org

Bug: chromium:860392
Change-Id: I6b5a0192f79c23cb1de55407fe93f6df9a17235a
Reviewed-on: https://chromium-review.googlesource.com/1127671
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54291}
2018-07-06 11:22:01 +00:00
Sigurd Schneider
b672210f1e Revert "[parser] Move some PPSD sanity checks to debug"
This reverts commit f45045cca5.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> [parser] Move some PPSD sanity checks to debug
> 
> Move some of PreParsedScopeData's santity checks, such as the magic
> value separating skippable function data from scope data, to be debug
> only, to save memory.
> 
> Start position of inner skippable functions is still kept, because it's
> too good at catching bugs, but we may want to remove it in the future
> as well.
> 
> Bug: chromium:818642
> Change-Id: If86ff1b9845e8dd3b015b4e554d0033328b145bf
> Reviewed-on: https://chromium-review.googlesource.com/1127046
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Marja Hölttä <marja@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54263}

TBR=marja@chromium.org,leszeks@chromium.org

Change-Id: I15ceedd66d9ecb66cf65f5834d09975b41d3ed27
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:818642
Reviewed-on: https://chromium-review.googlesource.com/1127859
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54290}
2018-07-06 11:06:02 +00:00
Georg Neis
ffd7ef24f7 Reland "Clean up DependentCode class."
This is a reland of 1ba5d5ba76
without any changes.

TBR=jarin@chromium.org

Original change's description:
> Clean up DependentCode class.
>
> Also move some helpers there.
>
> Bug: v8:7902
> Change-Id: I1ef3d1e8317102afae2861382e9ba60b0ef6bba4
> Reviewed-on: https://chromium-review.googlesource.com/1121461
> Commit-Queue: Georg Neis <neis@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54179}

Bug: v8:7902
Change-Id: I9ef70b88be1b31b458a95442ff3806d651e809ee
Reviewed-on: https://chromium-review.googlesource.com/1127719
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54289}
2018-07-06 10:28:22 +00:00
Théotime Grohens
cf88badcfe [turbofan] Add remaining DataView getters in TurboFan.
This CL implements Reduction and Lowering for the DataView Int32,
Uint32, Float32 and Float64 getters.

This makes DataView getters fully supported in TurboFan (except for
BigInts), and should bridge the performance gap with TypedArrays.

Change-Id: Ifa98df9cf13e44d6468ad9ec8a19c86b41c6d2b1
Reviewed-on: https://chromium-review.googlesource.com/1127360
Commit-Queue: Théotime Grohens <theotime@google.com>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54288}
2018-07-06 09:49:00 +00:00
Yang Guo
00ff6b014d Revert "[node] reset node checkout on v8 update"
This reverts commit ccfa4ca742.

Reason for revert: Infra supports this now.

Original change's description:
> [node] reset node checkout on v8 update
> 
> This is a temporary measure to get bots back in order.
> 
> Bug: chromium:860430
> 
> TBR=machenbach@chromium.org
> 
> Change-Id: I3275150f4bc5dfe8ab90984e15f8a1a469d70caf
> Reviewed-on: https://chromium-review.googlesource.com/1127166
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54269}

TBR=machenbach@chromium.org,yangguo@chromium.org

Change-Id: I6a74ab702fd32b278caebb665be6868b4712dffb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:860430
Reviewed-on: https://chromium-review.googlesource.com/1127721
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54287}
2018-07-06 09:43:05 +00:00
Sigurd Schneider
1299ba9681 [turbofan] Thread through AssemblerOptions
This CL surfaces AssemblerOptions to CodeAssembler::GenerateCode and
to pipeline methods. To allow forward declaring AssemblerOptions,
AssemblerBase::Options was moved out of the AssemblerBase class.

Bug: v8:6666
Change-Id: If9fc50d3d4767bb5dd39a0c3b6e094021f4cae2b
Reviewed-on: https://chromium-review.googlesource.com/1127039
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54286}
2018-07-06 09:42:00 +00:00
Yang Guo
ca302be0de Revert "[node] force checkout vee-eight-lkgr"
This reverts commit 7fb1874df8.

Reason for revert: Infra supports this now.

Original change's description:
> [node] force checkout vee-eight-lkgr
> 
> TBR=machenbach@chromium.org
> 
> Bug: chromium:860430
> Change-Id: I5554468a7c11038903fc3ab5eca067c230b2849a
> Reviewed-on: https://chromium-review.googlesource.com/1127370
> Commit-Queue: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54279}

TBR=machenbach@chromium.org,yangguo@chromium.org

Change-Id: I5d99abb4885f8da9929ab826db47cd8ffc416b81
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:860430
Reviewed-on: https://chromium-review.googlesource.com/1127720
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54285}
2018-07-06 09:40:56 +00:00
Simon Zünd
575e582edc [array] Move Array.p.pop fall-back from JS to C++
This CL extends the existing ArrayPop C++ builtin with a generic
slow-path that replaces the JavaScript fallback.

R=cbruni@chromium.org, jgruber@chromium.org

Bug: v8:7624
Change-Id: Ie3ce5379e5c65df67cbc4d956390a8701345ea3c
Reviewed-on: https://chromium-review.googlesource.com/1127162
Commit-Queue: Simon Zünd <szuend@google.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54284}
2018-07-06 09:39:51 +00:00
Sigurd Schneider
b8e104882e [deoptimizer,ppc] Fix bug: constant pool reg had wrong value
This fixes a typo where we stored the framepointer in the constant pool
register instead of the constant pool value.

Bug: v8:7915
Change-Id: I612bf1860ed2e5e5707e2df4a2b92aefaaa9c5cb
Reviewed-on: https://chromium-review.googlesource.com/1127639
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54283}
2018-07-06 09:16:30 +00:00
Simon Zünd
d447525297 [array] Move Array.p.push fall-back from JS to C++
This CL extends the existing ArrayPush C++ builtin with a generic
slow-path that replaces the JavaScript fall-back.

Bug: v8:7624
Change-Id: I1e8431601e8a872f3c5afba5d486f37fd5781d60
Reviewed-on: https://chromium-review.googlesource.com/1126922
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Simon Zünd <szuend@google.com>
Cr-Commit-Position: refs/heads/master@{#54282}
2018-07-06 08:50:20 +00:00
Dominik Inführ
5f9686616c [heap] remove flag optimize_ephemerons
Originally intended for benchmarking but not good enough for that since
recent changes cannot be easily disabled.

Bug: chromium:844008
Change-Id: I4c7075fe2f1d5e85b76a0c40c854b0dbf7d4564b
Reviewed-on: https://chromium-review.googlesource.com/1127376
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@google.com>
Cr-Commit-Position: refs/heads/master@{#54281}
2018-07-06 08:45:11 +00:00
Georg Neis
a1cb1eb9fc Reland^2 "[turbofan] Rewrite CompilationDependencies"
This is a reland of 4b9b9b6845, which
accidentally disabled optimization after dependency changes (instead
of retrying).

TBR=jarin@chromium.org
TBR=mstarzinger@chromium.org

Original change's description:
> Reland "[turbofan] Rewrite CompilationDependencies"
>
> This is a reland of 52a10e5081, after
> eliminating an invalid assumption about maps.
>
> TBR=jarin@chromium.org
> TBR=mstarzinger@chromium.org
>
> Original change's description:
> > [turbofan] Rewrite CompilationDependencies
> >
> > Instead of installing code dependencies during graph reduction,
> > install them after code generation.
> >
> > Bug: v8:7902, v8:7790
> > Change-Id: I8a3798254abb5b9ec7c295a1592aeb6b51f24c7a
> > Reviewed-on: https://chromium-review.googlesource.com/1119913
> > Commit-Queue: Georg Neis <neis@chromium.org>
> > Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#54170}
>
> Bug: v8:7902, v8:7790
> Change-Id: I9cbaf98980379b9b17464af5952ec0c47e1cdc6f
> Reviewed-on: https://chromium-review.googlesource.com/1126999
> Reviewed-by: Georg Neis <neis@chromium.org>
> Commit-Queue: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54254}

Bug: v8:7902, v8:7790
Change-Id: I2b7a7d186e03990350e375470569177e3309683c
Reviewed-on: https://chromium-review.googlesource.com/1127579
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54280}
2018-07-06 08:40:20 +00:00
Yang Guo
7fb1874df8 [node] force checkout vee-eight-lkgr
TBR=machenbach@chromium.org

Bug: chromium:860430
Change-Id: I5554468a7c11038903fc3ab5eca067c230b2849a
Reviewed-on: https://chromium-review.googlesource.com/1127370
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54279}
2018-07-06 05:46:21 +00:00
Sathya Gunasekaran
4afd39c3a9 [intl] Set null proto for internal objects
Makes it safer to access from C++

Bug: v8:5751
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Ib435382bd5568a62976a32b1ff4ca67c8413ddf2
Reviewed-on: https://chromium-review.googlesource.com/1127081
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54278}
2018-07-06 05:45:16 +00:00
Jaroslav Sevcik
a5c456ade8 [turbofan] Broker for more straightforward create lowering methods.
Bug: v8:7790
Change-Id: I543078d72c9ce40c6927b57fd81b555f90bbfbff
Reviewed-on: https://chromium-review.googlesource.com/1126764
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54277}
2018-07-06 05:38:16 +00:00
Yang Guo
4b7d253ecc Mark flaky test as --no-opt
TBR=sigurds@chromium.org

Change-Id: Ibc6bcb9f9576a34d909a8f0d0fbdc2899f0b671e
Reviewed-on: https://chromium-review.googlesource.com/1127369
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54276}
2018-07-06 05:18:26 +00:00