Commit Graph

1749 Commits

Author SHA1 Message Date
Michael Achenbach
519bf695b2 Revert "[snapshot] Add support for native counters."
This reverts commit 93716b9e71.

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

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

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

Change-Id: I93f1ed714e3dcd309f3100685e4bd282db471d46
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1543209
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60500}
2019-03-28 07:58:04 +00:00
Pierre Langlois
93716b9e71 [snapshot] Add support for native counters.
Counters in generated code, as enabled with --native-code-counters, do not work
in the snapshot. This adds a `v8_enable_snapshot_code_counters` build option
enabled by defaut in debug mode that allows code from the snapshot to increment
the current isolate's set of counters.

For this to work, we need to add native code counters in the external reference
table.

To keep the no snapshot configuration similar, we've also enabled the
--native-code-counters flag by default for debug builds.

Change-Id: I4478b79858c9b04f57e06e7ec67449e9e3a76f53
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1528998
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60495}
2019-03-27 17:45:50 +00:00
Sigurd Schneider
432751ae75 [cleanup] Reduce dependents of ordered-hash-table.h to 71.
Together with the previous CL, this is a 10x improvement.


Bug: v8:8834
Change-Id: I89b86ee88c82479997c08b725571369b1bf9d190
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1539592
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60470}
2019-03-26 16:13:58 +00:00
Cliff Smolinsky
31d7e1d366 Replace shlwapi call with STL.
The only use of shlwapi is for a single method which can be easily
replaced by simple wstring calls. This change makes that swap and
removes the reference to shlwapi completely.

Bug: v8:9031
Change-Id: Ia8f2c44e8166d93e309016896b26a84bdb90d720
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1534960
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Cliff Smolinsky <cliffsmo@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#60451}
2019-03-25 16:59:58 +00:00
Clemens Hammacher
83f76ba3b5 [wasm] Rename inl headers that can be plain headers
Both js-to-wasm-wrapper-cache-inl.h and wasm-import-wrapper-cache-inl.h
do not include any inl headers, thus they can be plain headers. If they
ever need to include inl headers again, we should split out the
respective functions into a separete inl header to follow the usual
pattern to have *both* a plain header *and* an inl header.

R=mstarzinger@chromium.org

Bug: v8:8834
Change-Id: I1b1b917a8e2c47f1354522479f8c57475bee6244
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1535826
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60431}
2019-03-25 10:48:34 +00:00
Jakob Gruber
5914c29e5b [regexp] Port RegExp.prototype[@@replace] to Torque
Just the outermost wrapper function (which does almost nothing).

Bug: v8:8976
Change-Id: I8137f86bde5e10ba7edd5051e7c86bfc631bfe94
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1528531
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Peter Wong <peter.wm.wong@gmail.com>
Cr-Commit-Position: refs/heads/master@{#60402}
2019-03-22 03:18:06 +00:00
Michael Achenbach
f936fb4258 Revert "Reland "[ptr-compr][x64] Temporarily enable pointer compression on x64""
This reverts commit 7b8968368d.

Reason for revert: Lots of test failures on current roll:
https://chromium-review.googlesource.com/c/chromium/src/+/1534141

Original change's description:
> Reland "[ptr-compr][x64] Temporarily enable pointer compression on x64"
> 
> This is a reland of 4f051fd5da
> 
> Relanding because last revert was caused by unrelated flakes.
> 
> Original change's description:
> > [ptr-compr][x64] Temporarily enable pointer compression on x64
> >
> > ... and make sure that the x64 ptr-compr bots proceed testing V8 without
> > pointer compression in order to keep testing the full pointer mode.
> >
> > Cq-Include-Trybots: luci.v8.try:v8_linux64_ubsan_rel_ng,v8_linux64_tsan_rel
> > Bug: v8:7703
> > Change-Id: Ied4e7bacf99c9d63e0459613fec522273f595de8
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1523327
> > Commit-Queue: Igor Sheludko <ishell@chromium.org>
> > Auto-Submit: Leszek Swirski <leszeks@chromium.org>
> > Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#60339}
> 
> Bug: v8:7703
> Change-Id: I9c588de77070d4fbf1bb1a21ae58c398a22eed9c
> Cq-Include-Trybots: luci.v8.try:v8_linux64_ubsan_rel_ng, v8_linux64_tsan_rel, v8_mac64_gc_stress_dbg
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1530819
> Commit-Queue: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60370}

TBR=machenbach@chromium.org,ishell@chromium.org

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

Bug: v8:7703
Change-Id: I1c037470b5895c4269c9574e6c93d0eed6fe90d5
Cq-Include-Trybots: luci.v8.try:v8_linux64_ubsan_rel_ng, v8_linux64_tsan_rel, v8_mac64_gc_stress_dbg
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1533867
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60397}
2019-03-21 17:57:15 +00:00
Cliff Smolinsky
02c06b1022 Delayload shlwapi
V8_libbase.dll, in a component build where the dll is created,
statically links against shlwapi.dll. Shlwapi is only needed for a
single use within the debug stacktrace code and is therefore not needed
in most cases. Statically loading shlwapi also brings in user32.dll and
gdi32.dll, so this is a decent perf hit which is generally unnecessary.
This changes delayloads shlwapi so that is only loaded when actually
used.

Bug: v8:9024
Change-Id: Ib8842893a43cde4b1110a333ae07d861088ba829
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1533145
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Cliff Smolinsky <cliffsmo@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#60394}
2019-03-21 15:52:00 +00:00
Leszek Swirski
9f6ddb48a0 Revert "V8 x64 backend doesn't emit ABI compliant stack frames"
This reverts commit 3cda21de77.

Reason for revert: Breaks the roll on Windows (see https://cr-buildbucket.appspot.com/build/8918477701097622400)

Original change's description:
> V8 x64 backend doesn't emit ABI compliant stack frames
> 
> On 64 bit Windows, the OS stack walking does not work because the V8 x64
> backend doesn't emit unwinding info and also because it doesn't emit ABI
> compliant stack frames. See
> https://docs.google.com/document/d/1-wf50jFlii0c_Pr52lm2ZU-49m220nhYMrHDi3vXnh0/edit
> for more details.
> 
> This problem can be fixed by observing that V8 frames usually all have the same
> prolog and epilog:
> 
> push rbp,
> mov rbp, rsp
> ...
> pop rbp
> ret N
> 
> and that it is possible to define XDATA (UNWIND_CODEs) that specify how Windows
> should walk through V8 frames. Furthermore, since V8 Code objects are all
> allocated in the same code-range for an Isolate, it is possible to register a
> single PDATA/XDATA entry to cover stack walking for all the code generated
> inside that code-range.
> 
> This PR contains changes required to enable stack walking on Win64:
> 
> EmbeddedFileWriter now adds assembler directives to the builtins
> snapshot source file (embedded.cc) to emit additional entries in the .pdata and
> in the .xdata section of the V8 executable. This takes care of stack walking
> for embedded builtins. (The case of non-embedded builtins is not supported).
> The x64 Assembler has been modified to collect the information required to emit
> this unwind info for builtins.
> 
> Stack walking for jitted code is handled is Isolate.cpp, by registering
> dynamically PDATA/XDATA for the whole code-range address space every time a new
> Isolate is initialized, and by unregistering them when the Isolate is
> destroyed.
> 
> Stack walking for WASM jitted code is handled is the same way in
> wasm::NativeModule (wasm/wasm-code-manager.cpp).
> 
> It is important to note that Crashpad and Breakpad are already registering
> PDATA/XDATA to manage and report unhandled exceptions (but not for embedded
> builtins). Since it is not possible to register multiple PDATA entries for the
> same address range, a new function is added to the V8 API:
> SetUnhandledExceptionCallback() can be used by an embedder to register its own
> unhandled exception handler for exceptions that arise in v8-generated code.
> V8 embedders should be modified accordingly (code for this is in a separate PR
> in the Chromium repository:
> https://chromium-review.googlesource.com/c/chromium/src/+/1474703).
> 
> All these changes are experimental, behind:
> 
> the 'v8_win64_unwinding_info' build flag, and
> the '--win64-unwinding-info' runtime flag.
> 
> Bug: v8:3598
> Change-Id: Iea455ab6d0e2bf1c556aa1cf870841d44ab6e4b1
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1469329
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Commit-Queue: Paolo Severini <paolosev@microsoft.com>
> Cr-Commit-Position: refs/heads/master@{#60330}

TBR=bbudge@chromium.org,ulan@chromium.org,mvstanton@chromium.org,mstarzinger@chromium.org,gdeepti@chromium.org,jgruber@chromium.org,paolosev@microsoft.com

Change-Id: If8470da94c58df8c800cbe8887f9f86236e43353
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:3598
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1532321
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60372}
2019-03-20 14:36:04 +00:00
Igor Sheludko
7b8968368d Reland "[ptr-compr][x64] Temporarily enable pointer compression on x64"
This is a reland of 4f051fd5da

Relanding because last revert was caused by unrelated flakes.

Original change's description:
> [ptr-compr][x64] Temporarily enable pointer compression on x64
>
> ... and make sure that the x64 ptr-compr bots proceed testing V8 without
> pointer compression in order to keep testing the full pointer mode.
>
> Cq-Include-Trybots: luci.v8.try:v8_linux64_ubsan_rel_ng,v8_linux64_tsan_rel
> Bug: v8:7703
> Change-Id: Ied4e7bacf99c9d63e0459613fec522273f595de8
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1523327
> Commit-Queue: Igor Sheludko <ishell@chromium.org>
> Auto-Submit: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60339}

Bug: v8:7703
Change-Id: I9c588de77070d4fbf1bb1a21ae58c398a22eed9c
Cq-Include-Trybots: luci.v8.try:v8_linux64_ubsan_rel_ng, v8_linux64_tsan_rel, v8_mac64_gc_stress_dbg
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1530819
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60370}
2019-03-20 14:23:33 +00:00
Michael Lippautz
73c62c845e profiler: Provide raw heap snapshots
Omit user roots when raw heap snapshots are used, i.e., when
the gn flag v8_enable_raw_heap_snapshots is enabled. For regular
Chrome production builds this is not the case.

Blink CL: https://crrev.com/c/1529096

Bug: chromium:936797
Change-Id: I5ae0ec1ecfab9a76352d8ce927d1c40e707262cc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1528994
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Alexei Filippov <alph@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60351}
2019-03-20 09:27:32 +00:00
Tom Anderson
701eb086f5 Fix V8 snapshot build for 32-bit Win/cross
This CL includes a revert of [1] with thakis@'s proposed fix at [2].  Verified a
build with the below gn args works on Linux:

target_os = "win"
target_cpu = "x86"
is_debug = false
is_official_build = true
is_component_build = false
use_goma = true
enable_nacl = false
use_custom_libcxx = true

[1] 93ee541417
[2] https://bugs.chromium.org/p/chromium/issues/detail?id=942347#c2

BUG=chromium:942347
R=machenbach
CC=thakis

Change-Id: I34f5744a9f600efbc075f4b5ba8d1c66bff46ae6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1529250
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60349}
2019-03-20 09:13:42 +00:00
Deepti Gandluri
979b3a33d7 Revert "Reland "[ptr-compr][x64] Temporarily enable pointer compression on x64""
This reverts commit 4f051fd5da.

Reason for revert: Fails with custom snapshot on GC stress - https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20GC%20Stress%20-%20custom%20snapshot/24855

Original change's description:
> Reland "[ptr-compr][x64] Temporarily enable pointer compression on x64"
> 
> This is a reland of 589d1a6b75
> 
> Relanding after fixing TSan and UBSan issues.
> 
> Original change's description:
> > [ptr-compr][x64] Temporarily enable pointer compression on x64
> >
> > ... and make sure that the x64 ptr-compr bots proceed testing V8 without
> > pointer compression in order to keep testing the full pointer mode.
> >
> > Bug: v8:7703
> > Change-Id: Iee725deda813425a6f0722948b54976154f50909
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1497139
> > Reviewed-by: Michael Hablich <hablich@chromium.org>
> > Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> > Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#60230}
> 
> Cq-Include-Trybots: luci.v8.try:v8_linux64_ubsan_rel_ng,v8_linux64_tsan_rel
> Bug: v8:7703
> Change-Id: Ied4e7bacf99c9d63e0459613fec522273f595de8
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1523327
> Commit-Queue: Igor Sheludko <ishell@chromium.org>
> Auto-Submit: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60339}

TBR=machenbach@chromium.org,hablich@chromium.org,leszeks@chromium.org,ishell@chromium.org,verwaest@chromium.org

Change-Id: Ia06829e9dfdf09501ceebc0eef175d3261969d1f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7703
Cq-Include-Trybots: luci.v8.try:v8_linux64_ubsan_rel_ng, v8_linux64_tsan_rel
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1531120
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60340}
2019-03-19 17:51:00 +00:00
Igor Sheludko
4f051fd5da Reland "[ptr-compr][x64] Temporarily enable pointer compression on x64"
This is a reland of 589d1a6b75

Relanding after fixing TSan and UBSan issues.

Original change's description:
> [ptr-compr][x64] Temporarily enable pointer compression on x64
>
> ... and make sure that the x64 ptr-compr bots proceed testing V8 without
> pointer compression in order to keep testing the full pointer mode.
>
> Bug: v8:7703
> Change-Id: Iee725deda813425a6f0722948b54976154f50909
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1497139
> Reviewed-by: Michael Hablich <hablich@chromium.org>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60230}

Cq-Include-Trybots: luci.v8.try:v8_linux64_ubsan_rel_ng,v8_linux64_tsan_rel
Bug: v8:7703
Change-Id: Ied4e7bacf99c9d63e0459613fec522273f595de8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1523327
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60339}
2019-03-19 17:19:57 +00:00
Paolo Severini
3cda21de77 V8 x64 backend doesn't emit ABI compliant stack frames
On 64 bit Windows, the OS stack walking does not work because the V8 x64
backend doesn't emit unwinding info and also because it doesn't emit ABI
compliant stack frames. See
https://docs.google.com/document/d/1-wf50jFlii0c_Pr52lm2ZU-49m220nhYMrHDi3vXnh0/edit
for more details.

This problem can be fixed by observing that V8 frames usually all have the same
prolog and epilog:

push rbp,
mov rbp, rsp
...
pop rbp
ret N

and that it is possible to define XDATA (UNWIND_CODEs) that specify how Windows
should walk through V8 frames. Furthermore, since V8 Code objects are all
allocated in the same code-range for an Isolate, it is possible to register a
single PDATA/XDATA entry to cover stack walking for all the code generated
inside that code-range.

This PR contains changes required to enable stack walking on Win64:

EmbeddedFileWriter now adds assembler directives to the builtins
snapshot source file (embedded.cc) to emit additional entries in the .pdata and
in the .xdata section of the V8 executable. This takes care of stack walking
for embedded builtins. (The case of non-embedded builtins is not supported).
The x64 Assembler has been modified to collect the information required to emit
this unwind info for builtins.

Stack walking for jitted code is handled is Isolate.cpp, by registering
dynamically PDATA/XDATA for the whole code-range address space every time a new
Isolate is initialized, and by unregistering them when the Isolate is
destroyed.

Stack walking for WASM jitted code is handled is the same way in
wasm::NativeModule (wasm/wasm-code-manager.cpp).

It is important to note that Crashpad and Breakpad are already registering
PDATA/XDATA to manage and report unhandled exceptions (but not for embedded
builtins). Since it is not possible to register multiple PDATA entries for the
same address range, a new function is added to the V8 API:
SetUnhandledExceptionCallback() can be used by an embedder to register its own
unhandled exception handler for exceptions that arise in v8-generated code.
V8 embedders should be modified accordingly (code for this is in a separate PR
in the Chromium repository:
https://chromium-review.googlesource.com/c/chromium/src/+/1474703).

All these changes are experimental, behind:

the 'v8_win64_unwinding_info' build flag, and
the '--win64-unwinding-info' runtime flag.

Bug: v8:3598
Change-Id: Iea455ab6d0e2bf1c556aa1cf870841d44ab6e4b1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1469329
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Paolo Severini <paolosev@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#60330}
2019-03-19 14:36:17 +00:00
Peter Marshall
da66158fe1 [platform] Implement delayed tasks in the default worker runner
This was unimplemented but is needed for Perfetto which posts delayed
tasks on worker threads e.g. drain the trace buffer into a file every x
seconds.

This is implemented by adding a second queue which holds the delayed
tasks in chronological order of 'next-to-execute'. We use an
std::multimap for the queue so that we can easily get the next delayed
task with begin().

The implementation will move delayed tasks into the main task queue
when their deadline expires.

Drive-by cleanup of the runner destructor which can just use = default.

Bug: v8:8339

Change-Id: I3629c5d6e15ced2fc47eb1b7519a2dbbf8461fce
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1521114
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60320}
2019-03-19 11:28:30 +00:00
Z Duong Nguyen-Huu
f78963de06 Port ProxyRevoke to Torque
This is a part of effort to port Proxy-related builtins to Torque.

Spec: https://tc39.github.io/ecma262/#sec-proxy-revocation-functions
Bug: v8:6664
Change-Id: I283a4d8109a31c7e91f1cea8eb7a6e819e60b1cc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1521921
Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60311}
2019-03-18 21:50:53 +00:00
peterwmwong
a4ea15575f [builtins] Port TFS StringRepeat to Torque.
Bug: v8:8996
Change-Id: I035c380768c324d8912aa8bc414d533dbf7f3e5a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1524640
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60292}
2019-03-18 13:09:06 +00:00
Igor Sheludko
43fa6bc9d2 Revert "[build] Suppress UBSan alignment checks in pointer compression"
This reverts commit 6861278461.

Reason for revert: I'll follow Jakob's suggestion and fix unaligned accesses in C++ with ReadUnalignedValue().

Original change's description:
> [build] Suppress UBSan alignment checks in pointer compression
> 
> It is a design decision of pointer compression to allow unaligned pointers,
> so disable this check in UBSan.
> 
> Bug: v8:7703
> Change-Id: I3fab34e77ad755cdef3cd385a3615e3d0e350c16
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1523346
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Auto-Submit: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60235}

TBR=jkummerow@chromium.org,machenbach@chromium.org,leszeks@chromium.org,verwaest@chromium.org

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

Bug: v8:7703
Change-Id: I17e669e7b5e2dea8f0686911730d27f3d2732b85
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1526200
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60283}
2019-03-18 12:31:48 +00:00
peterwmwong
4b9b23521e [builtins] Port String.prototype HTML functions to Torque
Consolidates all the work into a single TFS builtin (CreateHTML)
called by all these functions. Reduces the builtin size by
about half.

Change-Id: I92b2c7889f72db4c8c79d7ef0ce0e61036ab619e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1522727
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60248}
2019-03-14 22:12:18 +00:00
Maciej Goszczycki
e3aad1c84b [heap] Add read-only heap sharing behind a flag
Piggybacking of splitting heap setup, this change adds a shared
read-only heap and a flag to enable it.

Also makes CallOnce use std::function instead of a raw function
pointer so the CL can use lambdas with CallOnce.

Bug: v8:7464
Change-Id: I9a97fb1baa6badca39a7381de3fd9e01f5969340
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1518180
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Maciej Goszczycki <goszczycki@google.com>
Cr-Commit-Position: refs/heads/master@{#60241}
2019-03-14 14:57:08 +00:00
Leszek Swirski
6861278461 [build] Suppress UBSan alignment checks in pointer compression
It is a design decision of pointer compression to allow unaligned pointers,
so disable this check in UBSan.

Bug: v8:7703
Change-Id: I3fab34e77ad755cdef3cd385a3615e3d0e350c16
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1523346
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60235}
2019-03-14 10:48:17 +00:00
Maya Lekova
77f9b28767 Revert "[ptr-compr][x64] Temporarily enable pointer compression on x64"
This reverts commit 589d1a6b75.

Reason for revert: Breaking UBSan - https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20UBSan/5219

Original change's description:
> [ptr-compr][x64] Temporarily enable pointer compression on x64
> 
> ... and make sure that the x64 ptr-compr bots proceed testing V8 without
> pointer compression in order to keep testing the full pointer mode.
> 
> Bug: v8:7703
> Change-Id: Iee725deda813425a6f0722948b54976154f50909
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1497139
> Reviewed-by: Michael Hablich <hablich@chromium.org>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60230}

TBR=machenbach@chromium.org,hablich@chromium.org,ishell@chromium.org,verwaest@chromium.org

Change-Id: I5a9f04acba1ef23ae944d97a029ea018808c7fcb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7703
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1522991
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60231}
2019-03-14 09:28:48 +00:00
Igor Sheludko
589d1a6b75 [ptr-compr][x64] Temporarily enable pointer compression on x64
... and make sure that the x64 ptr-compr bots proceed testing V8 without
pointer compression in order to keep testing the full pointer mode.

Bug: v8:7703
Change-Id: Iee725deda813425a6f0722948b54976154f50909
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1497139
Reviewed-by: Michael Hablich <hablich@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60230}
2019-03-14 09:16:26 +00:00
Z Duong Nguyen-Huu
5af460f527 Reland Remove builtin-function-id in SFI
This is the reland of https://chromium-review.googlesource.com/c/v8/v8/+/1495898

builtin_function_id corresponded to BuiltinFunctionId (a manually maintained list of 'interesting' functionsmainly used during optimization). With this change, we nuke builtin-function-id in favor of builtin-id and 8 bits is freed up in SFI.

Bug: v8:6993
Change-Id: I7e1681cc2a95864c71ce8bdda075481310607166
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1506445
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#60131}
2019-03-08 18:40:05 +00:00
Mike Stanton
041a996dbb [Torque] More TypedArray builtins in Torque.
This CL contains find, findIndex, every and some. Now that we've
established the pattern on the torque side for iterating array
builtins, it's a very easy port, which nonetheless decreases
code size in the snapshot, w00t!

Bug: v8:8906
Change-Id: I3082d8e3e298e55733a42d6b441e5812b7f12f3d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1496976
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60128}
2019-03-08 15:28:10 +00:00
Mike Stanton
d6465298b6 [Torque] Port Array.prototype.shift to Torque
Optimizations to use fast memmove to move elements are preserved, as
well as heuristics for bailout to the runtime if left or right
trimming is desired.

Bug: v8:7672
Change-Id: I01ffc1143b63d705d99a40eab3a7e873596d0aa4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1499495
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60118}
2019-03-08 11:26:12 +00:00
Igor Sheludko
ad49f12908 [cleanup] Move Compressed[XXX]Slot definitions to separate header
... and fix header includes to please the respective bot.

Drive-by-fix: decompression implementation is now MSVC friendly.

Bug: v8:7703, v8:8834
Change-Id: Iaf589138e5bafb32b0d9feab5cf074b71f241a3c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1505579
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60074}
2019-03-06 19:41:21 +00:00
peterwmwong
7c89c29b78 [typedarray] Port TypedArray#filter to Torque.
Also ports GrowableFixedArray to Torque. The CSA version is preserved
for now, as the Torque structs are not consumable by CSA builtins yet
(Struct methods are inlined).

TypedArrayPrototypeFilter builtin size decreased by 24% (Mac x64.release):
  TFJ Builtin, TypedArrayPrototypeFilter, 5689 -> 4298

TypedArrays/Filter micro benchmarks have improved 10-15% (Mac x64.release):
  TypedArrays-Uint8Array(Score):     746 -> 857
  TypedArrays-Uint16Array(Score):    758 -> 862
  TypedArrays-Uint32Array(Score):    746 -> 855
  TypedArrays-Float32Array(Score):   749 -> 817
  TypedArrays-Float64Array(Score):   751 -> 839
  TypedArrays-BigUint64Array(Score): 562 -> 625

Bug: v8:8906
Change-Id: I1172b7407de95b067448e680ec327e726e9194cf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1501469
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60035}
2019-03-05 15:15:40 +00:00
Yang Guo
6eb66e1cbd Revert "Remove builtin-function-id in SFI"
This reverts commit f8a676707d.

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

I don't think I've seen MSAN being flaky. Chances are that the change to SFI's object layout indeed left some field uninitialized.

Original change's description:
> Remove builtin-function-id in SFI
> 
> builtin_function_id corresponded to BuiltinFunctionId (a manually maintained list of 'interesting' functionsmainly used during optimization). With this change, we nuke builtin-function-id in favor of builtin-id and 8 bits is freed up in SFI.
> 
> Bug: v8:6993
> Change-Id: Iee9b539475bc6531c9aa65b1904d1402a9ef30db
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1495898
> Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60017}

TBR=ulan@chromium.org,jgruber@chromium.org,leszeks@chromium.org,bmeurer@chromium.org,duongn@microsoft.com

Change-Id: Ic3964ce182ddbd7ef529ddb8b78b9bdfb1be7887
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6993
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1499500
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60018}
2019-03-04 19:54:05 +00:00
Z Duong Nguyen-Huu
f8a676707d Remove builtin-function-id in SFI
builtin_function_id corresponded to BuiltinFunctionId (a manually maintained list of 'interesting' functionsmainly used during optimization). With this change, we nuke builtin-function-id in favor of builtin-id and 8 bits is freed up in SFI.

Bug: v8:6993
Change-Id: Iee9b539475bc6531c9aa65b1904d1402a9ef30db
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1495898
Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60017}
2019-03-04 18:41:02 +00:00
Simon Zünd
f35ad6ecd4 [torque-ls] Port tests from cctest to unittest
Moving to gtest allows negative test cases as the current parser
implementation exits the process on a parser error. The CL adds two
small negative tests. The idea is less to get full coverage, but to
have a place for regression tests.

Drive-by-change: Lexer errors need a valid source position scope and
Json parser needs a valid SourceId, otherwise we read OOB when the
error message is generated.

R=petermarshall@chromium.org

Bug: v8:8880
Change-Id: I56c4b9e0a29c8333b2e5e44f8116e5178552d2f0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1498472
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60014}
2019-03-04 17:04:02 +00:00
peterwmwong
acdaa4c713 [typedarray] Port TypedArray#slice to Torque.
Bug: v8:8906
Change-Id: I7a07482d2d5de13de11fa2611e3c6ae18439e820
Reviewed-on: https://chromium-review.googlesource.com/c/1493136
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60007}
2019-03-04 14:10:51 +00:00
Mike Stanton
40c9cce4dd [Torque] Move some TypedArray builtins to Torque
This CL moves the following builtins from CSA to Torque:

TypedArray.prototype.forEach
TypedArray.prototype.reduce
TypedArray.prototype.reduceRight

A space-saving decision was made in the design -- instead of emitting
versions of the central loop for each ElementsKind, a function
pointer which knows how to read from the appropriate TypedArray
ElementsKind is constructed at the outset, and passed into the
loop. This enormously reduces codesize for the TypedArray builtins.
We'll have to see if the overhead of the builtin call affects
performance too adversely.

BUG: v8:8906
Change-Id: I808cd70f58ddbde18f85e5b2a9be0b883a3f6647
Reviewed-on: https://chromium-review.googlesource.com/c/1484292
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59970}
2019-03-01 12:46:25 +00:00
Simon Zünd
9911fd13cc [torque-ls] Add prototype language server implementation for Torque
Design Doc: https://goo.gl/9G9d9k

The initial prototype consists of a few parts:

The VS Code extension is now built using TypeScript. The build artifact
is checked-in along side the extension. The extension now starts up
the language server when it is activated. The path to the LS
executable is configurable via VS Code settings.

The language server is a separate executable. It adds a light-weight
object model on top of a Json Parser for reading/writing LSP requests
and responses. The current server is very much bare-bones featurewise:
    - Tell the client that the server can handle "goto definition"
    - Recompile when Torque files change
    - Goto definition support for Macros/Builtins, local variables
      and arguments.

R=mathias@chromium.org, mvstanton@chromium.org, tebbi@chromium.org

Bug: v8:8880
Change-Id: Ie9b433e64ee63e9aa757b6bf71e5d52beb15b079
Reviewed-on: https://chromium-review.googlesource.com/c/1494354
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59960}
2019-03-01 09:30:47 +00:00
Maciej Goszczycki
b0bcd45d83 [heap] Isolate read-only space creation
This provides a single point where read-only space sharing will be
controlled. Eventually ReadOnlyDeserializer will take ReadOnlyHeap
instead of Isolate, first steps include
https://chromium-review.googlesource.com/c/v8/v8/+/1483054

Bug: v8:7464
Change-Id: I213819aeca6fca335235025c9195edf474230eda
Reviewed-on: https://chromium-review.googlesource.com/c/1489087
Commit-Queue: Maciej Goszczycki <goszczycki@google.com>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59954}
2019-02-28 16:56:07 +00:00
Simon Zünd
3f057d44de [torque] Introduce LanguageServerData class
This CL introduces a new contextual 'LanguageSererData'. Its purpose
is to hold all the eagerly calculated data needed to answer
language server requests. The first thing collected are the
definitoins of some IdentifierExpresisons and macro/builtin
call-sites.

Collecting this data is not necessary for normal compilation, so it
is disabled by default and can be enabled via a Torque compiler
option. Since the holder class is a contextual for which no scope
exists during normal compilation, accidental collection of
unnecessary language server data *should* be prevented.

R=tebbi@chromium.org

Bug: v8:7793
Change-Id: Iffcebad4c420a0a51b1ed3c37a37c3475c6ab2e8
Reviewed-on: https://chromium-review.googlesource.com/c/1491594
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59941}
2019-02-28 12:11:24 +00:00
Michael Achenbach
459125197f [test] Skip test with gcc build
Also enable test runner to differentiate between clang and gcc.

Bug: v8:8919
Change-Id: Icdcae0aba3644a1b1b9ddc6c037eabde27d717f7
Reviewed-on: https://chromium-review.googlesource.com/c/1491634
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59906}
2019-02-27 14:46:02 +00:00
Mike Stanton
ada192fe21 [Torque] Port Array.prototype.find and findIndex to Torque
Happily, with the port of Array.prototype.find and findIndex, we can
remove a large set of library functions from array-builtins-gen.cc.

BUG: v8:7672
Change-Id: I74e07fe00162b34b2246c868386d4551ba4dc032
Reviewed-on: https://chromium-review.googlesource.com/c/1484296
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59902}
2019-02-27 14:12:38 +00:00
peterwmwong
1937e2b128 Reland "[typedarray] Port TA#subarray and TypedArraySpeciesCreate to Torque"
This is a reland of 19291bfc58

Same as original, but with ThrowTypeError/ThrowRange updated to use an implicit context.

Original change's description:
> [typedarray] Port TA#subarray and TypedArraySpeciesCreate to Torque
>
> Reduces TypedArrayPrototypeSubArray builtin size by 392 bytes:
>   - TFJ Builtin, TypedArrayPrototypeSubArray, 2448 -> 2056
>
> Small 3-4% perf increase on JSTests/TypedArrays/SubarrayNoSpecies benchmark
>
> Bug: v8:7161, v8:8906
> Change-Id: Ia2b906a93db7199ca4592c46c40638cca0a33eec
> Reviewed-on: https://chromium-review.googlesource.com/c/1485241
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> Reviewed-by: Simon Zünd <szuend@chromium.org>
> Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
> Cr-Commit-Position: refs/heads/master@{#59894}

Bug: v8:7161, v8:8906
Change-Id: Ic3784e2d4db262b1968ba467b7b46b98203f11d4
Reviewed-on: https://chromium-review.googlesource.com/c/1491533
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Cr-Commit-Position: refs/heads/master@{#59901}
2019-02-27 14:11:33 +00:00
Peter Wong
f0c90e2f9e Revert "[typedarray] Port TA#subarray and TypedArraySpeciesCreate to Torque"
This reverts commit 19291bfc58.

Reason for revert: https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket.appspot.com/8920369361383698384/+/steps/build/0/steps/compile/0/stdout

ThrowTypeError's method signature changed this morning


Original change's description:
> [typedarray] Port TA#subarray and TypedArraySpeciesCreate to Torque
> 
> Reduces TypedArrayPrototypeSubArray builtin size by 392 bytes:
>   - TFJ Builtin, TypedArrayPrototypeSubArray, 2448 -> 2056
> 
> Small 3-4% perf increase on JSTests/TypedArrays/SubarrayNoSpecies benchmark
> 
> Bug: v8:7161, v8:8906
> Change-Id: Ia2b906a93db7199ca4592c46c40638cca0a33eec
> Reviewed-on: https://chromium-review.googlesource.com/c/1485241
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> Reviewed-by: Simon Zünd <szuend@chromium.org>
> Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
> Cr-Commit-Position: refs/heads/master@{#59894}

TBR=peter.wm.wong@gmail.com,jgruber@chromium.org,petermarshall@chromium.org,szuend@chromium.org

Change-Id: Ic0eaa07e57df3c365b52fb3c5de8eb7c3d9f71e9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7161, v8:8906
Reviewed-on: https://chromium-review.googlesource.com/c/1491532
Reviewed-by: Peter Wong <peter.wm.wong@gmail.com>
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Cr-Commit-Position: refs/heads/master@{#59896}
2019-02-27 12:22:34 +00:00
peterwmwong
19291bfc58 [typedarray] Port TA#subarray and TypedArraySpeciesCreate to Torque
Reduces TypedArrayPrototypeSubArray builtin size by 392 bytes:
  - TFJ Builtin, TypedArrayPrototypeSubArray, 2448 -> 2056

Small 3-4% perf increase on JSTests/TypedArrays/SubarrayNoSpecies benchmark

Bug: v8:7161, v8:8906
Change-Id: Ia2b906a93db7199ca4592c46c40638cca0a33eec
Reviewed-on: https://chromium-review.googlesource.com/c/1485241
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Cr-Commit-Position: refs/heads/master@{#59894}
2019-02-27 12:17:23 +00:00
Sigurd Schneider
31a8f21576 [cleanup] Move ZoneSplayTree to its own header
Change-Id: I4bd02bdb68727b6242b0fe4b81fd522813b13f39
Bug: v8:8834
Reviewed-on: https://chromium-review.googlesource.com/c/1488755
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59875}
2019-02-26 15:39:39 +00:00
Simon Zünd
45dfb6c340 [torque-ls] Implement basic Json parser for the language server
This CL contains a basic Json parser used to read and write the
Json-RPC messages of the language server protocol.

This CL is part of the initial language server implementation but
submitted separately for easier review.

R=tebbi@chromium.org

Bug: v8:8880
Change-Id: Icea040975e1ed1d587954c3342d8d876e01c26b8
Reviewed-on: https://chromium-review.googlesource.com/c/1479956
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59848}
2019-02-26 07:38:03 +00:00
Mike Stanton
45ed388d3b Reland "[Torque] Port Array.prototype.reduce and reduceRight to Torque"
A custom deoptimization continuation point erroneously cast a parameter
to a number. Tests added.

BUG: v8:7672
Change-Id: I59848aacdedc1de9fd7d83d55045618f37d39fb0
Reviewed-on: https://chromium-review.googlesource.com/c/1485974
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59841}
2019-02-25 17:05:23 +00:00
Sigurd Schneider
de0a8c789e Revert "[Torque] Port Array.prototype.reduce and reduceRight to Torque"
This reverts commit b3d8eeb6eb.

Reason for revert: https://ci.chromium.org/p/chromium/builders/luci.chromium.try/win7-rel/25961

Original change's description:
> [Torque] Port Array.prototype.reduce and reduceRight to Torque
> 
> BUG: v8:7672
> Change-Id: I8816ab9051e7900119fd65c239f9e207f5c3d417
> Reviewed-on: https://chromium-review.googlesource.com/c/1478697
> Commit-Queue: Michael Stanton <mvstanton@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59807}

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

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

Change-Id: Ib15bd4499618a22185d8ef173c4df7b7d55f54ce
Reviewed-on: https://chromium-review.googlesource.com/c/1485971
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59828}
2019-02-25 13:30:16 +00:00
Ross McIlroy
ec9aef3d1e [Runtime] Ensure template objects are retained if bytecode is flushed.
Template objects should be cached after they are first created and reused on
subsiquent calls to tag functions. Currently these cached objects are stored
on the feedback vector, which has appropriate lifetime, however with bytecode
flushing the feedback vector could be cleared when the bytecode is flushed,
causing the template object to be dropped.

In order to retain the cached template objects in the face of bytecode flushing,
this CL adds a weakmap for each native context that is (weakly) keyed by
shared function info, and holds a linked list of cached template objects
associated with that shared function info, indexed by feedback vector slot id.
Misses will check this weakmap, and if no entry is found, a new template object
is created and added into this weakmap alongside the feedback vector.

BUG=v8:8799,v8:8799,v8:8395

Change-Id: Ia95d5cfc394ce58dc9fe6a1e49780f05299acc17
Reviewed-on: https://chromium-review.googlesource.com/c/1477746
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59818}
2019-02-25 11:20:06 +00:00
Tobias Tebbi
05715e53a0 [build][torque] include src/globals.h in Torque
Bug: v8:8863
Change-Id: I8907b7b0b7dfa53a2e1e607c0bad26939d312f4e
Reviewed-on: https://chromium-review.googlesource.com/c/1485836
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59816}
2019-02-25 11:15:06 +00:00
Mike Stanton
b3d8eeb6eb [Torque] Port Array.prototype.reduce and reduceRight to Torque
BUG: v8:7672
Change-Id: I8816ab9051e7900119fd65c239f9e207f5c3d417
Reviewed-on: https://chromium-review.googlesource.com/c/1478697
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59807}
2019-02-23 03:56:32 +00:00
Simon Zünd
6b132181eb [torque] Extract compiler into separate function for easier reusability
R=tebbi@chromium.org

Bug: v8:7793
Change-Id: I948b77a50cead2d031d007d06e9a4892a55b2408
Reviewed-on: https://chromium-review.googlesource.com/c/1477223
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59717}
2019-02-20 06:17:07 +00:00