Commit Graph

50176 Commits

Author SHA1 Message Date
Yang Guo
9feef007b1 Correctly initialize message handler for --cache=code
R=machenbach@chromium.org

Change-Id: I59a373d838678ec8659a3014e5e3184e5c2d5c12
Reviewed-on: https://chromium-review.googlesource.com/1209462
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55684}
2018-09-06 12:29:05 +00:00
Michael Achenbach
6a41625000 Revert "[test] Increase coverage of d8_default test suites"
This reverts commit 8ac91f6c6a.

Reason for revert:
Some actual failures on Mac and debugger:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Mac64%20GC%20Stress/2914

Failing message tests need to be skipped for predictable testing:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20predictable/18967

Original change's description:
> [test] Increase coverage of d8_default test suites
> 
> NOTRY=true
> 
> Bug: v8:7285,v8:8140
> Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
> Change-Id: I9cb216de302bc787189f8f12f5b254909b0f5773
> Reviewed-on: https://chromium-review.googlesource.com/1208496
> 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@{#55682}

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

Change-Id: I701abe28317028acbf65769674f15517020d3496
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7285, v8:8140
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/1209347
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55683}
2018-09-06 12:00:54 +00:00
Michael Achenbach
8ac91f6c6a [test] Increase coverage of d8_default test suites
NOTRY=true

Bug: v8:7285,v8:8140
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I9cb216de302bc787189f8f12f5b254909b0f5773
Reviewed-on: https://chromium-review.googlesource.com/1208496
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@{#55682}
2018-09-06 11:36:13 +00:00
Michael Stanton
6da8e1f993 Revert "[Builtins] Array.prototype.forEach perf regression on dictionaries."
This reverts commit 34625fdb5a.

Reason for revert: Test caused timeout, investigating.

Original change's description:
> [Builtins] Array.prototype.forEach perf regression on dictionaries.
> 
> An unnecessary call to ToString() on the array index caused trips to
> the runtime. The fix also includes performance micro-benchmarks so
> we'll have a harder time regressing this case in future.
> 
> Bug: v8:8112
> Change-Id: Iada5bd2e3c6d2246fb1225e7094f3d9c66ddafbd
> Reviewed-on: https://chromium-review.googlesource.com/1206355
> Commit-Queue: Michael Stanton <mvstanton@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#55653}

TBR=mvstanton@chromium.org,tebbi@chromium.org

Change-Id: I21de9b9b33edf03f2173f579c4ba0fc3dfd8ff88
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8112
Reviewed-on: https://chromium-review.googlesource.com/1209288
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55681}
2018-09-06 11:00:15 +00:00
Michael Achenbach
ea5ffdfd10 [test] Skip flaky test on ODROIDs in stress mode
NOTRY=true
TBR=yangguo@chromium.org,mvstanton@chromium.org

Change-Id: I8e558509dc324aa5efe1ccb09cb9959eaabc5720
Reviewed-on: https://chromium-review.googlesource.com/1209303
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55680}
2018-09-06 09:26:04 +00:00
Michael Starzinger
c0a9f50c88 [wasm] Add preliminary support for exported exceptions.
This adds the ability to add exception types to the export section of a
module and reference them via the local exception index. Currently the
export object then just contains the local index as a number, which is
only temporary until we have proper export wrappers for exceptions.

Also note that this tightens the restriction for the modules exception
section to be located in between the import and the export section.

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

Change-Id: Ie26081c3f94e71cb576057db7e45ec5bd0e112f9
Reviewed-on: https://chromium-review.googlesource.com/1206873
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55679}
2018-09-06 09:18:26 +00:00
Simon Zünd
4b4c46b38f [cleanup] Remove dead code from array.js
Some helpers in array.js are now dead code after the recent changes
to array builtins (splice/unshift).

R=jgruber@chromium.org

Bug: v8:8015
Change-Id: I3e0c0280516b539533bcc3b21d84e448112e4ec7
Reviewed-on: https://chromium-review.googlesource.com/1208632
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@google.com>
Cr-Commit-Position: refs/heads/master@{#55678}
2018-09-06 08:44:12 +00:00
Daniel Bratell
00c486bdba [jumbo] Avoid collision between two kFloat32Bit
In jumbo builds, many files are compiled in the same translation
unit and share the same anonymous namespace. Now both gap_resolver.cc and
register-allocator.cc defined kFloat32Bit (a mask representation
of MachineRepresentation::kFloat32) which clashed if those
files were compiled together.

This patch inlines and removed one of the constants.

Change-Id: Ic79e077e62ce9866b6201ec61a9df1e66d5e4a13
Reviewed-on: https://chromium-review.googlesource.com/1206572
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#55677}
2018-09-06 08:31:01 +00:00
Michael Achenbach
1120b5aa6e [test] Add configs for optional linux trybot
This optional trybot runs all tests not run by the CQ bot, but run by
the CI release or debug bot.

TBR=sergiyb@chromium.org
NOTRY=true

Bug: v8:7285
Change-Id: Ifda294448ba92b8055a633ef1e26b4045a38f718
Reviewed-on: https://chromium-review.googlesource.com/1207852
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55676}
2018-09-06 08:24:45 +00:00
Yang Guo
c79fa41870 Use unsigned comparison for stack checks
We use signed comparison when we compare the difference
between SP and stack limit to the size we are going to push,
but need to use unsigned comparison when we compare SP and
stack limit directly.

R=mvstanton@chromium.org

Bug: chromium:876210
Change-Id: I3ca5233677c42aebadb78920592a7c6d8e33a825
Reviewed-on: https://chromium-review.googlesource.com/1206870
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55675}
2018-09-06 07:40:23 +00:00
Michael Achenbach
217cced963 [test] Enable Andoid testing on more JS test suites
Bug: chromium:866862
Change-Id: Ib6c89d88344c2348de155fd54eafa03cf18ea88d
Reviewed-on: https://chromium-review.googlesource.com/1206631
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55674}
2018-09-06 07:26:22 +00:00
Yutaka Hirano
c4bffcd56d Use ScriptOriginOptions with IsSharedCrossOrigin set for empty script
Currently, neither IsSharedCrossOrigin nor IsOpaque is set for an empty
script. Hence an exception thrown from it (e.g., an exception thrown
from native promise implementation) is treated as an error with
blink::kNotSharableCrossOrigin. On the other hand, as the script is
empty, there is no meaningful URL attached, which means the
ExecutionContext's URL is used as the script's name in
blink::SourceLocation::FromMessage. In other words, it works virtually
as same as blink::kSharableCrossOrigin corresponding to
ScriptOriginOptions with IsSharedCrossOrigin set and IsOpaque unset.

With this CL, a ScriptOriginOptions with IsSharedCrossOrigin is set
and IsOpaque is not set is attached to the empty script, as a
preliminary step to deprecate kNotSharableCrossOrigin.

Bug: chromium:875153,chromium:876248
Change-Id: I39279a43994337329b8bd9d28b6ca29f0ac30d9c
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/1201689
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55673}
2018-09-06 07:12:20 +00:00
v8-ci-autoroll-builder
0074ecf574 Update V8 DEPS.
Rolling v8/build: 4ca6fa3..ebaffbc

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/70783e3..bcc3e49

Rolling v8/third_party/depot_tools: f215ae6..0f5a0b4

Rolling v8/third_party/fuchsia-sdk: e0c4613..0953bbd

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

Change-Id: Ic41cdb4c6db298364c6adf399d49ddc8e0e8c787
Reviewed-on: https://chromium-review.googlesource.com/1208304
Reviewed-by: V8 Autoroller <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: V8 Autoroller <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#55672}
2018-09-06 07:11:15 +00:00
Sathya Gunasekaran
d2a85d1032 [Intl] Fix subclassing of V8BreakIterator
Bug: v8:5751, chromium:881021
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I22514ceb5fb0953b728e67ba5266926e912ce9c1
Reviewed-on: https://chromium-review.googlesource.com/1208516
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55671}
2018-09-06 07:10:10 +00:00
Simon Zünd
cfe7115690 [array] Move Array.p.unshift fall-back to Torque
This CL implements a generic baseline version of Array.p.unshift
in Torque, enabling us to remove the JS fall-back.

The elements-accessor fast-path is still used, but the check whether
to use it is also moved to Torque.

Support for sparse JSArrays is removed.

Drive-by change: Small refactoring in builtins-array that will
get extended to other array builtins in a follow-up CL.

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

Bug: v8:7624
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I7b23ce15e7b922eb333f61a408050dedec77c95a
Reviewed-on: https://chromium-review.googlesource.com/1189902
Commit-Queue: Simon Zünd <szuend@google.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55670}
2018-09-06 07:09:05 +00:00
Yang Guo
dd5ea32af3 Revert "[intl] Port collator#resolvedOptions to C++"
This reverts commit f2c943fa7b.

Reason for revert: Non-flaky failures here: https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20nosnap%20-%20debug/20374

Original change's description:
> [intl] Port collator#resolvedOptions to C++
> 
> Bug: v8:5751
> Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
> Change-Id: I236dd3a1b5390911a6c668201aec33e7db1cbd53
> Reviewed-on: https://chromium-review.googlesource.com/1208650
> Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#55668}

TBR=yangguo@chromium.org,gsathya@chromium.org,usharma1998@gmail.com

Change-Id: I018815ec7e3e692cc76a25590c2197a6cf37cc37
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:5751
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/1208571
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55669}
2018-09-06 07:02:27 +00:00
Ujjwal Sharma
f2c943fa7b [intl] Port collator#resolvedOptions to C++
Bug: v8:5751
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I236dd3a1b5390911a6c668201aec33e7db1cbd53
Reviewed-on: https://chromium-review.googlesource.com/1208650
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55668}
2018-09-06 00:20:54 +00:00
Sathya Gunasekaran
f96c577ff5 test262 roll
Bug: v8:7834
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Ie66f443b86d3cf7bd64cc338d84231045ca5e3c6
Reviewed-on: https://chromium-review.googlesource.com/1208517
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55667}
2018-09-05 23:13:20 +00:00
Deepti Gandluri
2fcf6da494 [wasm] Add runtime checks for misaligned atomic accesses
BUG: v8:6532, chromium:874809
Change-Id: I55c00e8563741908cf0daf263152ce927ae18e7c
Reviewed-on: https://chromium-review.googlesource.com/1205812
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Ben Smith <binji@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55666}
2018-09-05 22:39:58 +00:00
Ujjwal Sharma
31142ba49d [intl] Port pluralrules#resolvedOptions to C++
Bug: v8:5751
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I7b126a318480c0d35d6440aa7aea109529ea8ee2
Reviewed-on: https://chromium-review.googlesource.com/1208651
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55665}
2018-09-05 21:31:52 +00:00
Sathya Gunasekaran
16f8417b66 [Intl] Convert options to an object in v8BreakIterator
Previously in the JS implementation, this would throw (on property
access) but this new behavior is more in line with how all the other
intl objects work.

Bug: v8:5751, chromium:880697
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I0bd073b2a0a6fc1eacd686083d8f1a72252cea53
Reviewed-on: https://chromium-review.googlesource.com/1207579
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55664}
2018-09-05 20:49:21 +00:00
Ujjwal Sharma
f548c1c9c4 [intl] reorder intl builtin definitions alphabetically
Bug: v8:5751
Change-Id: I978b5b1da41040132204b64dde3f44985b44255d
Reviewed-on: https://chromium-review.googlesource.com/1208110
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55663}
2018-09-05 20:47:02 +00:00
Ujjwal Sharma
8827178363 [intl] JSV8BreakIterator: accept and return Type instead of int
Change-Id: I4013a966c1f651f5e6cabfbc3f64a08eb01d0dad
Bug: v8:5751
Reviewed-on: https://chromium-review.googlesource.com/1207670
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55662}
2018-09-05 18:33:34 +00:00
Ujjwal Sharma
8f8f074f5d [intl] rename all BreakIterator builtins
Rename all BreakIterator builtins from BreakIterator to V8BreakIterator.

Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I49437096e5a53d85f229421ddae8d61a7164d9a9
Reviewed-on: https://chromium-review.googlesource.com/1207410
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55661}
2018-09-05 18:11:21 +00:00
Junliang Yan
00de0e8bc3 PPC: use pc-relative sequence for poisoning
Use pc relative code on poisoning to allow
relocation of bytecode handler. This is allow
v8_enable_embedded_bytecode_handlers on ppc.

Bug: v8:8068

Change-Id: I6e0a1e961e7e903f0935131cfc190c89c404cf67
Reviewed-on: https://chromium-review.googlesource.com/1205610
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Reviewed-by: Muntasir Mallick <mmallick@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#55660}
2018-09-05 17:34:20 +00:00
Yannic Bonenberger
a05da3adfa Remove unused symbol in mark-compact.h
Change-Id: I2992b0db7f403f682032f9b427c1f8c5238cf61e
Reviewed-on: https://chromium-review.googlesource.com/1205290
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55659}
2018-09-05 17:00:18 +00:00
Sathya Gunasekaran
b586b64276 [class] Stage static public fields
Bug: v8:5367
Change-Id: I7c65840b62a461de87dc88f8dd2e31eba47e8adf
Reviewed-on: https://chromium-review.googlesource.com/1205818
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55658}
2018-09-05 16:08:21 +00:00
Benedikt Meurer
56f7dda67f [turbofan] Fix incorrect typing rule for NumberExpm1.
The Math.expm1() function can actually return -0, for example in the
case that -0 is passed to it.

Bug: chromium:880207
Change-Id: If3a7a3a1fb6a18075ba0d7816687dfd831ebe293
Reviewed-on: https://chromium-review.googlesource.com/1205072
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55657}
2018-09-05 16:07:16 +00:00
Michael Lippautz
408d89041e Reland "Add external backing store JS test"
Allow mocking the limits for ArrayBuffer allocation to simulate operating
system OOM.

Fixes:
- Ensure OS limit > hard limit for external memory. This is necessary as
  any processing below the hard limit is opportunistic. E.g. a running
  sweeper may stall the current marking (GC) round.
- Immediately process AB allocations when under memory pressure. Otherwise,
  the allocations may be stuck in a stalled task. Freeing them upon
  adding them to the collector still enables parallelism if possible.

This reverts commit f3ad6cdb9c.

Bug: chromium:845409
Change-Id: Ic3e458f2af231bae3d53afcfd6002a0347d3f12b
Reviewed-on: https://chromium-review.googlesource.com/1206872
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55656}
2018-09-05 16:03:39 +00:00
Junliang Yan
d48bd16c9a PPC: use 64KB ASLR hint on PPC
Change-Id: I2e461f3f7b3abc666ed5dcc3294a14d27ef0fe60
Reviewed-on: https://chromium-review.googlesource.com/1194583
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#55655}
2018-09-05 15:06:40 +00:00
jgruber
2b1ca9781a [ia32] Enable restricted register allocation for CSA-generated builtins
This switches on a restricted register allocation for all
CSA-generated builtins on ia32, which treats the kRootRegister (=ebx)
as unallocatable.

A few builtins are explicitly excluded. These still need to be fixed
in follow-up CLs. But I'd like to bake this in now to ensure we don't
add more code that cannot handle restricted allocation.

All of this is still behind the (disabled-by-default on ia32)
v8_embedded_builtins configuration.

Bug: v8:6666
Change-Id: If5268aa00439406e1f4e0f7ee18496715a95fdd2
Reviewed-on: https://chromium-review.googlesource.com/1206874
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55654}
2018-09-05 14:42:56 +00:00
Mike Stanton
34625fdb5a [Builtins] Array.prototype.forEach perf regression on dictionaries.
An unnecessary call to ToString() on the array index caused trips to
the runtime. The fix also includes performance micro-benchmarks so
we'll have a harder time regressing this case in future.

Bug: v8:8112
Change-Id: Iada5bd2e3c6d2246fb1225e7094f3d9c66ddafbd
Reviewed-on: https://chromium-review.googlesource.com/1206355
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55653}
2018-09-05 14:25:17 +00:00
jgruber
52cef4edde Refactor OptimizedCompilationInfo construction
This mostly pushes code around (from the two specialized public ctors
to the ConfigureFlags method), but does include one behavioral change
in that all builtins/stubs/handlers now disables switch jump tables.

Bug: v8:6666
Change-Id: I801d5bdc7a9c4bcc3bc5eb467a7c049404ffaff0
Reviewed-on: https://chromium-review.googlesource.com/1201785
Reviewed-by: Stephan Herhut <herhut@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55652}
2018-09-05 13:53:47 +00:00
Clemens Hammacher
37cb48d996 [wasm] Check size of loaded instance fields
This CL adds static assertions (in Liftoff) and DCHECKs (in wasm
compiler) to validate that the size of loaded fields from the wasm
instance object matches the expected size. This is to avoid future bugs
where we change the size of integer fields and forget to update all
code that uses these fields.

R=titzer@chromium.org

Bug: v8:8130, v8:6600
Change-Id: Ib7273800029135b851c0f0b1ca52886783b61fb0
Reviewed-on: https://chromium-review.googlesource.com/1203836
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55651}
2018-09-05 13:25:37 +00:00
Michael Starzinger
eed60e2f34 [wasm] Remove unused WasmException::empty_sig constant.
R=clemensh@chromium.org

Change-Id: If4086054af6125c252acfbf32074e40ed98b8222
Reviewed-on: https://chromium-review.googlesource.com/1206356
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55650}
2018-09-05 12:49:04 +00:00
Michael Achenbach
82937ed7ed [build] Use default snapshot for all testing variants
Bug: v8:7964
Change-Id: I540aa0f9b64969f70822f3956d5f9d0a0ea0fde2
Reviewed-on: https://chromium-review.googlesource.com/1206710
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55649}
2018-09-05 12:26:49 +00:00
Camillo Bruni
ea518290d3 [parser] Drop is_get and is_set parameters in ParsePropertyName
The two bool parameters are used for DCHECks in most places. By
introducing more specialized enumes kAccessorGetterProperty and
kAccessorSetterProperty we can simplify the checks.

Bug: v8:7926
Change-Id: I61023f2da0d96ca5a4fba65c6ead309567144786
Reviewed-on: https://chromium-review.googlesource.com/1202822
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55648}
2018-09-05 11:56:42 +00:00
Stephan Herhut
25d06d8b01 [d8] Increase the maximum number of workers to 100
Change-Id: I34ad8910949e8eb265df53d66f79b315b4a990e6
Reviewed-on: https://chromium-review.googlesource.com/1206630
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55647}
2018-09-05 11:54:42 +00:00
Clemens Hammacher
05fa1f994e [wasm] Avoid use of AccessBuilder
The main goal is to untangle Liftoff from the TF-based wasm compiler,
but since the AccessBuilder does not simplify anything but rather adds
complexity I also removed it from the wasm compiler.
Instead, we now bottleneck all offset computations through the new
ObjectAccess helper.

R=titzer@chromium.org

Bug: v8:6600
Change-Id: I362b7b889d68e89da8c30d3fad7b5bab07bee5c8
Reviewed-on: https://chromium-review.googlesource.com/1204090
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55646}
2018-09-05 11:48:54 +00:00
Dan Elphick
58f0497ba9 [build] Write out octawords in embedded.cc
Shrink embedded.cc by writing out octa words instead of bytes. This
halves the size of the generated file from 28MB to 14MB in a debug build
and reduces compile times for the file from ~2s to ~0.6s.

Bug: v8:8129
Change-Id: I90893c7732d83f4eeedee964cd81958201e3b05c
Reviewed-on: https://chromium-review.googlesource.com/1204111
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55645}
2018-09-05 11:38:18 +00:00
Andreas Haas
78f2610345 [d8] Seal HandleScope and reset Context before running a v8::Task
V8 does not require the embedder to open a HandleScope before executing
a v8::Task. However, d8 does open such a HandleScope. Because of that
HandleScope we repeatedly found missing HandleScopes only in Chrome
tests and not in d8 tests. The same is true for the context, which is
not set when Chrome calls a v8::Task.

With this CL we create a SealHandleScope around the execution of a
v8::Task, and we set the context to nullptr, so that d8 matches Chrome
better.

Ideally d8 would not open a HandleScope in the first place, and would
not set a context. Both make d8 behave different than Chrome and thereby
may hide bugs from our testing infrastructure. However, the
implementation of the InspectorClient requires them. I think the
SealHandleScope and resetting the context is a good workaround at the
moment. Yang, do you know if we can get rid of the context there in the
long run?

R=yangguo@chromium.org

Change-Id: I8df0fabde7dfdcdc630d20af4c68f141ac3a454c
Reviewed-on: https://chromium-review.googlesource.com/1177742
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55644}
2018-09-05 10:34:23 +00:00
Michael Achenbach
beb7778d87 [test] Fix resource-fetching logic for imported files
Path names in import/export statements are relative to the file they are in.

This fixes the logic and unblocks using the messages test suite on Android,
which has cases importing files from mjsunit, which import more files from
there.

Bug: chromium:866862
Change-Id: I8d2ff645f69b67fbdaf4a622d06308e55298b0ce
Reviewed-on: https://chromium-review.googlesource.com/1206570
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55643}
2018-09-05 10:27:07 +00:00
Simon Zünd
c433112cca [array] Use CallCFunction3 for SmiLexicographicCompare
This CL changes the call-site of SmiLexicographicCompare to a fast
c call instead of a runtime call. The runtime function is not deleted
as it is still used in InnerArraySort.

The test is also moved from mjsunit to cctest, to make removal of the
runtime function easier in the future.

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

Bug: v8:7382
Change-Id: Ie961eeb094c13018e9ec28b68f7c444d7f889036
Reviewed-on: https://chromium-review.googlesource.com/1201587
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@{#55642}
2018-09-05 10:13:25 +00:00
Hai Dang
c0cf34104d Reduce duplication of generated code in IterableToList builtins.
This CL exposes IteratorBuiltinsAssembler::IterableToList as a builtin
to reduce generated code duplication. This follows up on CL 1201882.

Change-Id: I848e17bd1b6756de9e898e9d2f8c93d99699df07
Reviewed-on: https://chromium-review.googlesource.com/1206470
Commit-Queue: Hai Dang <dhai@google.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55641}
2018-09-05 10:02:30 +00:00
Mathias Bynens
d84e9496d2 Revert "Ship globalThis 🎉"
This reverts commit d3d37157b5.

Reason for revert: waiting for Chromium LKGR to include the
updated test expectations.

Original change's description:
> Reland "Ship globalThis 🎉"
> 
> This is a reland of 4dac9872ae
> 
> Original change's description:
> > Ship globalThis 🎉
> >
> > Proposal repository:
> > https://github.com/tc39/proposal-global
> >
> > Intent to ship:
> > https://groups.google.com/d/msg/v8-users/Vkoh0wXRwaM/Yt7MpzhkAgAJ
> >
> > Bug: v8:5537
> > Change-Id: I60a6c5375165d89548db12fef454a64137d04c27
> > Reviewed-on: https://chromium-review.googlesource.com/1195494
> > Reviewed-by: Adam Klein <adamk@chromium.org>
> > Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> > Commit-Queue: Mathias Bynens <mathias@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#55543}
> 
> TBR=adamk@chromium.org,machenbach@chromium.org,gsathya@chromium.org,mathias@chromium.org
> 
> No-Presubmit: true
> Bug: v8:5537
> Change-Id: I9776c24952e472c59861ee07f78b6456b19e6f2a
> Reviewed-on: https://chromium-review.googlesource.com/1203894
> Commit-Queue: Mathias Bynens <mathias@chromium.org>
> Reviewed-by: Mathias Bynens <mathias@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#55635}

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

Change-Id: Ie1dd22ecc4e13bf1bb6dbec108fbe37ea476bb1a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:5537
Reviewed-on: https://chromium-review.googlesource.com/1206471
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55640}
2018-09-05 09:49:54 +00:00
Hai Dang
5f8a42727d Reland "[interpreter] Add bytecode for leading array spreads."
This is a reland of 1c48d52bb1.

It turned out that IterableToList doesn't always behave according to
the ES operation with the same name. Specifically, it allows holey arrays
to take its fast path, which produces an output array with holes where
actually "undefined" elements should appear.

This CL changes the version of IterableToList that is used for spreads
(IterableToListWithSymbolLookup) such that holey arrays take the slow path.
It also includes tests for such situations.

Original change's description:
> [interpreter] Add bytecode for leading array spreads.
>
> This CL improves the performance of creating [...a, b] or [...a].
> If the array literal has a leading spread, this CL emits the bytecode
> [CreateArrayFromIterable] to create the literal. CreateArrayFromIterable
> is implemented by [IterableToListDefault] builtin to create the initial
> array for the leading spread. IterableToListDefault has a fast path to
> clone efficiently if the spread is an actual array.
>
> The bytecode generated is now shorter. Bytecode generation is refactored
> into to BuildCreateArrayLiteral, which allows VisitCallSuper to benefit
> from this optimization also.
> For now, turbofan also lowers the bytecode to the builtin.
>
> The idiomatic use of [...a] to clone the array a now performs better
> than a simple for-loop, but still does not match the performance of slice.
>
> Bug: v8:7980
>
> Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
> Change-Id: Ibde659c82d3c7aa1b1777a3d2f6426ac8cc15e35
> Reviewed-on: https://chromium-review.googlesource.com/1181024
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Commit-Queue: Georg Neis <neis@chromium.org>
> Commit-Queue: Hai Dang <dhai@google.com>
> Cr-Commit-Position: refs/heads/master@{#55520}

Bug: v8:7980
Change-Id: I0b5603a12d2b588327658bf0a9b214bd0f22e237
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/1201882
Commit-Queue: Hai Dang <dhai@google.com>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55639}
2018-09-05 09:29:51 +00:00
jgruber
fb1687cbd9 [heap] Fix gcc compile error related to lambda visibility
GCC may be buggy in how it handles visibility in this case. The
previous nested implementation resulted in a 'lambda1 declared with
greater visibility than the type of its field lambda2' error.

Unnesting the inner lambda works around the error.

Bug: v8:8126
Change-Id: Id822ca80fec9af27c4adc7ff53be3b6d9478f0d7
Reviewed-on: https://chromium-review.googlesource.com/1206310
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55638}
2018-09-05 09:17:39 +00:00
Camillo Bruni
1e0f101ae6 [scanner] Reduce branches for IsIdentifier and IsContextualKeyword
Bug: v8:7926
Change-Id: I1c3b831bb19c70e1e7c99f45ae50dbd1351ce2a7
Reviewed-on: https://chromium-review.googlesource.com/1202105
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55637}
2018-09-05 09:13:01 +00:00
Camillo Bruni
2a237ed436 [scanner] Use more range checks and const
Bug: v8:7926
Change-Id: I62e05240fd2bb165ddf8965b77763ec11a40a609
Reviewed-on: https://chromium-review.googlesource.com/1202543
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55636}
2018-09-05 09:11:09 +00:00
Mathias Bynens
d3d37157b5 Reland "Ship globalThis 🎉"
This is a reland of 4dac9872ae

Original change's description:
> Ship globalThis 🎉
>
> Proposal repository:
> https://github.com/tc39/proposal-global
>
> Intent to ship:
> https://groups.google.com/d/msg/v8-users/Vkoh0wXRwaM/Yt7MpzhkAgAJ
>
> Bug: v8:5537
> Change-Id: I60a6c5375165d89548db12fef454a64137d04c27
> Reviewed-on: https://chromium-review.googlesource.com/1195494
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> Commit-Queue: Mathias Bynens <mathias@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#55543}

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

No-Presubmit: true
Bug: v8:5537
Change-Id: I9776c24952e472c59861ee07f78b6456b19e6f2a
Reviewed-on: https://chromium-review.googlesource.com/1203894
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55635}
2018-09-05 08:28:39 +00:00