Commit Graph

51992 Commits

Author SHA1 Message Date
Igor Sheludko
a667c0ce86 [classes] Fix DCHECK for a case when data property overwrites one accessor
Also add comments and regression tests.

Bug: chromium:904272
Change-Id: I89e8ec537bbdce09fda120cd29d5a5e54e77cf19
Reviewed-on: https://chromium-review.googlesource.com/c/1335556
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57500}
2018-11-14 12:51:16 +00:00
Sathya Gunasekaran
f08e42e32d [dict] Remove ordered hash table base
Now we can pass in the prefix size to OrderedHashTable directly from
the Derived class and have it calculate the hash table start offset
based on this.

Bug: v8:6443, v8:7569
Change-Id: I80d54b65116e18f5a0cab18eb51649adad447cce
Reviewed-on: https://chromium-review.googlesource.com/c/1333682
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57499}
2018-11-14 12:35:01 +00:00
Michael Starzinger
ba5501edfe [heap] Make {NewOffHeapTrampolineFor} use finer scope.
This makes the above factory function use a fine-grained scope when
unlocking code space for modification. It is now based on the memory
chunk of the resulting code object.

R=ulan@chromium.org

Change-Id: Iabe6fba7595ba3264b21bcd6f6634ab9725eaad9
Reviewed-on: https://chromium-review.googlesource.com/c/1335687
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57498}
2018-11-14 12:29:41 +00:00
Leszek Swirski
ed77644b64 [parser] Switch on token in ScanSingleToken
Always generate a token for the first character in ScanSingleToken, and
switch on that. If the token could change with subsequent characters, e.g.
Token::ADD into Token::ASSIGN_ADD, then handle that in that token's case
rather than going character-by-character.

This allows us to have a tighter packing of the cases, and early detect
numbers, keywords and identifiers.

Change-Id: I8c3ac7a5453547abeb09fc90826a26390b15a415
Reviewed-on: https://chromium-review.googlesource.com/c/1335547
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57497}
2018-11-14 12:14:22 +00:00
Ivica Bogosavljevic
01f7ff5493 MIPS32: Implement AtomicPair operators through runtime
This CL implements AtomicPair operators: Load, Store,
Add, Sub, Or, Xor, And, Exchange and CompareExchange using
runtime on MIPS32R2 and older. MIPS32R6 includes instructions
for 64-bit atomic access so they are implemented using those.

Change-Id: I1309c1ea4771480516ec5a92f7592533bdcb205c
Reviewed-on: https://chromium-review.googlesource.com/c/1326466
Reviewed-by: Sreten Kovacevic <skovacevic@wavecomp.com>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Ivica Bogosavljevic <ibogosavljevic@wavecomp.com>
Cr-Commit-Position: refs/heads/master@{#57496}
2018-11-14 11:30:53 +00:00
Predrag Rudic
bfb5728266 MIPS[64]: Fix build failure.
Build started to fail after this

commit: bd0a7fd64c.
Change-Id: I2b628c067f6e5120d19498fd0b766c5233baf3e1
Reviewed-on: https://chromium-review.googlesource.com/c/1335552
Reviewed-by: Ivica Bogosavljevic <ibogosavljevic@wavecomp.com>
Commit-Queue: Ivica Bogosavljevic <ibogosavljevic@wavecomp.com>
Cr-Commit-Position: refs/heads/master@{#57495}
2018-11-14 10:59:39 +00:00
Michael Starzinger
d4afb5f3e2 [wasm] Simplify code modification scope for wrapper compilation.
R=clemensh@chromium.org

Change-Id: Idb11b07df72f2d9d1c606d04af701cb4e9853664
Reviewed-on: https://chromium-review.googlesource.com/c/1335549
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57494}
2018-11-14 10:50:09 +00:00
Toon Verwaest
0658744569 [scanner] Optimize lifetime management of literal buffers
Change-Id: I084b57a3a32c9ecb01bb17c9339dfeada436ea66
Reviewed-on: https://chromium-review.googlesource.com/c/1335449
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57493}
2018-11-14 10:37:18 +00:00
Michael Starzinger
680cdd0cd2 [wasm] Remove obsolete code modification scope.
R=clemensh@chromium.org

Change-Id: Iacfa93bdce7d8d175db9e606b7c667e4c967da51
Reviewed-on: https://chromium-review.googlesource.com/c/1335451
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57492}
2018-11-14 10:16:56 +00:00
Georg Neis
312dbdd5db [turbofan] Serialize more prototypes.
Bug: chromium:904417, v8:7790
Change-Id: Ie1edc179c88747a2515f2c42b4820ce3126bfe43
Reviewed-on: https://chromium-review.googlesource.com/c/1331478
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57491}
2018-11-14 09:13:25 +00:00
Michael Achenbach
b4eb489910 [test] Use even less parallelism to prevent OOMs on ODROIDs
Apparently the first attempt wasn't working yet:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Arm/8806

TBR=sergiyb@chromium.org
NOTRY=true

Change-Id: I5864845e59508cd4cd1836798b56539d74bbb82e
Reviewed-on: https://chromium-review.googlesource.com/c/1335450
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57490}
2018-11-14 09:07:35 +00:00
Toon Verwaest
9913c47127 [parser] Use IsInRange to check keyword length range
Change-Id: Ib910d034aff130dfe4324d020eacb0e7bf185d30
Reviewed-on: https://chromium-review.googlesource.com/c/1335447
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57489}
2018-11-14 09:00:34 +00:00
peterwmwong
0f249dd815 [builtins] Adjust String.prototype.matchAll as per spec changes (https://github.com/tc39/proposal-string-matchall/pull/38)
- Removes IsRegExp check and special handling when false
- Removes MatchAllIterator
- Extracts previously inlined CreateRegExpStringIterator
- Update comments to match spec text and numbering

Bug: v8:6890
Change-Id: Ie81757a499acc77910f029835fb042e70d86d83d
Reviewed-on: https://chromium-review.googlesource.com/c/1317830
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57488}
2018-11-14 08:54:02 +00:00
Michael Achenbach
ab9cd95b40 [test] Bump shards on slow bot
NOTRY=true
TBR=sergiyb@chromium.org

Change-Id: Ie45a93dc851f0bc12800cbd91fe324c854b1dcb6
Reviewed-on: https://chromium-review.googlesource.com/c/1335448
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57487}
2018-11-14 08:45:23 +00:00
Michael Achenbach
46de67cec8 [test] Run benchmarks less parallel on ODROIDs
This is to prevent errors like:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Arm/8792

The error code suggests the OS killed the tests due to OOM. The time it took
suggests OS paging. Fewer tests in parallel should mitigate this.

NOTRY=true

Change-Id: I847058cfb02a9a36795581df47760d921d695141
Reviewed-on: https://chromium-review.googlesource.com/c/1333674
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57486}
2018-11-14 07:42:47 +00:00
Junliang Yan
256604d99f PPC/s390: [iwyu] Remove include heap-inl.h -> counters.h
Port bd0a7fd64c

Original Commit Message:

    This reduces the build steps after touching counters.h from 710 to 191, thus
    detaching counters.h from the giant include cluster.

R=marja@chromium.org, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:7490,v8:8238
LOG=N

Change-Id: I7694a21856c228c6d0335c1f1e5e9177c96cc7da
Reviewed-on: https://chromium-review.googlesource.com/c/1333940
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#57485}
2018-11-13 20:31:52 +00:00
Frank Tang
7aced29990 [Intl] Cache intl objects in isolate
Remove old code in v8::Date::DateTimeConfigurationChangeNotification
Add code to clear date time cache object in isolate.

Running benchmark
python -u tools/run_perf.py --binary-override-path \
  out/x64.release/d8 --filter "JSTests/Strings/StringLocaleCompare" \
  test/js-perf-test/JSTests.json
python -u tools/run_perf.py --binary-override-path \
  out/x64.release/d8 --filter "JSTests/Dates" \
  test/js-perf-test/JSTests.json
python -u tools/run_perf.py --binary-override-path \
  out/x64.release/d8 --filter "JSTests/Numbers" \
  test/js-perf-test/JSTests.json

BEFORE THE FIX:
StringLocaleCompare-Strings(Score): 184287
toLocaleDateString-Dates(Score): 10456
toLocaleString-Dates(Score): 10436
toLocaleTimeString-Dates(Score): 10700
toLocaleString-Numbers(Score): 2935

AFTER THE FIX in Patch Set 13:
StringLocaleCompare-Strings(Score): 57470000
toLocaleDateString-Dates(Score): 6141000
toLocaleString-Dates(Score): 4093000
toLocaleTimeString-Dates(Score): 6323000
toLocaleString-Numbers(Score): 3371000

Bug: chromium:901748, chromium:901747, v8:5751
Change-Id: I7578e2ced0fe967dce6424d17f15ab806cc522be
Reviewed-on: https://chromium-review.googlesource.com/c/1320892
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57484}
2018-11-13 19:56:09 +00:00
Tobias Tebbi
205860b147 [csa] re-schedule CSA graph
This CL is an experiment to get more performance data from the perf-bots
and will likely lead to regressions. The try-bots (see patcheset 9)
indicate some regressions, but it doesn't seem too bad.

Change-Id: Ia173ab20ee2a4904663db0f4ca2ffb196b203c77
Reviewed-on: https://chromium-review.googlesource.com/c/1319763
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57483}
2018-11-13 17:12:01 +00:00
Mike Stanton
0ff69e7e93 [Torque] format-torque.py accepts wildcards
Now you can type:
  tools/torque/format-torque.py -i src/builtins/*.tq

  to format all the torque files in a particular directory. Is handy.

TBR=danno@chromium.org

Bug: v8:7793
Change-Id: Ifba85c4db553e19a65b87217fd2f670698c6b2c9
Reviewed-on: https://chromium-review.googlesource.com/c/1333679
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57482}
2018-11-13 16:53:24 +00:00
Sathya Gunasekaran
cdf750a8f4 [parser] Split out ParsePropertyKind::kShortHand
With this we can just shortcircuit parsing if we see an incorrect
Token::COMMA or Token::COLON when parsing class literals.

Change-Id: Idd0c0c33b035b821ed23174f9cb1b12616a2a621
Reviewed-on: https://chromium-review.googlesource.com/c/1333678
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57481}
2018-11-13 16:33:45 +00:00
Michael Stanton
589af9f257 Revert "[Torque] format-torque.py accepts wildcards"
This reverts commit 96a17c03da.

Reason for revert: Caused the tree to close

Original change's description:
> [Torque] format-torque.py accepts wildcards
> 
> Now you can type:
>   tools/torque/format-torque.py -i src/builtins/*.tq
> 
>   to format all the torque files in a particular directory. Is handy.
> 
> Bug: v8:7793
> Change-Id: I334b2c555c63fd7864636ebfd83a2631a5d44806
> Reviewed-on: https://chromium-review.googlesource.com/c/1333671
> Reviewed-by: Daniel Clifford <danno@chromium.org>
> Commit-Queue: Michael Stanton <mvstanton@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57479}

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

Change-Id: Ib531bd2f20f438ef95b657eb86356ee724fa5b39
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7793
Reviewed-on: https://chromium-review.googlesource.com/c/1333677
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57480}
2018-11-13 15:38:13 +00:00
Mike Stanton
96a17c03da [Torque] format-torque.py accepts wildcards
Now you can type:
  tools/torque/format-torque.py -i src/builtins/*.tq

  to format all the torque files in a particular directory. Is handy.

Bug: v8:7793
Change-Id: I334b2c555c63fd7864636ebfd83a2631a5d44806
Reviewed-on: https://chromium-review.googlesource.com/c/1333671
Reviewed-by: Daniel Clifford <danno@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57479}
2018-11-13 15:10:30 +00:00
Tobias Tebbi
b50ad96be8 [torque] compute fixed-point when typing Torque IR
This is important for transient types, which might be invalidated
in a loop syntactically below the vulnerable use.

Bug: v8:7793
Change-Id: Ia97c03282eefbc44d54beb8edc61f5d44af2c947
Reviewed-on: https://chromium-review.googlesource.com/c/1331547
Reviewed-by: Daniel Clifford <danno@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57478}
2018-11-13 15:06:20 +00:00
Michael Starzinger
d75e327d0f [wasm] Hide code copying from Wasm compiler interface.
This refactoring hides the fact that some wrappers are first generated
in the GC'ed heap and then copied into the native module. It is a first
step towards avoiding the redundant copy.

R=clemensh@chromium.org

Change-Id: I531fa42e8b4c210948d306624007348a39b981e0
Reviewed-on: https://chromium-review.googlesource.com/c/1333673
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57477}
2018-11-13 15:02:14 +00:00
Marja Hölttä
1ed5214c8c [js weak refs] Add WeakFactory.prototype.cleanupSome
BUG=v8:8179

Change-Id: I7dc024fe4880a787cadac8b79bca6da87e2d36de
Reviewed-on: https://chromium-review.googlesource.com/c/1328926
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57476}
2018-11-13 14:56:14 +00:00
Toon Verwaest
1f66512f45 [parser] Remove final remaining contextual keywords
Change-Id: I9c022d8d1aa363168546303516b5b3ee6196fdb5
Reviewed-on: https://chromium-review.googlesource.com/c/1333412
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57475}
2018-11-13 14:39:21 +00:00
Daniel Clifford
2234c4d5f9 [csa] Add scoped exception handler support for non-PLabels
In the process, move the rest of the implementation PLabels into the
CodeAssembler for consistency.

Change-Id: I56872d9fc756db066f0d13d87aeb55ec04de2495
Reviewed-on: https://chromium-review.googlesource.com/c/1329687
Commit-Queue: Daniel Clifford <danno@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57474}
2018-11-13 14:37:21 +00:00
Toon Verwaest
019494b364 [parser] Remove as, from, meta, of, target as contextual keywords
Change-Id: Ib73eca9233252a4b5b89f91cae1762528552c1b5
Reviewed-on: https://chromium-review.googlesource.com/c/1333407
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57473}
2018-11-13 14:29:51 +00:00
Daniel Clifford
42217a2f0a Follow-up tweak: Fix IteratorCloseOnException Torque interface
Use same value to rethrow as was used before this change. This doesn't
appear to be explicitly tested anywhere, but the behavior should stay
unchanged nevertheless.

Change-Id: Idaed90a143e9775746f034190918065897094acb
Reviewed-on: https://chromium-review.googlesource.com/c/1329684
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57472}
2018-11-13 14:12:23 +00:00
Michael Achenbach
3d6b336e34 [test] Bump shards for slow tests
Prevent timeouts like:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20debug/23124

TBR=sergiyb@chromium.org
NOTRY=true

Change-Id: I550a0d85366aa7171e2e23b2f6d2482ec953eb52
Reviewed-on: https://chromium-review.googlesource.com/c/1333672
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57471}
2018-11-13 14:07:03 +00:00
tzik
40245b75a4 Use Isolate::GetEnteredOrMicrotaskContext instead of GetEnteredContext
This CL replaces most of Isolate::GetEnteredContext with
GetEnteredOrMicrotaskContext, as it should be more relevant.

Here is a brief overview of the series of changes.
https://docs.google.com/document/d/1MY_xlsYS7E6_qbwwY66-FH3JkAYeTHBlF5qVBrBpWyY/edit#heading=h.fx2rezbyzz5c

Bug: v8:8124
Change-Id: I27355e325a92094240c25b672d1219f3214a9da0
Reviewed-on: https://chromium-review.googlesource.com/c/1297654
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57470}
2018-11-13 13:58:00 +00:00
Mike Stanton
08eed80c42 [Torque] Rename modules to namespaces
BUG=v8:7793

Change-Id: Ibcf16998ef9a44ae899a2536ccf02af1b7b7193d
Reviewed-on: https://chromium-review.googlesource.com/c/1333410
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57469}
2018-11-13 13:40:43 +00:00
Marja Hölttä
bd0a7fd64c [iwyu] Remove include heap-inl.h -> counters.h
This reduces the build steps after touching counters.h from 710 to 191, thus
detaching counters.h from the giant include cluster.

BUG=v8:7490,v8:8238

Change-Id: I0c7e707fb945e293f8a5604cc8da438cd35b3210
Reviewed-on: https://chromium-review.googlesource.com/c/1329695
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57468}
2018-11-13 13:19:38 +00:00
Toon Verwaest
66b9fedcb4 [parser] Drop name, prototype, constructor as contextual tokens
Change-Id: I19e23a1e91631a21d55bb5a42f1f538a655478f8
Reviewed-on: https://chromium-review.googlesource.com/c/1332233
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57467}
2018-11-13 13:11:08 +00:00
Clemens Hammacher
aab18a4c3e [wasm] Extract CompilationStateCallback to own class
Just moving code around a bit.

R=ahaas@chromium.org

Bug: v8:7921
Change-Id: I6a9f9dab41360e9a0d8249fe77260788151cd88b
Reviewed-on: https://chromium-review.googlesource.com/c/1333411
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57466}
2018-11-13 12:29:53 +00:00
Clemens Hammacher
2292b49d60 [wasm] Fix trace output
We were outputting the address of the WasmCodeManager instead of the
native module.

R=ahaas@chromium.org

Change-Id: I70f0aca4ef9126b91fcc3716570bfc69e71d27c7
Reviewed-on: https://chromium-review.googlesource.com/c/1326024
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57465}
2018-11-13 12:17:50 +00:00
Leszek Swirski
74e1fe6519 [parser] Pass next_ value from Next to Scan
For some reason the C++ compiler fails to realise that next_ cannot
change on entry into Scan from Next, and re-loads it, creating what
looks like a data dependency that stalls the next instruction.

Passing through a cached next_ value cleans up the generated code.

Change-Id: Iab62ed1890a3a720e5fa90a90e802305e3d55a82
Reviewed-on: https://chromium-review.googlesource.com/c/1331551
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57464}
2018-11-13 12:12:40 +00:00
Leszek Swirski
a12f244523 [parser] Micro-optimize Scanner::Scan()
Use a flag int instead of bit fields in LiteralBuffer, so that

cache the output of next() in Scanner::Scan() so that it doesn't get
reloaded between LiteralBuffer::Drop() calls.

LiteralBuffer: :Drop can set a single value rather than masking. Also,
Change-Id: I977703488ac41e3b091f46ce0840e7c464639073
Reviewed-on: https://chromium-review.googlesource.com/c/1331548
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57463}
2018-11-13 12:09:09 +00:00
Toon Verwaest
1cc5bb6acb [parser] Drop undefined as a contextual keyword
Change-Id: I6e8c72ea46e02361b7dd8ae698f3c13aef8a8beb
Reviewed-on: https://chromium-review.googlesource.com/c/1332297
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57462}
2018-11-13 12:08:00 +00:00
Toon Verwaest
41e3915834 [parser] Drop anonymous as contextual keyword
Change-Id: I8948ff43f45a486dc9ff591777db5051b1afaa22
Reviewed-on: https://chromium-review.googlesource.com/c/1332231
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57461}
2018-11-13 11:57:14 +00:00
Toon Verwaest
9af251df29 [parser] Drop eval and arguments as contextual keywords
We're fetching the symbols anyway, so we might as well use those instead in the
preparser.

Change-Id: Ie937c755690cdd7b15e8486aa9680d530eff602e
Reviewed-on: https://chromium-review.googlesource.com/c/1332296
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57460}
2018-11-13 11:52:19 +00:00
Georg Neis
04af85c6a9 [typed-array] Fix CopyElements.
An oversight in my previous change (3b64764b1d) could
cause a CHECK failure.

Bug: chromium:904707
Change-Id: Ie5f1c500bddc00741b889f78ae9ecd9af581ba5c
Reviewed-on: https://chromium-review.googlesource.com/c/1333409
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57459}
2018-11-13 11:47:00 +00:00
peterwmwong
7c35c03b5c [builtins] Fast path TA.p.subarray creating TypedArray when default constructor is used
Previously, the following call sequence was always made when creating resulting
subsetted TypedArray:
1) TFJ TypedArrayPrototypeSubArray
2) TFS TypedArrayConstructor
3) TFS CreateTypedArray

This CL, skips #2 and goes straight to #3 when the default constructor (builtin) is
safe to use (IsPrototypeTypedArrayPrototype and
!IsTypedArraySpeciesProtectorCellInvalid).

Local TypedArrays/SubarrayNoSpecies microbenchmark shows ~35-40% improvement...

BEFORE
TypedArrays-SubarrayNoSpecies(Score): 1033530
TypedArrays-SubarrayNoSpecies(Score): 1018490
TypedArrays-SubarrayNoSpecies(Score): 1037030

AFTER
TypedArrays-SubarrayNoSpecies(Score): 1439030
TypedArrays-SubarrayNoSpecies(Score): 1417540
TypedArrays-SubarrayNoSpecies(Score): 1405980

Bug: v8:7161
Change-Id: I356dace36570aa161ffe208a57a80e46714121a2
Reviewed-on: https://chromium-review.googlesource.com/c/1331154
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57458}
2018-11-13 10:36:08 +00:00
Georg Neis
a377c9ad10 Fix ArrayIteratorPrototypeNext for holes.
It's not sufficient to check the NoElements protector because that
doesn't guard against the array having a custom prototype.

Bug: v8:8449
Change-Id: I843815466a1e4ae197a2b76eec62d04cdc2d619d
Reviewed-on: https://chromium-review.googlesource.com/c/1332232
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57457}
2018-11-13 10:09:31 +00:00
peterwmwong
0dd0af7baf [builtin] Array.p.join throws on invalid Array lengths.
This matches the pre-torque behavior when the receiver's length
was greater than the max array length.

Bug: chromium:902672
Change-Id: Icf8ae3a1a4acc0680ce1b709f5b3372892337203
Reviewed-on: https://chromium-review.googlesource.com/c/1330921
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57456}
2018-11-13 09:46:01 +00:00
Michael Achenbach
9ef0160bd7 [V8] Skip tests on gc fuzzer
This skips more tests sensitive to optimization state on gc fuzzer.
Failure links:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20NumFuzz%20-%20debug/3620
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20NumFuzz%20-%20TSAN/3584
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20NumFuzz%20-%20TSAN/3564

NOTRY=true
TBR=sigurds@chromium.org

Change-Id: Iba8f475178b87a10b7cf793c65b16132ed2f1a1b
Reviewed-on: https://chromium-review.googlesource.com/c/1332294
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57455}
2018-11-13 07:41:02 +00:00
Jakob Kummerow
0dbda17de5 [ubsan] Port Map to the new design
Bug: v8:3770
Change-Id: I52660eeda1bd299953793af9af1395f47e89072e
Reviewed-on: https://chromium-review.googlesource.com/c/1331155
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57454}
2018-11-13 06:59:12 +00:00
v8-ci-autoroll-builder
47c642e5e9 Update V8 DEPS.
Rolling v8/build: 81ffd00..8af70c5

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

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/f2c3502..0cf6ee7

Rolling v8/third_party/depot_tools: ddbeac1..332c9ff

Rolling v8/tools/clang: 31f2d26..fa8094f

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

Change-Id: Ic70fa8509b5fc87f37f30b2081a92807518b4fe2
Reviewed-on: https://chromium-review.googlesource.com/c/1332869
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#57453}
2018-11-13 03:40:59 +00:00
tzik
e861dbbcf1 Make DetachableVector accessible from builtins
This CL updates DetachableVector to store the data at a known place
instead of in an std::vector<>, so that builtins can update it directly.

Bug: v8:8124
Change-Id: Iba5fb2e9d4e0ddc689d0f7eeaea40bc3218edf3a
Reviewed-on: https://chromium-review.googlesource.com/c/1297783
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57452}
2018-11-13 01:30:16 +00:00
Ben Smith
fd1b8bbf9e [wasm] Add bulk memory flag; parse passive segments
See the WebAssembly bulk memory proposal here:
https://github.com/WebAssembly/bulk-memory-operations

This initial CL adds a wasm experimental flag:
`--experimental-wasm-bulk-memory`, and also parsing of passive segments.

A passive segment is one that is not copied into the table/memory on
instantiation, but instead later via the `{table,memory}.init`
instructions.

The binary format of passive data segments is unlikely to change, but
the format for passive element segments may change (see
https://github.com/WebAssembly/bulk-memory-operations/pull/39).

Bug: v8:7747
Change-Id: I2a7fb9bc7648a722a8c4aab4185c68d3d0843858
Reviewed-on: https://chromium-review.googlesource.com/c/1330015
Commit-Queue: Ben Smith <binji@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57451}
2018-11-12 23:10:30 +00:00