Commit Graph

48453 Commits

Author SHA1 Message Date
Simon Zünd
ce3c0064cd [array] Fix OOB load/stores when underlying FixedArray changed
This CL fixes a bug that allowed OOB read/stores on fastpaths when
a comparison function caused the underlying FixedArray to change
while keeping the elements kinds and size property on the original
JSArray the same.

R=jgruber@chromium.org

Bug: chromium:852592
Change-Id: I09af357d10e7f41e75241e4c87430fc9aa806f8c
Reviewed-on: https://chromium-review.googlesource.com/1104158
Commit-Queue: Simon Zünd <szuend@google.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53811}
2018-06-19 05:19:44 +00:00
Anna Henningsen
e980d0e860 [SAB] Fix flake in Atomics.wait, part II
Refs: https://ci.chromium.org/buildbot/client.v8/V8%20Linux64%20TSAN/21047

Bug: v8:7836
Change-Id: Ic825065de419bbab97972d9b7a2beb6527b0a48a
Reviewed-on: https://chromium-review.googlesource.com/1103560
Commit-Queue: Ben Smith <binji@chromium.org>
Reviewed-by: Ben Smith <binji@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53810}
2018-06-19 00:10:59 +00:00
Alexey Kozyatinskiy
71892ad96c [inspector] added blink try bots on inspector tests change
Inspector test expectations may be changed without changes inside
src/inspector directory.

R=dgozman@chromium.org

Bug: none
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I3196209a4b974d4cf32c76c51116d77e589a9dbb
Reviewed-on: https://chromium-review.googlesource.com/1104303
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53809}
2018-06-18 21:38:59 +00:00
Alexey Kozyatinskiy
0b690227f8 Reland "[inspector] fixed location of top level function return"
This is a reland of 4363a69335

Original change's description:
> [inspector] fixed location of top level function return
>
> We should pass false as has_braces argument to create FunctionLiteral
> for top level function.
>
> R=dgozman@chromium.org,bmeurer@chromium.org
> TBR=bmeurer@chromium.org
>
> Bug: none
> Change-Id: I397f31b562d32c71f3a12bfc9ceeed16c367aa80
> Reviewed-on: https://chromium-review.googlesource.com/1098018
> Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
> Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53769}
TBR=dgozman@chromium.org

Bug: v8:7858
Change-Id: Ie636bc101f9d29d9d40bd10b96e62da6505c2734
Reviewed-on: https://chromium-review.googlesource.com/1104497
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53808}
2018-06-18 21:37:49 +00:00
Clemens Hammacher
33f6c3e10e Revert "[wasm] Introduce jump table"
This reverts commit 733b7c8258.

Reason for revert: breaks arm64 gc-stress: https://ci.chromium.org/buildbot/client.v8.ports/V8%20Linux%20-%20arm64%20-%20sim%20-%20gc%20stress/11659

Original change's description:
> [wasm] Introduce jump table
> 
> 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=​mstarzinger@chromium.org, titzer@chromium.org
> 
> Bug: v8:7758
> Change-Id: I45f9983c2b06ae81bf5ce9847f4542fb48844a4f
> Reviewed-on: https://chromium-review.googlesource.com/1097075
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Ben Titzer <titzer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53805}

TBR=mstarzinger@chromium.org,titzer@chromium.org,clemensh@chromium.org,sreten.kovacevic@mips.com

Change-Id: Iea358db2cf13656a65cf69a6d82cbbc10d3e7e1c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7758
Reviewed-on: https://chromium-review.googlesource.com/1105157
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53807}
2018-06-18 20:38:50 +00:00
Igor Sheludko
a2b5e64cfc [builtins] Remove BuiltinDescriptor.
Now TFJ builtins can use their own descriptors so there's no need to
keep the hacky BuiltinDescriptor around.

Bug: v8:7754
Change-Id: Ia7f23a21fb979370fd2149fef13186b83a3d5d30
Reviewed-on: https://chromium-review.googlesource.com/1104428
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53806}
2018-06-18 17:16:59 +00:00
Clemens Hammacher
733b7c8258 [wasm] Introduce jump table
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=mstarzinger@chromium.org, titzer@chromium.org

Bug: v8:7758
Change-Id: I45f9983c2b06ae81bf5ce9847f4542fb48844a4f
Reviewed-on: https://chromium-review.googlesource.com/1097075
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53805}
2018-06-18 16:38:09 +00:00
Dominik Inführ
3e5db48751 [heap] Move RecordSlot to concurrent marking
Move Slot recording to concurrent and incremental marking phase and
out of the atomic pause. Records more slots to remove
slot recording completely from the pause.

Bug: chromium:844008
Change-Id: I13ba20b4839990134dc37bd909fb0a2d66e13c64
Reviewed-on: https://chromium-review.googlesource.com/1104348
Commit-Queue: Dominik Inführ <dinfuehr@google.com>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53804}
2018-06-18 16:04:23 +00:00
Clemens Hammacher
3cb376dc83 Make CallInterfaceDescriptor isolate-independent
Currently each isolate stores its own array of
{CallInterfaceDescriptorData}. This array has size 173, and each entry
has 40 bytes. That's already 7kB per isolate.
Additionally, each {CallInterfaceDescriptorData} allocates two
heap-allocated arrays, which probably add up to more than the static
size of the {CallInterfaceDescriptorData}. Note that all the
{CallInterfaceDescriptorData} instances are initialized eagerly on
isolate creation.

Since {CallInterfaceDescriptor} is totally isolate independent itself,
this CL refactors the current design to avoid a copy of them per
isolate, and instead shares them process-wide. Still, we need to free
the allocated heap arrays when the last isolate dies to avoid leaks.
This can probably be refactored later by statically initializing more
and avoiding the heap allocations all together.

This refactoring will also allow us to use {CallInterfaceDescriptor}s
from wasm background compilation threads, which are not bound to any
isolate.

R=mstarzinger@chromium.org, titzer@chromium.org

Bug: v8:6600
Change-Id: If8625b89951eec8fa8986b49a5c166e874a72494
Reviewed-on: https://chromium-review.googlesource.com/1100879
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53803}
2018-06-18 15:55:53 +00:00
Toon Verwaest
467eb1497e Drop stack-locals from ScopeInfo
For now we keep params since NewSloppyArguments uses it to figure out how to structure the arguments object. We should be able to only keep params in case we have a special case though. E.g., leaf functions with no duplicate parameters don't need special treatment. Or we simply encode the parameter index for each context slot. (I'm not sure duplicates need special treatment.)


Change-Id: Icfbb844e5331aeb93c50bc07edd58246c8aeb1d7
Reviewed-on: https://chromium-review.googlesource.com/1104420
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53802}
2018-06-18 15:21:13 +00:00
Clemens Hammacher
6be6ec0091 [wasm] Store WasmModule in shared_ptr during async compilation
We currently store the {WasmModule} (generated during decoding) in a
unique_ptr and pass ownership to the {WasmModuleObject} after
compilation.
I plan to move the {Managed<NativeModule>} from {WasmCompiledModule} to
{WasmModuleObject}, which will force us to create the
{WasmModuleObject} *before* compilation, so that the {CompilationState}
is available during compilation.

This CL prepares that refactoring by storing the {WasmModule} in a
{shared_ptr} in the {AsyncCompileJob}. Note that it will eventually be
stored in a {shared_ptr} in the {Managed} anyway.

R=titzer@chromium.org

Change-Id: Iac5e3c1067af2801e938f77a455a68807801526a
Reviewed-on: https://chromium-review.googlesource.com/1104117
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53801}
2018-06-18 15:10:03 +00:00
Théotime Grohens
e947d21e3d [dataview]: Move DataView setters to Torque.
This CL completely reimplements the DataView setters in Torque, and
removes the former C++ runtime implementation.

Change-Id: I66cdd35712e46f3931d6530a4512fa3c8eb3b3bf
Reviewed-on: https://chromium-review.googlesource.com/1104162
Commit-Queue: Théotime Grohens <theotime@google.com>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53800}
2018-06-18 15:02:44 +00:00
Sigurd Schneider
8f8c53ba75 [mjsunit] Improve long-running test
Reading up on the bug description, this is a test
that is triggered by TurboFan execution. This can
be done with natives and does not need excessive
loop iterations. Additionally, we have a more specific
regression test for the original issue in the repo:
http://crrev.com/c/584837

Bug: v8:7783
Change-Id: Id022b515b663e6fb897acb29f43ef92b70b547b8
Reviewed-on: https://chromium-review.googlesource.com/1101018
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53799}
2018-06-18 14:45:23 +00:00
Igor Sheludko
412ec7539d [builtins] Relax type check in a slow path of Object.assign.
Bug: chromium:851393
Change-Id: I53cbf16068efbf24a2bd233c0b4c56e8361f9931
Reviewed-on: https://chromium-review.googlesource.com/1104317
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53798}
2018-06-18 14:37:38 +00:00
Georg Neis
402c300c23 [turbofan] Eliminate handle dereference in JSGraph::Constant.
This adds an overload of JSGraph::Constant that takes an ObjectReference
rather than a Handle<Object>.

ObjectReference is a new superclass of HeapReference.

Also several refactorings and renaming, e.g.:
- Rename HeapReference to HeapObjectRef.
- Rename ContextHeapReference to ContextRef.
- ...
- Rename HeapReferenceType to HeapObjectType.

Bug: v8:7790
Change-Id: Id3e567cbaf7c326189b99b2fd4ced6bff02f9640
Reviewed-on: https://chromium-review.googlesource.com/1104337
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53797}
2018-06-18 14:36:33 +00:00
Igor Sheludko
90e464a277 Interface descriptors cleanup: JSTrampolineDescriptor added.
This CL also adds macros for defining JS-compatible interface descriptors that
has additional parameters.
ArrayConstructorDescriptor is redefined using the new macros.

Bug: v8:7754
Change-Id: Id39cac9f234666576f35de755d11aba198248bea
Reviewed-on: https://chromium-review.googlesource.com/1100833
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53796}
2018-06-18 14:35:29 +00:00
Sigurd Schneider
a64c62393a [infra] Disable failing test
The test test-api/InitializeDefaultIsolateOnSecondaryThread1 has been
failing since at least 6.8, but our infra only recently realized that.

NOTRY=true
NOPRESUBMIT=true
NOTREECHECKS=true

Bug: v8:7856
Change-Id: I8cbfd4ea554bb32c50c01d437efa5b18f60c2fde
Reviewed-on: https://chromium-review.googlesource.com/1104458
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53795}
2018-06-18 14:34:24 +00:00
Igor Sheludko
2b0f66549b [builtins] Don't refer to builtin's parameters from helper methods.
This is a preliminary step before removing BuiltinDescriptor.

Bug: v8:7754
Change-Id: I752134aa29431e5773c9813361a3c6bda6f8872d
Reviewed-on: https://chromium-review.googlesource.com/1104169
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53794}
2018-06-18 12:46:52 +00:00
Igor Sheludko
e602c90abc Properly set enumeration order for accessor properties in class literals.
Bug: chromium:848165
Change-Id: I1ec18bf12f53c24f388dbd529fe62e990fbc8783
Reviewed-on: https://chromium-review.googlesource.com/1104175
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53793}
2018-06-18 12:45:02 +00:00
Théotime Grohens
6e47d31fca [torque] Fix Signature printing
The operator<< for Signature objects in Torque incorrectly counted
the number of named parameters instead of the total number
of parameters when displaying them.

This would cause the displayed signature to be "()" when no
parameters were named, instead of the actual signature.

Change-Id: I32572da5f5a378b71749515d89429172129bbcb9
Reviewed-on: https://chromium-review.googlesource.com/1104172
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Théotime Grohens <theotime@google.com>
Cr-Commit-Position: refs/heads/master@{#53792}
2018-06-18 12:38:22 +00:00
Clemens Hammacher
fffa33179d [wasm] Register and release protected instructions only once
We currently have a system where the protected instructions are
unregistered when the last instance dies, and registered again on the
next instantiation. This is triggered by {WasmCompiledModule::Reset}.
Since the reference to the {NativeModule} will move to the
{WasmModuleObject}, and this object stays alive even if the last
instance dies, this will become hard to maintain.
It will also make it harder to share wasm code across isolates.
This CL refactors this to register trap handler data once when the code
is added to the {NativeModule}, and releases it if the code dies.

R=mstarzinger@chromium.org
CC=​eholk@chromium.org

Bug: v8:5277
Change-Id: I3f1b336095230b255f3849c271b37b62f2b96cd6
Reviewed-on: https://chromium-review.googlesource.com/1103567
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53791}
2018-06-18 12:25:32 +00:00
Sigurd Schneider
feef6195a2 [mjsunit] Improve speed with OptimizeOsr
Bug: v8:7783
Change-Id: I3c6a229b5a1a30ea089ffeef920bf48b27bc86ab
Reviewed-on: https://chromium-review.googlesource.com/1101030
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53790}
2018-06-18 12:13:02 +00:00
Toon Verwaest
0a846a0e84 Don't expose GetFunction on the scope iterator. Simply take it into account for GetFunctionDebugName
This is a step towards avoiding materializing function_ altogether if we deoptimize. Typically we only need the SharedFunctionInfo.

Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Idee78f02d1afe3d2cb70e93a6d96a5a33907f892
Reviewed-on: https://chromium-review.googlesource.com/1100474
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53789}
2018-06-18 12:03:59 +00:00
Simon Zünd
bef673403e [array] Add fastpath for dictionary elements to Array.p.sort
R=cbruni@chromium.org, jgruber@chromium.org

Bug: v8:7382
Change-Id: I45f2517afa8ecb3ddb1f77f845e9ce88f69d4eef
Reviewed-on: https://chromium-review.googlesource.com/1092500
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@google.com>
Cr-Commit-Position: refs/heads/master@{#53788}
2018-06-18 11:31:59 +00:00
Clemens Hammacher
eaf03c0c90 [wasm][cleanup] Remove {CompileToModuleObjectInternal}
It only has one call size ({CompileToModuleObject}), which just tail
calls into {CompileToModuleObjectInternal}. Thus, merge the two.

R=titzer@chromium.org

Bug: v8:7754
Change-Id: I6344f257279f049fd6cab51114988f7e1c019272
Reviewed-on: https://chromium-review.googlesource.com/1104157
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53787}
2018-06-18 11:26:19 +00:00
Michael Starzinger
8d82cddbcc [turbofan] Remove obsolete Linkage::GetAllocateCallDescriptor.
R=ishell@chromium.org

Change-Id: I84288cc16297dbe33adddbdf08b689db95d0fc04
Reviewed-on: https://chromium-review.googlesource.com/1104164
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53786}
2018-06-18 10:58:18 +00:00
Clemens Hammacher
38be8e067a Avoid massive template instantiation in CodeAssembler
Instead of instantiating each function multiple times, just call out to
a common function, passing the variadic number of arguments in an
initializer list.

R=tebbi@chromium.org

Bug: v8:7754
Change-Id: Idb2d77cef7cf8e590de6aa3cea02c0e0773da45f
Reviewed-on: https://chromium-review.googlesource.com/1101689
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53785}
2018-06-18 10:43:28 +00:00
Leszek Swirski
f67e424d7c [GetIsolate] Return raw object for bytecode constants
Return the raw Object* when accessing the constant pool of bytecode
with the bytecode array accessor, to avoid needing an isolate there.
If the returned value needs to be a handle, we create the handle
later.

Bug: v8:7786
Change-Id: Ifeac2a06f0383230bf7e9bfc1b751d9750ecfb51
Reviewed-on: https://chromium-review.googlesource.com/1102334
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53784}
2018-06-18 10:26:18 +00:00
Igor Sheludko
d9a5a48d8d [builtins] Refer to parameters via Descriptor in TFC builtins.
Bug: v8:7754
Change-Id: Ie8224f2cda1132f0ac8f5508b54c31a6164a944e
Reviewed-on: https://chromium-review.googlesource.com/1104160
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53783}
2018-06-18 10:06:29 +00:00
Michael Starzinger
7619bde8f1 [turbofan] Remove obsolete {BlockCodeTargetSharingScope}.
By now we no longer emit calls with {RelocInfo::CODE_TARGET} as part of
WebAssembly code. Hence the requirement to block sharing of code targets
disappeared and the support can be dropped.

R=jarin@chromium.org

Change-Id: I6df026cd05769ddaa6ea8df5a7b17b62e8a7c373
Reviewed-on: https://chromium-review.googlesource.com/1100889
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53782}
2018-06-18 10:02:09 +00:00
Toon Verwaest
a5b5f8e970 Reland "[debugger] Rewrite the ScopeIterator/DebugEvaluate to use Scope rather than ScopeInfo for inner scopes."
Change-Id: I0ad97057600d0a0f1dd4c71d5f8245dafb908154
Reviewed-on: https://chromium-review.googlesource.com/1103576
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53781}
2018-06-18 09:25:29 +00:00
Simon Zünd
a93d30d532 [torque] Improve error message when calling macros
Current situation: When calling a macro with the wrong parameter types
the error message will say "macro not found".

This CL changes the message to "macro with parameter types not found"
and lists possible candidates.

R=tebbi@chromium.org

Bug: v8:7793
Change-Id: I6724c4030cbbf4ca1af008b33797b2dd9d18808b
Reviewed-on: https://chromium-review.googlesource.com/1101694
Commit-Queue: Simon Zünd <szuend@google.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53780}
2018-06-18 09:15:08 +00:00
Pierre Langlois
e0204550b6 [cctest] Disable --enable-slow-asserts for FuzzAssemble* tests.
The FuzzAssemble* tests rely on two CSA functions which are relatively big. And
with the --enable-slow-asserts flag they get so big that the register
allocator's memory consumption becomes a problem. Let's just override this flag.

Bug: v8:7819, v8:6848, v8:7842
Change-Id: I95db59b9c788aa665d04339892b2e0b5d92d9a89
Reviewed-on: https://chromium-review.googlesource.com/1093315
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#53779}
2018-06-18 09:00:29 +00:00
Simon Zünd
3291bd38bd [cleanup] Move Array.p.sort Torque code into its own file
R=jgruber@chromium.org

Bug: v8:7382
Change-Id: I5b92f46736d8c0ca8ef0f187ecaa1d58661a1c7f
Reviewed-on: https://chromium-review.googlesource.com/1101690
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@google.com>
Cr-Commit-Position: refs/heads/master@{#53778}
2018-06-18 08:22:59 +00:00
Matheus Marchini
acc336c125 [log] fix boolean logic on LogCodeObject
R=yangguo@google.com

Change-Id: Icb4825344991e5b2d15050e037064c60eeb9617e
Reviewed-on: https://chromium-review.googlesource.com/1097578
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@{#53777}
2018-06-18 08:12:38 +00:00
Clemens Hammacher
3f3c6e692e [assembler] Remove kCodeTargetMask
Since https://crrev.com/2951473002, there is only one reloc info for
code targets, so there is no need for the special {kCodeTargetMask}.

R=mstarzinger@chromium.org

Bug: v8:7754
Change-Id: I1055108c0128c7de0f5cfefc5e90bbd9dc75522a
Reviewed-on: https://chromium-review.googlesource.com/1098663
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53776}
2018-06-18 08:00:43 +00:00
Clemens Hammacher
7a8e24b48f Revert "[inspector] fixed location of top level function return"
This reverts commit 4363a69335.

Reason for revert: Seems to break layout tests: https://ci.chromium.org/buildbot/client.v8.fyi/V8-Blink%20Linux%2064/24146

Original change's description:
> [inspector] fixed location of top level function return
> 
> We should pass false as has_braces argument to create FunctionLiteral
> for top level function.
> 
> R=​dgozman@chromium.org,bmeurer@chromium.org
> TBR=bmeurer@chromium.org
> 
> Bug: none
> Change-Id: I397f31b562d32c71f3a12bfc9ceeed16c367aa80
> Reviewed-on: https://chromium-review.googlesource.com/1098018
> Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
> Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53769}

TBR=dgozman@chromium.org,yangguo@chromium.org,kozyatinskiy@chromium.org

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

Bug: none
Change-Id: I4495f6723daed63b7a38b0d3c3637724f6c2d484
Reviewed-on: https://chromium-review.googlesource.com/1104017
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53775}
2018-06-18 07:59:39 +00:00
Kanghua Yu
86e68d02af [turbofan] Add verification for jump optimization.
The jump optimization maybe run Turbofan pipeline twice for each TF/CS builtins,
and relies on the fact that the number of j/jmp instruction generated is always
the same.
This CL introduces a verification process to ensure that instruction sequence
and virtual registers are always the same in two stages, before the final
code generation phase.

R=danno@chromium.org, jarin@chromium.org

Bug: v8:7839
Change-Id: Id77e9bc80f54f79d7a845315e0b99e3f4b6a54fb
Reviewed-on: https://chromium-review.googlesource.com/1100491
Commit-Queue: Kanghua Yu <kanghua.yu@intel.com>
Reviewed-by: Daniel Clifford <danno@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53774}
2018-06-16 01:37:25 +00:00
Sergiy Byelozyorov
ee94d9be7d [tools] Whitespace CL
TBR=sergiyb@chromium.org

No-Try: true
Bug: chromium:793687
Change-Id: Ia2dbc1f11f1852bcc89889e9bf6ea5ab6066f868
Reviewed-on: https://chromium-review.googlesource.com/1103197
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53773}
2018-06-15 20:45:12 +00:00
Junliang Yan
497b6746be [wasm] skip big-endian failing tests across all big-endian platforms
Bug: v8:6020
Change-Id: If121d2813e81e11773c42c36893b63ff98fc0247
Reviewed-on: https://chromium-review.googlesource.com/1101840
Reviewed-by: Aseem Garg <aseemgarg@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#53772}
2018-06-15 17:58:22 +00:00
Vasili Skurydzin
f0da6bc459 s390: Optimize branches by brxh/brxhg
Change-Id: Icb92a52112f5e709c3cdbc6f1a5555674633cb89
Reviewed-on: https://chromium-review.googlesource.com/1093554
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#53771}
2018-06-15 17:56:23 +00:00
jgruber
cf00d6f06f Remove CodeAssembler::LoadRootsPointer
This reverts two commits:

Introduce CodeAssembler::LoadRootsPointer
377803f804

[turbofan][x64] Reduce reg-to-reg moving instruction for
LoadRootsRegister IR
d4177d1173

LoadRootsPointer was used by indirections for heap constants and
external references from within CSA. Now that handling has moved to
the macro-assembler, it can be removed.

Bug: v8:6666
Change-Id: I868fe100e65a0a7a44ffc81674fa1ce79a56f7ed
Reviewed-on: https://chromium-review.googlesource.com/1097080
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53770}
2018-06-15 15:16:17 +00:00
Alexey Kozyatinskiy
4363a69335 [inspector] fixed location of top level function return
We should pass false as has_braces argument to create FunctionLiteral
for top level function.

R=dgozman@chromium.org,bmeurer@chromium.org
TBR=bmeurer@chromium.org

Bug: none
Change-Id: I397f31b562d32c71f3a12bfc9ceeed16c367aa80
Reviewed-on: https://chromium-review.googlesource.com/1098018
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53769}
2018-06-15 15:11:27 +00:00
Kanghua Yu
7aa82b97f0 [csa] Add more constant folding
This adds constant folding support for IntPtrEqual/Word{,32,64}{Equal,NotEqual}

Change-Id: I3afe2b5284baf077f03805d2cf48be33282d7bec
Reviewed-on: https://chromium-review.googlesource.com/1053162
Commit-Queue: Kanghua Yu <kanghua.yu@intel.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53768}
2018-06-15 15:10:21 +00:00
Sergiy Byelozyorov
f1462b59c4 Disable allocation-site-info to unblock LKGR
R=clemensh@chromium.org

No-Try: true
Bug: v8:7775
Change-Id: I5f248b84bcb5467b7e53951dbd70c5af4614caf2
Reviewed-on: https://chromium-review.googlesource.com/1102512
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53767}
2018-06-15 15:09:17 +00:00
Daniel Clifford
267a639b12 [torque]: Fix bug uncovered by Netflix in Canary
Bug: chromium:852685
Change-Id: I0bb6cf433a5ea0a91d77048d3eef0d8077b8208e
Reviewed-on: https://chromium-review.googlesource.com/1102433
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53766}
2018-06-15 13:12:56 +00:00
Théotime Grohens
5b4e8db550 [dataview] Move DataView BigInt getters to Torque
This CL moves the remaining runtime DataView getters to Torque,
namely DataViewGetBigInt64/BigUint64, and removes the associated
runtime code that is now unneeded.

All of the DataView getters are now implemented in Torque, which brings
a nice performance improvement over the former C++ builtin code.

Change-Id: I35cf2eabce3c79cc0d3200e7f24dbe0c3e5c2804
Reviewed-on: https://chromium-review.googlesource.com/1092736
Commit-Queue: Théotime Grohens <theotime@google.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53765}
2018-06-15 13:07:56 +00:00
Clemens Hammacher
082422c409 [wasm] Move {LogWasmCodes} to the native module
{LogWasmCodes} is independent of the runtime object, so it should be
defined on the {NativeModule}.

R=herhut@chromium.org

Change-Id: I1202b18264ef0367004ba80e0030b057c633b62f
Reviewed-on: https://chromium-review.googlesource.com/1102424
Reviewed-by: Stephan Herhut <herhut@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53764}
2018-06-15 12:53:06 +00:00
Clemens Hammacher
b9401e42d1 [wasm] Create managed together with the module object
We currently create a managed object holding a shared reference to the
WasmModule, and pass this to the factory method for the
WasmModuleObject. Instead, we can just create it inside that factory
method, removing code duplication.

R=herhut@chromium.org

Change-Id: I3cea858ba445971dc8dbeb693061ef5684bc02da
Reviewed-on: https://chromium-review.googlesource.com/1102336
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Stephan Herhut <herhut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53763}
2018-06-15 12:45:26 +00:00
Clemens Hammacher
16f186974f [wasm][cleanup] Stronger typing for managed_module
Instead of just {Object}, this field can be typed as
{Managed<wasm::Module>}.

R=herhut@chromium.org

Change-Id: Iad47f75ae823846394b6ad04e8829961e924f33d
Reviewed-on: https://chromium-review.googlesource.com/1102333
Reviewed-by: Stephan Herhut <herhut@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53762}
2018-06-15 12:43:46 +00:00