Commit Graph

48378 Commits

Author SHA1 Message Date
jgruber
f86365dc73 [builtins] Properly handle cctest heap creation in embedded builds
Some cctests force fresh creation of heap constants, even though the
cctest binary itself is an embedded snapshot build (i.e.: a snapshot
blob exists, and a binary-embedded blob exists). This breaks a few
assumptions, for example that off-heap builtins have a single,
canonical off-heap code range.

Unfortunately this isn't that easy to fix. I see a few alternatives:

1. In builtins setup, if an embedded blob exists, regenerate the
builtins for their metadata (things like the safepoint table offset),
and then replace them by off-heap trampolines.

2. As above, but deserialize the trampolines from the snapshot blob.

3. As above, but pack required metadata into the embedded blob and
create trampolines from there.

4. Act as if the embedded blob does not exist.

Alternative 1 does not work because the generated code can be slightly
different at at runtime vs. mksnapshot-time. Alternative 2 is out
because we do not have access to the snapshot blob in TestIsolate
setup. Alternative 3 is probably the preferred option but would be a
more involved change.

This CL takes path 4. It's not an optimal solution, but it can be
replace by alternative 3 later.

TBR=ulan@chromium.org

Bug: v8:7718, v8:7751
Change-Id: I36c024cb0179615011c886ed3978bc95f0d197ac
Reviewed-on: https://chromium-review.googlesource.com/1098924
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53886}
2018-06-20 13:38:52 +00:00
Michael Starzinger
007e183e5e [wasm] Reuse existing {ModuleEnv} during lazy compilation.
R=clemensh@chromium.org

Change-Id: I6b109a596ba4bbeeab4189003b902f026ab79ac9
Reviewed-on: https://chromium-review.googlesource.com/1107809
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53885}
2018-06-20 13:33:32 +00:00
Michael Starzinger
34d1cf28c8 [wasm] Fix runtime stub relocation in {AddAnonymousCode}.
R=clemensh@chromium.org

Change-Id: I82e329058d7904e638010e10b4f75aac5075e7d1
Reviewed-on: https://chromium-review.googlesource.com/1107062
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53884}
2018-06-20 13:13:22 +00:00
Clemens Hammacher
ed27ae1b31 [wasm] Use stub descriptor for stack check
The stack check builtin really has stub linkage, not wasm linkage. For
the stack check, it technically does not make a difference currently
since the stack check does not receive any arguments.

R=mstarzinger@chromium.org

Change-Id: Ia3e6ea192250dc3799c7a5166cf616f883c1f63f
Reviewed-on: https://chromium-review.googlesource.com/1107709
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53883}
2018-06-20 12:54:32 +00:00
Leszek Swirski
155c34d185 [GetIsolate] Remove GetIsolate from src/objects/*
Bug: v8:7786
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: If9904fe8feb9b4e157d42d6e84f1aa263abcc8b7
Reviewed-on: https://chromium-review.googlesource.com/1106160
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53882}
2018-06-20 12:46:22 +00:00
Yang Guo
22116dd6c8 [snapshot] fix resetting function code.
Unconditionally setting the JSFunction code to that of the SFI
may skip initializing the feedback vector.

R=leszeks@chromium.org

Bug: v8:7857
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I65d4bf32493be4cade2eaf3d665d44f93e80f809
Reviewed-on: https://chromium-review.googlesource.com/1107618
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53881}
2018-06-20 12:43:52 +00:00
Leszek Swirski
a890034b8f [GetIsolate] Remove GetIsolate in src/debug
Bug: v8:7786
Change-Id: I369eb0bf32d89603b6b944c2bb8fe402a16e429b
Reviewed-on: https://chromium-review.googlesource.com/1104423
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53880}
2018-06-20 12:41:32 +00:00
Michael Starzinger
48d6650437 [wasm] Make {RelocInfo::WASM_CALL} shareable.
R=clemensh@chromium.org

Change-Id: I89339f2d9035d1882e8d29a9119f1bc2d68927e5
Reviewed-on: https://chromium-review.googlesource.com/1105759
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53879}
2018-06-20 12:21:30 +00:00
Clemens Hammacher
a77b4e6867 [wasm] Fix GrowingVsFixedModule test
This test was not adapted for the jump table yet.

R=mstarzinger@chromium.org

Bug: v8:7867
Change-Id: Ifd03899b0757972525dcc54f04949635d03fa493
Reviewed-on: https://chromium-review.googlesource.com/1107624
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53878}
2018-06-20 12:18:50 +00:00
Toon Verwaest
d07d165fc1 Drop invalid dcheck
Bug: chromium:854213
Change-Id: I01fafbf63009f309758b07ba59013c72c7439a10
Reviewed-on: https://chromium-review.googlesource.com/1107707
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53877}
2018-06-20 12:11:50 +00:00
Leszek Swirski
c69d3c5e2b [GetIsolate] Access isolate where available on other objects
If the isolate is available via another object (including JSReceivers
and Contexts), grab it through that rather than HeapObject::GetIsolate.
As a drive-by, fix up places where this looked like it would work but
didn't because of null or uninitialized objects.

Bug: v8:7786
Change-Id: I3454840073d1455b3738e0ac34ccaa3c9a220896
Reviewed-on: https://chromium-review.googlesource.com/1104170
Reviewed-by: Dan Elphick <delphick@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53876}
2018-06-20 11:42:39 +00:00
Sergiy Byelozyorov
0b971dc21e [tools] Add vpython config for run-tests.py
R=machenbach@chromium.org

Bug: v8:7187
Change-Id: I9c64d637501f074464b1fe3637df50be447603ab
Reviewed-on: https://chromium-review.googlesource.com/1098934
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53875}
2018-06-20 11:27:39 +00:00
Yang Guo
b413284634 Revert "Reland "[array] Change QuickSort to TimSort for Array.p.sort""
This reverts commit 9d406a0249.

Reason for revert: Layout Test failures: https://ci.chromium.org/buildbot/client.v8.fyi/V8-Blink%20Linux%2064/24236

Original change's description:
> Reland "[array] Change QuickSort to TimSort for Array.p.sort"
> 
> This is a reland of 6bb8236808
> 
> Original change's description:
> > [array] Change QuickSort to TimSort for Array.p.sort
> > 
> > Bug: v8:7382
> > Change-Id: I7f125a62867eb586d2720a2c641fb5f4012b284d
> > Reviewed-on: https://chromium-review.googlesource.com/1100881
> > Commit-Queue: Simon Zünd <szuend@google.com>
> > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#53838}
> 
> Bug: v8:7382
> Change-Id: I499d782feaeb36df154e00a11d3b03cd41442347
> Reviewed-on: https://chromium-review.googlesource.com/1107497
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Simon Zünd <szuend@google.com>
> Cr-Commit-Position: refs/heads/master@{#53864}

TBR=cbruni@chromium.org,jgruber@chromium.org,szuend@google.com

Change-Id: I877834301d98174b148e42dee42f598a62c544de
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7382
Reviewed-on: https://chromium-review.googlesource.com/1107757
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53874}
2018-06-20 11:21:40 +00:00
Dan Elphick
ec245267b8 [explicit isolates] Fix up bootstrapper Handles
Replace all implicit Handle<T>(T*) constructors in src/bootstrapper.cc
with explicit ones that use a local variable or parameter.

(All done using Leszek's awesome new tool!)

Bug: v8:7786
Change-Id: Iec01fda502dd121bc1815d5dab73bd09bb3e5aa6
Reviewed-on: https://chromium-review.googlesource.com/1107697
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53873}
2018-06-20 11:20:29 +00:00
Creddy
8ca1c3900b Reland "[runtime][gc] Drop AllocationSite::weak_next field for sub-literals"
This is a reland of 380dba0a5c

Original change's description:
> [runtime][gc] Drop AllocationSite::weak_next field for sub-literals
> 
> Use AllocationSite without Weaknext field for all the allocations in nested
> literal except for Root. The nested field is sufficient to link all the
> allocations in a nested literal. Only the Root is added to heap weak_alloc_list
> for GC to traverse
> 
> Change-Id: I946e63292c6d168197cd2a087f697c73cc431272
> Reviewed-on: https://chromium-review.googlesource.com/1101323
> Commit-Queue: Chandan Reddy <chandanreddy@google.com>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53813}

Change-Id: Ic451fb3600b87f8f69748b1659ff89a80c9322fa
Reviewed-on: https://chromium-review.googlesource.com/1106257
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Chandan Reddy <chandanreddy@google.com>
Cr-Commit-Position: refs/heads/master@{#53872}
2018-06-20 11:00:59 +00:00
Michael Starzinger
7913a2a7cd [wasm] Remove support for trampolines from WasmCodeManager.
R=clemensh@chromium.org

Change-Id: Ic16e1da4ca50070ceff7f9a441250db2d20a868f
Reviewed-on: https://chromium-review.googlesource.com/1104471
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53871}
2018-06-20 10:31:59 +00:00
Georg Neis
0f80a21ccc [turbofan] Weaken map stability assumption for JSGetSuperConstructor.
There's no need to assume anything when we don't reduce the node.

R=bmeurer@chromium.org

Change-Id: Ic39b6e634c662824a72affd91318ca024f3e1055
Reviewed-on: https://chromium-review.googlesource.com/1105832
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53870}
2018-06-20 10:28:59 +00:00
Leszek Swirski
a5bd77326c [serializer] Fix top-level assumption
Fix assumption that only top level code won't have outer scope infos.

Bug: v8:7690
Change-Id: Ia6eec7b406632ad301e7db557597204c7ca66730
Reviewed-on: https://chromium-review.googlesource.com/1107622
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53869}
2018-06-20 10:10:19 +00:00
Jaroslav Sevcik
2439c9672e [turbofan] Refactor allocation sites for fast literal creation.
Bug: v8:7790
Change-Id: I6a6347d7394ddeacbb185a2e6e5187898bfca2dc
Reviewed-on: https://chromium-review.googlesource.com/1106173
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53868}
2018-06-20 09:57:49 +00:00
Théotime Grohens
d020584ac7 [torque] Add constexpr int31 equality operator
This CL adds a constexpr int31 == operator that returns
a constexpr bool value.

It also fixes a bug that this introduces because branch generation
for ternary operators incorrectly assumed that the condition value
was bool, whereas it can also be constexpr bool now.

Change-Id: Ie7d3497c9d1112c121b4a29561fe065b5bf01fb6
Reviewed-on: https://chromium-review.googlesource.com/1106343
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Théotime Grohens <theotime@google.com>
Cr-Commit-Position: refs/heads/master@{#53867}
2018-06-20 09:56:20 +00:00
Sergiy Byelozyorov
ca3c2b59ed [tools] Whitespace CL
TBR=sergiyb@chromium.org

Bug: chromium:854503
Change-Id: I07ae21bee95c2ef781824c6b98929ceb3786b1dd
Reviewed-on: https://chromium-review.googlesource.com/1107559
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53866}
2018-06-20 09:50:09 +00:00
Georg Neis
bffe040eaa Experiment: Bypass the descriptor lookup cache.
This is in order to check if we can get rid of the cache.

Bug: v8:7790
Change-Id: Id6625ffc440665b090f999564b006506f947ae45
Reviewed-on: https://chromium-review.googlesource.com/1107620
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53865}
2018-06-20 09:45:19 +00:00
Simon Zünd
9d406a0249 Reland "[array] Change QuickSort to TimSort for Array.p.sort"
This is a reland of 6bb8236808

Original change's description:
> [array] Change QuickSort to TimSort for Array.p.sort
> 
> Bug: v8:7382
> Change-Id: I7f125a62867eb586d2720a2c641fb5f4012b284d
> Reviewed-on: https://chromium-review.googlesource.com/1100881
> Commit-Queue: Simon Zünd <szuend@google.com>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53838}

Bug: v8:7382
Change-Id: I499d782feaeb36df154e00a11d3b03cd41442347
Reviewed-on: https://chromium-review.googlesource.com/1107497
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@google.com>
Cr-Commit-Position: refs/heads/master@{#53864}
2018-06-20 09:44:09 +00:00
Georgia Kouveli
cdb2ef01f5 [arm64] Remove deopt tables.
We can instead pass the deopt id in a register, where before we were passing the
deopt entry address. This removes the need for the deopt tables altogether,
saving 192kB.

Change-Id: I479d4de1a0245de328720b6b03a1955c8c63f696
Reviewed-on: https://chromium-review.googlesource.com/1076472
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georgia Kouveli <georgia.kouveli@arm.com>
Cr-Commit-Position: refs/heads/master@{#53863}
2018-06-20 09:19:41 +00:00
Georg Neis
8c4a30acab [turbofan] Make oddball type checks more convenient.
Also fix an oversight in my previous CL.

R=jarin@chromium.org

Bug: v8:7790
Change-Id: I61c783392b7b7b38ea28dc44dc1e932d15b55bc6
Reviewed-on: https://chromium-review.googlesource.com/1106170
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53862}
2018-06-20 08:57:39 +00:00
Yang Guo
70c43402ee [log][api] Fix GCC 4.9 build failure
GCC 4.9 used on some Node.js CI machines complains when the control
reaches the end of a non-void function and no return is encountered.

R=bmeurer@google.com, ofrobots@google.com, yangguo@google.com

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I5af0192cb187eccbf34dbb60ff3ac2e4774af803
Reviewed-on: https://chromium-review.googlesource.com/1105619
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53861}
2018-06-20 08:53:49 +00:00
Clemens Hammacher
f318f9835f [wasm] Move the NativeModule to the WasmModuleObject
The reference to the {NativeModule} (stored in a {Managed}) should live
on the {WasmModuleObject}, not on the individual {WasmCompiledModule}
objects.

R=titzer@chromium.org

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I21dfa088c9643d36d9fd5052a145e7e2af5e47f9
Reviewed-on: https://chromium-review.googlesource.com/1106380
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53860}
2018-06-20 08:13:59 +00:00
Michael Achenbach
e1ffbe2cb8 Whitespace change to trigger bots
TBR=santa

Bug: chromium:854503
Change-Id: I88ae0256b74cbc62df6ef81069d55eb894171a35
Reviewed-on: https://chromium-review.googlesource.com/1107064
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53859}
2018-06-20 07:57:41 +00:00
Clemens Hammacher
ce5b6a4fb8 [wasm] Remove redundant parameters
The {ModuleEnv} already contains a pointer to the {WasmModule}, no need
to pass it explicitly.

R=titzer@chromium.org

Change-Id: Icf0e8ea8b25c33dd5bcaeab2a4a746376e73813d
Reviewed-on: https://chromium-review.googlesource.com/1105828
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53858}
2018-06-20 07:29:49 +00:00
Clemens Hammacher
7e4e5d0fd6 [wasm][test] Fix WasmModule::num_declared_functions
Our tests currently don't set {WasmModule::num_declared_functions}
correctly. This CL fixes that.
This enables the use of {WasmModule::num_declared_functions} instead of
{NativeModule::num_functions_ - NativeModule::num_imported_functions_}.

Drive-by: Fix {std::vector} reservation to reserve enough space for all
functions during decoding.

R=titzer@chromium.org

Change-Id: I6d7783aed1c0de3275fc72787dec17c38ff8c73b
Reviewed-on: https://chromium-review.googlesource.com/1106166
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53857}
2018-06-20 07:22:29 +00:00
Junliang Yan
16de74bba4 PPC/s390: [turbofan] replace linear lookup switches with binary search
Port 825c748113

R=tebbi@chromium.org, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: If067828166e44b99f48add7e929d6be8b585f34b
Reviewed-on: https://chromium-review.googlesource.com/1106877
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#53856}
2018-06-19 21:56:08 +00:00
Bill Budge
81835bf03d Revert "[async] Optimize await and AsyncFromSyncIterator"
This reverts commit 21c0d77e15.

Reason for revert: Compile failure in bootstrapper.cc

Original change's description:
> [async] Optimize await and AsyncFromSyncIterator
> 
> Simplify the promise wrapping in await and
> %AsyncFromSyncIteratorPrototype%.next/return/throw to reuse the PromiseResolve
> primitive. Now await takes 1 tick instead of 3 on the microtask queue.
> 
> Change-Id: I7e99b8689eb8fcb09c48915b11c1e06684dc0f1a
> Reviewed-on: https://chromium-review.googlesource.com/1090272
> Commit-Queue: Maya Lekova <mslekova@chromium.org>
> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Mathias Bynens <mathias@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53853}

TBR=kozyatinskiy@chromium.org,littledan@chromium.org,gsathya@chromium.org,bmeurer@chromium.org,domenic@chromium.org,mathias@chromium.org,mslekova@chromium.org

Change-Id: Ia631acdfcd5c1f9c28c1540c8da16cdf076abf87
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/1106566
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53855}
2018-06-19 20:22:20 +00:00
Junliang Yan
b4e00ca1c5 s390: fix s390 debug build failures
Change-Id: I3aa30ac6a04b914cdd278a9c016467296a42ef8f
Reviewed-on: https://chromium-review.googlesource.com/1105058
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#53854}
2018-06-19 19:56:57 +00:00
Maya Lekova
21c0d77e15 [async] Optimize await and AsyncFromSyncIterator
Simplify the promise wrapping in await and
%AsyncFromSyncIteratorPrototype%.next/return/throw to reuse the PromiseResolve
primitive. Now await takes 1 tick instead of 3 on the microtask queue.

Change-Id: I7e99b8689eb8fcb09c48915b11c1e06684dc0f1a
Reviewed-on: https://chromium-review.googlesource.com/1090272
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53853}
2018-06-19 19:55:52 +00:00
Junliang Yan
eafcdc96e1 PPC/s390: [wasm] Introduce jump table
Port 733b7c8258

Original Commit Message:

    This introduces the concept of a jump table for WebAssembly, which is
    used for every direct and indirect call to any WebAssembly function.
    For lazy compilation, it will initially contain code to call the
    WasmCompileLazy builtin, where it passes the function index to be
    called.
    For non-lazy-compilation, it will contain a jump to the actual code.
    The jump table allows to easily redirect functions for lazy
    compilation, tier-up, debugging and (in the future) code aging. After
    this CL, we will not need to patch existing code any more for any of
    these operations.

R=clemensh@chromium.org, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com
BUG= v8:7758

Change-Id: I1a370910ffa56dbdd609be6922067842a6adf1df
Reviewed-on: https://chromium-review.googlesource.com/1105060
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53852}
2018-06-19 19:54:48 +00:00
Dominik Inführ
996a6c1096 [heap] Flag for disabling ephemeron optimizations
Disables all optimizations for WeakMaps/WeakSets.

Bug: chromium:844008
Change-Id: I5395ce981bbdd0e8e03ba0821103afde0889cf56
Reviewed-on: https://chromium-review.googlesource.com/1102513
Commit-Queue: Dominik Inführ <dinfuehr@google.com>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53851}
2018-06-19 19:53:43 +00:00
Brian Stell
bc43c8e8fc [intl] Port getAvailableLocales to C++
R=gsathya@chromium.org
Bug: v8:5751

Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: If842ab4850fc8d75bebb5331188ee237c5f1e9d7
Reviewed-on: https://chromium-review.googlesource.com/1097419
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Nebojša Ćirić <cira@chromium.org>
Commit-Queue: Brian Stell <bstell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53850}
2018-06-19 19:52:38 +00:00
Jakob Kummerow
8ea702e668 Revert "[array] Change QuickSort to TimSort for Array.p.sort"
This reverts commit 6bb8236808.

Reason for revert: breaks "nosnap" tests: CSA_ASSERT failure, array OOB read, see:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20nosnap%20-%20debug/19207

Original change's description:
> [array] Change QuickSort to TimSort for Array.p.sort
> 
> Bug: v8:7382
> Change-Id: I7f125a62867eb586d2720a2c641fb5f4012b284d
> Reviewed-on: https://chromium-review.googlesource.com/1100881
> Commit-Queue: Simon Zünd <szuend@google.com>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53838}

TBR=cbruni@chromium.org,jgruber@chromium.org,szuend@google.com

Change-Id: I986ab4c3a65666bd06be086c1503d01b6e9e34b4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7382
Reviewed-on: https://chromium-review.googlesource.com/1106717
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53849}
2018-06-19 19:40:09 +00:00
Michael Starzinger
e465e7c22c [assembler] Remove WebAssembly special case for RelocInfo.
This removes special casing in the handling of {RelocInfo::CODE_TARGET}
for cases where such references appeared in {WasmCode}. Such references
can only appear in real {Code} objects and also only target real {Code}
objects by now.

R=clemensh@chromium.org

Change-Id: I87c55c60cd6344bb67fa8c8d04b66fb523d07ba7
Reviewed-on: https://chromium-review.googlesource.com/1104680
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53848}
2018-06-19 16:36:52 +00:00
Clemens Hammacher
d5177a02c9 [wasm] Fix jump table for long jumps on arm
Direct jumps only work for offset up to 64 MB on arm. For longer jumps,
use indirect branches (load target from constant pool into the pc
register).

R=mstarzinger@chromium.org
CC=pierre.langlois@arm.com

Bug: v8:7758
Change-Id: I1cf66b7d1bfb62cfcd6b1619c02816909a1f651e
Reviewed-on: https://chromium-review.googlesource.com/1105996
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53847}
2018-06-19 16:01:00 +00:00
Michael Starzinger
928e28cddd [wasm] Use runtime stubs for coercions in wrappers.
This makes sure we use WebAssembly runtime stubs when performing value
coercions in wrapper code that is compiled into {WasmCode}. It hence
removes the last {RelocInfo::CODE_TARGET} references in {WasmCode}.

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

Change-Id: Ic96e541abe98f90796a6506b09ff99557743b6f7
Reviewed-on: https://chromium-review.googlesource.com/1104462
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53846}
2018-06-19 15:10:10 +00:00
Georg Neis
78b5b32f87 [turbofan] Encapsulate some heap accesses.
This encapuslates some of the heap accesses done by
JSNativeContextSpecialization::ReduceJSLoadGlobal and
JSNativeContextSpecialization::ReduceJSStoreGlobal.

Bug: v8:7790
Change-Id: Ib6c63903809927d6094af22519285cb9d0bbff7a
Reviewed-on: https://chromium-review.googlesource.com/1106141
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53845}
2018-06-19 14:50:09 +00:00
Clemens Hammacher
b78763a125 [wasm] Remove {GetNumFunctionsToCompile}
After the removal of the --skip-compiling-wasm-funcs flag, this helper
does not help that much any more, and contains unneeded logic. This CL
just inlines the computation in the caller.

R=titzer@chromium.org

Bug: v8:7754
Change-Id: I99cf006ffe9c33d79bea2ce186354c38bc63f6af
Reviewed-on: https://chromium-review.googlesource.com/1105767
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53844}
2018-06-19 14:30:30 +00:00
Tobias Tebbi
825c748113 [turbofan] replace linear lookup switches with binary search
Bug: chromium:849098
Change-Id: Iec81d08cf6edb6040445650cadf802a34b65b8e1
Reviewed-on: https://chromium-review.googlesource.com/1092749
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53843}
2018-06-19 14:24:00 +00:00
Dan Elphick
25cd2453d4 [cleanup] Make Heap::InToSpace static
Like Heap::InFromSpace, it doesn't use any members, so should be made
static. Also clean up call sites to not call via a heap pointer.

Change-Id: If55484ddac51351d789c73093f1f7ebf1c568bea
Reviewed-on: https://chromium-review.googlesource.com/1088618
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53842}
2018-06-19 13:59:20 +00:00
Toon Verwaest
7f2fc562dd Drop parameter names from ScopeInfo
Change-Id: I5fd42cd70aaba15cfef32eea54232f8292aaa874
Reviewed-on: https://chromium-review.googlesource.com/1105775
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53841}
2018-06-19 13:26:09 +00:00
Peter Marshall
2ebd3ed2fa [typedarray] Fix incorrect optimization in IterableToList
Bug: chromium:854066
Change-Id: Icabd9bf5e00868822b9debfb9bbb5d3932726465
Reviewed-on: https://chromium-review.googlesource.com/1105774
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53840}
2018-06-19 13:01:08 +00:00
Théotime Grohens
9fd7ac73be [torque] Improve error message in constexpr conditionals
This CL adds the incorrect return type of the conditional expression
in 'if constexpr' conditionals to the error message displayed
if the return type is different from 'constexpr bool'.

Change-Id: I58be4c140fa6fc475dc907a9ec872005fcb7d839
Reviewed-on: https://chromium-review.googlesource.com/1105768
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Théotime Grohens <theotime@google.com>
Cr-Commit-Position: refs/heads/master@{#53839}
2018-06-19 12:56:18 +00:00
Simon Zünd
6bb8236808 [array] Change QuickSort to TimSort for Array.p.sort
Bug: v8:7382
Change-Id: I7f125a62867eb586d2720a2c641fb5f4012b284d
Reviewed-on: https://chromium-review.googlesource.com/1100881
Commit-Queue: Simon Zünd <szuend@google.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53838}
2018-06-19 12:29:03 +00:00
Théotime Grohens
7b417038b1 [torque][cleanup] Move ToBoolean to base.tq
This CL moves the ToBoolean function from data-view.tq to base.tq.

It used to be in data-view.tq because we couldn't call macros
from one file to the other but this has been fixed now, and it
makes more sense to have it there.

Change-Id: Id201979eacbeb4307ff7d515db48377490d5bed7
Reviewed-on: https://chromium-review.googlesource.com/1104683
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Théotime Grohens <theotime@google.com>
Cr-Commit-Position: refs/heads/master@{#53837}
2018-06-19 12:27:58 +00:00