Commit Graph

50119 Commits

Author SHA1 Message Date
Ujjwal Sharma
f2d07ec516 [intl] Port BreakIterator to C++
Port CreateBreakIterator and BreakIterator.prototype.resolvedOptions to
C++, refactoring the entire class into another one called
JSV8BreakIterator that would be a subclass of JSObject.

TBR: benedikt@chromium.org
Bug: v8:8111
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I9bd1d82ec34b210c8ed59ea6576548d45a34b8d5
Reviewed-on: https://chromium-review.googlesource.com/1198946
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55627}
2018-09-05 03:22:53 +00:00
Frank Tang
41db90b0da [Intl] Move most functions from DateFormat to JSDateTimeFormat
Move Unwrap,FormatDateTime,DateTimeFormat,ToDateTimeOptions,ToLocaleDateTime to JSDateTimeFormat

Bug: v8:8066
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng;luci.chromium.try:linux_chromium_rel_ng
Change-Id: I4d83cc96ea280ab8f77df5a431b877b76b05f1ac
Reviewed-on: https://chromium-review.googlesource.com/1198142
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Jungshik Shin <jshin@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55626}
2018-09-05 00:57:56 +00:00
Frank Tang
d7ae63e6f2 [Intl] Move toLDMLString & canonicalizeTimeZoneID js->C++
Bug: v8:8066
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng;luci.chromium.try:linux_chromium_rel_ng
Change-Id: I74fe09bb6bb4428d57c66811b77f5f35144f717f
Reviewed-on: https://chromium-review.googlesource.com/1186153
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Jungshik Shin <jshin@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55625}
2018-09-04 22:37:56 +00:00
tzik
e9e583ec59 Add v8::internal::MicrotaskQueue stub
As a step of Context-associated MicrotaskQueue [1], this CL adds
a stub for v8::internal::MicrotaskQueue.

[1]: https://docs.google.com/document/d/1oNNhXF66dmwyj5S6Ri_g1vmBZltK8rWvZo1Tgqj64Z0/edit?usp=sharing

Tbr: bmeurer@chromium.org
Bug: v8:8124
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Ie3d86ca49d46749660ec1316e4ae051528076e97
Reviewed-on: https://chromium-review.googlesource.com/1192803
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55624}
2018-09-04 22:26:42 +00:00
Junliang Yan
73932da7a0 PPC/s390: remove unused macro to fix compilation error
Change-Id: Id2ba591deb39428d9c788a9c9dcfd15bb8581bd0
Reviewed-on: https://chromium-review.googlesource.com/1205330
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#55623}
2018-09-04 22:21:17 +00:00
Frank Tang
3110b59253 [Intl] Use Intl::BoundFunctionContextSlot::kBoundFunction instead.
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng;luci.chromium.try:linux_chromium_rel_ng

Bug: v8:7979
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Ic390fbde6e04e86b8e284975c13c1eff8dc59e90
Reviewed-on: https://chromium-review.googlesource.com/1205411
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55622}
2018-09-04 22:12:18 +00:00
Frank Tang
9c7ec98a90 [Intl] Move NumberFormat to JSNumberFormat
Bug: v8:7979

TBR: benedikt@chromium.org
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng;luci.chromium.try:linux_chromium_rel_ng
Change-Id: I9d5181c15b56de3bc5288d11bd83e55157c7a610
Reviewed-on: https://chromium-review.googlesource.com/1168518
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55621}
2018-09-04 20:16:11 +00:00
Junliang Yan
71f14bd0d3 PPC: fix left_reg clobber issue on float min op
Change-Id: I0bd15f4769e9ab09aec3f479af0ee50fc81fd6dc
Reviewed-on: https://chromium-review.googlesource.com/1204950
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#55620}
2018-09-04 19:05:36 +00:00
Michael Lippautz
1d1d4d21e0 [heap] Record UMA for Scavenger sub phases
Reocord UMA counters for the following phases:
- Scavenging roots
- Scavenging object graph in parallel

Bug: chromium:850508
Change-Id: I07210271179ce6801ea6daf3b486b4ce237a3261
Reviewed-on: https://chromium-review.googlesource.com/1199302
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55619}
2018-09-04 18:57:11 +00:00
Hai Dang
b45204d607 Add warmup to SpreadCallsGeneral benchmarks.
Since the benchmark is very fast, a warmup is useful to reduce the noise
created by optimization.

Change-Id: I4902c5c1695099be766d0fcc563c2f5d0892d3a9
Reviewed-on: https://chromium-review.googlesource.com/1204112
Commit-Queue: Hai Dang <dhai@google.com>
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55618}
2018-09-04 16:15:54 +00:00
Bill Budge
f62550f40b [cleanup] Eliminate obsolete TODOs
Bug: v8:8015
Change-Id: Ic6d3b4f927095ba2e78509c1ba07e5b9258426e2
Reviewed-on: https://chromium-review.googlesource.com/1198182
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55617}
2018-09-04 14:59:47 +00:00
Michael Lippautz
5107ec2a7c Add external backing store JS test
Allow mocking the limits for ArrayBuffer allocation to simulate operating
system OOM.

Bug: chromium:845409
Change-Id: I38bf56a3677e1db547c774223c81e913f56cb631
Reviewed-on: https://chromium-review.googlesource.com/1203895
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55616}
2018-09-04 14:47:24 +00:00
Michael Starzinger
1990798030 [wasm] Fix ordering check of exception section.
This fixes an off-by-one in the ordering restriction check for exception
sections in a module. It also adds proper testing for exception handling
of indirect calls. This in turn adds a table section that triggers the
aforementioned bug.

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

Change-Id: Ie44ad4dee1b0c623f069fca7661c4282492b52d6
Reviewed-on: https://chromium-review.googlesource.com/1203993
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55615}
2018-09-04 14:45:14 +00:00
Clemens Hammacher
96a039aab1 [wasm][cleanup] Rename SsaEnv::go to SsaEnv::reached
{go} sounds active, as if the state would be changed. {reached} sounds
like an accessor.

Drive-by: Make the accessor const to further clarify that this is just
an accessor.

R=titzer@chromium.org

Bug: v8:8015
Change-Id: I80d5223b9573345d3de386d68871a9e828621fc0
Reviewed-on: https://chromium-review.googlesource.com/1203992
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55614}
2018-09-04 14:23:49 +00:00
Benoît Lizé
a1da383fb3 parsing: Lock ExternalStrings in the ExternalStringStream.
Utf*Characterstream caches the data pointer of ExternalStrings through
ExternalStringStream, so lock the strings in ExternalStringStream.

Bug: chromium:877044
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I241caaf64e109b33e2f9982573e11c514410509c
Reviewed-on: https://chromium-review.googlesource.com/1194003
Commit-Queue: Benoit L <lizeb@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55613}
2018-09-04 14:09:04 +00:00
Florian Sattler
13afaecc93 Reland "[scanner] Inlining ScanIdentifier and Token check"
This is a reland of 5bbd19219a

Original change's description:
> [scanner] Inlining ScanIdentifier and Token check
>
> This improves parse time for code-load and other benchmarks.
>
> Bug: v8:7926
> Change-Id: I9c8017f2e7f73dd952c025db5abe8e4062e6ef9b
> Reviewed-on: https://chromium-review.googlesource.com/1196506
> Commit-Queue: Florian Sattler <sattlerf@google.com>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#55521}

TBR=verwaest@chromium.org,marja@chromium.org

Bug: v8:7926
Change-Id: I35f265a2a2189325daaf4a361bda35bf82758b16
Reviewed-on: https://chromium-review.googlesource.com/1203731
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55612}
2018-09-04 14:03:04 +00:00
Mathias Bynens
08139eea51 Revert "Reland "Ship globalThis 🎉""
This reverts commit 0e78acebda.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Reland "Ship globalThis 🎉"
> 
> This reverts commit f7df60d561.
> 
> Original change's description:
> > Revert "Ship globalThis 🎉"
> > 
> > This reverts commit 4dac9872ae.
> > 
> > Reason for revert: Speculative revert for layout test failures:
> > https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8-Blink%20Linux%2064/25970
> > 
> > E.g.:
> > virtual/service-worker-servicification/http/tests/serviceworker/webexposed/global-interface-listing-service-worker.html
> > 
> > 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,gsathya@chromium.org,mathias@chromium.org
> > 
> > Change-Id: Iacb484d36ba2c8002336038660450b240006e0ab
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: v8:5537
> > Reviewed-on: https://chromium-review.googlesource.com/1199743
> > Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> > Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#55564}
> 
> TBR=adamk@chromium.org,machenbach@chromium.org,gsathya@chromium.org,mathias@chromium.org
> 
> Change-Id: I7912be09ab68ef956a8cc164fa8bbd937efb58c5
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: v8:5537
> Reviewed-on: https://chromium-review.googlesource.com/1200722
> Reviewed-by: Mathias Bynens <mathias@chromium.org>
> Commit-Queue: Mathias Bynens <mathias@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#55606}

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

Change-Id: Id41dbefc3b2015e66f71a0410bebae632692f178
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:5537
Reviewed-on: https://chromium-review.googlesource.com/1203893
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55611}
2018-09-04 13:52:30 +00:00
Mike Stanton
fd334b3216 [builtins] Enable Torque Array.prototype.splice
Before, splice was implemented with a C++ fast path and a
comprehensive JavaScript version.

This impl. is entirely in Torque with a fastpath for SMI,
DOUBLE and OBJECT arrays, and a comprehensive slow path.
The same level of "sparse" array support as given by the
array.js implementation is included.

This reland addresses several issues:

* Removed "sparse" array support from splice.
* Addressed ClusterFuzz issue 876443:
  The test and code that uses the fix is in this CL.
  The fix in isolation can be seen here:
  https://chromium-review.googlesource.com/c/v8/v8/+/1199403
* Removed dead code in elements.cc

BUG=chromium:876443, v8:8131, v8:1956, v8:7221

Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I2d4a66c24ba1edabeca34e27e6ff8ee6136ed5f1
Reviewed-on: https://chromium-review.googlesource.com/1201783
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55610}
2018-09-04 13:18:23 +00:00
Clemens Hammacher
0e460c25a0 [Liftoff] Load memory size as ptr-sized int
Since https://crrev.com/c/1112003, the memory size is stored as size_t
instead of uint32_t in order to support 4GB memories.
Loading it as uint32_t only works on little-endian systems, and only for
memory sizes <4GB. This CL fixes this to load and process the memory
size as pointer-sized value.
Additional platform-specific methods are added to perform a shift by a
constant value. This can be reused to improve the generated code for
other shifts.

R=titzer@chromium.org

Bug: v8:8130, v8:6600
Change-Id: Ifa688a3ed0e2809190571f24bdf47a7f53880b3d
Reviewed-on: https://chromium-review.googlesource.com/1203950
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55609}
2018-09-04 13:12:35 +00:00
Stephan Herhut
fa12290de7 [wasm] Avoid workaround for mising source positions
Bug: v8:8015
Change-Id: I6540104f58acd819d5a57edae49f8b909aa1a065
Reviewed-on: https://chromium-review.googlesource.com/1203892
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55608}
2018-09-04 12:45:06 +00:00
Michael Starzinger
7623d0fa4c [wasm] Fix some lost WasmDecoder template parameters.
R=clemensh@chromium.org

Change-Id: I6539bef4a0caa01bffaad85332c31681176c24d6
Reviewed-on: https://chromium-review.googlesource.com/1204110
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55607}
2018-09-04 12:16:49 +00:00
Mathias Bynens
0e78acebda Reland "Ship globalThis 🎉"
This reverts commit f7df60d561.

Original change's description:
> Revert "Ship globalThis 🎉"
> 
> This reverts commit 4dac9872ae.
> 
> Reason for revert: Speculative revert for layout test failures:
> https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8-Blink%20Linux%2064/25970
> 
> E.g.:
> virtual/service-worker-servicification/http/tests/serviceworker/webexposed/global-interface-listing-service-worker.html
> 
> 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,gsathya@chromium.org,mathias@chromium.org
> 
> Change-Id: Iacb484d36ba2c8002336038660450b240006e0ab
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: v8:5537
> Reviewed-on: https://chromium-review.googlesource.com/1199743
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#55564}

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

Change-Id: I7912be09ab68ef956a8cc164fa8bbd937efb58c5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:5537
Reviewed-on: https://chromium-review.googlesource.com/1200722
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55606}
2018-09-04 11:52:26 +00:00
Michael Starzinger
1003fcc48e [wasm] Fix exception handling with empty try blocks.
R=clemensh@chromium.org
TEST=mjsunit/wasm/exceptions
BUG=v8:8091

Change-Id: I866430e1f3d3e7b93001a4375a869f19de75e65e
Reviewed-on: https://chromium-review.googlesource.com/1203954
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55605}
2018-09-04 11:31:00 +00:00
Yang Guo
1c2aa60520 [debug-evaluate] extend accessors by runtime receiver checks
Also extend the API to reflect this new feature.


R=jgruber@chromium.org, szuend@google.com, ulan@chromium.org

Bug: v8:8125
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Ic7a7604a8c663ba04b324eb8902ff325a25654e7
Reviewed-on: https://chromium-review.googlesource.com/1202087
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55604}
2018-09-04 11:24:50 +00:00
Yang Guo
cbec08d5ad [node] update list of unnecessary deps
R=machenbach@chromium.org

Change-Id: I28553eb80f78359e6aeb5bb05a1ea39467e164c9
Reviewed-on: https://chromium-review.googlesource.com/1203830
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55603}
2018-09-04 10:38:36 +00:00
Michael Starzinger
e8d79f070c [wasm] Make exception creation non-observable by JS.
This fixes exception creation (by the WebAssembly throw operation) so
that it is not observable by JavaScript. Internal properties are now
stored with symbol names instead of string names, which also prevents
them from being accessed or monkey-patched directly by JavaScript.

R=clemensh@chromium.org
TEST=mjsunit/regress/wasm/regress-8094
BUG=v8:8094

Change-Id: I33cb27f4373114cd4db28d9aef23560093e55242
Reviewed-on: https://chromium-review.googlesource.com/1203951
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55602}
2018-09-04 10:37:27 +00:00
Stephan Herhut
175f2a6a6c [wasm] Throw a RuntimeError if memory lacks guard regions
WebAssembly.Instantiate would silently fail when the passed in memory
object did not have guard regions even though the compiled module assumes
so. This lead to an inconsitent state and a DCHECK error. Instead, now
throw a LinkError.

Change-Id: I68bab842bcc40d3325aea4b19979d80054ed407c
Reviewed-on: https://chromium-review.googlesource.com/1180892
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55601}
2018-09-04 10:35:26 +00:00
Clemens Hammacher
84012551a8 Fix gcc compile error
Bug: v8:8126

R=sattlerf@google.com
CC=jgruber@chromium.org, titzer@chromium.org

Change-Id: I32ec94fd913def346d1e783b2ffd0ec7d16e5df5
Reviewed-on: https://chromium-review.googlesource.com/1203730
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55600}
2018-09-04 10:34:06 +00:00
Stephan Herhut
8cc3da3ca4 [wasm] Do not use GenerateCodeForTesting in production
The wasm compiler used Pipeline::GenerateCodeForTesting to generate code
for various stubs. This change adds a dedicated entry point and moves
some common code there.

Bug: v8:8015
Change-Id: Ied628ba14c36e68826cb71d00506994184cc4763
Reviewed-on: https://chromium-review.googlesource.com/1196885
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55599}
2018-09-04 10:25:46 +00:00
Sergiy Byelozyorov
a4df9cbfd9 [tools] Add Nokia One trybot to the try_perf script
R=machenbach@chromium.org

Bug: chromium:874316
Change-Id: I148916d0b0f34214325910b29aceb39d3a1db459
Reviewed-on: https://chromium-review.googlesource.com/1201523
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55598}
2018-09-04 10:08:41 +00:00
v8-ci-autoroll-builder
26ed7b0d2d Update V8 DEPS.
Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/5167fb3..88dc49a

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

Change-Id: I84883887372c1abff8d2a643f98dad7ba867e903
Reviewed-on: https://chromium-review.googlesource.com/1203570
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@{#55597}
2018-09-04 03:51:21 +00:00
Yutaka Hirano
137f0c56dd Inherit ScriptOriginOptions in eval()
In general, whether an error thrown from a script will be muted is
passed as (part of) ScriptOriginOptions when the script is compiled.
Currently, when eval is called, that information is not given, and it
uses the default options (IsSharedCrossOrigin = false,
IsOpaque = false). Give it the options for the script in which eval
is called.

Bug: chromium:875153
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng;luci.chromium.try:linux_chromium_rel_ng
Change-Id: I4b5b872b4a8c2b8e503d457f199d85892a4c817c
Reviewed-on: https://chromium-review.googlesource.com/1188052
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55596}
2018-09-04 02:10:51 +00:00
Benedikt Meurer
b898112277 [turbofan] Improve typing of ToNumeric and ToNumber.
The previous typing rules for ToNumeric and ToNumber didn't match on the
NonBigIntPrimitive input set, which causes trouble when we morph ToNumeric
nodes into ToNumber nodes, and generally lead to worse typings in the
graph, and thus worse code generation. This change improves the existing
typing rules and turns ToNumber into a chokepoint again.

Bug: chromium:879898, v8:8015
Change-Id: I4a7ff0e9c420c5dcfdb2b96884e019a5943828a4
Reviewed-on: https://chromium-review.googlesource.com/1201522
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55595}
2018-09-03 19:14:09 +00:00
Yang Guo
4a96850aeb Revert "inspector: find magic comment using V8 scanner"
This reverts commit 1b3b808a54.

Reason for revert: crbug/879988

TBR=kozy@chromium.org

Original change's description:
> inspector: find magic comment using V8 scanner
>
> Inspector tries to provide sourceURL and sourceMappingURL for scripts
> with parser errors. Without this CL we convert source of each script
> to inspector string and search for magic comment there. Some web sites
> use pattern when they get some data from network and constantly try to
> parse this data as JSON, in this case we do a lot of useless work.
>
> So we can parse magic comments on V8 side only for compilation errors
> (excluding parse JSON errors), to do it we can reuse scanner by running
> it on each potential comment.
>
> R=​alph@chromium.org,verwaest@chromium.org,yangguo@chromium.org
>
> Bug: chromium:873865,v8:7731
> Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
> Change-Id: I77c270fd0e95cd7b2c9ee4b7f72ef344bc1fa104
> Reviewed-on: https://chromium-review.googlesource.com/1182446
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Alexei Filippov <alph@chromium.org>
> Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#55280}

TBR=alph@chromium.org,yangguo@chromium.org,kozyatinskiy@chromium.org,verwaest@chromium.org

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

Bug: chromium:873865, v8:7731, chromium:879988
Change-Id: Ia7ac766e19f9b58562d9430811f10b25c4556a46
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
Reviewed-on: https://chromium-review.googlesource.com/1202583
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55594}
2018-09-03 18:42:28 +00:00
Ross McIlroy
55b59e3038 [RCS] Fix %GetAndResetRuntimeCallStats for worker thread RCS tables.
Change-Id: Ifbe9ac0dc49b9826fb7ea2e81ce8e44401c3dc20
Reviewed-on: https://chromium-review.googlesource.com/1200002
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55593}
2018-09-03 15:13:14 +00:00
Yang Guo
29e1d39966 Revert "[scanner] Inlining ScanIdentifier and Token check"
This reverts commit 5bbd19219a.

Reason for revert: Tentative revert for crbug.com/879988

TBR=sattlerf@chromium.org,verwaest@chromium.org

Original change's description:
> [scanner] Inlining ScanIdentifier and Token check
>
> This improves parse time for code-load and other benchmarks.
>
> Bug: v8:7926
> Change-Id: I9c8017f2e7f73dd952c025db5abe8e4062e6ef9b
> Reviewed-on: https://chromium-review.googlesource.com/1196506
> Commit-Queue: Florian Sattler <sattlerf@google.com>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#55521}

TBR=marja@chromium.org,verwaest@chromium.org,sattlerf@google.com

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

Bug: v8:7926, chromium:879988
Change-Id: Ic71d9cf63b69c0f9560851259f434b02cc082417
Reviewed-on: https://chromium-review.googlesource.com/1202086
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55592}
2018-09-03 14:30:55 +00:00
Nico Weber
ab1ddf2b7e stop depsing in gyp
made possible by https://chromium-review.googlesource.com/c/chromium/src/+/1063611

Bug: chromium:826218
Change-Id: Id3123de5705c91beb0a5eb87ca4490fe55a7de01
Reviewed-on: https://chromium-review.googlesource.com/1201002
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55591}
2018-09-03 14:13:18 +00:00
jgruber
5b992f5343 Ensure kRootRegister is unused in interface descriptors
Now that we've removed kRootRegister from all ia32 interface
descriptors, let's make sure it does not sneak back in.

Bug: v8:6666
Change-Id: Ie3528908a142c36f106b0053041ed974216533d4
Reviewed-on: https://chromium-review.googlesource.com/1202083
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55590}
2018-09-03 13:35:55 +00:00
Bogdan Lazarescu
948c4b3067 [Liftoff] Fix registers constants declaration.
Change-Id: Ie18b39ab50d592c81de6dd2aa2d246191f758b5e
Reviewed-on: https://chromium-review.googlesource.com/1179670
Commit-Queue: Bogdan Lazarescu <bogdan.lazarescu@arm.com>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55589}
2018-09-03 12:31:43 +00:00
jgruber
233eeade0c [builtins] Reduce register pressure in RecordWrite
Just a minor refactoring that loads parameters just prior to their
uses to reduce register spills and restores. CSA is not smart enough
to do this on its own.

Bug: v8:6666
Change-Id: I6d01abc35b333b2b0d99fa86daaa6ecb6afcf6c0
Reviewed-on: https://chromium-review.googlesource.com/1201883
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55588}
2018-09-03 12:22:22 +00:00
jgruber
6276642357 Remove isolate parameter from RecordWrite builtin
The isolate can be efficiently loaded through other means: either as a
root-relative load (if embedded builtins are enabled), or as an embedded
external reference (i.e. the absolute pointer is included in the
instruction stream) otherwise.

The generated code should be at least as fast as previously. On x64
(with embedded builtins):

Before:
 // Register moves in prologue:
 0x7f47a6b4860a     a  488955e0       REX.W movq [rbp-0x20],rdx
 // And the load from a stack slot at each use-site.
 0x7f47a6b486f2    f2  488b7de0       REX.W movq rdi,[rbp-0x20]

After:
 // Each use-site just loads a root-relative offset.
 0x7f1645fcc6ce    ee  498dbd38ffffff REX.W leaq rdi,[r13-0xc8]

On ia32 (no embedded builtins), before:
 0x5c608930    10  8955f0         mov [ebp-0x10],edx
 0x5c6089fb    db  891424         mov [esp],edx

After:
 0x41d0898d    8d  b80033b156     mov eax,0x56b13300

Removal reduces register pressure, and frees up ebx as the root register
on ia32.

Note that the set of allocatable registers was only reduced on ia32 to
exclude the root register.

Bug: v8:6666
Change-Id: I14e401e2823c82042c76acae10c3c935b9982993
Reviewed-on: https://chromium-review.googlesource.com/1201586
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55587}
2018-09-03 12:12:01 +00:00
Florian Sattler
3ca12ea465 [scanner] Adapted member order to improve cache behaviour
Bug: v8:7926
Change-Id: I9b8129d60fc4d65481757222c255e883b24f47ab
Reviewed-on: https://chromium-review.googlesource.com/1196549
Commit-Queue: Florian Sattler <sattlerf@google.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55586}
2018-09-03 12:07:41 +00:00
jgruber
158216e948 [ia32] Pass InterpreterPushArgsThenConstruct args on the stack
In preparation for kRootRegister support on ia32.

Instead of pushing the register args first thing within the builtin to
free up needed scratch registers, we just pass the last 3 arguments on
the stack.

Drive-by: Update documentation of helper function.

Bug: v8:6666
Change-Id: I4a194d6885ac9cdfb9f5e66d687522442fae39ba
Reviewed-on: https://chromium-review.googlesource.com/1199025
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55585}
2018-09-03 12:06:37 +00:00
Florian Sattler
00566ed460 [preparser] Adapted the PreParser to use ThreadedLists
PreParser types, e.g., PreParserExpression, PreParserList,
PreParserFormalParameter.  This also enhances ThreadedLists to be used
on the same class more than once.

Bug: v8:7926
Change-Id: Ied204120e5d12ab1f1c4192f6b3c05971a12683b
Reviewed-on: https://chromium-review.googlesource.com/1199262
Commit-Queue: Florian Sattler <sattlerf@google.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55584}
2018-09-03 12:01:52 +00:00
Michael Starzinger
4e20a62a95 [wasm] Fix missing default value for anyref local.
R=titzer@chromium.org
TEST=mjsunit/wasm/anyref

Change-Id: Ia79c78038f6cc92f657ee1b48474323bde981155
Reviewed-on: https://chromium-review.googlesource.com/1201784
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55583}
2018-09-03 11:24:39 +00:00
Dan Elphick
6041afe4e9 [embed handlers] Enable embedding of handlers by default
Bug: v8:8068
Change-Id: Iaa89311441305cfe938a938b456045b40dec3943
Reviewed-on: https://chromium-review.googlesource.com/1199463
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55582}
2018-09-03 10:31:16 +00:00
Dan Elphick
b4b5e785c0 [embed handlers] Initialize dispatch table
When v8_enable_embedded_bytecode_handlers is true, initialize the
bytecode dispatch table from the builtins table. Also stops creating
the handlers more than once as the SetupInterpreter will now always do
nothing even when not starting from a snapshot.

In the short term, with the flag enabled all the bytecode handlers are
eagerly deserialized.

Finally, the bytecode handlers are marked as non-isolate independent to
prevent them being embedded in the binary until they can be converted.

Bug: v8:8068
Change-Id: I9e5ef7f1dce1b2d11c7aa26526f06b53f8939697
Reviewed-on: https://chromium-review.googlesource.com/1188477
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55581}
2018-09-03 08:18:10 +00:00
Georg Neis
1075e6a0ec [turbofan] Cleanup JSFunction and NativeContext serialization.
Bug: v8:7790
Change-Id: I93ecb8540a002b6bfca857c2938920ac52308df1
Reviewed-on: https://chromium-review.googlesource.com/1193874
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@{#55580}
2018-09-03 08:15:10 +00:00
Alexander Timokhin
724d8111dd [serializer] Add support for AllocationSites without weak_next field
After https://chromium-review.googlesource.com/c/v8/v8/+/1101323 some
AllocationSites can have dropped weak_next field, but this doesn't suported in
serializer/deserializer.

This CL adds support for such AllocationSites.

Change-Id: Ibf495ae4effdf4e127892d906967d8e30eebfc87
Reviewed-on: https://chromium-review.googlesource.com/1183238
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55579}
2018-09-03 07:26:36 +00:00
Simon Zünd
b50fa92a2d Introduce 'kLengthString' in torque code
This CL replaces occurrences of "length" with the CSA macro
LengthStringConstant().

R=jgruber@chromium.org

Bug: v8:8015
Change-Id: Idf095587940f859e4c634865560abae325cd9fb4
Reviewed-on: https://chromium-review.googlesource.com/1201782
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@google.com>
Cr-Commit-Position: refs/heads/master@{#55578}
2018-09-03 06:36:42 +00:00