Commit Graph

48521 Commits

Author SHA1 Message Date
Dan Elphick
edec05ea73 [explicit isolates] Pass Isolate to Object::Print
All Object::Print functions now take an Isolate* parameter. Various
XX::XXPrint functions now take an Isolate if it's needed rather than
calling GetIsolate(). Such method use DECL_PRINTER_WITH_ISOLATE rather
than DECL_PRINTER.

The _v8_internal_Print_ function (intended for use in gdb) now uses
Isolate::Current() to get hold of an Isolate.

Reduces the GetIsolate and GetHeap count by 9 and 5 respectively.

Also removes unneeded gdb/lldb macros (along with their support
functions), jfv, jfm, jda and jta, since job does the same thing.

Bug: v8:7786
Change-Id: Ib93ebca6ca47c4db9c85cc6d9ff8004da5942dec
Reviewed-on: https://chromium-review.googlesource.com/1112001
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54029}
2018-06-26 12:32:04 +00:00
Rodrigo Bruno
d4792e8f6b [heap] Added per-page array buffer accouting (external memory).
Bug: chromium:845409
Change-Id: Ibc568cdc501edf5d84d9c6379aff58be069369af
Reviewed-on: https://chromium-review.googlesource.com/1114602
Commit-Queue: Rodrigo Bruno <rfbpb@google.com>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54028}
2018-06-26 12:24:23 +00:00
Georg Neis
f1c79e0224 Reland "Reland "Introduce MutableHeapNumber class.""
This is a reland of f0bcbc90c1.
A few casts were still wrong.

Original change's description:
> Reland "Introduce MutableHeapNumber class."
>
> This is a reland of 40ac6b187a, which
> was incorrect due to a bad merge.
>
> Original change's description:
> > Introduce MutableHeapNumber class.
> >
> > V8 knows heap numbers and mutable heap numbers. They have
> > difference instance types, but in C++ code we've used the
> > same class for both (HeapNumber). Confusingly, however,
> > IsHeapNumber would return false for mutable heap numbers,
> > while HeapNumber::cast would succeed.
> >
> > This CL adds a separate class MutableHeapNumber and
> > eliminates the confusing behavior.
> >
[...]
> TBR=bmeurer@chromium.org
> TBR=ulan@chromium.org
>
> Change-Id: I3af1014c949821dfac0754a3e48c65ce1bad1ad1
> Reviewed-on: https://chromium-review.googlesource.com/1114539
> Reviewed-by: Georg Neis <neis@chromium.org>
> Commit-Queue: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54022}

Change-Id: I19a33da4b6abcd445b528a84d4f56ba1964d337b
Reviewed-on: https://chromium-review.googlesource.com/1114100
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54027}
2018-06-26 11:58:32 +00:00
Michael Starzinger
8ca3d065bf [wasm] Remove obsolete code specialization support.
R=clemensh@chromium.org

Change-Id: Id8a0849d3456be1062a065a23f51bac250de4f7d
Reviewed-on: https://chromium-review.googlesource.com/1107936
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54026}
2018-06-26 11:25:52 +00:00
Leszek Swirski
6038f637a4 [GetIsolate] Remove 1-arg Handle constructor
Remove the one-argument Handle constructor and "handle" factory method,
replacing them with Isolates where available and GetIsolate() methods
otherwise.

TBR=verwaest@chromium.org

Bug: v8:7786
Change-Id: I8ee92ef727c05382c984a3e4c290198d0b312619
Reviewed-on: https://chromium-review.googlesource.com/1113542
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54025}
2018-06-26 11:02:30 +00:00
Georg Neis
722dfb70cf Revert "Reland "Introduce MutableHeapNumber class.""
This reverts commit f0bcbc90c1.

Reason for revert: Still failing bots.

Original change's description:
> Reland "Introduce MutableHeapNumber class."
> 
> This is a reland of 40ac6b187a, which
> was incorrect due to a bad merge.
> 
> Original change's description:
> > Introduce MutableHeapNumber class.
> >
> > V8 knows heap numbers and mutable heap numbers. They have
> > difference instance types, but in C++ code we've used the
> > same class for both (HeapNumber). Confusingly, however,
> > IsHeapNumber would return false for mutable heap numbers,
> > while HeapNumber::cast would succeed.
> >
> > This CL adds a separate class MutableHeapNumber and
> > eliminates the confusing behavior.
> >
> > TBR=bmeurer@chromium.org
> >
> > Change-Id: Id894d177c7fe8cc3f451be80c273b50daee91378
> > Reviewed-on: https://chromium-review.googlesource.com/1113544
> > Commit-Queue: Georg Neis <neis@chromium.org>
> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> > Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#54012}
> 
> TBR=bmeurer@chromium.org
> TBR=ulanchromium.org
> 
> Change-Id: I3af1014c949821dfac0754a3e48c65ce1bad1ad1
> Reviewed-on: https://chromium-review.googlesource.com/1114539
> Reviewed-by: Georg Neis <neis@chromium.org>
> Commit-Queue: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54022}

TBR=ulan@chromium.org,jarin@chromium.org,neis@chromium.org,bmeurer@chromium.org

Change-Id: I99c226e95dfb0b913903cc83193f6e51de8c1b47
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/1114099
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54024}
2018-06-26 10:40:11 +00:00
Sigurd Schneider
ba39d635de [turbofan] Support kRootRegisterBias on all platforms
We had a kRootRegisterBias on x64 before. This CL ports the feature to
all other platforms as well. The root register bias is helpful to adjust
the value of the root register, which allows to better utilize signed
immediate offset constants in load instructions.

We currently use a separate add instruction to add kRootRegisterBias
in the code that initializes the root register. This could be improved
by adding a custom relocation mode ensuring that instead of the root
address, the root address plus the bias is inserted (and in this way
the add instruction can be omitted).

Bug: v8:6666
Change-Id: I55cf02ab85d11e3c6d0d83a8f7905dbf924890f1
Reviewed-on: https://chromium-review.googlesource.com/1113539
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54023}
2018-06-26 09:59:00 +00:00
Georg Neis
f0bcbc90c1 Reland "Introduce MutableHeapNumber class."
This is a reland of 40ac6b187a, which
was incorrect due to a bad merge.

Original change's description:
> Introduce MutableHeapNumber class.
>
> V8 knows heap numbers and mutable heap numbers. They have
> difference instance types, but in C++ code we've used the
> same class for both (HeapNumber). Confusingly, however,
> IsHeapNumber would return false for mutable heap numbers,
> while HeapNumber::cast would succeed.
>
> This CL adds a separate class MutableHeapNumber and
> eliminates the confusing behavior.
>
> TBR=bmeurer@chromium.org
>
> Change-Id: Id894d177c7fe8cc3f451be80c273b50daee91378
> Reviewed-on: https://chromium-review.googlesource.com/1113544
> Commit-Queue: Georg Neis <neis@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54012}

TBR=bmeurer@chromium.org
TBR=ulanchromium.org

Change-Id: I3af1014c949821dfac0754a3e48c65ce1bad1ad1
Reviewed-on: https://chromium-review.googlesource.com/1114539
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54022}
2018-06-26 09:46:10 +00:00
Michael Starzinger
4769681cd3 [wasm] Remove {NativeModule::module_object} field.
R=titzer@chromium.org
BUG=v8:7424

Change-Id: I1e5f41fba6cc575001cac1fd0a862736784a2131
Reviewed-on: https://chromium-review.googlesource.com/1113456
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54021}
2018-06-26 09:44:20 +00:00
Georg Neis
e3d4dd0805 Add missing deopt-trigger to invalidation of some protector cells.
R=bmeurer@chromium.org

Change-Id: Idd9c45f733e2e5d518c69a6ead2b56f6433ca30e
Reviewed-on: https://chromium-review.googlesource.com/1114598
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54020}
2018-06-26 09:38:20 +00:00
Michael Starzinger
676b4895ca [wasm] Remove all uses of {NativeModule::module_object}.
The field in question is a phantom link back into the GC'ed heap from
the native WebAssembly heap. It is one of the last pieces that makes the
compiled module specific to an Isolate. This is intended to finally make
code sharable between Isolates.

R=herhut@chromium.org
BUG=v8:7424

Change-Id: I75bcfabaf5149ca98a75d3ea3f19d8d8a8d96dce
Reviewed-on: https://chromium-review.googlesource.com/1113452
Reviewed-by: Stephan Herhut <herhut@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54019}
2018-06-26 09:31:50 +00:00
Leszek Swirski
733b15744f [GetIsolate] Remove 1-arg handles around ScriptIterator
Change the ScriptIterator to:

    a) construct its script list handle using the given isolate, and
    b) take the Script (which it doesn't store) by pointer instead of
       by Handle, to avoid callers needing to allocate a handle.

Bug: v8:7786
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I72c1ee13f1b72fe962f4b1bccba69ae4e97088a7
Reviewed-on: https://chromium-review.googlesource.com/1113316
Reviewed-by: Dan Elphick <delphick@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54018}
2018-06-26 08:52:30 +00:00
Michael Starzinger
82535f12c7 [wasm] Remove remnants of {WasmCompiledModule} handling.
R=titzer@chromium.org

Change-Id: Ia1eca39add782c5af27f12c2bb450cc7837a4251
Reviewed-on: https://chromium-review.googlesource.com/1113678
Reviewed-by: Ben Titzer <titzer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54017}
2018-06-26 08:06:50 +00:00
Ben L. Titzer
588e179449 [compiler] Rename Instruction::kEnableSerialization
The option to "enable serialization" actually only enables the
roots-relative register addressing. In the spirit of expressing specific
behaviors rather than isolate-wide modes, rename this flag to what
it actually does.

R=bmeurer@chromium.org

Change-Id: Iacbad8064c8f38b364db2a0bdd0e83ef4a265867
Reviewed-on: https://chromium-review.googlesource.com/1113742
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54016}
2018-06-26 07:10:47 +00:00
Georg Neis
7ef7290765 [turbofan] Remove uncertainty from OddballType.
We decided not to use this.

R=jarin@chromium.org

Bug: v8:7790
Change-Id: I18413bb1a363477bd297a5e44aeff2623e2f1c8e
Reviewed-on: https://chromium-review.googlesource.com/1113931
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54015}
2018-06-26 07:07:50 +00:00
Rodrigo Bruno
92f461c0b5 [heap] Preparing memory chunks to contain external memory counters.
Bug: chromium:845409
Change-Id: Id4f1b93f0992e15ed592156c7dec7d15828e4c42
Reviewed-on: https://chromium-review.googlesource.com/1113552
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Rodrigo Bruno <rfbpb@google.com>
Cr-Commit-Position: refs/heads/master@{#54014}
2018-06-26 06:46:35 +00:00
Yang Guo
983456f5b8 Revert "Introduce MutableHeapNumber class."
This reverts commit 40ac6b187a.

Reason for revert: https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20debug/21009

Original change's description:
> Introduce MutableHeapNumber class.
> 
> V8 knows heap numbers and mutable heap numbers. They have
> difference instance types, but in C++ code we've used the
> same class for both (HeapNumber). Confusingly, however,
> IsHeapNumber would return false for mutable heap numbers,
> while HeapNumber::cast would succeed.
> 
> This CL adds a separate class MutableHeapNumber and
> eliminates the confusing behavior.
> 
> TBR=bmeurer@chromium.org
> 
> Change-Id: Id894d177c7fe8cc3f451be80c273b50daee91378
> Reviewed-on: https://chromium-review.googlesource.com/1113544
> Commit-Queue: Georg Neis <neis@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54012}

TBR=ulan@chromium.org,jarin@chromium.org,neis@chromium.org,bmeurer@chromium.org

Change-Id: I358a822f20b9110def968e69463a753a2a32c68c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/1114538
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54013}
2018-06-26 06:45:31 +00:00
Georg Neis
40ac6b187a Introduce MutableHeapNumber class.
V8 knows heap numbers and mutable heap numbers. They have
difference instance types, but in C++ code we've used the
same class for both (HeapNumber). Confusingly, however,
IsHeapNumber would return false for mutable heap numbers,
while HeapNumber::cast would succeed.

This CL adds a separate class MutableHeapNumber and
eliminates the confusing behavior.

TBR=bmeurer@chromium.org

Change-Id: Id894d177c7fe8cc3f451be80c273b50daee91378
Reviewed-on: https://chromium-review.googlesource.com/1113544
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54012}
2018-06-26 06:25:50 +00:00
Aseem Garg
21e5229c5f Revert "[wasm] reduce registers for simd packing in ia32"
This reverts commit 82d447228b.

Reason for revert: we want to keep register allocation general simd binary case

Original change's description:
> [wasm] reduce registers for simd packing in ia32
>
> R=​gdeepti@chromium.org
> BUG=v8:6020
>
> Change-Id: I01644bca95ff5715122c1bc3923024145586a6fd
> Reviewed-on: https://chromium-review.googlesource.com/1112070
> Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
> Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53985}

TBR=bbudge@chromium.org,gdeepti@chromium.org,aseemgarg@chromium.org,jing.bao@intel.com

Bug: v8:6020
Change-Id: I878ca82b893fc019e9f769ab2b218fdbaad5f701
Reviewed-on: https://chromium-review.googlesource.com/1114157
Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
Reviewed-by: Aseem Garg <aseemgarg@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54011}
2018-06-25 21:51:38 +00:00
Yang Guo
b8626ca445 Skip long-running tests on gc-stress.
TBR=machenbach@chromium.org

Bug: v8:7881
Change-Id: I1fe6a64e3d64532411bdcbb95cd4dd36cbe234e0
Reviewed-on: https://chromium-review.googlesource.com/1111699
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54010}
2018-06-25 18:28:32 +00:00
Michael Starzinger
783ea6b23d [wasm] Remove obsolete {WasmCompiledModule::Reset} method.
In the two remaining places that call the {Reset} method, it is already
guaranteed that the {next_instance} and {prev_instance} is undefined.

R=titzer@chromium.org

Change-Id: Iab2e764d88b7ba710c664fea363951fb6f9132e0
Reviewed-on: https://chromium-review.googlesource.com/1113551
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54009}
2018-06-25 17:01:11 +00:00
Camillo Bruni
6ad42e8503 [proxies][keys] Do not filter ownKeys when defaulting to the target
Previously the KeyAccumulator incorrectly reused the filter properties when
collecting the keys of a proxy target. This led to incorect behavior where for
instance non-enumerable properties were filtered too early.


Bug: v8:7818
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I9b43b65be168ef0975fea9245d433a54338d228e
Reviewed-on: https://chromium-review.googlesource.com/1113743
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54008}
2018-06-25 16:40:01 +00:00
Camillo Bruni
2df4ba0263 Convert empty_fixed_double_array to empty_fixed_array in call/construct
Bug: chromium:850005, chromium:852085,
Change-Id: I777321306b1b68330e39e43aacc715478764649f
Reviewed-on: https://chromium-review.googlesource.com/1104470
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54007}
2018-06-25 16:38:21 +00:00
Sergiy Byelozyorov
d5e1d57c79 Update V8 DEPS.
Rolling v8/third_party/fuchsia-sdk: 8c08316..b334665

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

Change-Id: If210d2822e17961099b42080bfb9d0e5747a5d42
Reviewed-on: https://chromium-review.googlesource.com/1113545
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54006}
2018-06-25 14:20:55 +00:00
Théotime Grohens
3e78711c21 [dataview] Add fast path for DataView methods
This CL adds a fast path for DataView getters and setters when the
load or store to be performed is aligned and when the requested
endianness matches the platform endianness.

In that case, we can just emit the right load/store instruction
instead of having to read and write data byte by byte.

Change-Id: I10bd95a7fe8d23f695899eb8173bc654fb38fbb0
Reviewed-on: https://chromium-review.googlesource.com/1106168
Commit-Queue: Théotime Grohens <theotime@google.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54005}
2018-06-25 14:19:49 +00:00
Jaroslav Sevcik
541a0b7552 [turbofan] Use heap broker for accesses in JSCreateLowering::ReduceJSCreateLiteralArrayOrObject.
This does not move the dependency management there, yet.

Bug: v8:7790
Change-Id: Ia8b473a89c2853ffeba4adf84ac8814f403279c9
Reviewed-on: https://chromium-review.googlesource.com/1112256
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54004}
2018-06-25 14:13:49 +00:00
Mathias Bynens
75f14dbffc [regexp] Remove exhaustive Script_Extensions tests
The upstream test suite for Unicode property escapes [1] is exhaustive
and is updated soon after every new release of the Unicode Standard.
It is then upstreamed into Test262.

This patch simplifies our own Script_Extensions tests and the script
used to generate them. Now, only a few code points are tested for each
Script_Extension. This avoids unnecessary friction every time ICU
is updated based on a new Unicode version.

[1] https://github.com/mathiasbynens/unicode-property-escapes-tests
[2] https://github.com/tc39/test262/tree/master/test/built-ins/RegExp/property-escapes

Bug: chromium:850334, v8:7825
Change-Id: I792d6848ef48b41ea5e9db18b777040d019822f3
Reviewed-on: https://chromium-review.googlesource.com/1112250
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54003}
2018-06-25 13:42:59 +00:00
Rodrigo Bruno
da831e966d [heap] Added NewToOld page promotion test using JSArrayBuffers.
Bug: chromium:845409
Change-Id: I7a4e19529193f7e8369b7db02c7bcf01ae302ee3
Reviewed-on: https://chromium-review.googlesource.com/1113439
Commit-Queue: Rodrigo Bruno <rfbpb@google.com>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54002}
2018-06-25 13:26:09 +00:00
Michael Starzinger
fd151f32c2 [wasm] Allow printing of WasmCode without an Isolate.
R=titzer@chromium.org

Change-Id: I760a2568194edce486383d2bf32d598bdb9d44b1
Reviewed-on: https://chromium-review.googlesource.com/1109938
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54001}
2018-06-25 12:53:07 +00:00
Michael Starzinger
3b86e17604 [wasm] Remove {WasmModule::LookupName} for on-heap string.
R=herhut@chromium.org

Change-Id: I648c0247985c434df36586cbe702287516c54580
Reviewed-on: https://chromium-review.googlesource.com/1113337
Reviewed-by: Stephan Herhut <herhut@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54000}
2018-06-25 12:49:48 +00:00
Sergiy Byelozyorov
ed53aef016 Update V8 DEPS.
Rolling v8/build: 169887d..59ac9bd

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

Change-Id: Ie5992189071dffe8b26ae4dc51741bc853de5892
Reviewed-on: https://chromium-review.googlesource.com/1113314
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53999}
2018-06-25 12:16:22 +00:00
Sigurd Schneider
395d1e574e [unittests] Fix use-after-free leak via compilation dependencies
Unittests may take compilation dependencies without committing them,
because no code object is ever created. This CL ensures that after each
unittest, all uncommitted dependencies are discarded. Without this,
the compilation dependencies leaks pointers to already freed C++ objects
between test-cases, which are then accessed after free if a unittest
invalidates the corresponding compilation dependency.

Bug: v8:851886
Change-Id: I55d989c42d45f5d713613bc1d3f86e00bd1b8d21
Reviewed-on: https://chromium-review.googlesource.com/1113313
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53998}
2018-06-25 12:15:17 +00:00
Leszek Swirski
882080c499 [GetIsolate] Remove GetIsolate use in Map
Roughly:
    GetIsolate(): -31
    handle(HeapObject): -6

TBR=verwaest@chromium.org

Bug: v8:7786
Change-Id: I3857f8c45f1f93c727d575d5f9244d9811949a7f
Reviewed-on: https://chromium-review.googlesource.com/1111838
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53997}
2018-06-25 11:38:37 +00:00
Peter Marshall
23c4288380 [typedarray] Add a fast-path copy of arrays in IterableToList
Currently we perform the full iteration protocol even when we don't need
to. When IterableToListCanBeElided is true, we still need to create a
copy of the array (from a spec correctness point of view, in case there
are user-JS side-effects that would modify the original).

This CL copies the array directly, skipping the iteration protocol.
This recovers the JSTests/TypedArrays/ConstructArrayLike benchmark
almost completely.

Change-Id: I7f1593dd9af6e4a0485bd654e6c02186c5ae99d0
Reviewed-on: https://chromium-review.googlesource.com/1105995
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53996}
2018-06-25 11:27:37 +00:00
Sergiy Byelozyorov
a47c946d04 Update V8 DEPS.
Rolling v8/buildtools: 6f4dae2..5941c1b

Rolling v8/third_party/android_tools: https://chromium.googlesource.com/android_tools/+log/c22a664..3545ab5

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/fdacd16..2e625dc

Rolling v8/third_party/depot_tools: e09b684..d91a468

Rolling v8/third_party/googletest/src: 9077ec7..ce468a1

Rolling v8/tools/clang: 37fc68b..c6e5ea2

Rolling v8/tools/luci-go: 4cc6820..0e27f88

Rolling v8/tools/swarming_client: 281c390..9a518d0

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

Change-Id: I988c02cd04943c96e28badf97ac232d71e03e935
Reviewed-on: https://chromium-review.googlesource.com/1113185
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53995}
2018-06-25 10:51:45 +00:00
Camillo Bruni
e7f5c5ccc0 Reland "[parser][log] Log script id during background compilation"
This reverts commit a800e05007.

Original change's description:
> Revert "[parser][log] Log script id during background compilation"
>
> This reverts commit aafd5c52ab.
>
> Reason for revert: Tentative revert for
>
> https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Win64/24825
> https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Win64%20-%20msvc/3242
>
> Original change's description:
> > [parser][log] Log script id during background compilation
> >
> > - Add separate script-create, script-reserve-id and script-details log events
> > - Add log events for CompilationCache hits and puts
> > - Simplify function event logging by only pass along the script id
> > - Explicitly create Scripts in parse-processor.js on script events only
> > - Create a temporary script id in the ParseInfo for use during background
> >   parsing and compilation
> > - Clean up ParseInfo initialization to centralize creation and use of
> >   script ids
> > - Allow creating Scripts with predefined script ids
> >
> > Bug: chromium:757467, chromium:850038
> > Change-Id: I02dfd1d5725795b9fe0ea94ef57b287b934a1efe
> > Reviewed-on: https://chromium-review.googlesource.com/1097131
> > Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> > Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> > Commit-Queue: Camillo Bruni <cbruni@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#53978}
>
> TBR=ulan@chromium.org,cbruni@chromium.org,gsathya@chromium.org,leszeks@chromium.org
>
> Change-Id: I629f72f51d5e086e2b54658c1fdd18cec268aab2
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:757467, chromium:850038
> Reviewed-on: https://chromium-review.googlesource.com/1112538
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53984}

TBR=ulan@chromium.org,yangguo@chromium.org,cbruni@chromium.org,gsathya@chromium.org,leszeks@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: chromium:757467, chromium:850038
Change-Id: I3088c86362c06ee50464f1f14e25350b1b8048ad
Reviewed-on: https://chromium-review.googlesource.com/1112539
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53994}
2018-06-25 10:46:34 +00:00
Tobias Tebbi
9061eca256 [turbofan] [wasm] enable switch jump tables by default
With this CL, switch jump tables are enabled even with
--untrusted-code-mitigations

Bug: chromium:849098
Change-Id: I60545ed7bef2cd847710fd9660ef1007aac3b428
Reviewed-on: https://chromium-review.googlesource.com/1110817
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53993}
2018-06-25 09:05:24 +00:00
Shiyu Zhang
f9868eaa53 [builtins] implement fast path of Object.getOwnPropertyNames using CSA.
Migrate the Object.getOwnPropertyNames to the CodeStubAssembler and use the enum cache backing store when
1) the enum cache is avaible
2) the {object} has no elements
3) all own properties are enumerable

This makes a speedup of 10x when using Object.getOwnPropertyNames with fast-path. It improves Speedometer2.0 Inferno case by ~9% on ATOM platform.

Change-Id: I05e1df0e7d9d53d97664c322248cedb106a7b1d0
Reviewed-on: https://chromium-review.googlesource.com/1004434
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Shiyu Zhang <shiyu.zhang@intel.com>
Cr-Commit-Position: refs/heads/master@{#53992}
2018-06-25 08:50:54 +00:00
Michael Starzinger
e1f86718e4 [turbofan] Make --trace-turbo-graph annotate successors.
R=herhut@chromium.org

Change-Id: I052aee6778e96feeac5610c52b34b65d26de4dcb
Reviewed-on: https://chromium-review.googlesource.com/1112000
Reviewed-by: Stephan Herhut <herhut@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53991}
2018-06-25 08:46:04 +00:00
jing.bao
65bcf6c287 [ia32][wasm] Add unpacking integer conversions
I32x4U/SConvertI16x8Low/High, I16x8U/SConvertI8x16Low/High

Add pmovsxbw/wd, pmovzxbw/wd and AVX version
Add Palignr, Pmovsxbw/wd, Pmovzxbw/wd macro.
Reconstruct ptest/vptest, Ptest using macro

Change-Id: I4a26b3bb6d5791f72e3192c914758287701e78a0
Reviewed-on: https://chromium-review.googlesource.com/1111691
Commit-Queue: Jing Bao <jing.bao@intel.com>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Aseem Garg <aseemgarg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53990}
2018-06-25 04:25:24 +00:00
v8-ci-autoroll-builder
24d8254e72 Update test262.
Rolling v8/test/test262/data: 6c2503a..9bddfae

TBR=adamk@chromium.org,gsathya@chromium.org

Change-Id: I55dc31096a88cb0663bc87f53939c35e3c6422c2
Reviewed-on: https://chromium-review.googlesource.com/1112913
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@{#53989}
2018-06-23 14:52:30 +00:00
Leszek Swirski
a7da55e66d [GetIsolate] Remove GetIsolate use in PropertyCell
Bug: v8:7786
Change-Id: I2d2e62001294c15411e26b022cad410d54577927
Reviewed-on: https://chromium-review.googlesource.com/1111837
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53988}
2018-06-23 09:55:30 +00:00
Leszek Swirski
83ac43275e [GetIsolate] More low-hanging fruit
Access Isolate* and Heap* wherever already available.

Roughly:
GetIsolate(): -20
GetHeap(): -22
Handle<>(HeapObject): -315
handle(HeapObject): -21

Bug: v8:7786
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I2da36ed1909d849812a1cb6bf94cb735eedca45b
Reviewed-on: https://chromium-review.googlesource.com/1111707
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53987}
2018-06-23 09:53:20 +00:00
Deepti Gandluri
096927c123 [wasm] Fix memory flags for fuzzer test generation
R=clemensh@chromium.org
CC=titzer@chromium.org

Change-Id: Ie9cfc0902e765fe3c7945540a609be9901faedff
Reviewed-on: https://chromium-review.googlesource.com/1110847
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53986}
2018-06-23 00:34:29 +00:00
Aseem Garg
82d447228b [wasm] reduce registers for simd packing in ia32
R=gdeepti@chromium.org
BUG=v8:6020

Change-Id: I01644bca95ff5715122c1bc3923024145586a6fd
Reviewed-on: https://chromium-review.googlesource.com/1112070
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53985}
2018-06-22 23:56:20 +00:00
Yang Guo
a800e05007 Revert "[parser][log] Log script id during background compilation"
This reverts commit aafd5c52ab.

Reason for revert: Tentative revert for

https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Win64/24825
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Win64%20-%20msvc/3242

Original change's description:
> [parser][log] Log script id during background compilation
> 
> - Add separate script-create, script-reserve-id and script-details log events
> - Add log events for CompilationCache hits and puts
> - Simplify function event logging by only pass along the script id
> - Explicitly create Scripts in parse-processor.js on script events only
> - Create a temporary script id in the ParseInfo for use during background
>   parsing and compilation
> - Clean up ParseInfo initialization to centralize creation and use of
>   script ids
> - Allow creating Scripts with predefined script ids
> 
> Bug: chromium:757467, chromium:850038
> Change-Id: I02dfd1d5725795b9fe0ea94ef57b287b934a1efe
> Reviewed-on: https://chromium-review.googlesource.com/1097131
> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Commit-Queue: Camillo Bruni <cbruni@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53978}

TBR=ulan@chromium.org,cbruni@chromium.org,gsathya@chromium.org,leszeks@chromium.org

Change-Id: I629f72f51d5e086e2b54658c1fdd18cec268aab2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:757467, chromium:850038
Reviewed-on: https://chromium-review.googlesource.com/1112538
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53984}
2018-06-22 19:46:30 +00:00
Yang Guo
eb785dc0cc Revert "Reland "[wasm] Enable Liftoff by default on ia32 and x64""
This reverts commit 31815e7350.

Reason for revert: Several failures:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Win32/14453
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Win32%20-%20debug/15144
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Mac64%20ASAN/18385
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Win64%20ASAN/3469

Original change's description:
> Reland "[wasm] Enable Liftoff by default on ia32 and x64"
> 
> This is a reland of 20f33823c9.
> The GC crash should be fixed by https://crrev.com/c/1108208.
> 
> Original change's description:
> > [wasm] Enable Liftoff by default on ia32 and x64
> >
> > R=titzer@chromium.org, hablich@chromium.org
> >
> > Bug: v8:6600, chromium:787421
> > Change-Id: Ia8ae56ddef3b27b0721d5a66ff19abe098a2c6ca
> > Reviewed-on: https://chromium-review.googlesource.com/1109899
> > Reviewed-by: Ben Titzer <titzer@chromium.org>
> > Reviewed-by: Michael Hablich <hablich@chromium.org>
> > Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#53965}
> 
> TBR=titzer@chromium.org, hablich@chromium.org
> 
> Bug: v8:6600, chromium:787421
> Change-Id: I2228084d7bd8ef8e96027bbd3dd81bc42d1dc533
> Reviewed-on: https://chromium-review.googlesource.com/1112097
> Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53982}

TBR=titzer@chromium.org,hablich@chromium.org,clemensh@chromium.org

Change-Id: Id53c3cf08fa084108b656b7697786a364dfdf827
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6600, chromium:787421
Reviewed-on: https://chromium-review.googlesource.com/1112537
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53983}
2018-06-22 19:43:50 +00:00
Clemens Hammacher
31815e7350 Reland "[wasm] Enable Liftoff by default on ia32 and x64"
This is a reland of 20f33823c9.
The GC crash should be fixed by https://crrev.com/c/1108208.

Original change's description:
> [wasm] Enable Liftoff by default on ia32 and x64
>
> R=titzer@chromium.org, hablich@chromium.org
>
> Bug: v8:6600, chromium:787421
> Change-Id: Ia8ae56ddef3b27b0721d5a66ff19abe098a2c6ca
> Reviewed-on: https://chromium-review.googlesource.com/1109899
> Reviewed-by: Ben Titzer <titzer@chromium.org>
> Reviewed-by: Michael Hablich <hablich@chromium.org>
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53965}

TBR=titzer@chromium.org, hablich@chromium.org

Bug: v8:6600, chromium:787421
Change-Id: I2228084d7bd8ef8e96027bbd3dd81bc42d1dc533
Reviewed-on: https://chromium-review.googlesource.com/1112097
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53982}
2018-06-22 18:32:29 +00:00
Clemens Hammacher
7f851cd42c Reland "[Liftoff] Fix register use count"
This is a reland of ada648006b, fixed
for 32 bit architectures (register pairs).

Original change's description:
> [Liftoff] Fix register use count
>
> In {SetLocalFromStackSlot}, we decrement the use count of the register
> in the target slot without updating this slot, and then call
> {GetUnusedRegister}. At that point, the register use counts do not
> match the cache state, which leads to errors later on.
> This CL fixes this by marking the target slot as a stack slot after
> reducing the register use count.
>
> It also adds a Validation which helped to find that error and will
> catch similar errors earlier.
>
> R=titzer@chromium.org
>
> Bug: chromium:854050, v8:6600
> Change-Id: I74d3a5aa947ec4247d7b4557567f642bf4082316
> Reviewed-on: https://chromium-review.googlesource.com/1111958
> Reviewed-by: Ben Titzer <titzer@chromium.org>
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53976}

TBR=titzer@chromium.org

Bug: chromium:854050, v8:6600
Change-Id: Ibc8801737e9604a8490382c569b0378585625376
Reviewed-on: https://chromium-review.googlesource.com/1112238
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53981}
2018-06-22 17:41:21 +00:00
Alexey Kozyatinskiy
c46aa5bc93 [debug] removed live_edit flag and reimplemented LiveEdit::RestartFrame
It looks like we do not need live_edit flag.

R=dgozman@chromium.org,yangguo@chromium.org

Bug: v8:7862
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I2b635f7d24138894b7a0f94fc90293d50e40f22c
Reviewed-on: https://chromium-review.googlesource.com/1108386
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53980}
2018-06-22 17:29:59 +00:00