Commit Graph

50295 Commits

Author SHA1 Message Date
Benedikt Meurer
a15ad0d310 [turbofan] Reduce overhead of megamorphic property accesses.
We had an optimization in Crankshaft where we would call into the
megamorphic handler stub directly if an inline cache was already
found to be megamorphic when it hit the optimizing compiler. This
way we could avoid the dispatch overhead when we know that there's
no point in checking for the other states anyways. However we somehow
missed to port this optimization to TurboFan.

Now this change introduces support to call into LoadIC_Megamorphic and
KeyedLoadIC_Megamorphic directly (plus the trampoline versions), which
saves quite a lot of overhead for the cases where the map/name pair is
found in the megamorphic stub cache, and it's quite a simple change. We
can later extend this to also handle the StoreIC and KeyedStoreIC cases
if that turns out to be beneficial.

This improves the score on the Octane/TypeScript test by around ~2%
and the TypeScript test in the web-tooling-benchmark by around ~4%. On
the ARES-6 Air test the steady state mean improves by 2-4%, and on the
ARES-6 ML test the steady state mean seems to also improve by 1-2%, but
that might be within noise.

On a micro-benchmark that just runs `o.x` in a hot loop on a set of 9
different objects, which all have `x` as the first property and are
all in fast mode, we improve by around ~30%, and are now almost on par
with JavaScriptCore.

Bug: v8:6344, v8:6936
Change-Id: Iaa4c6e34c37e78da217ee75f32f6acc95a834250
Reviewed-on: https://chromium-review.googlesource.com/1215623
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55803}
2018-09-11 18:04:01 +00:00
Deepti Gandluri
0fb2d2b0b6 Revert "[typedarray] Properly convert hole to undefined in TypedArray.from"
This reverts commit ece86adc6b.

Reason for revert: Potential cause of auto-roller breakage https://ci.chromium.org/p/chromium/builders/luci.chromium.try/win10_chromium_x64_rel_ng/91864

Original change's description:
> [typedarray] Properly convert hole to undefined in TypedArray.from
> 
> It used to call the old IterableToList, which had the wrong
> semantics for holes.
> 
> Bug: v8:8133
> Change-Id: Idd5acd55a155bc43df7552135a44151bb2db38e9
> Reviewed-on: https://chromium-review.googlesource.com/1213204
> Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> Commit-Queue: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#55745}

TBR=neis@chromium.org,petermarshall@chromium.org,dhai@google.com

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

Bug: v8:8133
Change-Id: I09b108e7844c598253fbbe02d705699c21308637
Reviewed-on: https://chromium-review.googlesource.com/1220286
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55802}
2018-09-11 17:49:16 +00:00
Florian Sattler
78f8ff9568 [preparser] Refactor VariableProxies to use ThreadedLists interface
Bug: v8:7926
Change-Id: Idfc520b67696c8a838a0ee297ea392d416dd899e
Reviewed-on: https://chromium-review.googlesource.com/1206292
Commit-Queue: Florian Sattler <sattlerf@google.com>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55801}
2018-09-11 16:14:00 +00:00
Clemens Hammacher
c887e40c9a [assembler][ia32] Don't clobber random registers
The fallback for {Pinsrd} and {Pextrd} for the non-avx and non-sse
variant clobbered the {xmm0} register. This CL fixes this by storing
the values on the stack and modifying them there instead.
The alternative would have been to pass in a scratch register. But this
path is not commonly used and we cannot express in the API whether the
scratch register is needed or not. So we would sometimes have to spill a
register to pass it as scratch register even though it is then unused.

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

Bug: v8:6600
Change-Id: Ieae53b892cc55eed4fcfa3d0e7f82f3e1afe72be
Reviewed-on: https://chromium-review.googlesource.com/1219633
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55800}
2018-09-11 16:12:56 +00:00
Clemens Hammacher
ae9a577c47 [test] Also print hex representation of floats/doubles
In the CHECK_FLOAT_EQ and CHECK_DOUBLE_EQ wrappers, do also print hex
representations on failure. Otherwise, single bit flips might not be
visible in the output, like here:
Check failed: DoubleWrapper(x) == y (-2e+66 vs. -2e+66).

R=titzer@chromium.org

Change-Id: I2521706aedc6ff81c0dbb25259230f8e29ce9a3e
Reviewed-on: https://chromium-review.googlesource.com/1219630
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55799}
2018-09-11 16:05:33 +00:00
Michael Lippautz
9c67143f4a [heap] Introduce backing store counters on Heap
- Update those counters from space
- Add fast path for move memory

Bug: chromium:845409
Change-Id: Icd72e551df2422a635801fb4e31588073f81544e
Reviewed-on: https://chromium-review.googlesource.com/1219707
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55798}
2018-09-11 15:35:56 +00:00
Simon Zünd
77db602f4b [torque] Enforce lint errors in the torque compiler
This CL adds a contextual variable that tracks lint errors and will
cause the Torque compiler to abort if there were any.

R=tebbi@chromium.org

Bug: v8:7793
Change-Id: Ia7c2b5b6c7cb12d489b12596afa84f933fc3f337
Reviewed-on: https://chromium-review.googlesource.com/1219388
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Simon Zünd <szuend@google.com>
Cr-Commit-Position: refs/heads/master@{#55797}
2018-09-11 15:15:45 +00:00
Clemens Hammacher
b9d71d9339 [assembler][ia32] Replace UNREACHABLE by FATAL with message
This improves the error message if we accidentally call this method on
a CPU which does not support it.

R=mstarzinger@chromium.org

Bug: v8:6600
Change-Id: If67bf9e95ab0e71d832a833a70b6ba748b53296e
Reviewed-on: https://chromium-review.googlesource.com/1219631
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55796}
2018-09-11 14:28:35 +00:00
Michael Achenbach
565c83f843 [test] Add missing resource for test on Android
TBR=neis@chromium.org
NOTRY=true

Bug: chromium:866862
Change-Id: I7c143eb67edcb54ab1fe260d1d7da6eedb44bfc2
Reviewed-on: https://chromium-review.googlesource.com/1219635
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55795}
2018-09-11 14:13:15 +00:00
Simon Zünd
31eca73d34 [torque] Fix all current lint errors in Torque code
To make the changes in base.tq work, there were 2 changes needed on
the C++ side:
  - calls to "FromConstexpr" are generated by the compiler for
    implicit conversions.
  - type switch is desugared and uses "Cast"

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

Change-Id: I085f1a393f93e501e6bbcaeacb0d6568259a4714
Reviewed-on: https://chromium-review.googlesource.com/1219629
Commit-Queue: Simon Zünd <szuend@google.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55794}
2018-09-11 14:11:05 +00:00
Michael Achenbach
44202a1b42 [test] Bump shards on slowest bots
NOTRY=true
TBR=sergiyb@chromium.org

Change-Id: I0ee00cccbcfd238a183df53e2d9234e06d5cca51
Reviewed-on: https://chromium-review.googlesource.com/1219634
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55793}
2018-09-11 14:06:55 +00:00
Michael Achenbach
c56833b016 [build] Fix clusterfuzz release builder
Bug: v8:8162
Change-Id: Ib3965263a7ef52284a6f08378a76fafc7b18fa42
Reviewed-on: https://chromium-review.googlesource.com/1219506
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55792}
2018-09-11 14:03:55 +00:00
Florian Sattler
9f144f1e4a [tools] Restrict clang-tidy to src and test files
NOTRY=true

Change-Id: If305367e5971a596ea5b3cd665dc5a5771d925bf
Reviewed-on: https://chromium-review.googlesource.com/1219628
Commit-Queue: Florian Sattler <sattlerf@google.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55791}
2018-09-11 14:00:45 +00:00
Creddy
f79caee25f [Runtime] Use Runtime_SetNamedProperty for property stores in one-shot code.
- Rename Runtime_SetProperty to Runtime_SetKeyedProperty
- Create Runtime_SetNamedProperty and use it for SetNamed property
  in one-shot code.
- Rename Object::StoreFromKeyed enum to StoreOrigin

Bug: v8:8072, chromium:876839
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I22132380ca4b6ce1e0a14a38cca849814559cdcf
Reviewed-on: https://chromium-review.googlesource.com/1207870
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Chandan Reddy <chandanreddy@google.com>
Cr-Commit-Position: refs/heads/master@{#55790}
2018-09-11 13:42:25 +00:00
Michael Starzinger
515fef86c3 [wasm] Perform signature check on exception import.
This checks the type signature during import against the expected
signature. For this the {WasmExceptionObject} now contains a serialized
version of the signature.

R=clemensh@chromium.org
TEST=mjsunit/wasm/exceptions-import
BUG=v8:8091

Change-Id: I5a34ef87eccf4d2ed3a784620796ec009623fd90
Reviewed-on: https://chromium-review.googlesource.com/1219509
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55789}
2018-09-11 13:40:03 +00:00
Andreas Haas
cecd2ed5b7 [wasm] Return immediately if code generation is not allowed
There was a bug in WebAssembly.instantiate in the case where a CSP
disallows WebAssembly compilation. In this case the promise returned by
WebAssembly.instantiate was rejected immediately because of the CSP,
but then compilation was started anyways, and the promise was resolved
after compilation for a second time, which caused the crash. With this
CL we do not start compilation if CSP disallows WebAssembly compilation.

R=clemensh@chromium.org

Bug: chromium:881978
Change-Id: Iffdb3e02c3006eb7f86211ab197f81cf20438f0e
Reviewed-on: https://chromium-review.googlesource.com/1219706
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55788}
2018-09-11 13:15:20 +00:00
Dan Elphick
e0e9461fab Fix coverage build for bytecode_builtins_list_generator
Use v8_executable instead of executable for
bytecode_builtins_list_generator so that coverage link flags should be
picked up too.

Bug: v8:8068
Change-Id: I260e4de3485a78d3b3a3455441837e1a5936aa25
Reviewed-on: https://chromium-review.googlesource.com/1219326
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55787}
2018-09-11 12:22:56 +00:00
Florian Sattler
c995a1dcd6 Add a tool/script to run clang-tidy over V8.
Change-Id: I6d20cb2febdcf8c937d5b37557a701d9c6c45fd2
Reviewed-on: https://chromium-review.googlesource.com/1177720
Commit-Queue: Florian Sattler <sattlerf@google.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55786}
2018-09-11 12:01:09 +00:00
Frank Tang
c62b0634f3 [Intl] mv code to objects/js-date-time-format.*
Bug: v8:5751
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng;luci.chromium.try:linux_chromium_rel_ng
Change-Id: Idf89e9d79e9b063c7d01e2b133826b9127910f4e
Reviewed-on: https://chromium-review.googlesource.com/1205835
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55785}
2018-09-11 11:14:41 +00:00
Michael Achenbach
0d1b00b8c2 [test] Add non-d8 test suites to Android testing
This enables cctest, unittests, fuzzer and inspector on Android.
The cctest suite requires extra resource-fetching logic for the
bytecode-generator expectation files.

Bug: chromium:866862
Cq-Include-Trybots: luci.v8.try:v8_android_arm64_n5x_rel_ng
Change-Id: If3da853a62c047388476a7f38e32e64e2859f186
Reviewed-on: https://chromium-review.googlesource.com/1213208
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55784}
2018-09-11 11:12:21 +00:00
Clemens Hammacher
86dd4af02c Revert "[Liftoff] Implement f32.copysign and f64.copysign"
This reverts commit 6afe7d1815.

Reason for revert: Failures (-2e+66 vs. -2e+66): https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20debug/22148

Original change's description:
> [Liftoff] Implement f32.copysign and f64.copysign
> 
> These are two of the few missing instructions. This CL implements them
> for ia32 and x64, and bails out on other platforms.
> On x64, we are using the BTR instruction since we cannot have 64-bit
> immediates.
> 
> Drive-by: Fix naming of existing bt/bts instructions on x64.
> 
> R=​titzer@chromium.org
> 
> Bug: v8:6600
> Change-Id: Ib8532ca811160cd61f4ba7c06b04ce093861c872
> Reviewed-on: https://chromium-review.googlesource.com/1174383
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Ben Titzer <titzer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#55780}

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

Change-Id: I4377c13346b42b65e8db04cbd15fc2f906113f65
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6600
Reviewed-on: https://chromium-review.googlesource.com/1219446
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55783}
2018-09-11 10:59:33 +00:00
Frank Tang
6e5e3b2c9e [Intl] fix formatToPart generate unit in plural if pass in plural as unit.
Bug: v8:8150
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: If2157d486ac164fcfd0efdc5469357fbad72e0de
Reviewed-on: https://chromium-review.googlesource.com/1215271
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55782}
2018-09-11 10:02:04 +00:00
Michael Starzinger
a64e6b5062 [wasm][test] Add additional module builder checks.
R=clemensh@chromium.org

Change-Id: I9734259c9f41378ac216d5a222f0f7c71fcb5fa6
Reviewed-on: https://chromium-review.googlesource.com/1219023
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55781}
2018-09-11 09:56:44 +00:00
Clemens Hammacher
6afe7d1815 [Liftoff] Implement f32.copysign and f64.copysign
These are two of the few missing instructions. This CL implements them
for ia32 and x64, and bails out on other platforms.
On x64, we are using the BTR instruction since we cannot have 64-bit
immediates.

Drive-by: Fix naming of existing bt/bts instructions on x64.

R=titzer@chromium.org

Bug: v8:6600
Change-Id: Ib8532ca811160cd61f4ba7c06b04ce093861c872
Reviewed-on: https://chromium-review.googlesource.com/1174383
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55780}
2018-09-11 09:39:57 +00:00
Clemens Hammacher
a2139261ca [cleanup] Remove empty and deprecated BASE_EMBEDDED macro
The macro has been deprecated since 2016, and it keeps confusing me, so
let's just remove it completely from the code base.

R=leszeks@chromium.org
TBR=mstarzinger@chromium.org, verwaest@chromium.org, jgruber@chromium.org

Bug: v8:8015
Change-Id: Ibe1122fd9d2624bc94873d9c51dc8499c54a04fd
Reviewed-on: https://chromium-review.googlesource.com/1209322
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55779}
2018-09-11 09:33:18 +00:00
Marja Hölttä
07cfad7a00 [in-place weak refs] Pass MaybeObjectHandles as const&
BUG=v8:7308

Change-Id: I564f340096e64b3d17f9367aea031148a40faf40
Reviewed-on: https://chromium-review.googlesource.com/1218742
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55778}
2018-09-11 09:27:19 +00:00
Michael Starzinger
8238a9b245 [wasm] Add preliminary support for imported exceptions.
This adds the ability to import exception into a module at instantiation
time. Only a {WasmExceptionObject} that has been exported by another
module instance can be imported, all other values are rejected.

Note that currently there is no signature check being performed to make
sure the imported exception matches the expected type. Also the identity
of imported exceptions is not yet preserved.

Furthermore the engine does not yet match thrown exception objects on a
global level across modules. Hence imported exceptions will (wrongly)
behave as completely new types within the module.

R=clemensh@chromium.org
TEST=mjsunit/wasm/exceptions-import,unittests/WasmModuleVerifyTest
BUG=v8:8091

Change-Id: If247762b949a1ba4a87d13bc3e790a45dbc67815
Reviewed-on: https://chromium-review.googlesource.com/1216402
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55777}
2018-09-11 09:25:18 +00:00
Florian Sattler
7d98d8e01d [compiler] Fixed some perf related issues.
This patch removes unnecessary copies and adds reserves to vectors that
are filled in a loop afterwards. Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: I4e13c0445a9760e09ef03a62ae48be622ebecc6b
Reviewed-on: https://chromium-review.googlesource.com/1209783
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55776}
2018-09-11 09:18:21 +00:00
Frank Tang
d048600ce9 [Intl] mv code from builtins/builtins-intl.cc to objects/js-number-format.*
Bug: v8:5751
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I334a6eca81c02bdb90b2054f085bf57dec5f9a9d
Reviewed-on: https://chromium-review.googlesource.com/1215645
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55775}
2018-09-11 09:12:23 +00:00
Frank Tang
eec50fa3cf [Intl] Remove quarter hack after cherrypick icu fix.
Manually roll ICU to 7ca3ffa to pick up an upstream fix for quarter handling.

Remove the hack that prevent unexpected behavior in ICU
and remove the skip of failing tests.

Bug: v8:8151,v8:7869
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Ic9a56679bf1eb9dc18c739161838d518fd664d6f
Reviewed-on: https://chromium-review.googlesource.com/1214522
Reviewed-by: Jungshik Shin <jshin@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55774}
2018-09-11 09:11:18 +00:00
Frank Tang
5609e27ec6 [Intl] fix Intl.Locale toStringTag bugs
Bug: v8:7684
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I48490187d4cb967b3567ff12306aad094698d0ee
Reviewed-on: https://chromium-review.googlesource.com/1218062
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55773}
2018-09-11 09:09:08 +00:00
Ross McIlroy
1cc573508b [Cleanup] Move some inlined SFI functions to .cc and export for tests.
Moves some functions that used to be simple, but now do more complex logic
out of the inlined headers into .cc to avoid having to export all the
functions they depend on as V8_PRIVATE_EXPORT for tests. Also mark them
as V8_PRIVATE_EXPORT for tests along with a couple in ast.h

BUG=v8:8041

Change-Id: I6e94ca160cd3d84a0d1b099167a7b9862f08b122
Reviewed-on: https://chromium-review.googlesource.com/1216642
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55772}
2018-09-11 08:51:22 +00:00
Georg Neis
589906abed [turbofan] Serialize modules.
Bug: v8:7790
Change-Id: I7f66333d43b057746e279851010681c4ecd36ba1
Reviewed-on: https://chromium-review.googlesource.com/1215626
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55771}
2018-09-11 08:43:16 +00:00
Jaroslav Sevcik
3cfaca6331 [turbofan] Insert unreachable node after unconditional deopt.
This inserts unreachable node after uncoditional deopt in bit-to-word
conversion and wires it as an input to the dead-value.

This fixes a problem, where a floating  dead-value was inserted by a change
of bit-to-word (which always fails because bit cannot be converted to word).
Without the unrachable node (which this CL inserts in the effect chain after
deopt), the dead value was scheduled before the uncoditional deoptimization
and crash at runtime.

Unfortunately, I do not know how to construct a test that does not end up in
an infinite loop.

Bug: chromium:878805
Change-Id: Ia03060949f6a9b914807f5614fadcf2271911998
Reviewed-on: https://chromium-review.googlesource.com/1196663
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55770}
2018-09-11 07:54:52 +00:00
Simon Zünd
99e13e587e [builtins] Add FastCallFunction builtin that elides some checks
This CL adds a new "Call" stub that can be used by builtins that will
call the same JS call-back function often (e.g. compare function in
Array.p.sort). The checks have to be done upfront once, but can then
be omitted.

R=jgruber@chromium.org

Bug: v8:7861
Change-Id: Id6e4ca27c3d488a7b1f708cbcb4cbe6cc382513e
Reviewed-on: https://chromium-review.googlesource.com/1208574
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@{#55769}
2018-09-11 07:31:32 +00:00
Frank Tang
d830602839 [Intl] Call uloc_forLanguageTag before morphing a language tag
The ICU API for maximizing and minimizing a locale ID takes ICU format locale id as an input
so that a BCP 47 language tag must be converted to the corresponding ICU locale id.

Bug: v8:7982
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I1cb1dacbf057bbc8bb8beb9b62d1ec4becd82624
Reviewed-on: https://chromium-review.googlesource.com/1150934
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Jungshik Shin <jshin@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55768}
2018-09-11 06:45:12 +00:00
jgruber
56863904be Undeprecate the STATIC_ASSERT wrapper macro
In many cases, the condition already explains the assertion and a string
message clutters the code without adding value. This wrapper macro is
actually very useful in such cases.

Change-Id: I44f27c1c9255f5fc80453c92565f07f8f3cbacae
Reviewed-on: https://chromium-review.googlesource.com/1216183
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55767}
2018-09-11 06:17:21 +00:00
v8-ci-autoroll-builder
018332c46b Update V8 DEPS.
Rolling v8/build: 0e1589b..b34c179

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/c869f29..c80faf4

Rolling v8/third_party/depot_tools: 25c380c..727453b

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

Change-Id: If839c89bcb13325a129d3c9dd9afced27617f09e
Reviewed-on: https://chromium-review.googlesource.com/1217727
Commit-Queue: V8 Autoroller <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Reviewed-by: V8 Autoroller <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#55766}
2018-09-11 03:41:22 +00:00
Ujjwal Sharma
7cb609d0c3 Reland "[intl] Port collator#resolvedOptions to C++"
This reverts commit dd5ea32af3.

Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Ic902fb239cc4b83563a2d92a2ae2e1569d21f549
Reviewed-on: https://chromium-review.googlesource.com/1217642
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55765}
2018-09-10 22:41:26 +00:00
Michael Lippautz
22b2b34c26 [heap] Refactor HeapController
Split off from
  https://chromium-review.googlesource.com/c/v8/v8/+/1196484

Bug: chromium:879045
Change-Id: I58b1a2ad10729f54c9a452dcfecd7511660460f6
Reviewed-on: https://chromium-review.googlesource.com/1216285
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55764}
2018-09-10 19:47:15 +00:00
Igor Sheludko
b0edf8e66a [ptr-compr][heap] Fix TODOs about always using proper page allocator
Only read-only pages don't have properly initialized reservation object.

Bug: v8:8096
Change-Id: I83f4baa414dc2ca5a397a9897088060b6cac4783
Reviewed-on: https://chromium-review.googlesource.com/1216562
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55763}
2018-09-10 17:13:15 +00:00
Georg Neis
d8bdea05bd [turbofan] Serialize more objects.
Such as:
- JSArray (length)
- Root strings, code objects, oddballs

Bug: v8:7790
Change-Id: Ibed83be71b013c090c5a2b6a342c8771ad06916c
Reviewed-on: https://chromium-review.googlesource.com/1215224
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55762}
2018-09-10 15:07:23 +00:00
jgruber
68d244a1db [wasm] Inline the arguments adaptor builtin lookup
The motivation behind this change is that the WasmArgumentsAdaptor
builtin needed too many registers on ia32 and was blocking work on
adding a root register.

Bug: v8:6666
Change-Id: I9d39af96e8520acc092f5ef4b7f0a159fe4e3b12
Reviewed-on: https://chromium-review.googlesource.com/1209788
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55761}
2018-09-10 14:56:53 +00:00
Igor Sheludko
0606bf91ed [cleanup] Introduce LsanPageAllocator decorator
... in order to avoid page allocator filtering when notifying leak sanitizer.

Bug: v8:8015
Change-Id: I2a3222030dbbf0c467808d0f397a064c40324189
Reviewed-on: https://chromium-review.googlesource.com/1216182
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55760}
2018-09-10 14:53:32 +00:00
jgruber
440bda1068 [ia32] Reduce TFS register argument count to 3
To support all possible cases, we must limit the number of register
args for TFS builtins on ia32 to 3. Out of the 6 allocatable
registers, esi is taken as the context register and ebx is the root
register. One register must remain available to store the jump/call
target. Thus 3 registers remain for arguments.

The reason this applies to TFS builtins specifically is because this
becomes relevant for builtins used as targets of Torque function
pointers (which must have a register available to store the target).

Bug: v8:6666
Change-Id: I17d9450cc29c983ddaffc2deb36f45c1c414e166
Reviewed-on: https://chromium-review.googlesource.com/1209287
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55759}
2018-09-10 14:52:22 +00:00
Simon Zünd
5c244ca5de [torque] Add Lint errors for naming convention violations
This CL adds naming convention errors for:
  - Variable names
  - Torque Macro/Builtin names
  - Parameter names

R=tebbi@chromium.org

Bug: v8:7793
Change-Id: Icfe20e53524234f0b4534f0102aff6b14121dfbc
Reviewed-on: https://chromium-review.googlesource.com/1213184
Commit-Queue: Simon Zünd <szuend@google.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55758}
2018-09-10 14:46:12 +00:00
Dan Elphick
5a9f05560e [embedded handlers] Store the handlers without gaps
Previously the builtins table had a value for every single
OperandScale/Bytecode combination regardless of whether it was valid.
This change makes it so that only valid bytecode handlers are stored in
the builtins table. This prevents placeholders being serialized into the
snapshot (and embedded into the binary) saving 9KB in
CODE_SPACE/OLD_SPACE and 2.5KB in the embedded data as well as 66
entries in the builtins table.

To do this, it generates a new header file bytecodes-builtins-list.h
which is created from the BYTECODE_LIST and OPERAND_SCALE_LIST macros.
Since list macros cannot be used to conditionally generate elements in
the C-preprocessor, this is done by generator executable, compiled from
interpreter/generate-flat-headers.cc.

Additionally the generator creates the flat bytecode list so that it is
transposed from the previous result, i.e. the results are grouped by
bytecode and then operand scale rather than operand scale then bytecode.
This should give better locality for commonly used bytecodes and may
allow less commonly used ExtraWide bytecodes to never be mapped into
memory at all.

The cost to storing the handlers densely is that looking up a handler
now requires a binary search through the builtins table, but this should
only happen during debugging. It is also fixable at least for non-wide
handlers and could be improved for wide ones if the need arises.

Bug: v8:8068
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Iaad22a952e2858f508030c5ddc082f91bf59f667
Reviewed-on: https://chromium-review.googlesource.com/1209304
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55757}
2018-09-10 14:42:02 +00:00
Georg Neis
9ed348e65f [turbofan] Serialize descriptor arrays.
- Provide MapData::SerializeDescriptors method for serializing the whole
  descriptor array.
- Trigger this in JSObjectData::SerializeAsBoilerplate.
- Further make things more consistent across the broker.

Bug: v8:7790
Change-Id: Ie6499da8857f7c6561f7c44922aeffcea4876be7
Reviewed-on: https://chromium-review.googlesource.com/1199102
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55756}
2018-09-10 14:23:03 +00:00
Georg Neis
5365cc1e40 [turbofan] More broker cleanups.
- Provide getters for all member variables.
- Add missing flags for cycle detection.
- Be more consistent in stylistic matters.

Bug: v8:7790
Change-Id: I87c3901b203acc4254ec48f5cc895b2e68ff32aa
Reviewed-on: https://chromium-review.googlesource.com/1196431
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55755}
2018-09-10 14:03:22 +00:00
Sreten Kovacevic
1c8ea8f63b [mips] Enable mjsunit/regress/wasm/regress-864509 on big-endian
Issues that caused failure of this test have been resolved with commit
https://chromium-review.googlesource.com/c/v8/v8/+/1213183, so it can
be re-enabled.

Change-Id: I441998e5e63fce7a7e718b593c8e58a71841b78e
Reviewed-on: https://chromium-review.googlesource.com/1215168
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Sreten Kovacevic <skovacevic@wavecomp.com>
Cr-Commit-Position: refs/heads/master@{#55754}
2018-09-10 13:56:27 +00:00