Commit Graph

52965 Commits

Author SHA1 Message Date
Igor Sheludko
a4993b73c5 [testrunner] Add mode detection for v8_enable_pointer_compression
Tbr: machenbach@chromium.org
Bug: v8:8562
Change-Id: If2242c6271d400e7c4c031e10871b06438c2636d
Reviewed-on: https://chromium-review.googlesource.com/c/1384088
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58373}
2018-12-19 16:59:46 +00:00
Ulan Degenbaev
0400fc2049 [heap] Optimize marking of descriptor arrays.
Now a descriptor array tracks the number of descriptors that were
already marked. The marking visitor of a map only marks the subset
of the descriptors that it needs and that are not already marked.

If a descriptor array is shared between M maps and has N descriptos,
then the number of marking operations is reduced from O(M*N) to O(N).

This patch also adds a marking barrier for descriptors.

The marked descriptor counter in a descriptor array is not cleared
after mark-compact GC. Instead, it embeds two bits from the global
mark-compact epoch counter and is considered 0 if the bits do not match
the current value of the global epoch counter.

Bug: v8:8486
Change-Id: I2a7822a6833f3143e1d351e5e4819c2ef2c07fb0
Reviewed-on: https://chromium-review.googlesource.com/c/1382746
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58372}
2018-12-19 16:49:06 +00:00
Igor Sheludko
27cfcf5662 [cleanup] Fix kPointerSize usages in platform-independent src/builtins/
Bug: v8:8477, v8:8562
Change-Id: Iebb60551a461304539d943a080ce107eecf6fdbf
Reviewed-on: https://chromium-review.googlesource.com/c/1384264
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58371}
2018-12-19 16:26:25 +00:00
Sigurd Schneider
0382ca40e0 [turbolizer] Improve load time of code and disassembly view
This CL improves load times by up to 6x. This is achieved by not setting
event handlers per-line, but setting one event handler on the container.

Unfortunately, load times are dominated by the graph view, which needs
to be addressed in another CL.

Bug: v8:7327
Notry: true
Change-Id: Ie9a999f4150617fd763b770fcacca6096f457880
Reviewed-on: https://chromium-review.googlesource.com/c/1384312
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58370}
2018-12-19 16:11:53 +00:00
Sathya Gunasekaran
635f938f2a [dict] Add facade around the two different kind of dicts
OrderedNameDictionarHandler is the external API to interface with the
OrderedNameDictionary variants. This abstracts away the need for the
user to know that there are two different backing stores.

Bug: v8:6443, v8:7569
Change-Id: Ief4f0904823988e629a01060b018b4cb0291542d
Reviewed-on: https://chromium-review.googlesource.com/c/1381758
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58369}
2018-12-19 16:04:19 +00:00
Clemens Hammacher
b534e00e38 [wasm] Deprecate reachability tracking in SsaEnv
Reachability is already being tracked in the function body decoder.
This CL adds a DCHECK that the reachability tracked in the SsaEnv
matches the reachability tracked in the function body decoder. Most of
our methods will only be called for reachable code anyway.
For exceptions, we still track reachability explicitly for now in the
wasm graph builder, this can be refactored in the future by improving
reachability tracking for catch blocks in the function body decoder.

If this DCHECK survives fuzzing for a few days, we can remove code that
handles unreachable code in graph-building-interface.cc.

R=herhut@chromium.org

Bug: v8:8423, v8:8611
Change-Id: I0fb375c99497352aad396816566883fe234ca0ac
Reviewed-on: https://chromium-review.googlesource.com/c/1384089
Reviewed-by: Stephan Herhut <herhut@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58368}
2018-12-19 15:55:39 +00:00
Dan Elphick
27d1e9f22f [cleanup] Remove TODOs now that full codegen is gone
The TODOs are wrong for now since even without full codegen, it's still
possible for it to be compiled, so this just removes them

Bug: v8:8562
Change-Id: Ia9f2539e22364b31c0b45b0408dfe434f212c72a
Reviewed-on: https://chromium-review.googlesource.com/c/1384311
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58367}
2018-12-19 15:25:25 +00:00
Clemens Hammacher
86024575de [cleanup] Remove empty simulators for ia32 and x64
No need for empty header files and empty implementation files (which
will be compiled even though they are empty).

R=ishell@chromium.org

Bug: v8:8562
Change-Id: Icd54b0cab7dba991d11c26262deb2b034f67869e
Reviewed-on: https://chromium-review.googlesource.com/c/1384305
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58366}
2018-12-19 15:17:45 +00:00
Clemens Hammacher
bf2b5d0ba6 [cleanup] Fix include guards of simulators
The platform-specific simulators are only included on the respective
hardware, so no need to guard against other platforms.
Also, unify where the USE_SIMULATOR macro is evaluated. Make it cover
the whole implementation file.
Also, make sure to include the respective header file first, as
suggested by the style guide, and fix up includes in general.

R=ishell@chromium.org

Bug: v8:8562, v8:7490
Change-Id: Ifc6a87030364eab1e6a6fcbda008607ccd1c1f2f
Reviewed-on: https://chromium-review.googlesource.com/c/1384090
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58365}
2018-12-19 15:12:55 +00:00
Igor Sheludko
ef07980ebf [cleanup] Fix kPointerSize usages in src/compiler/
Bug: v8:8477, v8:8562
Change-Id: I0dab49a03b74abc68600885f4951c5cb727a3d73
Reviewed-on: https://chromium-review.googlesource.com/c/1366736
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58364}
2018-12-19 14:56:40 +00:00
Mythri
1ca0de67d2 [reland] Don't allocate feedback vectors and feedback metadata in lite mode
Don't allocate feedback vectors and feedback metadata in lite mode.
Also updates to skip tests that require feedback vectors.

This is a reland of
https://chromium-review.googlesource.com/c/v8/v8/+/1384087 after skipping
the failing tests.

Bug: v8:8394
Change-Id: I7766533b85a144e62996ceed8d542cdc534feeb5
Reviewed-on: https://chromium-review.googlesource.com/c/1384307
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58363}
2018-12-19 14:29:30 +00:00
Sergiy Belozorov
60e76dd8ce Update V8 DEPS (manual).
Rolling v8/build: 8ee3e8b..9945d79

Rolling v8/buildtools: 7d88270..5cce74c

Rolling v8/third_party/android_tools: https://chromium.googlesource.com/android_tools/+log/6fecaa5..e958d6e

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/368ebf1..203676d

Rolling v8/third_party/depot_tools: 7fa4fbc..c6a8d11

TBR=machenbach@chromium.org

Change-Id: I55cd001dd1dd6d4c37dd2bd0c59ea3cb8ad8ad00
Reviewed-on: https://chromium-review.googlesource.com/c/1384308
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Commit-Queue: Sergiy Belozorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58362}
2018-12-19 14:12:09 +00:00
Igor Sheludko
528a603711 [cleanup][x64] Fix kPointerSize usages in src/builtins/x64
Bug: v8:8477, v8:8562
Change-Id: I37361ded733d21a5814a2a23a4155d7e8b562446
Reviewed-on: https://chromium-review.googlesource.com/c/1384092
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58361}
2018-12-19 13:24:42 +00:00
Igor Sheludko
50f6baf404 [cleanup] Fix kPointerSize usages in src/wasm/
Also added != 0 for readability in checks like:
  if (FIELD_SIZE(kFooOffset) != 0) {...}

Bug: v8:8477, v8:8562
Change-Id: Ibc305103475e6ec029e89e7ad095ec0a1fa30189
Reviewed-on: https://chromium-review.googlesource.com/c/1382743
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58360}
2018-12-19 12:42:24 +00:00
Clemens Hammacher
e95be4598c [wasm] Avoid redundant {EndControl}
Many callers of {DoReturn} either already call {EndControl}, or pop
the control afterwards, hence we do not need to {EndControl}.
Hence only call {EndControl} when really needed.

R=herhut@chromium.org

Bug: v8:8423
Change-Id: Ie4e7b2dd6918cc0f9619a72d624014222f58a251
Reviewed-on: https://chromium-review.googlesource.com/c/1384085
Reviewed-by: Stephan Herhut <herhut@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58359}
2018-12-19 12:25:26 +00:00
Sigurd Schneider
4aa97de1af [conversions] Speed up double to CString conversion
This addresses most of the regression in of
Kraken's json-stringify-tinderbox-orig with
31bit Smis: Many object properties become heap
numbers, and printing an integer which is
represented as a double is slower than printing
the integer directly.

Change-Id: I9a14c4da61721b6c3f22e88145acc6a61ed4a419
Bug: v8:8344
Reviewed-on: https://chromium-review.googlesource.com/c/1382741
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58358}
2018-12-19 12:10:50 +00:00
Toon Verwaest
89a64f04d1 [parser] Eagerly throw pattern error even if we lazily throw lhs error for calls
We don't eagerly throw for assignments to calls; see v8:4480. They are simply
turned into assignments to Property instead. We need to record a declaration
error, however. Otherwise we'll end up with a Property in a declaration
context.

To reduce the scope of the lazy throwing, in this fix I record a pattern error
instead, making calls as assignment target in a destructuring assignment
context throw eagerly.

Bug: chromium:916288
Change-Id: If94a46b5d2b65c3549c641e0e19135c6c8af7a9a
Reviewed-on: https://chromium-review.googlesource.com/c/1384084
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58357}
2018-12-19 11:39:30 +00:00
Igor Sheludko
2f5817fcd2 [ptr-compr][Liftoff] Add macro operations for loading tagged pointer fields
These load operations will decompress values if pointer compression is
enabled.

Bug: v8:7703
Change-Id: I4c5cef39a735f3b03e36d27c0e5e7c21653bbbc0
Reviewed-on: https://chromium-review.googlesource.com/c/1382742
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58356}
2018-12-19 11:32:35 +00:00
Clemens Hammacher
9efa28bf00 Revert "Do not allocate feedback vectors and feedback metadata in lite mode"
This reverts commit 62e86b88e5.

Reason for revert: Fails on arm sim lite debug: https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20arm%20-%20sim%20-%20lite%20-%20debug/1075

Original change's description:
> Do not allocate feedback vectors and feedback metadata in lite mode
> 
> Don't allocate feedback vectors and feedback metadata in lite mode.
> Also updates to skip tests that require feedback vectors.
> 
> Bug: v8:8394
> Change-Id: I22c64a32c44bb8f25fb09003d6e9fc5a04e84f8a
> Reviewed-on: https://chromium-review.googlesource.com/c/1378173
> Commit-Queue: Mythri Alle <mythria@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58351}

TBR=rmcilroy@chromium.org,yangguo@chromium.org,mlippautz@chromium.org,mythria@chromium.org

Change-Id: I88fd37ea4e21aa2cc81eceb87ddb35c23224beae
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8394
Reviewed-on: https://chromium-review.googlesource.com/c/1384087
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58355}
2018-12-19 11:31:32 +00:00
Sigurd Schneider
4ee489b8b0 [turbofan] Improve constant handling in representation change
Change-Id: I68ede2cda0441cd9a032318462fe3a085480a1dd
Bug: v8:8344
Reviewed-on: https://chromium-review.googlesource.com/c/1380111
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58354}
2018-12-19 11:22:10 +00:00
Toon Verwaest
a5f559c3f8 [parser] Change how catch is parsed
- Directly declares the special catch variable from the parser-base.
- Tracks Scope on PreParserBlock and finds conflicting lexical declarations by
  simply walking the VariableMap of the block inserted for the pattern; or the
  catch variable in case of identifier.
- This also enables throwing errors for duplicate let in the preparser. We may
  have to back that out if it breaks something.

Bug: v8:2728, v8:7828
Change-Id: Id2eea62062533eb99cd6670c42a4b1da87139008
Reviewed-on: https://chromium-review.googlesource.com/c/1382095
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58353}
2018-12-19 11:02:01 +00:00
Igor Sheludko
42afba5195 [ptr-compr][x64] Introduce bottlenecks for accessing on-heap tagged fields
and fix platform builtins.

This CL also introduces MacroAssembler::xxx_tagged() operations which
operate on potentially compressed tagged values without doing decompression.

This CL also drive-by fixes compilation failures when pointer compression is
enabled.

Bug: v8:7703
Change-Id: Id417f2a78907e8911aaa79ef404f5bcc87d9a3b8
Reviewed-on: https://chromium-review.googlesource.com/c/1382740
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58352}
2018-12-19 10:34:28 +00:00
Mythri
62e86b88e5 Do not allocate feedback vectors and feedback metadata in lite mode
Don't allocate feedback vectors and feedback metadata in lite mode.
Also updates to skip tests that require feedback vectors.

Bug: v8:8394
Change-Id: I22c64a32c44bb8f25fb09003d6e9fc5a04e84f8a
Reviewed-on: https://chromium-review.googlesource.com/c/1378173
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58351}
2018-12-19 10:30:48 +00:00
Jakob Kummerow
5ffe6c9f15 Fix std::ostream printing for ObjectPtr-derived types
Moving the declaration of operator<< from objects-printer.cc to
heap-object.h makes sure that it is visible.

Change-Id: I316db9c03a464974129b8e9c776423bb80066cdd
Reviewed-on: https://chromium-review.googlesource.com/c/1382737
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58350}
2018-12-19 09:34:25 +00:00
Sigurd Schneider
5c38b47af5 [assembler] Factor out Registers from assembler.h
This refactoring reduces the LoC after preprocessor expansion by 370,322

gen         (   21 files):    71,503 to    1,631,168 (   23x)
src         (  624 files):   367,639 to   53,231,764 (  145x)
test        (  392 files):   490,770 to   37,450,839 (   76x)
third_party (  432 files):   239,085 to    9,547,902 (   40x)
total       ( 1521 files): 1,183,681 to  102,836,194 (   87x)

gen         (   21 files):    71,503 to    1,613,222 (   23x)
src         (  624 files):   367,634 to   52,964,046 (  144x)
test        (  392 files):   490,771 to   37,366,181 (   76x)
third_party (  432 files):   239,085 to    9,547,902 (   40x)
total       ( 1521 files): 1,183,677 to  102,465,872 (   87x)

Bug: v8:8562
Change-Id: Ib4e771c37471a2ff19c5538e62c038943cc74eaf
Reviewed-on: https://chromium-review.googlesource.com/c/1382469
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58349}
2018-12-19 09:18:20 +00:00
tzik
f2c2742c50 Move MicrotaskQueue-related flags to MtQ itself
This CL moves variables that control MicrotaskQueue to MtQ itself.
Namely,
 * is_running_microtasks_ and microtask_completed_callbacks_ from
   v8::internal::Isolate
 * microtasks_depth_, microtasks_suppressions_ and debug_microtask_depth_
   from v8::internal::HandleScopeImplementer.

As the current implementation has these variables one per-Isolate rather
than per-MicrotaskQueue, this is needed to have multiple MicrotaskQueues
for an Isolate.

Bug: v8:8124
Change-Id: Id63075cbfb59cf5b7f45a4184affb206400150da
Reviewed-on: https://chromium-review.googlesource.com/c/1358029
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58348}
2018-12-19 08:19:20 +00:00
Andreas Haas
c6d8c75557 [wasm][cleanup] Extract processing of imported globals
The function InstanceBuilder::ProcessImports got long and hard to
understand. This CL is the third change of a series which aims at
extracting parts of ProcessImports into specialized functions.

This CL extracts the processing of imported globals into a separate
function. Aside from copying the code, I made the following changes:
* Rename {index} to {import_index}.

This CL does minimal changes to the processing of globals itself.
That code looks quite complex at the moment. Therefore I want to do
the refactoring of that code in separate CLs, so that each CL is
smaller and more understandable.

R=clemensh@chromium.org

Bug: v8:8562
Change-Id: Ie553a2c9031cef07f0b9925144c79248084e428d
Reviewed-on: https://chromium-review.googlesource.com/c/1382732
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58347}
2018-12-19 07:56:43 +00:00
Andreas Haas
0a84bc50fa [wasm][cleanup] Extract processing of imported memory
The function InstanceBuilder::ProcessImports got long and hard to
understand. This CL is the third change of a series which aims at
extracting parts of ProcessImports into specialized functions.

This CL extracts the processing of imported memory into a separate
function. Aside from copying the code, I made the following changes:
* Rename {index} to {import_index}.
* Add one `return false;` after reporting a LinkError.
  - I think it should have been this way all along.

R=clemensh@chromium.org

Bug: v8:8562
Change-Id: I34d68d7bc1013c2743a68778dfc22a2d8e1d46af
Reviewed-on: https://chromium-review.googlesource.com/c/1382731
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58346}
2018-12-19 07:44:23 +00:00
Yang Guo
ec3a603091 [debug-evaluate] check transitively called builtins
Bug: v8:8558
Change-Id: Ib179947fb1b00f32a574ae3084e3107cc264a851
Reviewed-on: https://chromium-review.googlesource.com/c/1369951
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58345}
2018-12-19 07:34:17 +00:00
tzik
b5e3fb5b5d Fix code generation failures on MIPS
On MIPS and MIPS64, UseScratchRegisterScope has only one register for the scratch register [1,2],
and TurboAssembler::CallCFunctionHelper runs out of it as fast_c_call_caller_fp_address
uses the register. That causes code generation failures.

As a workaround, this CL reduces the number of nested UseScratchRegisterScope where
the code generation is failing.

[1]: dde25872f5/src/mips/assembler-mips.cc (310)
[2]: dde25872f5/src/mips64/assembler-mips64.cc (287)

Change-Id: I0813c656cafdb09ccd6f53d51f3620385e00022f
Reviewed-on: https://chromium-review.googlesource.com/c/1379590
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58344}
2018-12-19 07:18:17 +00:00
Toon Verwaest
5c0e5a5b56 [parser] Fix late-checked destructuring pattern followed by property (2)
Now just accumulate right before we might validate a property and once we're
done, so we're guaranteed to catch all PatternErrors.

Bug: v8:8607
Change-Id: Ibc5bc7773756f4827868ca01d0f9fb0c5545e59b
Reviewed-on: https://chromium-review.googlesource.com/c/1382749
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58343}
2018-12-18 20:10:36 +00:00
Clemens Hammacher
995333da1f [base] Remove redundant DISALLOW_COPY_AND_MOVE_AND_ASSIGN
The DISALLOW_COPY_AND_ASSIGN has the same semantics, as long as you do
not explicitly add a move constructor or move assignment operator.
This CL documents this better and removes the
DISALLOW_COPY_AND_MOVE_AND_ASSIGN macro.

R=tebbi@chromium.org

Bug: v8:8562
Change-Id: I1b742ee1a106d85d59a67c90341fafec2473e925
Reviewed-on: https://chromium-review.googlesource.com/c/1382465
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58342}
2018-12-18 18:23:30 +00:00
Andreas Haas
19bc78db8d [wasm][cleanup] Extract processing of imported tables
The function InstanceBuilder::ProcessImports got long and hard to
understand. This CL is the second change of a series which aims at
extracting parts of ProcessImports into specialized functions.

This CL extracts the processing of imported tables into a separate
function. Aside from copying the code, I made the following changes:
* Rename {index} to {import_index}.
* Rename {table_num} to {table_index}.

R=clemensh@chromium.org

Bug: v8:8562
Change-Id: I37398f0c8feccae3647a7817d7d4d6d0d87fd5a9
Reviewed-on: https://chromium-review.googlesource.com/c/1382470
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58341}
2018-12-18 18:02:00 +00:00
Camillo Bruni
8c3369f9e9 [parsing] Always stack-allocate DataGatheringScopes
Avoiding malloc and unique_ptr seems to have positive effects on a
representative facebook and cnn workload.
This makes arrow functions and eager functions potentially more
expensive since the DataGatheringScope is now always stack-allocated
and only the full initialization happens conditionally.

Change-Id: Ibf1c1308a7db464f7c5d2bafd61560e4cabf0ce9
Reviewed-on: https://chromium-review.googlesource.com/c/1382733
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58340}
2018-12-18 18:00:30 +00:00
Toon Verwaest
81a11c173b [parser] Fix late-checked destructuring pattern followed by property
Otherwise the error would have been dropped between the previous
accumulate and the subsequent ValidateExpression.

Bug: v8:8607
Change-Id: I29f5d5b6887b57f4b70369ba370fe0b44b1d6798
Reviewed-on: https://chromium-review.googlesource.com/c/1382744
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58339}
2018-12-18 17:52:10 +00:00
Mythri
2ea009086f Fix ObjectToString builtin to work for subclasses
When we call ObjectToString on JSValues we only looked at string tags
on the prototype map of the JSValue's value type and do not check the
tags on the JSValue's prototype chain which may be non-trivial if
subclassing is involved. For ex: if we have a class Test extend Number,
we only looked for tags on the Number prototype and not on the Test
prototype. This cl fixes the builtin to also check for these cases.


Bug: v8:7706
Change-Id: I9f0e3bb6499646bf27b92bf4fb4e9014f6efa56b
Reviewed-on: https://chromium-review.googlesource.com/c/1378176
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58338}
2018-12-18 17:33:50 +00:00
Jakob Kummerow
81bf74341b [ubsan] Port Oddball to the new design
Bug: v8:3770
Change-Id: If88c285bf1528f03401d3a83349b61435ac79f85
Reviewed-on: https://chromium-review.googlesource.com/c/1382455
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58337}
2018-12-18 17:19:40 +00:00
Jakob Kummerow
09e4054533 [objects.h splitting] Move Oddball to oddball.h
Bug: v8:5402
Change-Id: Ib2d7b24cdcf55e3dfa8d3b1665ac565904ac2112
Reviewed-on: https://chromium-review.googlesource.com/c/1379940
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58336}
2018-12-18 17:10:40 +00:00
Jakob Kummerow
1e461e3c5e [gm.py] Fix gm.py to work on Windows
gm.py has been careful to only use the "pty" module's functionality
on Linux, but as it turns out, the module is *so* strongly specific
to Linux that even importing it fails on Windows. Making the import
of "pty" conditional makes gm.py work on Windows.

Change-Id: I0c1fb8a9a0299fde50e252337551d9395039f14d
Reviewed-on: https://chromium-review.googlesource.com/c/1382738
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58335}
2018-12-18 17:09:10 +00:00
Jakob Kummerow
f1cb51ad4e [ubsan] Let Runtime functions return a plain Address
instead of Object* (which is deprecated) or ObjectPtr (which is
unsuitable for cases where we need to control the ABI exactly).
Callers in generated code expect a plain tagged value, so return
precisely that. Same for C++ Builtins.

Bug: v8:3770
Change-Id: Id12f0d9830f7caf2a16aa973b8297f70d65241f5
Reviewed-on: https://chromium-review.googlesource.com/c/1382466
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58334}
2018-12-18 17:06:21 +00:00
Georg Neis
63ce4ba47a Reland "Use CopyElements (which uses memcpy) to copy FixedDoubleArray."
This is a reland of fac6f63eb8, after
adding initialization of unused element slots.

Original change's description:
> Use CopyElements (which uses memcpy) to copy FixedDoubleArray.
>
> This improves the performance of ExtractFixedArray and
> CloneFastJSArray for double arrays, which in turn improve the
> performance of cloning double arrays with slice() or spreading.
>
> This, however, does not improve performance of spreading holey
> double arrays, because spreading needs extra work to convert
> holes to undefined.
>
> Bug: v8:7980
> Change-Id: Ib8aed74abbb0b06982a3b754e134fa415cb7de2d
> Reviewed-on: https://chromium-review.googlesource.com/c/1280308
> Reviewed-by: Michael Stanton <mvstanton@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Commit-Queue: Hai Dang <dhai@google.com>
> Cr-Commit-Position: refs/heads/master@{#56680}

Bug: v8:7980
Change-Id: I899af60c061b9cd6eb619c247c5fc515b92e9fd7
Reviewed-on: https://chromium-review.googlesource.com/c/1382735
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58333}
2018-12-18 16:34:49 +00:00
Toon Verwaest
dde5e3a134 [parser] Detect duplciate lexical declarations in preparser
This changes how rewind upon preparser abort works. It now rewinds to the start
of the parameter scope. In the case of "function X(" it is before the "(". In
the case of arrow functions it's before the start of the arrow function. This
allows us to reparse the arrow function from the start so all parameters are
declared properly.

Bug: v8:2728, v8:7390
Change-Id: I1c40056a49ec198560e63cd73949a59221ee0401
Reviewed-on: https://chromium-review.googlesource.com/c/1382736
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58332}
2018-12-18 16:32:28 +00:00
Andreas Haas
68c33b29a9 [wasm][cleanup] Extract processing of imported functions
The function InstanceBuilder::ProcessImports got long and hard to
understand. This CL is the first of a series which aims at extracting
parts of ProcessImports into specialized functions.

This CL extracts the processing of imported functions into a separate
function. Aside from copying the code, I made the following changes:
* Use {enabled_} instead of a newly created WasmFeatures object.
  - I think this is more correct anyways.
* Rename {index} to {import_index}.
* Load {native_module} from {instance} for every function, instead of
  loading it once for all imports.

R=clemensh@chromium.org

Bug: v8:8562
Change-Id: I9533f302929eedd395962253c340ba35324df631
Reviewed-on: https://chromium-review.googlesource.com/c/1382467
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58331}
2018-12-18 16:27:45 +00:00
Sergiy Belozorov
9fa98c139f [tools] Use device_utils.HealthyDevices to handle USB bus issues
TBR=machenbach@chromium.org

No-Try: true
Bug: chromium:893593
Change-Id: Ia1512e55426dc64f260b074dd964cc7dcc822dcf
Reviewed-on: https://chromium-review.googlesource.com/c/1382457
Commit-Queue: Sergiy Belozorov <sergiyb@chromium.org>
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58330}
2018-12-18 15:52:13 +00:00
Tamer Tas
a5a381bd96 [test] add an option for disabling linter cache in the pre_submit check
Adds a flag to specify whether to disable the linter caching.

R=machenbach@chromium.org,sergiyb@chromium.org
CC=​​yangguo@chromium.org

Bug: v8:8482
Change-Id: I62a9b7cffb3adb50b136659568ad52078675ca4b
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/1370029
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Tamer Tas <tmrts@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58329}
2018-12-18 15:37:09 +00:00
Jakob Gruber
e9a0e0e593 [nojit,x64] Tweak builtin pointer call sequence for pointer compression
This is to fix the pointer compression bot, which tests only x64.
Other 64-bit architectures will need similar work in the future.

On x64 with pointer compression, smi-untagging can be folded into the
Operand calculation since the left-shift for multiplying by
kSystemPointerSize is greater than the right-shift for untagging.

Bug: v8:7777
Change-Id: I5c46e9d3f51580341cfc3c12a7e32d17cf0b63ee
Reviewed-on: https://chromium-review.googlesource.com/c/1381452
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58328}
2018-12-18 15:24:36 +00:00
peterwmwong
682db7845c [typedarray] Add TA.p.toLocaleString check for a detached buffer.
Bug: chromium:915783
Change-Id: I053ee6e905a98e0aafcabcf0838ada836a05c181
Reviewed-on: https://chromium-review.googlesource.com/c/1382553
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Cr-Commit-Position: refs/heads/master@{#58327}
2018-12-18 15:06:15 +00:00
Tamer Tas
b267f94ffc [test] update the jsfunfuzz archive in Google Storage
After reducing the noise in jsfunfuzz output (1378177), we need to make sure
that the builders pick up the latest version of this repository.

Currently, because the builders haven't downloaded the repository after the
change landed, they're still using the previous version of the jsfunfuzz runner.

R=machenbach@chromium.org
CC=yangguo@chromium.org,sergiyb@chromium.org

Bug: v8:8493
Change-Id: I7629c592d1c455e8d39d41d11f8071a67eac371e
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/1382464
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Tamer Tas <tmrts@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58326}
2018-12-18 15:00:35 +00:00
Ross McIlroy
1a5d6a5384 [Compiler] Fix flaky tsan error for bytecode flushing.
The SFI's flags can be changed by the mutator while the concurrent marker is checking
the flags for bytecode flushing. None of the flag bits checked for bytecode flushing
are changed, however since they are in an int32 field TSAN will complain if any of the
other flags are changed while reading from another flag. Fix this by making the flags
use the RELAXED_INT32_ACCESSORS.

BUG=v8:8592,v8:8395

Change-Id: I5fbb4fd381c2b288abf0cd36eb0b8256e1929af6
Reviewed-on: https://chromium-review.googlesource.com/c/1382458
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58325}
2018-12-18 14:49:13 +00:00
Jakob Gruber
5308f83d6b [nojit] Skip on-heap trampoline in Invoke
This skips one level of indirection by calling the off-heap entry
point directly instead of going through the on-heap Code trampoline.

Bug: v8:7777
Change-Id: If667ea6cd6138ab1c12aa861ef441109008e4fba
Reviewed-on: https://chromium-review.googlesource.com/c/1382459
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58324}
2018-12-18 14:47:15 +00:00