Commit Graph

55138 Commits

Author SHA1 Message Date
Clemens Hammacher
c9abc31189 [base][cleanup] Using 'using' instead of 'typedef'
Even though both are allowed in the style guide, it recommends to use
'using', as its syntax is more consistent with the rest of C++.
This CL turns all typedefs in base code to 'using' declarations.

R=mlippautz@chromium.org

Bug: v8:8834
Change-Id: Ic5c3d7fa2e50938c6f43e9ff304dc2289fed1133
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547650
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60546}
2019-04-01 11:29:56 +00:00
Michael Lippautz
b1a91ce543 heap: Consider embedder objects when linearly processing ephemerons
Without the proper check V8 would not delegate to the embedder (Blink) for
processing wrappable objects.

Bug: chromium:946941
Change-Id: I5aa3ca85e5113ab8d28a61eca6a5e0593c62f6a1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547649
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60545}
2019-04-01 10:51:56 +00:00
Clemens Hammacher
afba794216 Revert "[mjsunit] Add test that calls functions on prototypes with no arguments"
This reverts commit 5fbc5015de.

Reason for revert: Fails on noi18n: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20-%20noi18n%20-%20debug/26006

Original change's description:
> [mjsunit] Add test that calls functions on prototypes with no arguments
> 
> Change-Id: I0ede9f309b89cfa878a325e3f68327b1682d4ced
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1538123
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60541}

TBR=jarin@chromium.org,sigurds@chromium.org

Change-Id: I4b9c747e6d73dd3ff01af81c3d1e6143dcab6ecd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547652
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60544}
2019-04-01 10:50:27 +00:00
Georg Neis
f74407028c Tighten types of Map::prototype and JSFunction::instance_prototype
... from Object to HeapObject, as they are never Smis.

Change-Id: I4cbe12985091ed1b1e94dab2803a977ae3e25224
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1541104
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60543}
2019-04-01 10:45:33 +00:00
Benedikt Meurer
b3b7011867 [turbofan] Fix incorrect CheckNonEmptyString lowering.
The CheckNonEmptyString lowering was the wrong way around and would
deoptimize if it doesn't see the empty string. This leads to the
creation of invalid ConsStrings and also to unnecessary deopt loops
with proper code.

Bug: chromium:947949, v8:8834, v8:8931, v8:8939, v8:8951
Change-Id: Ib2cc4e92cc9ec7e0284d94f74d14f67f8c878dec
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545908
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60542}
2019-04-01 10:32:24 +00:00
Sigurd Schneider
5fbc5015de [mjsunit] Add test that calls functions on prototypes with no arguments
Change-Id: I0ede9f309b89cfa878a325e3f68327b1682d4ced
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1538123
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60541}
2019-04-01 10:22:03 +00:00
Sigurd Schneider
2bcbc4b632 [cctest] Add V8_EXPORT_PRIVATE for cctest (compiler part)
Bug: v8:9020

Change-Id: If32de05a48bddf5f746b2a3ea810ee350f6a7dda
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1541051
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60540}
2019-04-01 09:12:23 +00:00
Sigurd Schneider
db94d2aa9a [tools] Improve locs.py to include target name in json
Change-Id: I71a97bf686e9d821b607504c4211b21a4fe8234b
Notry: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545906
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60539}
2019-04-01 08:24:03 +00:00
v8-ci-autoroll-builder
f504898843 Update wasm-spec.
Rolling v8/test/wasm-js/data: 1443de9..8059cd6

Update instructions.rst (#995) (Søren Sjørup)
https://chromium.googlesource.com/external/github.com/WebAssembly/spec/+/8059cd6

[interpreter] Check argument types on invoke (Andreas Rossberg)
https://chromium.googlesource.com/external/github.com/WebAssembly/spec/+/5ea9d89

[test] Add test when start function traps (#994) (Ben Smith)
https://chromium.googlesource.com/external/github.com/WebAssembly/spec/+/559a10d

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

Change-Id: Id73ec7683a566f5d206426fcfbbc75f726cbe244
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547414
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#60538}
2019-04-01 04:37:13 +00:00
v8-ci-autoroll-builder
1c46061466 Update V8 DEPS.
Rolling v8/build: 524030d..a72af28

Rolling v8/tools/clang: adc6ac4..82dbc02

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

Change-Id: Ie4d1344c408d094000b7a2c4f61ba6bcdbf20085
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547413
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#60537}
2019-04-01 03:37:13 +00:00
v8-ci-autoroll-builder
0cd7bdf18b Update V8 DEPS.
Rolling v8/build: 99a60dd..524030d

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

Change-Id: I7b483abcaed40e74e54bc950a03c31d12e54e04f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547125
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#60536}
2019-03-31 03:34:11 +00:00
v8-ci-autoroll-builder
9afecd5f44 Update wasm-spec.
Rolling v8/test/wasm-js/data: 4406612..1443de9

[interpreter] Fix in JS conversion (Andreas Rossberg)
https://chromium.googlesource.com/external/github.com/WebAssembly/spec/+/1443de9

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

Change-Id: I6bd1f78bacb7b805730246fc6e3ce6bbad8ab6ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1546929
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#60535}
2019-03-30 10:21:11 +00:00
v8-ci-autoroll-builder
9d1e65d4c8 Update V8 DEPS.
Rolling v8/base/trace_event/common: c7664bb..c69a8ff

Rolling v8/build: a525b65..99a60dd

Rolling v8/buildtools: eda23ac..459baaf

Rolling v8/buildtools/linux64:gn/gn/linux-amd64: https://chrome-infra-packages.appspot.com/gn/gn/linux-amd64/+log/git_rev..git_rev

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/aab7e31..5b63b1f

Rolling v8/third_party/depot_tools: 803c869..8d3ba46

Rolling v8/third_party/perfetto: 40cc341..21a33af

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

Change-Id: I7c82fed3eac96ae2a5f09de2642b624f681d2878
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545088
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#60534}
2019-03-30 03:37:19 +00:00
Milad Farazmand
d2d73e9e96 PPC/S390: [liftoff] Introduce emit_{i64,i32}_add with immediate
Porting: 138d2dfcb1

Original comment:
   This allows immediates to be encoded directly into instructions, rather than
   mov-ing constants to registers first.

   This patch only changes emit_{i64,i32}_add, other emit_ functions will be changed once
   this approach has been approved.

Change-Id: I8442642126555f47a47d511f0ca9d4c00ed82da1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1546050
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#60533}
2019-03-29 19:42:39 +00:00
Alexei Filippov
38986c4750 [inspector] Do not report async stack for console.log messages
That saves some bytes on the frontend side and some cycles when generating and parsing protocol JSON for stacks.
BUG=chromium:946411

Change-Id: I36b3a48b5d8246a05b877bc21f36c08803a1c304
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1542800
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60532}
2019-03-29 19:37:34 +00:00
Clemens Hammacher
6f24e4d1f0 [objects][cleanup] Using 'using' instead of 'typedef'
Even though both are allowed in the style guide, it recommends to use
'using', as its syntax is more consistent with the rest of C++.
This CL turns all typedefs in src/objects to 'using' declarations.

R=mstarzinger@chromium.org

Bug: v8:8834
Change-Id: Iec455b40e9256ee3aae867a42c0e949a338d417c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545893
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60531}
2019-03-29 19:30:29 +00:00
Deepti Gandluri
52d319e078 [wasm-simd] Fix I8x16 unsigned compares
Change-Id: Iad000c91323b9eef799b1e17f25bd3e9d345ab2d
Bug: v8:8635
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1543850
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60530}
2019-03-29 17:37:09 +00:00
Michael Achenbach
74c2039af2 [test] Skip test on gc fuzzer
TBR=sigurds@chromium.org
NOTRY=true

Change-Id: I367705e892aea333cee4f8410b866972b7885dfc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545907
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60529}
2019-03-29 14:13:19 +00:00
Michael Starzinger
5638cad4a5 [wasm] Remove special casing for asm.js function tables.
This removes a special case for eager initialization of function tables
used by asm.js modules. For such modules the table in question can never
be exported. It is used to implement asm.js function tables (for details
see section 6.3 - ValidateFunctionTable in the asm.js spec). Since such
tables are never exported, it should be beneficial to lazily allocate
the export entries.

R=ahaas@chromium.org

Change-Id: I5099d548fe1d2432584d1a09b756c136866d4a0b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1539578
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60528}
2019-03-29 13:14:11 +00:00
Clemens Hammacher
3e7a089c62 [compiler][cleanup] Using 'using' instead of 'typedef'
Even though both are allowed in the style guide, it recommends to use
'using', as its syntax is more consistent with the rest of C++.
This CL turns all typedefs in compiler code to 'using' declarations.

R=mstarzinger@chromium.org

Bug: v8:8834
Change-Id: I3baf3ecbfe2c853cb17bb479ebbf140382193b5c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545896
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60527}
2019-03-29 13:03:30 +00:00
Jaroslav Sevcik
cde53270e3 [turbofan][ptr-compr] Fix pointer map generation for compression nodes
Bug: v8:8977
Change-Id: I3eed7db62e4b6fc8f8e51c5aca29c8b78439a400
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545891
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60526}
2019-03-29 12:56:40 +00:00
Michael Starzinger
4902e91a82 [wasm] Fix reference type global initialization by index.
This fixes initialization of reference type global variables (i.e.
anyref and except_ref) based on an index of another global. It extends
the existing support to exception types, fixes the logic, and also fixes
a missing write barrier.

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

Change-Id: Ia91f1ea03be24fadf3023a5acdd073badb8dcd93
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1539581
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60525}
2019-03-29 12:39:40 +00:00
Michael Achenbach
dd5f07a542 [build] Use default for component build on full debug builders
NOTRY=true

Bug: v8:9061
Change-Id: Ib8064fc45caa362a63ffd826325c8eabf49e5608
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545898
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60524}
2019-03-29 12:38:20 +00:00
Clemens Hammacher
33148af282 [heap][cleanup] Using 'using' instead of 'typedef'
Even though both are allowed in the style guide, it recommends to use
'using', as its syntax is more consistent with the rest of C++.
This CL turns all typedefs in heap code to 'using' declarations.

R=mstarzinger@chromium.org

Bug: v8:8834
Change-Id: I8a9f6e1eebdd0adca4373c866e95ebab0a1e992d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545892
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60523}
2019-03-29 12:15:30 +00:00
Clemens Hammacher
8ab941a087 [parsing][cleanup] Using 'using' instead of 'typedef'
Even though both are allowed in the style guide, it recommends to use
'using', as its syntax is more consistent with the rest of C++.
This CL turns all typedefs in parsing code to 'using' declarations.

R=leszeks@chromium.org

Bug: v8:8834
Change-Id: I0c95f83ee6897d294bd002b7a4a6277962397e90
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545897
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60522}
2019-03-29 11:30:30 +00:00
Joey Gouly
138d2dfcb1 Reland "[liftoff] Introduce emit_{i64,i32}_add with immediate"
This is a reland of e3be96d644

The failure was due to not sign extendint the immediate for 64-bit adds on
32-bit platforms.

Original change's description:
> [liftoff] Introduce emit_{i64,i32}_add with immediate
>
> This allows immediates to be encoded directly into instructions, rather than
> mov-ing constants to registers first.
>
> This patch only changes emit_{i64,i32}_add, other emit_ functions will be changed once
> this approach has been approved.
>
> Bug: v8:9038
>
> Change-Id: I0c7306c2da0dae26f1c6e2465a9565adbf0bda84
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1524482
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60506}

Bug: v8:9038
Change-Id: I7dd1112827d037d900fd36cce71206388642605b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1543730
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60521}
2019-03-29 11:15:20 +00:00
Clemens Hammacher
45535ba178 [ic][cleanup] Using 'using' instead of 'typedef'
Even though both are allowed in the style guide, it recommends to use
'using', as its syntax is more consistent with the rest of C++.
This CL turns all typedefs in ic code to 'using' declarations.

R=ishell@chromium.org

Bug: v8:8834
Change-Id: I70c74d3f20a6c15693157de5fc40bb769ef0599d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545895
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60520}
2019-03-29 10:37:40 +00:00
Clemens Hammacher
98b8715427 [wasm][cleanup] Using 'using' instead of 'typedef'
Even though both are allowed in the style guide, it recommends to use
'using', as its syntax is more consistent with the rest of C++.
This CL turns all typedefs in wasm code to 'using' declarations.

R=ahaas@chromium.org

Bug: v8:8834
Change-Id: Ibdce88a5cc31e0785cbc1b34088bd39aa3ec84b3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545890
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60519}
2019-03-29 10:20:30 +00:00
Santiago Aboy Solanes
6576b2843a [ptr-compr] Fix interaction with instruction selector and code generator
In x64 we can use the macro ASSEMBLE_MOVX.

In Arm64, we force the use of registers.

B

Cq-Include-Trybots: luci.v8.try:v8_linux64_pointer_compression_rel_ng,v8_linux64_arm64_pointer_compression_rel_ng
Bug: v8:8977
Change-Id: I98c6a12d28acca43a38a77dc3ee7af126edb64fe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545889
Auto-Submit: Santiago Aboy Solanes <solanes@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60518}
2019-03-29 09:31:40 +00:00
Jaroslav Sevcik
1ec7ffedc8 [turbofan] Make sure nodes are killed on replacement
In reducers, we should avoid reductions of the form

  ReduceWithValue(node, replacement)
  return Replace(node)

because such reduction does not kill the original node, so it may
become subject to resurrection from some side table (in the bug
referenced below it was load elimination's side table). Instead,
we should use

  ReduceWithValue(node, replacement)
  return Replace(replacement)

Bug: chromium:945644
Change-Id: Id210efe0d214a53241392d30b7f0eee8e7515e2a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545229
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60517}
2019-03-29 08:52:20 +00:00
v8-ci-autoroll-builder
d96f5e4cfb Update V8 DEPS.
Rolling v8/build: adf96bc..a525b65

Rolling v8/buildtools: 466efc7..eda23ac

Rolling v8/buildtools/linux64:gn/gn/linux-amd64: https://chrome-infra-packages.appspot.com/gn/gn/linux-amd64/+log/git_rev..git_rev

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/6d6a48a..aab7e31

Rolling v8/third_party/depot_tools: 51c0f38..803c869

Rolling v8/third_party/perfetto: b66b4e0..40cc341

Rolling v8/third_party/protobuf: bdeb215..b68a347

Rolling v8/tools/clang: 39afd62..adc6ac4

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

Change-Id: Ia3bc8391b9cc96488e21bbd5482ac2c983578f99
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545091
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#60516}
2019-03-29 03:39:49 +00:00
Frank Tang
9907e65475 [Intl] Move intl_bigint and intl_datetime_style to STAGED
For intl_datetime_style
DesignDoc: https://goo.gl/v7n7zV
Test:
test/intl/date-format/constructor-date-time-style.js
test/intl/date-format/constructor-date-time-style-order.js
test/intl/date-format/property-override-date-time-style.js
test/intl/date-format/constructor-date-style-order.js
test/intl/date-format/property-override-date-style.js
test/intl/date-format/constructor-time-style-order.js
test/intl/date-format/property-override-time-style.js

For intl_bigint
Test: test/intl/bigint/tolocalestring.js
https://www.chromestatus.com/feature/5742274625404928


chromium
src/v8/test/intl/date-format/constructor-no-style-order.js

Bug: v8:8699,v8:8702
Change-Id: Ide331e3571d5f6c230fe29b24bf6cced351cba49
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1541449
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60515}
2019-03-29 00:19:49 +00:00
Maciej Goszczycki
c06f118610 ReadOnlyHeap::Contains should only work with HeapObjects
Change-Id: I6c1a2edcee54993cd73e211de8271ea6b6c42ad7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1543732
Auto-Submit: Maciej Goszczycki <goszczycki@google.com>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Maciej Goszczycki <goszczycki@google.com>
Cr-Commit-Position: refs/heads/master@{#60514}
2019-03-28 18:47:58 +00:00
Simon Zünd
c3b51ac093 Revert "[torque] Throw exception instead of aborting if something goes wrong"
This reverts commit 3bd49f9b90.

Reason for revert: Build failure on Win Bot

Original change's description:
> [torque] Throw exception instead of aborting if something goes wrong
> 
> This CL enables exceptions for the Torque compiler and Torque language
> server. Instead of aborting when something goes wrong during
> compilation, a TorqueError is thrown, containing the error message
> and a source position. The compiler executable still prints the error
> and aborts, while the language server will pass this information
> along to the client (not included in this CL).
> 
> R=​danno@chromium.org
> 
> Bug: v8:8880
> Change-Id: Iad83c46fb6a91c1babbc0ae7dbd94fbe4e7f1663
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1526003
> Reviewed-by: Daniel Clifford <danno@chromium.org>
> Commit-Queue: Simon Zünd <szuend@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60512}

TBR=danno@chromium.org,mvstanton@chromium.org,szuend@chromium.org

Change-Id: Iac253da404eaf6e534267f59a42ca93667c205e4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8880
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1543849
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60513}
2019-03-28 16:26:24 +00:00
Simon Zünd
3bd49f9b90 [torque] Throw exception instead of aborting if something goes wrong
This CL enables exceptions for the Torque compiler and Torque language
server. Instead of aborting when something goes wrong during
compilation, a TorqueError is thrown, containing the error message
and a source position. The compiler executable still prints the error
and aborts, while the language server will pass this information
along to the client (not included in this CL).

R=danno@chromium.org

Bug: v8:8880
Change-Id: Iad83c46fb6a91c1babbc0ae7dbd94fbe4e7f1663
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1526003
Reviewed-by: Daniel Clifford <danno@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60512}
2019-03-28 15:49:52 +00:00
Andreas Haas
7eaa0b0b09 [wasm] Update core spec tests
R=clemensh@chromium.org

Change-Id: I3bcac024578eeb556a5422d10c86843be17f5782
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1543355
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60511}
2019-03-28 15:25:12 +00:00
Sven Sauleau
227493b190 [wasm] split bigint.js test
This CL splits a specific test out the bigint.js test suite in order to
be, eventually, ignored by the wasm-bigint proposal 32-bit support CL.

Change-Id: I8ab673abfb53bac95952b11716fe4f29a4a7feaa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1543352
Commit-Queue: Sven Sauleau <ssauleau@igalia.com>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60510}
2019-03-28 14:48:12 +00:00
Clemens Hammacher
24151a9136 [wasm] Fix lazy compilation throughput counter
Instead of reporting kB/s as documented, we were computing bytes/us,
i.e. MB/s, hence mostly reporting 0.
This CL fixes this and renames the variables to make the units more
obvious.

R=titzer@chromium.org

Bug: v8:8975
Change-Id: I0177a8631cc600ab1369657318944f9a215486ce
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1543351
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60509}
2019-03-28 14:34:42 +00:00
Clemens Hammacher
9474b54075 Revert "[liftoff] Introduce emit_{i64,i32}_add with immediate"
This reverts commit e3be96d644.

Reason for revert: Fails on ia32: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux/31041

Original change's description:
> [liftoff] Introduce emit_{i64,i32}_add with immediate
> 
> This allows immediates to be encoded directly into instructions, rather than
> mov-ing constants to registers first.
> 
> This patch only changes emit_{i64,i32}_add, other emit_ functions will be changed once
> this approach has been approved.
> 
> Bug: v8:9038
> 
> Change-Id: I0c7306c2da0dae26f1c6e2465a9565adbf0bda84
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1524482
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60506}

TBR=clemensh@chromium.org,martyn.capewell@arm.com,joey.gouly@arm.com

Change-Id: I131b13dc7178e31919fc2fffacec72c0697d93a6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:9038
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1543354
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60508}
2019-03-28 14:21:53 +00:00
Pierre Langlois
a7fa1ae2e1 Reland "[snapshot] Add support for native counters."
This is a reland of 93716b9e71

Original change's description:
> [snapshot] Add support for native counters.
> 
> Counters in generated code, as enabled with --native-code-counters, do not work
> in the snapshot. This adds a `v8_enable_snapshot_code_counters` build option
> enabled by defaut in debug mode that allows code from the snapshot to increment
> the current isolate's set of counters.
> 
> For this to work, we need to add native code counters in the external reference
> table.
> 
> To keep the no snapshot configuration similar, we've also enabled the
> --native-code-counters flag by default for debug builds.
> 
> Change-Id: I4478b79858c9b04f57e06e7ec67449e9e3a76f53
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1528998
> Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
> Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60495}

Change-Id: Ib6427caf068ca196a032e3f3b97d9f9219e0fe60
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1543349
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#60507}
2019-03-28 14:15:22 +00:00
Joey Gouly
e3be96d644 [liftoff] Introduce emit_{i64,i32}_add with immediate
This allows immediates to be encoded directly into instructions, rather than
mov-ing constants to registers first.

This patch only changes emit_{i64,i32}_add, other emit_ functions will be changed once
this approach has been approved.

Bug: v8:9038

Change-Id: I0c7306c2da0dae26f1c6e2465a9565adbf0bda84
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1524482
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60506}
2019-03-28 13:40:41 +00:00
Clemens Hammacher
45689a1ca1 [zone] Fix peak memory accounting
When switching from atomicops to std::atomic, I introduced a bug that
makes us miss the actual peak memory consumption, and only report the
second-highest memory usage in each zone.
This CL fixes that.

R=petermarshall@chromium.org

Bug: chromium:939724
Change-Id: I3db8eeb9719eb026cf6b4a9690c702cbc4c11bd9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1541227
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60505}
2019-03-28 13:39:11 +00:00
Dan Elphick
5376383cd7 [compiler] Make source position collection lazier
Previously when lazy source positions were enabled, source positions
were immediately collected whenever an exception was thrown for every
frame in the stack trace.

This change makes source position collection trigger only when the
source positions of a stack frame are actually accessed with the
exception of the top frame which is still eagerly collected for now.

Additionally when stack overflows occur during source position
collection, the bytecode is marked with exception in the
source_position_table field so it can be distinguished from the case
where source position collection has never been attempted (undefined)
or is not desired because the bytecode is for natives
(empty_byte_array).

Bug: v8:8510
Change-Id: If7ee68edbacc9e2adadf00fe5ec822a8dbe1c79a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1520721
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60504}
2019-03-28 10:17:41 +00:00
Mythri A
71bf27628f [mjsunit] Fix elements-kind test to not call %NeverOptimizeFunction
test/mjsunit/elements-kind.js calls %NeverOptimizeFunction followed by
%OptimizeFunctionOnNextCall later. If NeverOptimize marker is set, the
funciton would not be optimized even when requested through
%OptimizeFunctionOnNextCall

Change-Id: I37307fee7afd083953699026a82bbf12c85581ac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1533865
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60503}
2019-03-28 09:49:51 +00:00
Peter Marshall
800616151e [tracing] Add build config for Perfetto behind a flag
This adds dependencies on Perfetto and Protobuf and the required
configs to build them.

The build configs are behind a gn flag (v8_use_perfetto) and
are disabled by default. Actual implementation of Perfetto will follow.

Based on Primiano's prototype:
https://chromium-review.googlesource.com/c/v8/v8/+/1290549

Bug: v8:8339
TBR: yangguo@chromium.org
Change-Id: I2b7462d567bfb0a5a3ffbbb8b6fcbf41c824e285
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1517876
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Auto-Submit: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60502}
2019-03-28 09:26:52 +00:00
Jaroslav Sevcik
c62a6da5b8 [turbofan] Analyze loops in memory optimizer.
Currently, we are flushing current allocation group state on loop entry.
With this CL, we only flush the state for loops that can allocate.
Non-allocating loop will preserve the state. This enables more
optimization opportunities for write barrier elimination and
allocation folding.

Unforutnately, the optimization will only trigger for
compiler-introduced loops - user loops always contain stack check
(which can allocate).

Bug: v8:8984
Change-Id: I5a47accec92455f4aabb0129800773596712029a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1541043
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60501}
2019-03-28 08:05:41 +00:00
Michael Achenbach
519bf695b2 Revert "[snapshot] Add support for native counters."
This reverts commit 93716b9e71.

Reason for revert: Breaks asan debug:
https://ci.chromium.org/p/v8/builders/ci/V8%20Clusterfuzz%20Mac64%20ASAN%20-%20debug%20builder/7872
https://ci.chromium.org/p/v8/builders/ci/V8%20Clusterfuzz%20Linux64%20ASAN%20-%20debug%20builder/7874

Original change's description:
> [snapshot] Add support for native counters.
> 
> Counters in generated code, as enabled with --native-code-counters, do not work
> in the snapshot. This adds a `v8_enable_snapshot_code_counters` build option
> enabled by defaut in debug mode that allows code from the snapshot to increment
> the current isolate's set of counters.
> 
> For this to work, we need to add native code counters in the external reference
> table.
> 
> To keep the no snapshot configuration similar, we've also enabled the
> --native-code-counters flag by default for debug builds.
> 
> Change-Id: I4478b79858c9b04f57e06e7ec67449e9e3a76f53
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1528998
> Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
> Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60495}

TBR=sigurds@chromium.org,jgruber@chromium.org,petermarshall@chromium.org,pierre.langlois@arm.com

Change-Id: I93f1ed714e3dcd309f3100685e4bd282db471d46
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1543209
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60500}
2019-03-28 07:58:04 +00:00
tzik
39bfa15786 Use non-primary promise handler as a source of fallback microtask context
A microtask requires a non-detached Context to trigger, and the Context
is usually pulled from the primary handler.
On an example below, |on_rejected| is primary, as the attached promise
is rejected and |on_rejected| will be called as the reaction.

  Promise.reject().then(on_fulfilled, on_rejected);

If the primary handler is undefined or invalid, we used to use the
promise's context as the fallback. E.g. the primary handler is undefined
on the examlpe below, and the context of |promise| was used.

  let promise = Promise.reject();
  promise.then(on_fulfilled);

However, that causes a non-intuitive behavior around a detached
context:

  let DeadPromise = iframe.contentWindow.Promise;
  iframe.src = "http://example.com"; // navigate away.
  // DeadPromise's Context is detached state now.

  let p = DeadPromise.reject();

  // |on_rejected| is called, as the context is pulled from |on_rejected|.
  p.then(on_fulfilled, on_rejected);

  // |on_rejected| was NOT called, as a microtask to settle |q| does not
  // run due to the detached context.
  let q = p.then(on_fulfilled);
  q.catch(on_rejected);

After this CL, we use non-primary handler as a source of fallback context.
On the last example above, the Context is pulled from |on_fullfilled|,
so that |q| is settled using that context.

Bug: chromium:941271
Change-Id: Iff71acf7c3617f3493d100abcd2c5c36bd1bbfd1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1535916
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60499}
2019-03-28 05:59:11 +00:00
v8-ci-autoroll-builder
92d3768d14 Update wasm-spec.
Rolling v8/test/wasm-js/data: d51ec1b..4406612

[test] Check for "unreachable" consistently (#992) (Ben Smith)
https://chromium.googlesource.com/external/github.com/WebAssembly/spec/+/4406612

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

Change-Id: Ib25b56bc297e47a8a35ba868707d9c689f71d79c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1541451
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#60498}
2019-03-28 04:33:31 +00:00
v8-ci-autoroll-builder
0f077e5059 Update V8 DEPS.
Rolling v8/build: 5256fba..adf96bc

Rolling v8/buildtools: d09c967..466efc7

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/2b058ca..6d6a48a

Rolling v8/third_party/depot_tools: c74cce1..51c0f38

Rolling v8/tools/clang: e0abf7a..39afd62

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

Change-Id: I1b59b6b9931362db3ab9600dbd9b795f2363cacc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1541450
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#60497}
2019-03-28 03:31:41 +00:00