Commit Graph

1720 Commits

Author SHA1 Message Date
Sigurd Schneider
b55dd17f19 Reland "Reland "Reland "[code-comments] Put code comments into the code object"""
This is a reland of 9c0a48580b

Original change's description:
> Reland "Reland "[code-comments] Put code comments into the code object""
>
> This is a reland of ed3d647284
>
> This reland fixes that padding at the end of Wasm instruction streams
> triggered asserts in the code printer.
>
> Original change's description:
> > Reland "[code-comments] Put code comments into the code object"
> >
> > This is a reland of e774cffe2b
> >
> > This reland disables a test as v8:8548 is blocking it, which was
> > broken by a recent CL. CQ did not catch this because the merge-base
> > CQ used did not yet contain the CL that caused v8:8548.
> >
> > Original change's description:
> > > [code-comments] Put code comments into the code object
> > >
> > > Code comments in the snapshot can now be enabled with gn
> > > arg 'v8_enable_snapshot_code_comments'
> > >
> > > Bug: v8:7989
> > > Change-Id: I8bd00cafa63132d00d849394c311ba15e6b6daf3
> > > Reviewed-on: https://chromium-review.googlesource.com/c/1329173
> > > Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> > > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> > > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> > > Reviewed-by: Michael Stanton <mvstanton@chromium.org>
> > > Cr-Commit-Position: refs/heads/master@{#58020}
> >
> > TBR=mvstanton@chromium.org,mstarzinger@chromium.org,jgruber@chromium.org,tebbi@chromium.org
> >
> > Bug: v8:7989, v8:8548
> > Change-Id: I464fc897205fefdf2dfc2eadc54d699c4e08a0e9
> > Reviewed-on: https://chromium-review.googlesource.com/c/1361166
> > Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> > Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#58028}
>
> Bug: v8:7989, v8:8548
> Change-Id: I254f55ff687ad049f8d92b09331ed26a2bd05d7d
> Reviewed-on: https://chromium-review.googlesource.com/c/1371784
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58221}

TBR=jgruber@chromium.org,mstarzinger@chromium.org

Bug: v8:7989, v8:8548, v8:8593
Change-Id: I4f7ffc98e0281c7b744eb4a04ba0763896c7b59b
Reviewed-on: https://chromium-review.googlesource.com/c/1375919
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58232}
2018-12-13 22:35:55 +00:00
Clemens Hammacher
8a5c009563 Revert "Reland "Reland "[code-comments] Put code comments into the code object"""
This reverts commit 9c0a48580b.

Reason for revert: Seems to break nosnap debug: https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20nosnap%20-%20debug/22228

Original change's description:
> Reland "Reland "[code-comments] Put code comments into the code object""
> 
> This is a reland of ed3d647284
> 
> This reland fixes that padding at the end of Wasm instruction streams
> triggered asserts in the code printer.
> 
> Original change's description:
> > Reland "[code-comments] Put code comments into the code object"
> >
> > This is a reland of e774cffe2b
> >
> > This reland disables a test as v8:8548 is blocking it, which was
> > broken by a recent CL. CQ did not catch this because the merge-base
> > CQ used did not yet contain the CL that caused v8:8548.
> >
> > Original change's description:
> > > [code-comments] Put code comments into the code object
> > >
> > > Code comments in the snapshot can now be enabled with gn
> > > arg 'v8_enable_snapshot_code_comments'
> > >
> > > Bug: v8:7989
> > > Change-Id: I8bd00cafa63132d00d849394c311ba15e6b6daf3
> > > Reviewed-on: https://chromium-review.googlesource.com/c/1329173
> > > Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> > > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> > > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> > > Reviewed-by: Michael Stanton <mvstanton@chromium.org>
> > > Cr-Commit-Position: refs/heads/master@{#58020}
> >
> > TBR=mvstanton@chromium.org,mstarzinger@chromium.org,jgruber@chromium.org,tebbi@chromium.org
> >
> > Bug: v8:7989, v8:8548
> > Change-Id: I464fc897205fefdf2dfc2eadc54d699c4e08a0e9
> > Reviewed-on: https://chromium-review.googlesource.com/c/1361166
> > Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> > Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#58028}
> 
> Bug: v8:7989, v8:8548
> Change-Id: I254f55ff687ad049f8d92b09331ed26a2bd05d7d
> Reviewed-on: https://chromium-review.googlesource.com/c/1371784
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58221}

TBR=mvstanton@chromium.org,mstarzinger@chromium.org,sigurds@chromium.org,jgruber@chromium.org

Change-Id: I681a3c63120c6ab953bfe9cd2b07bcf560ebfdee
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7989, v8:8548
Reviewed-on: https://chromium-review.googlesource.com/c/1375916
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58228}
2018-12-13 16:57:15 +00:00
Sigurd Schneider
bf16b8d395 Revert "Enable 31bit Smis everywhere"
This reverts commit c1bf25bb68.

Reason for revert: We got many regressions:

https://chromeperf.appspot.com/group_report?rev=58157

Original change's description:
> Enable 31bit Smis everywhere
> 
> This is a experiment to see how performance is impacted. If we tank
> too much, we can revert this change.
> 
> Change-Id: I01be33f5dd78aee6a5beecdc62adbaa6c3850eb1
> Bug: v8:8344
> Reviewed-on: https://chromium-review.googlesource.com/c/1355279
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58157}

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

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

Bug: v8:8344
Change-Id: I407cb99743a08452edcecfc2e945ef98509e8d32
Reviewed-on: https://chromium-review.googlesource.com/c/1375911
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58227}
2018-12-13 16:19:40 +00:00
Sigurd Schneider
9c0a48580b Reland "Reland "[code-comments] Put code comments into the code object""
This is a reland of ed3d647284

This reland fixes that padding at the end of Wasm instruction streams
triggered asserts in the code printer.

Original change's description:
> Reland "[code-comments] Put code comments into the code object"
>
> This is a reland of e774cffe2b
>
> This reland disables a test as v8:8548 is blocking it, which was
> broken by a recent CL. CQ did not catch this because the merge-base
> CQ used did not yet contain the CL that caused v8:8548.
>
> Original change's description:
> > [code-comments] Put code comments into the code object
> >
> > Code comments in the snapshot can now be enabled with gn
> > arg 'v8_enable_snapshot_code_comments'
> >
> > Bug: v8:7989
> > Change-Id: I8bd00cafa63132d00d849394c311ba15e6b6daf3
> > Reviewed-on: https://chromium-review.googlesource.com/c/1329173
> > Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> > Reviewed-by: Michael Stanton <mvstanton@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#58020}
>
> TBR=mvstanton@chromium.org,mstarzinger@chromium.org,jgruber@chromium.org,tebbi@chromium.org
>
> Bug: v8:7989, v8:8548
> Change-Id: I464fc897205fefdf2dfc2eadc54d699c4e08a0e9
> Reviewed-on: https://chromium-review.googlesource.com/c/1361166
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58028}

Bug: v8:7989, v8:8548
Change-Id: I254f55ff687ad049f8d92b09331ed26a2bd05d7d
Reviewed-on: https://chromium-review.googlesource.com/c/1371784
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58221}
2018-12-13 14:51:52 +00:00
Igor Sheludko
bc078ce4fc [ptr-compr] Introduce CompressedXxxSlots
for accessing compressed on-heap slots with corresponding contents.

Bug: v8:7703
Change-Id: Icb314f02f4d5e8d70b997dec02ee9a9568af5d5d
Reviewed-on: https://chromium-review.googlesource.com/c/1370040
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58215}
2018-12-13 12:07:03 +00:00
Jakob Gruber
e61d3564e7 [builtins] Associate ASM builtins with descriptors
Post-stub-to-builtin migration, all explicit connection between
descriptors and their associated ASM code has been lost. This restores
the connection where possible. Builtins without an associated
descriptor are marked with the DummyDescriptor.

Drive-by: alpha-sort the descriptor list.
Drive-by: use Builtins::CallableFor in code factory.

Bug: v8:8562, v8:8553
Change-Id: If1f13bbaf7e42453b3235cc97c58ada91b5fa7b8
Reviewed-on: https://chromium-review.googlesource.com/c/1373552
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58212}
2018-12-13 11:32:28 +00:00
Alexander Timokhin
014eb820f5 Reland "Don't use |v8_initializers| code in |v8_base|"
This is a reland of 2e36e9ea1e

Was reverted because of v8_presubmit.py issue in
https://chromium-review.googlesource.com/c/v8/v8/+/1374292

Original change's description:
> Don't use |v8_initializers| code in |v8_base|
>
> Removing |CodeStubAssembler| from |v8_base| source list (see
> https://chromium-review.googlesource.com/c/v8/v8/+/1346329) leads to
> linkage problems with some build configurations because it was explicitly
> and implicitly included in |v8_base| code.
>
> This CL decouple this code and fixes problems.
>
> Bug: v8:7777
> Change-Id: I58de5c62914bc77645ed6cc9114409890bc13189
> Reviewed-on: https://chromium-review.googlesource.com/c/1372067
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58200}

Bug: v8:7777
Change-Id: Iaa00e73c7dbd8c413fbf15a17709aa12eda9a706
Reviewed-on: https://chromium-review.googlesource.com/c/1375654
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58209}
2018-12-13 10:48:44 +00:00
Michael Achenbach
7975e215f7 Revert "Don't use |v8_initializers| code in |v8_base|"
This reverts commit 2e36e9ea1e.

Reason for revert: Missing explicit include in cc file:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Presubmit/986

Original change's description:
> Don't use |v8_initializers| code in |v8_base|
> 
> Removing |CodeStubAssembler| from |v8_base| source list (see
> https://chromium-review.googlesource.com/c/v8/v8/+/1346329) leads to
> linkage problems with some build configurations because it was explicitly
> and implicitly included in |v8_base| code.
> 
> This CL decouple this code and fixes problems.
> 
> Bug: v8:7777
> Change-Id: I58de5c62914bc77645ed6cc9114409890bc13189
> Reviewed-on: https://chromium-review.googlesource.com/c/1372067
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58200}

TBR=jkummerow@chromium.org,jgruber@chromium.org,bmeurer@chromium.org,atimoxin@yandex-team.ru

Change-Id: I3e41fb5f8a9db6a78c56546a08e55610885d312b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7777
Reviewed-on: https://chromium-review.googlesource.com/c/1374292
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58201}
2018-12-12 18:26:38 +00:00
Alexander Timokhin
2e36e9ea1e Don't use |v8_initializers| code in |v8_base|
Removing |CodeStubAssembler| from |v8_base| source list (see
https://chromium-review.googlesource.com/c/v8/v8/+/1346329) leads to
linkage problems with some build configurations because it was explicitly
and implicitly included in |v8_base| code.

This CL decouple this code and fixes problems.

Bug: v8:7777
Change-Id: I58de5c62914bc77645ed6cc9114409890bc13189
Reviewed-on: https://chromium-review.googlesource.com/c/1372067
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58200}
2018-12-12 18:04:55 +00:00
peterwmwong
d1c15973d3 [builtins] Port TypedArray join, toString, and toLocaleString to Torque.
Micro-benchmarks show speed improvements across the various types:

TypedArrays-JoinBigIntTypes                7246   8297  14.50%
TypedArrays-JoinBigIntTypes                7194   8637  20.06%
TypedArrays-JoinBigIntTypes                7258   8586  18.30%
TypedArrays-JoinFloatTypes                24461  28628  17.04%
TypedArrays-JoinFloatTypes                24523  29647  20.89%
TypedArrays-JoinFloatTypes                24419  29327  20.10%
TypedArrays-JoinIntTypes                  23378  33928  45.13%
TypedArrays-JoinIntTypes                  23333  34034  45.86%
TypedArrays-JoinIntTypes                  21653  34000  57.02%
TypedArrays-JoinWithSeparatorBigIntTypes   6620   7339  10.86%
TypedArrays-JoinWithSeparatorBigIntTypes   6566   7579  15.43%
TypedArrays-JoinWithSeparatorBigIntTypes   6631   7481  12.82%
TypedArrays-JoinWithSeparatorFloatTypes   18695  19670   5.22%
TypedArrays-JoinWithSeparatorFloatTypes   18518  20088   8.48%
TypedArrays-JoinWithSeparatorFloatTypes   18482  20193   9.26%
TypedArrays-JoinWithSeparatorIntTypes     17849  21482  20.35%
TypedArrays-JoinWithSeparatorIntTypes     17831  21578  21.01%
TypedArrays-JoinWithSeparatorIntTypes     17937  21578  20.30%

Drive-by: Removed unused CSA helper InternalArrayCreate.

Bug: v8:7624
Change-Id: I8e63815982439cfd2267417d03cd2b71b4b7a812
Reviewed-on: https://chromium-review.googlesource.com/c/1369330
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58167}
2018-12-11 17:52:33 +00:00
Sigurd Schneider
c1bf25bb68 Enable 31bit Smis everywhere
This is a experiment to see how performance is impacted. If we tank
too much, we can revert this change.

Change-Id: I01be33f5dd78aee6a5beecdc62adbaa6c3850eb1
Bug: v8:8344
Reviewed-on: https://chromium-review.googlesource.com/c/1355279
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58157}
2018-12-11 14:48:56 +00:00
Sven Sauleau
2b92afd054 [wasm] Add WebAssembly's i64<>JavaScript's BigInt conversions - 64 bits
Uses the JavaScript BigInt Object to represent Wasm's 64bits integers.
Attention, 32 bits architectures are not supported yet.

Bug: v8:7741
Change-Id: I28b718fa567bca5103b2f38a879049cd20a46f12
Reviewed-on: https://chromium-review.googlesource.com/c/1355144
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58152}
2018-12-11 12:30:50 +00:00
Daniel Clifford
9362fa9478 [builtins] Port Frame-related CSA functionality to Torque
Moving Frame-inspection functionality to Torque is a prerequisite
for porting the CSA-based arguments code, which is a great candidate
to simplify/cleanup with Torque.

Change-Id: I1f4cb94cb357aae5864c2e84f3bf5a07549b27f8
Reviewed-on: https://chromium-review.googlesource.com/c/1357050
Commit-Queue: Daniel Clifford <danno@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58106}
2018-12-07 17:13:43 +00:00
Marja Hölttä
b090d7e746 [objects.h splitting] Move DescriptorArray leftovers out of objects-inl.h
BUG=v8:5402,v8:8238

Change-Id: I61afd09ecd80dba4fbb89e3ae4b71fca1138cec2
Reviewed-on: https://chromium-review.googlesource.com/c/1367449
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58103}
2018-12-07 16:42:09 +00:00
Jakob Gruber
24e766168b Reland "[nojit] Remove code stubs"
This is a reland of f849396c3a

Original change's description:
> [nojit] Remove code stubs
>
> All stubs have been migrated to builtins. This CL removes most related
> code.
>
> Bug: v8:7777, v8:5784
> Change-Id: I4470cfef34788e6c8e0fd5fd09e40e250d088dad
> Reviewed-on: https://chromium-review.googlesource.com/c/1365284
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58093}

Tbr: mstarzinger@chromium.org,yangguo@chromium.org,jkummerow@chromium.org,bmeurer@chromium.org
Bug: v8:7777, v8:5784
Change-Id: I005ee2a820d49a75a90481d262a310e4ccfd1391
Reviewed-on: https://chromium-review.googlesource.com/c/1367746
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58101}
2018-12-07 15:46:17 +00:00
Junliang Yan
2713a83bbf PPC/s390: [nojit] Migrate DirectCEntryStub to a builtin
Port bec0234f4b

Original Commit Message:

    been converted to builtins themselves and are thus immovable.

R=jgruber@chromium.org, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: I5e08b7a894ab72647028735521d7851b15ef5f12
Reviewed-on: https://chromium-review.googlesource.com/c/1363566
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#58097}
2018-12-07 15:03:45 +00:00
Jakob Gruber
05100848ba Revert "[nojit] Remove code stubs"
This reverts commit f849396c3a.

Reason for revert: arm64: https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20arm64%20-%20sim%20-%20MSAN/24229

Original change's description:
> [nojit] Remove code stubs
> 
> All stubs have been migrated to builtins. This CL removes most related
> code.
> 
> Bug: v8:7777, v8:5784
> Change-Id: I4470cfef34788e6c8e0fd5fd09e40e250d088dad
> Reviewed-on: https://chromium-review.googlesource.com/c/1365284
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58093}

TBR=jkummerow@chromium.org,yangguo@chromium.org,mstarzinger@chromium.org,jarin@chromium.org,jgruber@chromium.org,bmeurer@chromium.org

Change-Id: I52c3abd3f4e5872fe26ed7e527a58b118e02b387
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7777, v8:5784
Reviewed-on: https://chromium-review.googlesource.com/c/1367804
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58095}
2018-12-07 13:54:22 +00:00
Jakob Gruber
f849396c3a [nojit] Remove code stubs
All stubs have been migrated to builtins. This CL removes most related
code.

Bug: v8:7777, v8:5784
Change-Id: I4470cfef34788e6c8e0fd5fd09e40e250d088dad
Reviewed-on: https://chromium-review.googlesource.com/c/1365284
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58093}
2018-12-07 13:41:21 +00:00
Jakob Gruber
b89d4249c0 [nojit] Migrate JSEntry variants to builtins
This migrates the JSEntryStub to three dedicated builtins:

JSEntry
JSConstructEntry
JSRunMicrotasksEntry

Drive-by: Tweaks to make the code isolate-independent (e.g. using the
correct macro assembler method to load and store external references
through the kRootRegister).
Drive-by: The context slot on x64/ia32 must be set up after
kRootRegister is initialized, so we first reserve the slot and later
load its value.
Drive-by: Update all remaining comments referencing JSEntryStub.

Bug: v8:7777
Change-Id: Ie3ba17ffb3bde6f18ec1d26d778b258719b2d4ef
Reviewed-on: https://chromium-review.googlesource.com/c/1365275
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58088}
2018-12-07 10:16:06 +00:00
Jakob Gruber
bec0234f4b [nojit] Migrate DirectCEntryStub to a builtin
Drive-by: Replace uses in CallApi* with a direct call now that they've
been converted to builtins themselves and are thus immovable.

Bug: v8:7777
Change-Id: I660b5788bdac4f5e45cc5c5677b86be17474cd83
Reviewed-on: https://chromium-review.googlesource.com/c/1361161
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58037}
2018-12-05 10:36:10 +00:00
Sigurd Schneider
871e3dea50 Revert "Reland "[code-comments] Put code comments into the code object""
This reverts commit ed3d647284.

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

Original change's description:
> Reland "[code-comments] Put code comments into the code object"
> 
> This is a reland of e774cffe2b
> 
> This reland disables a test as v8:8548 is blocking it, which was
> broken by a recent CL. CQ did not catch this because the merge-base
> CQ used did not yet contain the CL that caused v8:8548.
> 
> Original change's description:
> > [code-comments] Put code comments into the code object
> >
> > Code comments in the snapshot can now be enabled with gn
> > arg 'v8_enable_snapshot_code_comments'
> >
> > Bug: v8:7989
> > Change-Id: I8bd00cafa63132d00d849394c311ba15e6b6daf3
> > Reviewed-on: https://chromium-review.googlesource.com/c/1329173
> > Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> > Reviewed-by: Michael Stanton <mvstanton@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#58020}
> 
> TBR=mvstanton@chromium.org,mstarzinger@chromium.org,jgruber@chromium.org,tebbi@chromium.org
> 
> Bug: v8:7989, v8:8548
> Change-Id: I464fc897205fefdf2dfc2eadc54d699c4e08a0e9
> Reviewed-on: https://chromium-review.googlesource.com/c/1361166
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58028}

TBR=mvstanton@chromium.org,mstarzinger@chromium.org,sigurds@chromium.org,jgruber@chromium.org

Change-Id: I1075bb09de7cb8dad71e31ff51a4e7bb6a200a8b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7989, v8:8548
Reviewed-on: https://chromium-review.googlesource.com/c/1362043
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58029}
2018-12-04 21:21:37 +00:00
Sigurd Schneider
ed3d647284 Reland "[code-comments] Put code comments into the code object"
This is a reland of e774cffe2b

This reland disables a test as v8:8548 is blocking it, which was
broken by a recent CL. CQ did not catch this because the merge-base
CQ used did not yet contain the CL that caused v8:8548.

Original change's description:
> [code-comments] Put code comments into the code object
>
> Code comments in the snapshot can now be enabled with gn
> arg 'v8_enable_snapshot_code_comments'
>
> Bug: v8:7989
> Change-Id: I8bd00cafa63132d00d849394c311ba15e6b6daf3
> Reviewed-on: https://chromium-review.googlesource.com/c/1329173
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Michael Stanton <mvstanton@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58020}

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

Bug: v8:7989, v8:8548
Change-Id: I464fc897205fefdf2dfc2eadc54d699c4e08a0e9
Reviewed-on: https://chromium-review.googlesource.com/c/1361166
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58028}
2018-12-04 20:16:14 +00:00
Leszek Swirski
25d8187023 Revert "[code-comments] Put code comments into the code object"
This reverts commit e774cffe2b.

Reason for revert: Breaks OptimizeForSize tests https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket.appspot.com/8928056438104852432/+/steps/OptimizeForSize/0/logs/TestCodeAssemblerCode../0

Original change's description:
> [code-comments] Put code comments into the code object
> 
> Code comments in the snapshot can now be enabled with gn
> arg 'v8_enable_snapshot_code_comments'
> 
> Bug: v8:7989
> Change-Id: I8bd00cafa63132d00d849394c311ba15e6b6daf3
> Reviewed-on: https://chromium-review.googlesource.com/c/1329173
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Michael Stanton <mvstanton@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58020}

TBR=mvstanton@chromium.org,mstarzinger@chromium.org,sigurds@chromium.org,jgruber@chromium.org

Change-Id: Ie336a99218db4def848bd5c8c58dfb66f0e372b2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7989
Reviewed-on: https://chromium-review.googlesource.com/c/1361165
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58021}
2018-12-04 16:04:47 +00:00
Sigurd Schneider
e774cffe2b [code-comments] Put code comments into the code object
Code comments in the snapshot can now be enabled with gn
arg 'v8_enable_snapshot_code_comments'

Bug: v8:7989
Change-Id: I8bd00cafa63132d00d849394c311ba15e6b6daf3
Reviewed-on: https://chromium-review.googlesource.com/c/1329173
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58020}
2018-12-04 15:49:26 +00:00
Marja Hölttä
f40638d148 [objects.h splitting] Move Dictionary and HashTable related leftovers out of objects-inl.h
For this to work, I had to move PropertyCell out of objects.h too, since
otherwise there would be an inl include cycle which makes the code not compile.

BUG=v8:5402,v8:8238

Change-Id: I3233f86b68c1e2fd32d135fcf0bbba8101af8cb2
Reviewed-on: https://chromium-review.googlesource.com/c/1356510
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58004}
2018-12-04 08:17:30 +00:00
Nico Weber
48924ffa0f Make generate_bytecode_builtins_list build-dir-independent.
Bug: chromium:911183
Change-Id: I99552d09e68a6b99e35daf39e15ddf1ef5781baa
Reviewed-on: https://chromium-review.googlesource.com/c/1358701
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58000}
2018-12-03 19:04:22 +00:00
Ben L. Titzer
cb242eded6 [iwyu] Extract src/memcopy.h from src/utils.h
This CL moves a number of memory-related methods out of utils into its
own header, since utils.h is included in many places that do not need
these methods.

R=clemensh@chromium.org,mstarzinger@chromium.org

Change-Id: I5155baf329844784286413408c05c7108b789020
Reviewed-on: https://chromium-review.googlesource.com/c/1354889
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57948}
2018-11-29 17:01:10 +00:00
Sigurd Schneider
f86946fda3 [tools] Add ninja targets that generate all generated .cc files
This adds a new target :generated_cc_files which generates all
generated .cc files and is quick to build (~5sec on my machine).

TBR=yangguo@chromium.org

Change-Id: I51485635671b55302b06f1ea300e86ef1745931e
Bug: v8:8526
Reviewed-on: https://chromium-review.googlesource.com/c/1354881
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57941}
2018-11-29 15:28:02 +00:00
Vasili Skurydzin
b3e7775f82 aix, builtins: Embedded builtins support on Aix
Bug: v8:8043
Change-Id: Iff786eccd2dcb63e46e331b096d91a6ddb13f851
Reviewed-on: https://chromium-review.googlesource.com/c/1351129
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#57913}
2018-11-28 18:28:20 +00:00
Yang Guo
3a437ce47a Reland "Implement Faster MicrotaskQueue Step 2"
This is an attempt to reland https://crrev.com/1d726111ab7087a5, that
was reverted at https://crrev.com/0a820125230bec24.

Tbr: bmeurer@chromium.org
Bug: chromium:887920, v8:7253
Change-Id: I785417de7d0560b93bda5ade623fa5be3647d7dd
Reviewed-on: https://chromium-review.googlesource.com/c/1350530
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57865}
2018-11-27 11:27:46 +00:00
Marja Hölttä
e8a1c25f6a [objects.h splitting] Move InstanceType and -Checker
BUG=v8:5402,v8:8238

Change-Id: Idd00fc664da8173612266ba7a976b383bb1f728e
Reviewed-on: https://chromium-review.googlesource.com/c/1349329
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57836}
2018-11-26 15:18:55 +00:00
Michael Starzinger
28c83375bf [asm.js] Remove dead switch logic helper code.
R=clemensh@chromium.org

Change-Id: I325b10268a9ed9548fd28ecc3e5e2b0959afcdc4
Reviewed-on: https://chromium-review.googlesource.com/c/1350125
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57819}
2018-11-26 13:54:27 +00:00
Caitlin Potter
8a9cbdacad Reland "[builtins] Implement Object.fromEntries"
This is a reland of a5336471f2

Original change's description:
> [builtins] Implement Object.fromEntries
> 
> Adds the Object.fromEntries() method behind
> --harmony-object-from-entries.
> 
> 
> Includes an initial implementation of the new experimental builtin
> Object.fromEntries implemented by Daniel Clifford, and
> has been modified by Caitlin Potter to support a fast case to skip
> the iterator protocol when it can be done unobservably in common cases.
> 
> There are some incidental changes: A number of CSA macros have been
> updated to use TNodes, and some Context arguments have been
> re-arranged to be implicit in Torque.
> 
> 
> There are also a number of mjsunit tests written mirroring and
> expanding on the test262 tests.
> 
> BUG=v8:8021
> 
> Change-Id: I1c12bee8a2f98c6297b77d5d723910a5e3b630cc
> Co-authored-by: Daniel Clifford <danno@chromium.org>
> Co-authored-by: Caitlin Potter <caitp@igalia.com>
> Reviewed-on: https://chromium-review.googlesource.com/c/1337585
> Commit-Queue: Daniel Clifford <danno@chromium.org>
> Reviewed-by: Daniel Clifford <danno@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57667}

Bug: v8:8021
Change-Id: I706e2d87bfc2f688e833c1b7d40ca82f5d80f5a2
Reviewed-on: https://chromium-review.googlesource.com/c/1346630
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Cr-Commit-Position: refs/heads/master@{#57798}
2018-11-23 23:43:44 +00:00
Peter Marshall
f4bb38c321 [tools] Add an API for unwinding the V8 stack
This API allows the embedder to provide a stack and PC, FP and
SP registers. V8 will then attempt to unwind the stack to the C++ frame
that called into JS. This API is signal-safe, meaning it does not call
any signal-unsafe OS functions or read/write any V8 state.

Bug: v8:8116

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I7e3e73753b711737020b6a5f11946096658afa6f
Reviewed-on: https://chromium-review.googlesource.com/c/1186724
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57749}
2018-11-22 16:36:26 +00:00
Jakob Gruber
8c1248932e [builtins] Emit builtins as inline assembly on windows clang builds
We recently changed embedded builtins to be emitted as raw assembly
files during the build process in order to support MSVC (which doesn't
support inline assembly on x64). Ninja uses ml.exe / ml64.exe as the
assembler on all Windows builds (msvc & clang); these unfortunately
don't support large data streams well and can take over 5 minutes for
embedded.S.

With this CL we work around this by going back to inlined assembly for
clang Windows builds.

Bug: v8:6666, v8:8475
Change-Id: I33beb3f5a1df07de3299df0fc2be4e8983701db0
Reviewed-on: https://chromium-review.googlesource.com/c/1344114
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57726}
2018-11-22 11:08:36 +00:00
Jakob Gruber
1f6d5a4362 Remove CodeStubAssembler from final binary
With the last remaining TF code stubs gone, c-s-a.{h,cc} is no longer
needed in the final binary.

Bug: v8:7777
Change-Id: I8573199401678758698df56e0cb680f125f06bdc
Reviewed-on: https://chromium-review.googlesource.com/c/1346329
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57721}
2018-11-22 09:44:11 +00:00
Yang Guo
0a82012523 Revert "Implement Faster MicrotaskQueue Step 2"
This reverts commit 1d726111ab.

Reason for revert: This breaks a layout test, and blocks V8 roll

https://ci.chromium.org/p/chromium/builders/luci.chromium.try/win7_chromium_rel_ng/135831

Original change's description:
> Implement Faster MicrotaskQueue Step 2
> 
> This is an implementation of https://bit.ly/v8-faster-microtask-queues
> step 2.
> 
> This CL overhauls MicrotaskQueue class, the previous one is on V8 heap,
> and the new one is on C++ heap.
> 
> Benchmark:
> This CL improves a benchmark score around promise by 5~23%.
> https://github.com/v8/promise-performance-tests
> https://docs.google.com/spreadsheets/d/1HtwZGzUAGJYg87VmYhV9hLdvfddlCtC6Oz0iOj-WwQA/edit#gid=1952666737
> 
> Bug: chromium:887920, v8:7253
> Change-Id: I1f26e02c45ae60ae39d1ccc168daa98bca4663d9
> Reviewed-on: https://chromium-review.googlesource.com/c/1290751
> Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57681}

TBR=ulan@chromium.org,adamk@chromium.org,yangguo@chromium.org,ishell@chromium.org,bmeurer@chromium.org,tzik@chromium.org

Change-Id: I639882a95fe63c029a2e53d610dc4133d1ac48f2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:887920, v8:7253
Reviewed-on: https://chromium-review.googlesource.com/c/1347473
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57711}
2018-11-22 08:16:23 +00:00
tzik
1d726111ab Implement Faster MicrotaskQueue Step 2
This is an implementation of https://bit.ly/v8-faster-microtask-queues
step 2.

This CL overhauls MicrotaskQueue class, the previous one is on V8 heap,
and the new one is on C++ heap.

Benchmark:
This CL improves a benchmark score around promise by 5~23%.
https://github.com/v8/promise-performance-tests
https://docs.google.com/spreadsheets/d/1HtwZGzUAGJYg87VmYhV9hLdvfddlCtC6Oz0iOj-WwQA/edit#gid=1952666737

Bug: chromium:887920, v8:7253
Change-Id: I1f26e02c45ae60ae39d1ccc168daa98bca4663d9
Reviewed-on: https://chromium-review.googlesource.com/c/1290751
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57681}
2018-11-21 13:10:07 +00:00
Igor Sheludko
ea9f847d36 [ptr-compr] Introduce EmbedderDataSlot
an abstraction that hides the details about how embedder data fields are
encoded in EmbedderDataArrays and JSObjects.

Bug: v8:7703
Change-Id: Ic9f6d9511bec557c6671aa6488b9545e353f968c
Reviewed-on: https://chromium-review.googlesource.com/c/1344155
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57679}
2018-11-21 12:30:13 +00:00
Clemens Hammacher
6abd6f3dd4 Revert "[builtins] Implement Object.fromEntries"
This reverts commit a5336471f2.

Reason for revert: Fails nosnap debug tests: https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20nosnap%20-%20debug/21838

Original change's description:
> [builtins] Implement Object.fromEntries
> 
> Adds the Object.fromEntries() method behind
> --harmony-object-from-entries.
> 
> 
> Includes an initial implementation of the new experimental builtin
> Object.fromEntries implemented by Daniel Clifford, and
> has been modified by Caitlin Potter to support a fast case to skip
> the iterator protocol when it can be done unobservably in common cases.
> 
> There are some incidental changes: A number of CSA macros have been
> updated to use TNodes, and some Context arguments have been
> re-arranged to be implicit in Torque.
> 
> 
> There are also a number of mjsunit tests written mirroring and
> expanding on the test262 tests.
> 
> BUG=v8:8021
> 
> Change-Id: I1c12bee8a2f98c6297b77d5d723910a5e3b630cc
> Co-authored-by: Daniel Clifford <danno@chromium.org>
> Co-authored-by: Caitlin Potter <caitp@igalia.com>
> Reviewed-on: https://chromium-review.googlesource.com/c/1337585
> Commit-Queue: Daniel Clifford <danno@chromium.org>
> Reviewed-by: Daniel Clifford <danno@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57667}

TBR=danno@chromium.org,caitp@igalia.com,tebbi@chromium.org

Change-Id: Id0cd8b16131f151a42dffbaca7e59ab17c68ab23
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8021
Reviewed-on: https://chromium-review.googlesource.com/c/1346116
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57677}
2018-11-21 11:51:44 +00:00
Ulan Degenbaev
841c40b76a [heap] Clean up TypedSlotSet.
This extracts the parts of the TypedSlotSet that are used only
sequentially into a separate class called TypedSlots.

The new class will be used in the concurrent marker to keep track of
typed slots locally and then to merge them to the main remembered set
during finalization of marking.

The patch also cleans up atomics in the Iterate and ClearInvalidSlots
methods that can run concurrently to each other.

Bug:v8:8459

Change-Id: Id7a63041f7b99218381e5e9e1999210cab9c4369
Reviewed-on: https://chromium-review.googlesource.com/c/1340247
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57673}
2018-11-21 11:14:47 +00:00
Caitlin Potter
a5336471f2 [builtins] Implement Object.fromEntries
Adds the Object.fromEntries() method behind
--harmony-object-from-entries.


Includes an initial implementation of the new experimental builtin
Object.fromEntries implemented by Daniel Clifford, and
has been modified by Caitlin Potter to support a fast case to skip
the iterator protocol when it can be done unobservably in common cases.

There are some incidental changes: A number of CSA macros have been
updated to use TNodes, and some Context arguments have been
re-arranged to be implicit in Torque.


There are also a number of mjsunit tests written mirroring and
expanding on the test262 tests.

BUG=v8:8021

Change-Id: I1c12bee8a2f98c6297b77d5d723910a5e3b630cc
Co-authored-by: Daniel Clifford <danno@chromium.org>
Co-authored-by: Caitlin Potter <caitp@igalia.com>
Reviewed-on: https://chromium-review.googlesource.com/c/1337585
Commit-Queue: Daniel Clifford <danno@chromium.org>
Reviewed-by: Daniel Clifford <danno@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57667}
2018-11-21 10:05:42 +00:00
Pierre Langlois
32981bdbf9 [perf-prof] Remove option to generate unwinding info in the snapshot
Emitting unwinding info for builtins for perf to consume doesn't make sense with
embedded builtins so let's just remove the option.

The perf support is meant for code on the heap and the builtins are not there
anymore. If we want perf to be able to unwind through builtins we should emit
the unwinding DWARF information directly into the binary, using the dedicated
.eh_frame ELF section. This would also mean GDB would be able to unwind through
builtins as well which would be great.

Change-Id: I751cc5eb1e6f7c0eeae6b37a42986ae8ea47d6a0
Reviewed-on: https://chromium-review.googlesource.com/c/1340294
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#57641}
2018-11-20 12:38:31 +00:00
Igor Sheludko
d469fec064 [ptr-compr] Introduce EmbedderDataArray
for storing embedder data in native context. We can't use FixedArray because
with enabled pointer compression it would not be possible to fit raw aligned
pointer into 32-bits of a tagged value so we will need to store both tagged
and raw data in this array and therefore custom visitor is required.

Bug: v8:7703
Change-Id: Iae23d9aa76c79a572d5f0f1f3c0f924e8e407dd0
Reviewed-on: https://chromium-review.googlesource.com/c/1340295
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57639}
2018-11-20 11:51:15 +00:00
Andreas Haas
9d5dd6dd19 [wasm] Adjust the traphandler implementation for MacOS
In the chrome-side implementation I currently use the default
trap handlers of V8, see https://crrev.com/c/1290955

Bug: chromium:906565

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I74c5a18c479ad1c69303d104ad4f040de436c4e7
Reviewed-on: https://chromium-review.googlesource.com/c/1282960
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57636}
2018-11-20 11:03:54 +00:00
Igor Sheludko
b5e9b82962 [ptr-compr] Add a header for pointer compression related code
Bug: v8:7703
Change-Id: I96fd746291aa2e1386ed40068d38f5140bb1e44f
Reviewed-on: https://chromium-review.googlesource.com/c/1342031
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57612}
2018-11-19 17:02:30 +00:00
Jakob Gruber
ca38b84bb1 [builtins] Pull EmbeddedData and InstructionStream into one file
This pulls both classes into a dedicated file. InstructionStream may
be removed in a follow-up.

Tbr: mlippautz@chromium.org
Bug: v8:6666
Change-Id: Ibd374eba25cebf7495390ec13f6b4aeac5e1dc01
Reviewed-on: https://chromium-review.googlesource.com/c/1337738
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57562}
2018-11-16 09:35:00 +00:00
Jakob Gruber
bd8ed720cf Reland "[snapshot] Emit the embedded blob as assembly instead of inline assembly"
This is a reland of 0b13f0f517

Original change's description:
> [snapshot] Emit the embedded blob as assembly instead of inline assembly
>
> The motivation behind this is that MSVC doesn't support inline assembly
> on x64. Emitting the embedded blob as a plain assembly file will give us
> MSVC support (and possibly faster compilation times as a side-effect).
>
> Bug: v8:6666,v8:8349
> Change-Id: I2e6cf072faa9ef406fe721a05b63912c655546c2
> Reviewed-on: https://chromium-review.googlesource.com/c/1329205
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Michael Stanton <mvstanton@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57524}

Tbr: yangguo@chromium.org,mvstanton@chromium.org
Bug: v8:6666, v8:8349
Change-Id: Ib35696b60a9cd01bc2edf459c8e8d84716e3438d
Reviewed-on: https://chromium-review.googlesource.com/c/1337733
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57546}
2018-11-15 14:53:51 +00:00
Toon Verwaest
9486f220c2 [parser] Remove ContextSlotCache
Now that we always cache lookups through scope-info-backed scopes on the
entry-point scope-info-backed scope, we don't need additional caching
per scope-info. The one missing piece was negative lookups, but they
automatically turn into DynamicGlobals which we also cache on the entry
scope.

The one possible difference is that we don't cache across compilation,
but seems unlikely to be very beneficial. We'll keep an eye out for
regressions though.


Change-Id: I23186d2b085d2042fafa32fb3cca88f88c61074c
Reviewed-on: https://chromium-review.googlesource.com/c/1337731
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57544}
2018-11-15 14:31:50 +00:00
Jakob Gruber
e1044d1007 Reland "[builtins] Support embedded builtins in nosnapshot builds"
This is a reland of bf2f0a0227

Original change's description:
> [builtins] Support embedded builtins in nosnapshot builds
>
> This CL adds support for embedded builtins in nosnap builds by creating
> and setting an 'embedded blob' after builtin generation. Unlike
> snapshot builds, the blob is not embedded into the .text section but
> located on the C++ heap.
>
> This makes nosnap builds more consistent with mksnapshot, and allows us
> to simplify there and in serializer cctests.
>
> Complications arise from the different workflows we need to support:
>
> 1. the standard mksnapshot build process,
> 2. nosnap builds (which reuse the blob created by the first Isolate),
> 2. and tests with various complicated serialization workflows.
>
> To cover all of these cases, this CL introduces two knobs to twiddle:
>
> 1. A 'sticky' embedded blob which overrides compiled-in default
>    embedded blobs at Isolate setup.
> 2. The blob lifecycle can be managed manually or through refcounting.
>
> These are described in more detail in isolate.cc.
>
> Tbr: ulan@chromium.org
> Bug: v8:6666, v8:8350
> Change-Id: I3842e40cdaf45d2cadd05c6eb1ec2f5e3d83568d
> Reviewed-on: https://chromium-review.googlesource.com/c/1310195
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57523}

Tbr: ulan@chromium.org,yangguo@chromium.org
Bug: v8:6666, v8:8350
Change-Id: I13b523c9e7406b39a3cd28465c06f17f1744a738
Reviewed-on: https://chromium-review.googlesource.com/c/1337578
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57540}
2018-11-15 13:56:25 +00:00
Michael Achenbach
09afb027bf [build] Don't build cctest on windows archive builds
The archive builder is broken since https://crrev.com/c/1330912, see:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Official%20Win64/3279

We don't need the windows cctest on the ref builds, hence this removes it.

TBR=sergiyb@chromium.org

Change-Id: Ic8d40bcc45b2f29884cc3fe9a2802e2b86f099a2
Reviewed-on: https://chromium-review.googlesource.com/c/1337583
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57534}
2018-11-15 12:27:52 +00:00
Jakob Gruber
850c446aa5 [nojit] Add build- and runtime flags
This adds flags for the upcoming JIT-less V8.

Build-time: v8_enable_jitless_mode in gn.args
Runtime: --jitless command-line flag

The build-time flag is expected to be removed as the implementation
matures.

Bug: v8:7777
Change-Id: Ieea404a14c7859a66e18175d1740d73182db9b1b
Reviewed-on: https://chromium-review.googlesource.com/c/1335559
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57533}
2018-11-15 12:14:37 +00:00
Daniel Clifford
33f41e41d8 [builtins] Implement LoadKeyValuePair in Torque
Change-Id: I0652a75f6d1f6abfb40ba9bf35afeadfd4533336
Reviewed-on: https://chromium-review.googlesource.com/c/1328801
Commit-Queue: Daniel Clifford <danno@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57531}
2018-11-15 11:26:06 +00:00
Jakob Gruber
856be9c21c Revert "[builtins] Support embedded builtins in nosnapshot builds"
This reverts commit bf2f0a0227.

Reason for revert: https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20nosnap%20-%20debug/21753

Original change's description:
> [builtins] Support embedded builtins in nosnapshot builds
> 
> This CL adds support for embedded builtins in nosnap builds by creating
> and setting an 'embedded blob' after builtin generation. Unlike
> snapshot builds, the blob is not embedded into the .text section but
> located on the C++ heap.
> 
> This makes nosnap builds more consistent with mksnapshot, and allows us
> to simplify there and in serializer cctests.
> 
> Complications arise from the different workflows we need to support:
> 
> 1. the standard mksnapshot build process,
> 2. nosnap builds (which reuse the blob created by the first Isolate),
> 2. and tests with various complicated serialization workflows.
> 
> To cover all of these cases, this CL introduces two knobs to twiddle:
> 
> 1. A 'sticky' embedded blob which overrides compiled-in default
>    embedded blobs at Isolate setup.
> 2. The blob lifecycle can be managed manually or through refcounting.
> 
> These are described in more detail in isolate.cc.
> 
> Tbr: ulan@chromium.org
> Bug: v8:6666, v8:8350
> Change-Id: I3842e40cdaf45d2cadd05c6eb1ec2f5e3d83568d
> Reviewed-on: https://chromium-review.googlesource.com/c/1310195
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57523}

TBR=ulan@chromium.org,yangguo@chromium.org,jgruber@chromium.org

Change-Id: I6e35a0cb7186fb50f1012f5c618fb8b48b24a813
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6666, v8:8350
Reviewed-on: https://chromium-review.googlesource.com/c/1337577
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57529}
2018-11-15 10:27:21 +00:00
Jakob Gruber
ec4b2be12d Revert "[snapshot] Emit the embedded blob as assembly instead of inline assembly"
This reverts commit 0b13f0f517.

Reason for revert: https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Win32%20-%20debug/17373

Original change's description:
> [snapshot] Emit the embedded blob as assembly instead of inline assembly
> 
> The motivation behind this is that MSVC doesn't support inline assembly
> on x64. Emitting the embedded blob as a plain assembly file will give us
> MSVC support (and possibly faster compilation times as a side-effect).
> 
> Bug: v8:6666,v8:8349
> Change-Id: I2e6cf072faa9ef406fe721a05b63912c655546c2
> Reviewed-on: https://chromium-review.googlesource.com/c/1329205
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Michael Stanton <mvstanton@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57524}

TBR=yangguo@chromium.org,mvstanton@chromium.org,jgruber@chromium.org

Change-Id: I35f7763f86b4de01e74827a95706b969b43af55e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6666, v8:8349
Reviewed-on: https://chromium-review.googlesource.com/c/1337574
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57528}
2018-11-15 10:13:39 +00:00
Jakob Gruber
0b13f0f517 [snapshot] Emit the embedded blob as assembly instead of inline assembly
The motivation behind this is that MSVC doesn't support inline assembly
on x64. Emitting the embedded blob as a plain assembly file will give us
MSVC support (and possibly faster compilation times as a side-effect).

Bug: v8:6666,v8:8349
Change-Id: I2e6cf072faa9ef406fe721a05b63912c655546c2
Reviewed-on: https://chromium-review.googlesource.com/c/1329205
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57524}
2018-11-15 09:23:13 +00:00
Jakob Gruber
bf2f0a0227 [builtins] Support embedded builtins in nosnapshot builds
This CL adds support for embedded builtins in nosnap builds by creating
and setting an 'embedded blob' after builtin generation. Unlike
snapshot builds, the blob is not embedded into the .text section but
located on the C++ heap.

This makes nosnap builds more consistent with mksnapshot, and allows us
to simplify there and in serializer cctests.

Complications arise from the different workflows we need to support:

1. the standard mksnapshot build process,
2. nosnap builds (which reuse the blob created by the first Isolate),
2. and tests with various complicated serialization workflows.

To cover all of these cases, this CL introduces two knobs to twiddle:

1. A 'sticky' embedded blob which overrides compiled-in default
   embedded blobs at Isolate setup.
2. The blob lifecycle can be managed manually or through refcounting.

These are described in more detail in isolate.cc.

Tbr: ulan@chromium.org
Bug: v8:6666, v8:8350
Change-Id: I3842e40cdaf45d2cadd05c6eb1ec2f5e3d83568d
Reviewed-on: https://chromium-review.googlesource.com/c/1310195
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57523}
2018-11-15 09:18:58 +00:00
Toon Verwaest
80e9f18a0d [scopes] Separate CollectNonLocals from AnalyzePartially
The functions are sufficiently different and AnalyzePartially is
performance-sensitive so it's helpful to see what exact code is in there.

Change-Id: I8807684e58a7af48bdba62f0adf41e78f7b6557d
Reviewed-on: https://chromium-review.googlesource.com/c/1335701
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57514}
2018-11-14 17:42:19 +00:00
Leszek Swirski
7aac6bc905 [cleanup] Make unicode predicate cache tables static
Moves the unicode predicate cache tables out of the unicode cache,
and turns them into generic predicates in char-predicates.h which
use static constexpr tables.

This drops the per-isolate cost of unicode caches, and removes the
need for accessing the unicode cache from most files. It does remove
the mutability of the cache, which means that there may be regressions
when parsing non-ASCII identifiers. Most likely the benefits to ASCII
identifiers/keywords will outweigh any non-ASCII costs.

Change-Id: I9a7a8b7c9b22d3e9ede824ab4e27f133ce20a399
Reviewed-on: https://chromium-review.googlesource.com/c/1335564
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57506}
2018-11-14 15:33:45 +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
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
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 L. Titzer
0227b62fdb [compiler] Move some files to backend/ directory
This CL splits the backend of TurboFan off into its own directory,
without changing namespaces. This makes ownership management a bit
more fine-grained with a logical separation.

R=mstarzinger@chromium.org,jarin@chromium.org,adamk@chromium.org

Change-Id: I2ac40d6ca2c4f04b8474b630aae0286ecf79ef42
Reviewed-on: https://chromium-review.googlesource.com/c/1308333
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57437}
2018-11-12 15:06:56 +00:00
Sergiy Byelozyorov
4737793b6e Add cctest to the v8_archive target and mark the latter as testonly
This is needed so that cctest is built for the Memory perf benchmark. Marking
v8_achive as testonly is necessary to be able to depend on the cctest, which is
testonly already.

R=machenbach@chromium.org

Bug: chromium:903562
Change-Id: If5baf3e75226282110999dfa2bd83d475b63258c
Reviewed-on: https://chromium-review.googlesource.com/c/1330912
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57416}
2018-11-10 17:51:33 +00:00
tzik
0d1ff784af Move MicrotaskQueue stuff of InternalBuiltinsAssembler to a separate class
This CL moves EnqueueMicrotask and RunMicrotasks builtins out of
InternalBuiltinAssembler to a separate class with no logic change.

This is a trivial part of the following "Implement Faster MicrotaskQueue Step 2"
https://crrev.com/c/1290751 in order to clean up the diff for easier review,
and also for unblocking other CLs.

Change-Id: I34dda8e599ffbf4db4bae07d3fd8ea3d6fadeb6b
Reviewed-on: https://chromium-review.googlesource.com/c/1328548
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57411}
2018-11-09 22:25:16 +00:00
Clemens Hammacher
578fe72102 Extract lambda tasks to task-utils.h
This extracts the lambda tasks to an own compilation unit and header
file. Additionally, it addresses the TODO to avoid templates and just
store the function to execute in an std::function.
Third, it provides the same functionality for pure (non-cancellable
non-idle) tasks.
Last, it removes the "Lambda" part from the methods, because we can
actually instantiate it with anything that is invocable (function
pointer, lambda, functor, ...).

R=ahaas@chromium.org

Bug: v8:8238
Change-Id: I2f613f5b15ee208f215bbf74bd6d1d41889fd637
Reviewed-on: https://chromium-review.googlesource.com/c/1328923
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57397}
2018-11-09 14:55:46 +00:00
Jakob Gruber
166e74d581 [snapshot] Rename allocators
There's only one allocator kind left post-builtin-snapshot-removal,
so the 'Default' prefix can be removed.

Bug: v8:6666, v8:7990
Change-Id: Ib3c3eeb121792708591ca7be1e30adef77d3c111
Reviewed-on: https://chromium-review.googlesource.com/c/1309638
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57236}
2018-11-05 13:22:58 +00:00
Tobias Tebbi
06c8ce5957 [torque] cleanup generics and scopes
- Name lookup in module scopes has namespace semantics now: All
  overloads from all parent modules are combined before overload
  resolution.
- Allow overloads of different callables: runtime-functions,
  macros, builtins, and generics.
- The duplication between the DeclarationVisitor and the
  ImplementationVisitor is removed: The DeclarationVisitor creates
  declarables for everything except for implicit generic specializations.
  The ImplementationVisitor iterates over declarables.
  The DeclarationVisitor only looks at the header of declarations, not
  at the body.
- Modules become Declarable's, which will enable them to be nested.
- Modules replace the existing Scope chain mechanism, which will make it
  easier to inline macros.
- The DeclarationVisitor and Declarations become stateless. All state is
  moved to contextual variables and the GlobalContext.
- Implicit specializations are created directly from the
  ImplementationVisitor. This will enable template parameter inference.
- As a consequence, the list of all builtins is only available after the
  ImplementationVisitor has run. Thus GenerateBuiltinDefinitions has to
  move to the ImplementationVisitor. Also, this makes it necessary to
  resolve the link from function pointer types to example builtins only
  at this point.


Bug: v8:7793
Change-Id: I61cef2fd3e954ab148c252974344a6e38ee2d01d
Reviewed-on: https://chromium-review.googlesource.com/c/1304294
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57231}
2018-11-05 11:49:40 +00:00
Michael Achenbach
92b131b2e9 [build] Add runtime deps for mips
TBR=sergiyb@chromium.org

Bug: v8:8291
Change-Id: I3fe107ae4d5853b71238521218017943f2d56393
Reviewed-on: https://chromium-review.googlesource.com/c/1314569
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57213}
2018-11-02 13:55:43 +00:00
Frank Tang
dffaff7769 [Intl] Move cachedOrNewService to C++ w/o caching
Stage 1 of https://goo.gl/ooFdqJ

Bug: v8:7958,v8:7960,v8:7961
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Iabc69e547760122699a526a1255cb42bf9ddacb4
Reviewed-on: https://chromium-review.googlesource.com/c/1212466
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57203}
2018-11-02 07:08:26 +00:00
Jakob Kummerow
6b226ea2ff [ubsan] Replace AtomicElement with UB-safe alternative
The previous AtomicElement wrapper fundamentally relied on
reinterpret_casting a heap address to an instance of a C++
object, which is an invalid cast. This patch replaces that
pattern with an ObjectSlot-based alternative that does not
rely on UB.

Bug: v8:3770
Change-Id: I62fb3c7589ac59e9e18139b525174de77e0e2149
Reviewed-on: https://chromium-review.googlesource.com/c/1309297
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57197}
2018-11-01 05:20:04 +00:00
Daniel Clifford
2e3ba516cf Add a Torque module exposing iterators
This is preparation to support the Torque port of Object.fromEntries,
including tests to make sure that the interface of the iterator functions
is correct and compiles when used.

Change-Id: I2a30ef80a80f42d4744a92746c8cd383abc10c19
Reviewed-on: https://chromium-review.googlesource.com/c/1303726
Commit-Queue: Daniel Clifford <danno@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57192}
2018-10-31 22:20:01 +00:00
Alexey Kozyatinskiy
ebd070ec2f reland: inspector: move injected script source to native
- introduced ValueMirror interface, this interface contains methods to generate
  different protocol entities,
- introduced DebugPropertyIterator, this iterator iterates through object properties
  in the following order: exotic indices, enumerable strings, all other properties,
- removed all injected script infra, e.g. closure compiler,

R=dgozman@chromium.org
TBR=yangguo@chromium.org

Bug: chromium:595206
Change-Id: I030fdb3a80074ca6edd4749f86b39b590776ae6f
Reviewed-on: https://chromium-review.googlesource.com/c/1310056
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57181}
2018-10-31 17:47:58 +00:00
Aleksey Kozyatinskiy
fc5c8d7f78 Revert "inspector: move injected script source to native"
This reverts commit 7e079c660b.

Reason for revert: native implementation should be ready for navigation.

Original change's description:
> inspector: move injected script source to native
> 
> - introduced ValueMirror interface, this interface contains methods to generate
>   different protocol entities,
> - introduced DebugPropertyIterator, this iterator iterates through object properties
>   in the following order: exotic indices, enumerable strings, all other properties,
> - removed all injected script infra, e.g. closure compiler,
> 
> R=​dgozman@chromium.org
> TBR=yangguo@chromium.org
> 
> Bug: chromium:595206
> Change-Id: Idcfc04489ee52e015ad1d1d191c3474cc65e63f2
> Reviewed-on: https://chromium-review.googlesource.com/c/1308353
> Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
> Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57150}

TBR=dgozman@chromium.org,yangguo@chromium.org,kozyatinskiy@chromium.org

Change-Id: I8c5c61f4cfe5a66cd33eadd02ab4acec539cc3bb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:595206
Reviewed-on: https://chromium-review.googlesource.com/c/1310055
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57176}
2018-10-31 15:58:30 +00:00
Jakob Gruber
4ef0e79cba [snapshot] Remove the builtins snapshot
Now that lazy deserialization has been removed, we can roll back all
the mechanisms we introduced to support lazy single-builtin
deserialization.

This CL moves serialized builtin code objects (i.e.
off-heap-trampolines in most cases) back into the startup snapshot.
Support classes for builtin serialization and deserialization, as well
as the builtins snapshot itself are removed. Templatization on the
allocator class is removed as well.

Tbr: delphick@chromium.org
Bug: v8:6666, v8:7990
Change-Id: I2a910f8d3278b7e27b5f18ad408361ebd18871cc
Reviewed-on: https://chromium-review.googlesource.com/c/1304539
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57160}
2018-10-31 10:18:28 +00:00
Alexey Kozyatinskiy
7e079c660b inspector: move injected script source to native
- introduced ValueMirror interface, this interface contains methods to generate
  different protocol entities,
- introduced DebugPropertyIterator, this iterator iterates through object properties
  in the following order: exotic indices, enumerable strings, all other properties,
- removed all injected script infra, e.g. closure compiler,

R=dgozman@chromium.org
TBR=yangguo@chromium.org

Bug: chromium:595206
Change-Id: Idcfc04489ee52e015ad1d1d191c3474cc65e63f2
Reviewed-on: https://chromium-review.googlesource.com/c/1308353
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57150}
2018-10-30 21:30:55 +00:00
Clemens Hammacher
192bee6bac Revert "inspector: move injected script source to native"
This reverts commit 34686abe40.

Reason for revert: Compile errors on several bots, e.g. https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20debug%20builder/33299

Original change's description:
> inspector: move injected script source to native
> 
> - introduced ValueMirror interface, this interface contains methods to generate
>   different protocol entities,
> - introduced DebugPropertyIterator, this iterator iterates through object properties
>   in the following order: exotic indices, enumerable strings, all other properties,
> - removed all injected script infra, e.g. closure compiler,
> 
> R=​dgozman@chromium.org
> TBR=yangguo@chromium.org
> 
> Bug: chromium:595206
> Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
> Change-Id: I077c1879622aa0d9900d719b80d2ef5ba4221a22
> Reviewed-on: https://chromium-review.googlesource.com/c/1295550
> Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
> Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57142}

TBR=dgozman@chromium.org,yangguo@chromium.org,kozyatinskiy@chromium.org

Change-Id: I6e4ccaf1d6b151fbc0ffe4f26daa584433321c77
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:595206
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Reviewed-on: https://chromium-review.googlesource.com/c/1307432
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57144}
2018-10-30 17:04:54 +00:00
Alexey Kozyatinskiy
34686abe40 inspector: move injected script source to native
- introduced ValueMirror interface, this interface contains methods to generate
  different protocol entities,
- introduced DebugPropertyIterator, this iterator iterates through object properties
  in the following order: exotic indices, enumerable strings, all other properties,
- removed all injected script infra, e.g. closure compiler,

R=dgozman@chromium.org
TBR=yangguo@chromium.org

Bug: chromium:595206
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I077c1879622aa0d9900d719b80d2ef5ba4221a22
Reviewed-on: https://chromium-review.googlesource.com/c/1295550
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57142}
2018-10-30 16:43:55 +00:00
Igor Sheludko
2e2604b967 [ptr-compr] Introduce IsolateAllocator
to control how the memory for Isolate object is allocated.
This is the support for pointer-compression friendly heap layout.

Bug: v8:8182
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Ida36b81ee22bd865005c394748b62d4c0897d746
Reviewed-on: https://chromium-review.googlesource.com/c/1251548
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57131}
2018-10-30 14:38:07 +00:00
Andreas Haas
a600594d5a [wasm] Implement trap handler on Windows
This is the V8 side of the implementation. You can take a look at a
prototype of the Chrome side changes in https://crrev.com/c/1273043.
Chrome could also use V8's default implementation of the trap handler,
see https://crrev.com/c/1290952.

Bug: v8:6743
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I9bb3e717db17a4f30bbb8acfd80a1f6510d463ff
Reviewed-on: https://chromium-review.googlesource.com/c/1283111
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57117}
2018-10-30 10:25:37 +00:00
Marja Hölttä
b16fdb77a5 [js weak refs] Fix contexts + task scheduling
- Store dirty JSWeakFactories in a heap root (not native context) -
during GC there's no native context necessarily.

- Schedule one microtask per JSWeakFactory.

- Enter the context of the cleanup function before calling it.

BUG=v8:8179

Change-Id: Icaa245a08a60dd7325af828858ebe55d842c5bf6
Reviewed-on: https://chromium-review.googlesource.com/c/1298899
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57081}
2018-10-29 12:39:37 +00:00
Clemens Hammacher
9299702afc [iwyu] Split off allocation-builder-inl.h
allocation-builder.h was using methods defined in map-inl.h, which is
not allowed. Thus move the respective methods to
allocation-builder-inl.h.

R=mstarzinger@chromium.org

Bug: v8:7965
Change-Id: Idd040f624d7e9491bc3d4bbd1e6ab3e8cf051917
Reviewed-on: https://chromium-review.googlesource.com/c/1303297
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57069}
2018-10-29 10:49:44 +00:00
Igor Sheludko
72e6c758c3 [cleanup] Move ThreadId to separate source file
and make it Isolate-independent.

Bug: v8:8238
Change-Id: I23faae87c302d24877ef001873f673d4a1cdd327
Reviewed-on: https://chromium-review.googlesource.com/c/1301484
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57066}
2018-10-29 10:22:44 +00:00
Andreas Haas
4fc90a2597 [wasm] Refactor trap-handler to allow an extension to windows
This CL refactors the existing trap handler code for Linux to allow a
cleaner extension to Windows.

1) The CL extracts platform-specific code into separate files, see
https://docs.google.com/document/d/1HCgKIpdjy_CEodTLvZ5VuykDI6gGTHrTtau2j0zwm28.
Specifically this means:
* Move posix-specific API functions from v8.h to v8-wasm-trap-handler-posix.h.
  Deprecate the existing TryHandleSignal API function.
* Move posix-specific function declarations from trap-handler-internal.h to
  handler-inside-posix.h
* Move posix-specific function definitions from handler-shared.cc to
  handler-outside-posix.cc

2) The CL changes filenames from *-linux.* to *-posix.*. I expect that
most of the implementation for MacOS will be the same as for Linux.

Bug: v8:6743
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I4bb7f199564a2f01042084d15a82311d11a93c7b
Reviewed-on: https://chromium-review.googlesource.com/c/1280324
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57028}
2018-10-26 12:02:41 +00:00
Lei Zhang
a66fddb397 Fix MSVC error in PointerWithPayload::SetPayload().
In a DCHECK inside SetPayload(), MSVC gives a C4806 warning. Use the
right types to avoid this.

Also add pointer-with-payload.h to BUILD.gn.

Change-Id: I10a415250e7d2f06dab7a10bff48eef5890bb723
Reviewed-on: https://chromium-review.googlesource.com/c/1297991
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57003}
2018-10-25 17:30:59 +00:00
Igor Sheludko
0e09760881 [ptr-compr] Make IsolateData be the bottleneck for root-relative accesses
Bug: v8:8182
Change-Id: I4dadd9cab071ecd4314c370be5f444e36acb708e
Reviewed-on: https://chromium-review.googlesource.com/c/1297317
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56973}
2018-10-25 08:46:58 +00:00
Jakob Kummerow
76968a2ff3 [ubsan] Introduce ObjectPtr and port PropertyArray
This CL gives a first look at the new way to represent tagged object
pointers in C++.
It adds infrastructure in Handles and the garbage collector to deal
with the new object type, and ports a first class to the new world.

Design overview: https://goo.gl/Ph4CGz

Bug: v8:3770
Change-Id: I3e37fbf399612f95540cb386710a595069fb9d55
Reviewed-on: https://chromium-review.googlesource.com/c/1292673
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56964}
2018-10-24 18:27:31 +00:00
Lei Zhang
cbf58f4df0 Remove torque_generated_core target.
GN should understand action outputs, so the header generated by the
run_torque action do not need to be separately listed in another
source_set.

Change-Id: I309e8c012eb0a0597a247806d36658c1d6e5d97b
Reviewed-on: https://chromium-review.googlesource.com/c/1297680
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56953}
2018-10-24 14:20:10 +00:00
Sigurd Schneider
a124f0da9b [ptr-compr] Add gn arg for 31bit Smis on 64bit arch
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I44e62d53bc7b341a685eeca5691a86e915fcce44
Bug: v8:8344
Reviewed-on: https://chromium-review.googlesource.com/c/1292064
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56940}
2018-10-24 13:26:35 +00:00
Mathias Bynens
dffba1ee77 Port Array.of to Torque
Spec: https://tc39.github.io/ecma262/#sec-array.of

Note that the `IsConstructor` abstract operation [1] is implemented
as a `typeswitch`.

[1] https://tc39.github.io/ecma262/#sec-isconstructor

Bug: v8:8321
Change-Id: I17af918c1d928faf8a630b35432876baa96da217
Reviewed-on: https://chromium-review.googlesource.com/c/1296464
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56935}
2018-10-24 11:06:20 +00:00
Jakob Kummerow
266c0b967b [ubsan,heap] Replace Object** with ObjectSlot
as part of the continuing quest to get rid of Object*/Object**.
This is a fairly mechanical replacement of Object**/MaybeObject** with
wrapper objects carrying the same data. No change in behavior is intended.
Overloaded operators are provided to minimize code churn.

Bug: v8:3770
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I76cee82b8bf2dd80a1b66f09dd2bb2b65038eeb7
Reviewed-on: https://chromium-review.googlesource.com/c/1287889
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56920}
2018-10-24 00:14:20 +00:00
Clemens Hammacher
097b5c3b82 [wasm] Move compilation-related structs to own header
This is to prepare larger refactorings that reduce the amount of
information stored in the WasmCompilationUnits and avoid ever storing
the ModuleEnv. Instead, we will generate it when needed. This will
allow us to correctly switch from a trap-handler configuration to
non-trap-handler.

R=mstarzinger@chromium.org

Bug: v8:8343, v8:5277
Change-Id: I383a8105448ccdcae1148ddfebd74db70c648ecf
Reviewed-on: https://chromium-review.googlesource.com/c/1293951
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56893}
2018-10-23 12:16:47 +00:00
Frank Tang
c4311e52f7 [Intl] Remove intl.(h|cc)
Fold methods from intl.* to objects/intl-objects.*
Move Isolate* to the first parameter for some method
Move ICUSerice type under Intl
Hide ICUTimeZoneCache under a CreateTimeZoneCache factory method.

Bug: v8:5751
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Ie6f6a1ceee789333a077c1965de8e11d8c15c175
Reviewed-on: https://chromium-review.googlesource.com/c/1293109
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56873}
2018-10-22 22:44:36 +00:00
Ross McIlroy
69138876cd [tools] Add lite_mode status file parameter.
BUG=v8:8293

Change-Id: Ic58ac512d5f32d26756e21ca929dda79f133a40e
Reviewed-on: https://chromium-review.googlesource.com/c/1290982
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56844}
2018-10-22 10:15:10 +00:00
Frank Tang
b8b7fe39cf [Intl] Remove some unneeded code fom intl.
Remove the file src/objects/intl-objects-inl.h
Remove Intl functions:
TypeFromInt(), TypeFromSmi(), IsObjectOfType(), AvailableLocalesOf()
CreateNumberFormat() and Handle<String> version of CreateICULocale
Also remove StringToICUService() inside
src/objects/intl-objects.cc

Bug: v8:5751
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Ifbd7ce162e04b8563c09e3ee5d99c55c6ad7bf7a
Reviewed-on: https://chromium-review.googlesource.com/c/1290116
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56831}
2018-10-19 23:08:14 +00:00
Daniel Clifford
b51053d89e Reland: [builtins] Implement Array.prototype.slice in Torque
In the process:

- add volatile types for FastJSArray and remove the length_fast accessor
  from JSArray with the application of more rigorous typing.
- add micro benchmarks for testing all the interesting slice cases

Also update a few assorted places in .tq code to make them more
idiomatic.

The original version of this patch had an overly agressive assert that has
been loosened.

TBR=jgruber@chromium.org

Change-Id: I56870862f4b124d1b38372daa326182a526c874c
Reviewed-on: https://chromium-review.googlesource.com/c/1291375
Reviewed-by: Daniel Clifford <danno@chromium.org>
Commit-Queue: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56829}
2018-10-19 21:27:19 +00:00
Sigurd Schneider
1dc1d1ae4e [assembler] Move ConstantPools out of src/assembler.h
Drive-by: Eliminate unnecessary includes to src/assembler.h.

Bug: v8:8238
Change-Id: Ia0408b993b8b1c21a76c947f406f96b63fe41994
Reviewed-on: https://chromium-review.googlesource.com/c/1288810
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56817}
2018-10-19 11:38:39 +00:00
Sigurd Schneider
5bc96c9191 Revert "[builtins] Implement Array.prototype.slice in Torque"
This reverts commit 41ba3d3eb0.

Reason for revert: Speculative revert:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Fuzzer/27370
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20predictable/19895

Original change's description:
> [builtins] Implement Array.prototype.slice in Torque
> 
> In the process:
> 
> - add volatile types for FastJSArray and remove the length_fast accessor
>   from JSArray with the application of more rigorous typing.
> - add micro benchmarks for testing all the interesting slice cases
> 
> Also update a few assorted places in .tq code to make them more
> idiomatic.
> 
> Change-Id: I76ec2bb25b65a869180af1f7288419dc1f0a9c37
> Reviewed-on: https://chromium-review.googlesource.com/c/1281603
> Commit-Queue: Daniel Clifford <danno@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#56806}

TBR=danno@chromium.org,jgruber@chromium.org,tebbi@chromium.org

Change-Id: I1f2c82b4c3ab0848857f620facacf9604d4fcd11
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/1290973
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56815}
2018-10-19 11:24:34 +00:00
Jakob Gruber
1e748ba83c [ia32] Enable embedded builtins and kRootRegister
Bug: v8:6666
Change-Id: Idcccd5467d48263f54cbb5e3c197543f8a2119c8
Reviewed-on: https://chromium-review.googlesource.com/c/1286683
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Michael Hablich <hablich@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56808}
2018-10-19 09:39:40 +00:00
Daniel Clifford
41ba3d3eb0 [builtins] Implement Array.prototype.slice in Torque
In the process:

- add volatile types for FastJSArray and remove the length_fast accessor
  from JSArray with the application of more rigorous typing.
- add micro benchmarks for testing all the interesting slice cases

Also update a few assorted places in .tq code to make them more
idiomatic.

Change-Id: I76ec2bb25b65a869180af1f7288419dc1f0a9c37
Reviewed-on: https://chromium-review.googlesource.com/c/1281603
Commit-Queue: Daniel Clifford <danno@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56806}
2018-10-19 09:12:21 +00:00
Frank Tang
bf95c6fa67 [Intl] Add Intl.Segmenter.prototype.segment
Design doc https://goo.gl/fgc2Cp

Bug: v8:6891

Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I8bc5ea3137fd1b66213403ae9ea3461f40efc977
Reviewed-on: https://chromium-review.googlesource.com/c/1257923
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56757}
2018-10-18 08:08:37 +00:00
Ross McIlroy
bac7dad666 [Build] Disable build-time untrusted code mitigations on non-Android platforms and ia32.
Non-Android platforms are protected in Chrome by site isolation, therefore we can
disable the untrusted code mitigations. We still enable them on Android, and on
simulator builds since that is where we do much of the correctness testing for Android.

Mitigations for ia32 are disabled since they conflict with upcoming work on an ia32
root register.

BUG=chromium:860429, v8:6666

Change-Id: I7831071ec1c4490b7d303314c53c27078fa04979
Reviewed-on: https://chromium-review.googlesource.com/c/1276470
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56753}
2018-10-18 07:40:57 +00:00
peterwmwong
952c097679 [builtins] Port Array.p.join to Torque.
This also includes ports of Array.p.toString and Array.p.toLocaleString.
Many parts of the old JS implementation are preserved, because
TypedArray.p.join still relies on it.  These will be removed once
TypedArray.p.join is ported to Torque.

To simplify implementation, special handling of extremely sparse arrays
has been removed.

Performance improvements vary by array size, elements, and sparse-ness.
Some quick numbers and graphs are here:
https://docs.google.com/spreadsheets/d/125VLmRMudk8XaomLCsZQ1ewc94WCqht-8GQwU3s9BW8/edit#gid=2087673710

Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.v8.try:v8_linux_noi18n_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ia4069a068403ce36676c37401d349aefc976b045
Reviewed-on: https://chromium-review.googlesource.com/c/1196693
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56699}
2018-10-16 13:56:31 +00:00
Dan Elphick
f602712f6f [snapshot] Create a ReadOnly snapshot
In preparation for sharing RO_SPACE between all Isolates within a
process, this first pulls RO_SPACE out of the Startup snapshot and puts
it in its own ReadOnly snapshot.

The snapshot is first populated with the read-only roots. After that the
StartupSerializer serializes as before but starting from the first
mutable root. References to objects in the ReadOnly snapshot that aren't
themselves roots are added to a new cache called ReadOnlyObjectCache
which functions like the PartialSnapshotCache but lives in the
ReadOnlySerializer rather than the StartupSerializer. These cache
entries are referenced using a new bytecode: ReadOnlyObjectCache. (To
make room for this, the ApiReference bytecode has been moved).

To reduce code duplication, the StartupSerializer has been refactored to
create a new base class RootSerializer, which ReadOnlySerializer also
subclasses. The base class is responsible primarily for keeping track of
already serialized roots and visiting the roots.

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Iff26042886130ae22eccf2e11b35f6f226f4a792
Bug: v8:8191
Reviewed-on: https://chromium-review.googlesource.com/c/1244676
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56681}
2018-10-16 10:13:20 +00:00
Sigurd Schneider
a4e820df48 [tools] Add verify_csa statusfile param
Change-Id: Ibacdc7b41a96fc7c7d4ff44552fe6d86ec2ef1aa
Bug: v8:8312
Reviewed-on: https://chromium-review.googlesource.com/c/1282605
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56679}
2018-10-16 09:48:05 +00:00
Ross McIlroy
c73fa4fce4 [Build] Add support for V8 Lite mode.
Adds a build-time flag to control enabling of V8 Lite mode. Currently
this mode enables optimize-for-size and makes that flag read-only so that
it can't be changed at runtime.

This mode also replaces the --minimal flag which was previously used
to make porting easier.

BUG=v8:8293

Change-Id: I8360b4d55dd15a2a7c18429c94329dc5264dea86
Reviewed-on: https://chromium-review.googlesource.com/c/1276467
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56653}
2018-10-15 16:04:17 +00:00
Clemens Hammacher
bfa2be86af [wasm] Move WasmGraphBuildingInterface to own cc file
This class was defined in function-body-decoder.cc, but it's not an
implementation of function body decoding, but rather the interface
between the decoder and the WasmGraphBuilder. Hence move it out to its
own file.

R=titzer@chromium.org, mstarzinger@chromium.org

Bug: v8:8238
Change-Id: Ib9bf47e90a3683f578b30b6de74d01da81b2be93
Reviewed-on: https://chromium-review.googlesource.com/c/1278391
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56602}
2018-10-12 10:40:11 +00:00
Jakob Kummerow
d4612bbd61 Move MessageTemplate enum into its own header file
The primary purpose of this is to untangle a circular dependency
objects.h -> handles.h -> objects.h. Most compilation units only
need message-template.h, without the rest of messages.h.
Bonus: change the enum to an enum class for improved type safety.

Bug: v8:3770
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I8102c55197a450811de2588a68a08e7f99ea6b9e
Reviewed-on: https://chromium-review.googlesource.com/c/1272193
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56583}
2018-10-11 23:01:32 +00:00
Igor Sheludko
b929b52e36 [ptr-compr] Introduce IsolateData class
... containing RootsTable, ExternalReferenceTable, builtins array and
potentially some other data that can be accessed via the RootRegister.

This is a preliminary step before adding support for pointer-compression
friendly heap layout.

Bug: v8:8182
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I2899f657aaff1351a5304afa0b1a4c5ae4cfc31d
Reviewed-on: https://chromium-review.googlesource.com/c/1245426
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56551}
2018-10-11 08:01:37 +00:00
Nico Weber
54723cae72 v8: Build with -Wexit-time-destructors.
Bug: chromium:101600, v8:8257
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ie6c4f80cdec855355c0b8985e4f8a88da2ddfef9
Reviewed-on: https://chromium-review.googlesource.com/c/1273322
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56538}
2018-10-10 18:01:26 +00:00
Ben L. Titzer
98e3e32df2 [wasm] Cache import wrappers in NativeModule
Now that import wrappers are no longer specialized to an index, they
can be cached in the native module, keyed by
(WasmImportCallKind, FunctionSig). This saves instantiation time and
also fixes a (slow) memory leak.

R=mstarzinger@chromium.org

Change-Id: I5197bbfae79d6e811a01289b990db445373eea6c
Reviewed-on: https://chromium-review.googlesource.com/c/1270943
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56526}
2018-10-10 13:03:32 +00:00
Tobias Tebbi
b38d3f98ec [build] disable asan on Windows for Torque
An asan bug on Windows breaks the chrome asan bot. This disables asan
for the Torque build step as a workaround.

Bug: chromium:893437
Change-Id: I4ccc25e7667abb3ea167c3e8af1210685ff06b9e
Reviewed-on: https://chromium-review.googlesource.com/c/1273105
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56523}
2018-10-10 11:47:40 +00:00
Matheus Marchini
8aaa186ed4 [postmortem] add postmortem metadata for Promises
R=bmeurer@google.com, yangguo@google.com

Change-Id: Ica3f6308d92079d6602e16da31fa01488f9cc6bd
Reviewed-on: https://chromium-review.googlesource.com/c/1261162
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56521}
2018-10-10 11:25:45 +00:00
Sigurd Schneider
f805b43d9a [tools] Add embedded_builtins statusfile param
R=machenbach@chromium.org, sigurds@chromium.org

Bug: v8:6666
Change-Id: I9ac0fc393a9f9a66bebb72abd54a429e95aa078a
Reviewed-on: https://chromium-review.googlesource.com/c/1270840
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56510}
2018-10-10 09:48:43 +00:00
Clemens Hammacher
7c2aef087e [d8] Add --stress-delay-tasks flag
This flag stresses different interleavings of background and foreground
tasks by delaying the execution of each task by a random value between
0 and 100ms (with a quadratic distribution favoring smaller delayes).

The implementation is encapsulated in the new {DelayedTasksPlatform}
class, which wraps each task in a {DelayedTask} which first sleeps for
the given number of microseconds, then executes the actual task.

Both the old {PredictablePlatform} and the new {DelayedTasksPlatform}
are moved to the new d8-platforms.cc file with an interface to create
them in d8-platforms.h.

R=yangguo@chromium.org, mslekova@chromium.org

Bug: v8:8278
Change-Id: I5847fb2da31ffde773195da7ad3f56a0390cc05b
Reviewed-on: https://chromium-review.googlesource.com/c/1270592
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56496}
2018-10-09 16:04:57 +00:00
Marja Hölttä
b8f8deaf02 [js weak refs] Initial JS Weak Ref implementation.
Minimal implementation to run a simple example (see test) demonstrating the
weakness of WeakCell.

- Behind FLAG_harmony_weak_refs
- Add WeakFactory & WeakCell, no WeakRef in this version.

Spec clarifications: goo.gl/7ujBAk
Design doc: goo.gl/nvof2T

BUG=v8:8179

Change-Id: Iea2a7a2201e6380644235d190a542ab46e082382
Reviewed-on: https://chromium-review.googlesource.com/c/1238579
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56483}
2018-10-09 13:16:50 +00:00
Ross McIlroy
493c894a2e [Compiler] Remove CompilerDispatcherJob and use BackgroundCompileTask directly
Simplify the logic in the CompilerDispatcher to use BackgroundCompileTasks
directly, rather than having a (now unecessary) CompilerDispatcherJob
abstraction. In the process, the CompilerDispatcherTracer is removed, and the
idle task logic is simplified finalize already compiled jobs until the
idle task deadline.

BUG=v8:8238, v8:8041

Change-Id: I1ea2366f959b6951de222d62fde80725b3cc70ff
Reviewed-on: https://chromium-review.googlesource.com/c/1260123
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56473}
2018-10-09 10:39:27 +00:00
Toon Verwaest
e874d6a3d0 [parser] Rewrite duplicate formal detection
Now duplicate parameter detection depends on tracking of unresolved references.
This also fixes finding duplicate parameters of arrow functions nested in other
arrow functions.

Change-Id: I644bfdc513244637345c1069e5c7e5fde713da63
Reviewed-on: https://chromium-review.googlesource.com/c/1270578
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56467}
2018-10-09 09:17:42 +00:00
Dimitri Glazkov
d72bd12258 Enable cross-building V8 Fuchsia port on Mac.
Add necessary dependencies and rules to produce a functional
Fuchsia d8 package from a standalone V8 build.

R=adamk
BUG=

Change-Id: If81cc9fc37822cda47bb1fe1846b9519c8fcbf40
Reviewed-on: https://chromium-review.googlesource.com/c/1226414
Commit-Queue: Dimitri Glazkov <dglazkov@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56425}
2018-10-06 23:30:02 +00:00
Frank Tang
4274d2f190 [Intl] add Intl.Segmenter - part 1
Add the JSSegmenter and hook up constructor,
supportedLocales and resolvedOptions only
Desgin Doc- https://goo.gl/fgc2Cp

TBR: bmeurer@chromium.org
Bug: v8:6891
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Ief25fb31d724c55c43c0fdf3080294fa83486e4f
Reviewed-on: https://chromium-review.googlesource.com/c/1247362
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56393}
2018-10-05 02:42:30 +00:00
Tobias Tebbi
a4008bf009 [torque] add an intermediate representation to Torque
Bug: v8:7793
Change-Id: I5261122faf422987968ee1e405966f878ff910a1
Reviewed-on: https://chromium-review.googlesource.com/c/1245766
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Daniel Clifford <danno@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56391}
2018-10-04 21:29:18 +00:00
Marja Hölttä
c7b1ceb801 [objects.h splitting] Move StackFrameInfo
BUG=v8:5402,v8:8238

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I6cdc27cc8e687e32e08dfbd4f16b014f60ec2747
Reviewed-on: https://chromium-review.googlesource.com/1256243
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56333}
2018-10-02 12:01:06 +00:00
Ivica Bogosavljevic
408896a8b4 MIPS: Implement 64-bit atomics in software
MIPS architecture doesn't have support for 64-bit atomics.
It is possible to implement them using 32-bit atomics,
but the process is involved and takes time. For the time
being support 64-bit atomics using runtime.

Bug: v8:8100
Change-Id: I8c732ea9975c46be70643a1e722d78938c8a70de
Reviewed-on: https://chromium-review.googlesource.com/1251521
Commit-Queue: Ivica Bogosavljevic <ibogosavljevic@wavecomp.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56331}
2018-10-02 09:42:47 +00:00
Maya Lekova
8724b8d4fd [turbofan] Introduce snapshot for serialized builtins
This change adds an infrastructure to "snapshot" data that is being
serialized only once. This data lives in its own per-isolate zone, wrapped
in a new CompilerData class.

This change reduces the "serialize standard objects" on TypeScript
benchmark from ~69ms to ~30ms (more than 50% improvement).

Bug: v8:7790
Change-Id: I6ce4f6fb993334969662fdd993d681945a9f3727
Reviewed-on: https://chromium-review.googlesource.com/1238920
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56309}
2018-10-01 09:38:20 +00:00
Igor Sheludko
e5648b2ac9 [cleanup] Move some helper methods from Heap to ReadOnlyRoots
In particular: MapForFixedTypedArray() and EmptyFixedTypedArrayForMap().

And make ReadOnlyRoots object independent of the Heap.

Bug: v8:8015
Change-Id: Ifd17294661fac21c8e7545145280c8a2dedfe8c3
Reviewed-on: https://chromium-review.googlesource.com/1243131
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56234}
2018-09-26 11:03:11 +00:00
Marja Hölttä
eda00a5c49 [objects.h splitting] Move PropertyArray
BUG=v8:5402,v8:8015

Change-Id: I2fce46c944e3057cb05aa53c3030916334ffbc3e
Reviewed-on: https://chromium-review.googlesource.com/1243044
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56230}
2018-09-26 06:41:51 +00:00
Marja Hölttä
68deca9b41 [objects.h splitting] Move BuiltinFunctionId
BUG=v8:5402,v8:8015

Change-Id: I4afa8ada312df691b06c2d107fd5254c0fbb9496
Reviewed-on: https://chromium-review.googlesource.com/1238577
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56199}
2018-09-25 11:01:33 +00:00
Yang Guo
ac66c97cfd Reland "Do not use FixedDoubleArray to store RNG state"
This is a reland of 33fa357b6f

TBR=mvstanton@chromium.org

Original change's description:
> Do not use FixedDoubleArray to store RNG state
>
> Also:
>  - replace runtime call with cheaper C call
>  - change state to double conversion
>
> R=mvstanton@chromium.org
>
> Bug: v8:8212
> Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
> Change-Id: If4bfe0f5fb1864c89f4acd871cb8b74c7cd7ab09
> Reviewed-on: https://chromium-review.googlesource.com/1240116
> Commit-Queue: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Michael Stanton <mvstanton@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#56165}

Bug: v8:8212
Change-Id: Iccc9128034ce7b65801a04a54982219b5a4fe84e
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/1238551
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56175}
2018-09-24 14:23:22 +00:00
Maya Lekova
601d8896b3 Revert "Do not use FixedDoubleArray to store RNG state"
This reverts commit 33fa357b6f.

Reason for revert: Breaking the V8 Linux - arm64 - sim - MSAN bot. Please see here:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20arm64%20-%20sim%20-%20MSAN/23001

Original change's description:
> Do not use FixedDoubleArray to store RNG state
> 
> Also:
>  - replace runtime call with cheaper C call
>  - use xor instead of addition to remove bias
> 
> R=​mvstanton@chromium.org
> 
> Bug: v8:8212
> Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
> Change-Id: If4bfe0f5fb1864c89f4acd871cb8b74c7cd7ab09
> Reviewed-on: https://chromium-review.googlesource.com/1240116
> Commit-Queue: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Michael Stanton <mvstanton@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#56165}

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

Change-Id: I05f23f0b52a706233bbc1a1877cc15691ed9f40a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8212
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/1238549
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56167}
2018-09-24 13:11:00 +00:00
Yang Guo
33fa357b6f Do not use FixedDoubleArray to store RNG state
Also:
 - replace runtime call with cheaper C call
 - use xor instead of addition to remove bias

R=mvstanton@chromium.org

Bug: v8:8212
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: If4bfe0f5fb1864c89f4acd871cb8b74c7cd7ab09
Reviewed-on: https://chromium-review.googlesource.com/1240116
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56165}
2018-09-24 12:35:23 +00:00
Marja Hölttä
81a3c699d6 [objects.h splitting] Move JSObject + subclasses
Also fixing DEPS include rules for heap-write-barrier.h

BUG=v8:5402,v8:8015

Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Ia785da321bc6c6f4c375ae8c866a0bf294e64f5b
Reviewed-on: https://chromium-review.googlesource.com/1238453
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56138}
2018-09-21 13:03:09 +00:00
Dan Elphick
daa296b564 [interpreter] Always put bytecode handlers in builtins table
This always creates the bytecode handlers as part of the builtins table
regardless of the V8_EMBEDDED_BYTECODE_HANDLERS definition.

Lazy deserialization of bytecode handlers is enabled for this flow by
moving the three lazy bytecode deserializers from the strong roots into
the builtins table (ensuring that they not marked lazy themselves).

To simplify lazy deserialization, the illegal bytecode handler is made
non-lazy so that GetAndMaybeDeserializeBytecodeHandler doesn't to know
about it.

Since the bytecode handlers are now always part of the builtins table,
many bytecode specific methods are removed, including logging and in
BuiltinsSerializer and BuiltinsDeserializer.

Removes setup-interpreter.h, setup-interpreter-internal.cc and
builtin-snapshot-utils.*.

Change-Id: Ie421aa897a04f7b3bcb964c476eb7ab149388d53
Reviewed-on: https://chromium-review.googlesource.com/1220046
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56063}
2018-09-20 09:58:15 +00:00
Maya Lekova
fef047a4a5 [turbofan] Implement constant folding of string concatenations
This CL implements the following design doc:
https://docs.google.com/document/d/1h5kdfemMQMpUd15PSKW1lqikJW5hsGwrmOvoqhGFRts/edit?ts=5b978756#heading=h.urs7r34mx9p

Bug: v8:7790
Change-Id: I5f758c6d906ea9275c30b28f339063c64a2dc8d8
Reviewed-on: https://chromium-review.googlesource.com/1221807
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56021}
2018-09-19 09:47:23 +00:00
Yang Guo
c8bfbed921 Reland "[regexp] implement regexp property sequence proposal"
This is a reland of f4c14fd971

TBR=jgruber@chromium.org

Original change's description:
> [regexp] implement regexp property sequence proposal
>
> Also-By: mathias@chromium.org
> Bug: v8:7467
> Change-Id: I9fd6e61f4da1097c2375f671b4801e9730f792c4
> Reviewed-on: https://chromium-review.googlesource.com/1227974
> Commit-Queue: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Mathias Bynens <mathias@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#55991}

Bug: v8:7467
Change-Id: If07137dea5a8ea42dbff1d749d997eb4ae055d80
Reviewed-on: https://chromium-review.googlesource.com/1232634
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56017}
2018-09-19 08:39:22 +00:00
Leszek Swirski
be271454c4 Revert "[regexp] implement regexp property sequence proposal"
This reverts commit f4c14fd971.

Reason for revert: Breaks noi18n build

Original change's description:
> [regexp] implement regexp property sequence proposal
> 
> Also-By: mathias@chromium.org
> Bug: v8:7467
> Change-Id: I9fd6e61f4da1097c2375f671b4801e9730f792c4
> Reviewed-on: https://chromium-review.googlesource.com/1227974
> Commit-Queue: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Mathias Bynens <mathias@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#55991}

TBR=yangguo@chromium.org,jgruber@chromium.org,mathias@chromium.org

Change-Id: I10c67ad3ade35af920d32a7eea8ae0297677fa07
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7467
Reviewed-on: https://chromium-review.googlesource.com/1230137
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55996}
2018-09-18 13:48:58 +00:00
Yang Guo
f4c14fd971 [regexp] implement regexp property sequence proposal
Also-By: mathias@chromium.org
Bug: v8:7467
Change-Id: I9fd6e61f4da1097c2375f671b4801e9730f792c4
Reviewed-on: https://chromium-review.googlesource.com/1227974
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55991}
2018-09-18 12:20:54 +00:00
Igor Sheludko
69621ef0c1 [cleanup] Introduce base::AddressRegion helper class
Bug: v8:8015
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I2ce078b662e3dd93e0fac310b0d73c4cadbaccb3
Reviewed-on: https://chromium-review.googlesource.com/1226640
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55957}
2018-09-17 13:02:54 +00:00
Igor Sheludko
6211697a24 [cleanup] Introduce LsanPageAllocator decorator
... in order to avoid page allocator filtering when notifying leak sanitizer.

This is a reland of 0606bf91ed

Bug: v8:8015
Change-Id: I314eee7699ce2c8abeeafce4fcf185810ac252a9
Reviewed-on: https://chromium-review.googlesource.com/1226918
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55952}
2018-09-17 11:34:25 +00:00
Igor Sheludko
37d87f610f [ptr-compr] Introduce BoundedPageAllocator and use it instead of CodeRange.
This is a reland of 16816e53be

Bug: v8:8096
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I257fc391931a0a4bf01f2e8136183aaed044231c
Reviewed-on: https://chromium-review.googlesource.com/1226915
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55928}
2018-09-15 22:25:40 +00:00
Dan Elphick
011401c135 Build bytecode_builtins_list_generator with same toolchain as torque
Fix build issues on mips by using the same v8_torque_toolchain (renamed
to v8_generator_toolchain), which is the same as the host tool chain
when targeting MIPS.

Bug: v8:8162
Change-Id: I5d213398cba4c5e108b203e6aa6ba5a2b0e8f781
Reviewed-on: https://chromium-review.googlesource.com/1221289
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55844}
2018-09-13 07:26:42 +00:00
Florian Sattler
d970749152 Reland "[preparser] Refactor VariableProxies to use ThreadedLists interface"
This is a reland of 78f8ff9568

Original change's description:
> [preparser] Refactor VariableProxies to use ThreadedLists interface
>
> Bug: v8:7926
> Change-Id: Idfc520b67696c8a838a0ee297ea392d416dd899e
> Reviewed-on: https://chromium-review.googlesource.com/1206292
> Commit-Queue: Florian Sattler <sattlerf@google.com>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Marja Hölttä <marja@chromium.org>
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#55801}

Bug: v8:7926, chromium:883059
Change-Id: Icaa496be1b4df8306fe6d623e5825909d7b0c9c5
Reviewed-on: https://chromium-review.googlesource.com/1221529
Commit-Queue: Florian Sattler <sattlerf@google.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55833}
2018-09-12 15:13:29 +00:00
Marja Hölttä
01452bedfc [objects.h splitting] Move Allocationsite & AllocationMemento
BUG=v8:5402,v8:8015

Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I14613a05f9b71308858afdd8d2b212ae9786abb3
Reviewed-on: https://chromium-review.googlesource.com/1215169
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55822}
2018-09-12 11:21:08 +00:00
Florian Sattler
daf1a349dc Revert "[preparser] Refactor VariableProxies to use ThreadedLists interface"
This reverts commit 78f8ff9568.

Reason for revert: Causing failures on ClusterFuzz and flakes on the waterfall.
BUG: v8:8166, chromium:883042, chromium:883054, chromium:883119, chromium:883110

Original change's description:
> [preparser] Refactor VariableProxies to use ThreadedLists interface
>
> Bug: v8:7926,
> Change-Id: Idfc520b67696c8a838a0ee297ea392d416dd899e
> Reviewed-on: https://chromium-review.googlesource.com/1206292
> Commit-Queue: Florian Sattler <sattlerf@google.com>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Marja Hölttä <marja@chromium.org>
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#55801}

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

Change-Id: Ibebff76b5ae69b9790b73c6bd1d53beff5d53673
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7926
Reviewed-on: https://chromium-review.googlesource.com/1221227
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55819}
2018-09-12 09:10:05 +00:00
Michael Achenbach
0005c2de36 Revert multiple commits
Revert "[ptr-compr] Introduce BoundedPageAllocator and use it instead of CodeRange."

This reverts commit 16816e53be.

Revert "[cleanup] Introduce LsanPageAllocator decorator"

This reverts commit 0606bf91ed.

Revert "[ptr-compr][heap] Fix TODOs about always using proper page allocator"

This reverts commit b0edf8e66a.

The fist CL in the list is suspected to block the roll:
https://chromium-review.googlesource.com/c/chromium/src/+/1216022

Pseudo bisect points to that CL:
https://chromium-review.googlesource.com/c/chromium/src/+/1219612

TBR=ishell@chromium.org

Bug: v8:8096
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I9fafedd3810e14cdfc2068df7727cf90fc0cc85a
Reviewed-on: https://chromium-review.googlesource.com/1219695
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55818}
2018-09-12 08:34:10 +00:00
Florian Sattler
78f8ff9568 [preparser] Refactor VariableProxies to use ThreadedLists interface
Bug: v8:7926
Change-Id: Idfc520b67696c8a838a0ee297ea392d416dd899e
Reviewed-on: https://chromium-review.googlesource.com/1206292
Commit-Queue: Florian Sattler <sattlerf@google.com>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55801}
2018-09-11 16:14:00 +00:00
Michael Achenbach
c56833b016 [build] Fix clusterfuzz release builder
Bug: v8:8162
Change-Id: Ib3965263a7ef52284a6f08378a76fafc7b18fa42
Reviewed-on: https://chromium-review.googlesource.com/1219506
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55792}
2018-09-11 14:03:55 +00:00
Dan Elphick
e0e9461fab Fix coverage build for bytecode_builtins_list_generator
Use v8_executable instead of executable for
bytecode_builtins_list_generator so that coverage link flags should be
picked up too.

Bug: v8:8068
Change-Id: I260e4de3485a78d3b3a3455441837e1a5936aa25
Reviewed-on: https://chromium-review.googlesource.com/1219326
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55787}
2018-09-11 12:22:56 +00:00
Frank Tang
d048600ce9 [Intl] mv code from builtins/builtins-intl.cc to objects/js-number-format.*
Bug: v8:5751
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I334a6eca81c02bdb90b2054f085bf57dec5f9a9d
Reviewed-on: https://chromium-review.googlesource.com/1215645
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55775}
2018-09-11 09:12:23 +00:00
Igor Sheludko
0606bf91ed [cleanup] Introduce LsanPageAllocator decorator
... in order to avoid page allocator filtering when notifying leak sanitizer.

Bug: v8:8015
Change-Id: I2a3222030dbbf0c467808d0f397a064c40324189
Reviewed-on: https://chromium-review.googlesource.com/1216182
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55760}
2018-09-10 14:53:32 +00:00
Dan Elphick
5a9f05560e [embedded handlers] Store the handlers without gaps
Previously the builtins table had a value for every single
OperandScale/Bytecode combination regardless of whether it was valid.
This change makes it so that only valid bytecode handlers are stored in
the builtins table. This prevents placeholders being serialized into the
snapshot (and embedded into the binary) saving 9KB in
CODE_SPACE/OLD_SPACE and 2.5KB in the embedded data as well as 66
entries in the builtins table.

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

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

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

Bug: v8:8068
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Iaad22a952e2858f508030c5ddc082f91bf59f667
Reviewed-on: https://chromium-review.googlesource.com/1209304
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55757}
2018-09-10 14:42:02 +00:00