Commit Graph

54567 Commits

Author SHA1 Message Date
Seth Brenith
e97dfa6746 [torque] convert a handful of simple class layout definitions to Torque
I tried to use more specific union types where appropriate, even though
many of these fields are accessed as Object from C++.

Bug: v8:7793
Change-Id: I771d9b6459bdc1413019f8ff5ddfd611d1adf61f
Reviewed-on: https://chromium-review.googlesource.com/c/1490573
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59975}
2019-03-01 14:22:18 +00:00
Junliang Yan
d71374b1b0 PPC/s390: [arm] Port the skipping of arguments adaptor frames.
Port 4f62b4bb61

Original Commit Message:

    This is a port of the improvements to the ArgumentsAdaptorTrampoline
    that previously landed for x64. It skips the arguments adaptor frame
    creation if the callee cannot observe the actual arguments (as indicated
    by the "is_safe_to_skip_arguments_adaptor" bit on the SharedFunctionInfo),
    and instead just massages the current stack frame appropriately (either
    by pushing more undefineds in case of under application, or by removing
    the superfluous arguments in case of over application).

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

Change-Id: I94824c4b3d94f7c93c7526c865b82649426cd3a4
Reviewed-on: https://chromium-review.googlesource.com/c/1495014
Reviewed-by: Milad Farazmand <miladfar@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#59974}
2019-03-01 14:13:07 +00:00
Milad Farazmand
c8d0dae842 [torque-ls] Adding a required header needed for sorting
gcc requires the <algorithm> header for compiling std::sort. This issue
is not present when using Clang.

Change-Id: Ief7bfd6152754f71194c784b09dce39e357ddd5c
Reviewed-on: https://chromium-review.googlesource.com/c/1496280
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59973}
2019-03-01 14:02:26 +00:00
Sigurd Schneider
c924896fba [mjsunit] Skip test on ARM
TBR=ulan@chromium.org

Change-Id: Ic886973633b3631a336b5e549bb4c910d82fe57e
Notry: true
Reviewed-on: https://chromium-review.googlesource.com/c/1495988
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59972}
2019-03-01 13:55:46 +00:00
Michael Achenbach
6b8f202b4f [build] Switch off goma on gcc trybots
NOTRY=true

Bug: chromium:933093
Change-Id: I0945adb70bcecb7542281eae39ce55929ad002ed
Reviewed-on: https://chromium-review.googlesource.com/c/1495985
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59971}
2019-03-01 13:34:05 +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
7eae3a63bf [torque] Update README.md for the extension to include build step
R=mathias@chromium.org

Bug: v8:8880
Change-Id: I6954ede6669f19d970ad4257fa4699da2db62fd3
Reviewed-on: https://chromium-review.googlesource.com/c/1495982
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59969}
2019-03-01 12:33:35 +00:00
Simon Zünd
756fdf6e10 [torque-ls][cleanup] JsonValue accessors are now checked
Instead of accessing JsonValue struct fields directly, typed
accessors check that the tag matches with the type access.

Drive-by: The factory methods are now static methods on the JsonValue
type itself, making call-sites more readable.

R=tebbi@chromium.org

Bug: v8:8880
Change-Id: I49b37b3ba8eaf1153b8aa93ea08913077c923fdc
Reviewed-on: https://chromium-review.googlesource.com/c/1495559
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59968}
2019-03-01 12:32:27 +00:00
Toon Verwaest
a83523d594 [scanner] Reuse SkipSingleLineComment in SkipSourceURLComment
Change-Id: Ie8109300ce134f3f9d0c1619f1375c29af2c8fa6
Reviewed-on: https://chromium-review.googlesource.com/c/1494758
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59967}
2019-03-01 12:00:34 +00:00
Ben L. Titzer
70a7287c96 [tools] Fix gdbinit cast error
R=clemensh@chromium.org

Change-Id: I1dec320464f5bc80e248cdf0b31b4a095bc54994
Reviewed-on: https://chromium-review.googlesource.com/c/1495981
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59966}
2019-03-01 11:52:54 +00:00
Andreas Haas
dd23f2f316 [wasm][interpreter] Support calls to imported JS functions in cctests
The interpreter is set up specially in cctests to allow more direct
testing. This requires sometimes to write special testing code in the
interpreter which is different than production code. This CL fixes one
instance of testing code which deals with indirect calls.

In production code, indirect calls go through the indirect function
table which can change over time. In cctests, however, the indirect
function table is not set up completely. In cctests the interpreter
uses information from the module instead to acquire the target of an
indirect call. In that testing code, calls to imported JS functions
were not handled. This handling gets added with this CL.


CC=fgm@chromium.org
R=titzer@chromium.org

Bug: v8:7431
Change-Id: I3b90d4ea8fec2633c010dd8359814440c7988509
Reviewed-on: https://chromium-review.googlesource.com/c/1495560
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59965}
2019-03-01 11:30:10 +00:00
tzik
06770cef6c Mark a non-primary path of ExtractHandlerContext as deferred
The performance regression comes from the extra time of
ExtractHandlerContext called by TriggerPromiseReaction,
On the previous code, it takes the current Context from Isolate,
and on the typical case of the new code, the Context is taken from
the promise reaction function, that adds a few memory read ops and
a few conditional branches.

This CL adds Label::kDeferred to non-typical cases of
ExtractHandlerContext, so that newly added instructions have smaller
impact under the speculative execution.
On a local benchmark, this fixes half of the regression.

Bug: chromium:936717
Change-Id: I34ce858f77d7d604dd596711a239160ed8dac383
Reviewed-on: https://chromium-review.googlesource.com/c/1496774
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59964}
2019-03-01 10:24:49 +00:00
Yu Yin
7eaaab2976 [MIPS] fix build error.
update the missing file in a2d9924.
see https://chromium-review.googlesource.com/c/1470129

port 591408c to mips.
see https://chromium-review.googlesource.com/c/1482915

Update the missing file in a4b19dc.
see https://chromium-review.googlesource.com/c/1460474

Update the missing file in ad3546a.
see https://chromium-review.googlesource.com/c/1434036

Fix compiler warnings.

Change-Id: Ie47b1d5aaa3c7f558def92255ce135b0fc0406ec
Reviewed-on: https://chromium-review.googlesource.com/c/1490995
Commit-Queue: Michael Hablich <hablich@chromium.org>
Reviewed-by: Predrag Rudic <prudic@wavecomp.com>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59963}
2019-03-01 10:11:39 +00:00
Clemens Hammacher
8e0b2d1f70 [wasm] Remove compile job when finishing the module
The {AsyncCompileJob} can now always be deleted when initial
compilation finished. The previous conditions are redudant, since
{baseline_compilation_finished()} is always true when calling
{FinishModule()}.

R=ahaas@chromium.org

Bug: v8:8689
Change-Id: I95c0cf83943630b83216c83db0edbabdfbd71284
Reviewed-on: https://chromium-review.googlesource.com/c/1494008
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59962}
2019-03-01 09:57:17 +00:00
Tamer Tas
a6426cb888 [testrunner] remove the extra characters in progress indicator
After python3 migration, the new print usage started causing leftover character
issues.

This CL fixes the print usage.

R=clemensh@chromium.org,neis@chromium.org
CC=machenbach@chromium.org

Bug: v8:8918
Change-Id: Ibee06677c3bae3e1141579693aa16a539309a566
Reviewed-on: https://chromium-review.googlesource.com/c/1495558
Commit-Queue: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59961}
2019-03-01 09:37:37 +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
Clemens Hammacher
3f8b031647 [zone] Remove segment pooling from accounting allocator
This pooling introduces severe lock contention for Liftoff compilation,
since each compilation uses its own Zone which does at least one
segment allocation.
It's also unclear whether pooling improves performance, since {malloc}
should implement a similar pooling mechanism, but better optimized for
multithreaded uses.

Feel free to revert if this introduces significant regressions.

R=verwaest@chromium.org

Bug: v8:8916
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
Change-Id: Iaf988bed898e35700f5f7f3310df8e01918de4c9
Reviewed-on: https://chromium-review.googlesource.com/c/1491632
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59959}
2019-03-01 09:25:48 +00:00
Matt Gardner
803ad32414 Reland "Optimize in operator"
The original was reverted for breaking webkit layout tests:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8-Blink%20Linux%2064/30270

It also caused the following clusterfuzz failures:

chromium:935832
This was a correctness bug due to not properly handling the case of arrays with prototypes other
than Array.prototype. Accesses that were TheHole were not being handled property, both in bounds
holes in holey arrays and out of bounds on either holey or packed arrays. Handling was incorrect
both in access-assembler and in Turbofan.

chromium:935932
This bug was that there was no handling for Has checks on the global object. Turbofan was emitting
code for a store (the 'else' condition on 'access_mode == AccessMode::kLoad'). It hit a DCHECK in
debug builds but in release could show up in different places. This is the bug that caused the
webkit layout test failure that led to the revert.

Both bugs are fixed by in CL, and tests are added for those cases.

Bug: v8:8733, chromium:935932, chromium:935832
Change-Id: Iba0dfcfce6e15d2c0815a7670ece67bc13ba1925
Reviewed-on: https://chromium-review.googlesource.com/c/1493132
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Matt Gardner <magardn@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#59958}
2019-03-01 09:01:18 +00:00
v8-ci-autoroll-builder
b8c79ff6e0 Update V8 DEPS.
Rolling v8/build: 325e95d..04fc46b

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/827da84..9950df1

Rolling v8/third_party/depot_tools: fe34723..a6d41e2

Rolling v8/third_party/icu: 960f195..8c67416

Rolling v8/tools/clang: a287525..257c91c

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

Change-Id: I19df61991d87ab439d3dd2c88368081dc5632be3
Reviewed-on: https://chromium-review.googlesource.com/c/1495899
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#59957}
2019-03-01 03:41:30 +00:00
Johannes Henkel
6141741064 [DevTools] Roll of inspector protocol ...
... to b13e24ccee66d7e0590ce1266db9c906e3648561

to support UTF16 strings with binary protocol (v8).

Original review here:
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1493312

Change-Id: I401c5d52d233805dc681bb23b40df99f2ea14992
Reviewed-on: https://chromium-review.googlesource.com/c/1493291
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59956}
2019-03-01 02:10:29 +00:00
Tom Tan
75d972a6fd Move Assembler::AbortedCodeGeneration() from .h to .cc for arm64
Assembler::AbortedCodeGeneration() is defined in assembler-arm64.h, but it calls
into Constant::Clear() which is defined in assembler-arm64.cc. This introduces
dependency to v8_base component when including assembler-arm64.h which is not
always possible like for V8 unittests target. To fix this, we could define both
in the same file, like Assembler::IsConstPoolEmpty() calls Constant::Clear() and
both are defined in assembler-arm64.h, so it works fine.

Bug: chromium:893460
Change-Id: I895cf0147950fca20142ea5ed18bcd020c1ab866
Reviewed-on: https://chromium-review.googlesource.com/c/1493293
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59955}
2019-02-28 19:40:59 +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
Toon Verwaest
506f79b88f [scanner] Remove superfluous cases from switch in ScanEscape
Change-Id: I4d774452e4537ba507bab87ac0a197d17a2f2862
Reviewed-on: https://chromium-review.googlesource.com/c/1494759
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59953}
2019-02-28 16:17:31 +00:00
Dan Elphick
3ce662f4e6 [cleanup] Make MentionedObjectCache GC-safe
This changes DebugObjectCache to be a vector of Handles rather than
tagged pointers, meaning it's not GC-safe.

This will allow PrintStack to allocate memory if required (if for
instance source positions must be regenerated).

Bug: v8:8834, v8:8510
Change-Id: Ieec9a827af9abbcb9b5b237d79984eedf0cdcc57
Reviewed-on: https://chromium-review.googlesource.com/c/1494755
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59952}
2019-02-28 16:03:41 +00:00
Leszek Swirski
8d940b913a [ignition] Use dead code elimination for implicit returns
Rather than manually tracking basic blocks in the bytecode array builder,
use the existing dead code elimination to generate an implicit return iff
the block ending the bytecode is not dead by the time all statements have
been visited.

Change-Id: I9520486a523ec4e01bc203e9a847eb1f57b130b6
Reviewed-on: https://chromium-review.googlesource.com/c/1494756
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59951}
2019-02-28 15:55:41 +00:00
Clemens Hammacher
919e6b4fbb [zone] Minor cleanups in zone segments
1) Rename {size()} to {total_size()} because
   {size() != end() - start()}.
2) Avoid undefined behaviour when creating segments, i.e. construct
   them via a constructor.
3) Minor drive-by cleanups.

R=mstarzinger@chromium.org

Bug: v8:8834
Change-Id: I3de47b2a775cf277e2f01ba5482afbd400acd06c
Reviewed-on: https://chromium-review.googlesource.com/c/1493926
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59950}
2019-02-28 15:52:01 +00:00
Clemens Hammacher
eb573b71c4 Switch ThreadId to std::atomic
Avoid atomicops, use std::atomic instead.

R=ishell@chromium.org

Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
Bug: v8:8834, v8:8926
Change-Id: I07bc7bbe079fc4a138feb4d8fda91eb57046846d
Reviewed-on: https://chromium-review.googlesource.com/c/1491609
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59949}
2019-02-28 14:15:25 +00:00
Leszek Swirski
c7ebc5814f Reland "[ignition] Skip binding dead labels"
This is a reland of 35269f77f8

Switches on an expression that unconditionally throws would have all their
case statements dead, causing a DCHECK error in the SwitchBuilder. This
fixes up the DCHECK to allow dead labels.

Original change's description:
> [ignition] Skip binding dead labels
>
> BytecodeLabels for forward jumps may create a dead basic block if their
> corresponding jump was elided (due to it dead code elimination). We can
> avoid generating such dead basic blocks by skipping the label bind when
> no corresponding jump has been observed. This works because all jumps
> except JumpLoop are forward jumps, so we only have to special case one
> Bind for loop headers to bind unconditionally.
>
> Since Binds are now conditional on a jump existing, we can no longer rely
> on using Bind to get the current offset (e.g. at the beginning of a try
> block). Instead, we now expose the current offset in the bytecode array
> writer. Conveniently, this means that we can be a bit smarter about basic
> blocks around these statements.
>
> As a drive-by, remove the unused Bind(target,label) function.
>
> Bug: chromium:934166
> Change-Id: I532aa452fb083560d07b90da99caca0b1d082aa3
> Reviewed-on: https://chromium-review.googlesource.com/c/1488763
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59942}

TBR=rmcilroy@chromium.org

Bug: chromium:934166
Change-Id: If6eab4162106717ce64a2dc477000c6a76354cb4
Reviewed-on: https://chromium-review.googlesource.com/c/1494535
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59948}
2019-02-28 14:06:15 +00:00
Sigurd Schneider
8ee20f5e61 Revert "[ignition] Skip binding dead labels"
This reverts commit 35269f77f8.

Reason for revert: Fuzzer unhappy: https://ci.chromium.org/p/v8/builders/ci/V8%20Fuzzer/29792

Original change's description:
> [ignition] Skip binding dead labels
> 
> BytecodeLabels for forward jumps may create a dead basic block if their
> corresponding jump was elided (due to it dead code elimination). We can
> avoid generating such dead basic blocks by skipping the label bind when
> no corresponding jump has been observed. This works because all jumps
> except JumpLoop are forward jumps, so we only have to special case one
> Bind for loop headers to bind unconditionally.
> 
> Since Binds are now conditional on a jump existing, we can no longer rely
> on using Bind to get the current offset (e.g. at the beginning of a try
> block). Instead, we now expose the current offset in the bytecode array
> writer. Conveniently, this means that we can be a bit smarter about basic
> blocks around these statements.
> 
> As a drive-by, remove the unused Bind(target,label) function.
> 
> Bug: chromium:934166
> Change-Id: I532aa452fb083560d07b90da99caca0b1d082aa3
> Reviewed-on: https://chromium-review.googlesource.com/c/1488763
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59942}

TBR=rmcilroy@chromium.org,leszeks@chromium.org

Change-Id: I8118e54e0afa5e08b0a0a874c952f8a01f1c3242
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:934166
Reviewed-on: https://chromium-review.googlesource.com/c/1494534
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59947}
2019-02-28 13:16:28 +00:00
Clemens Hammacher
500260027f [wasm] Store function index in integer
We sometimes store function indexes and number of functions as {size_t}
and sometimes as {int}. Unify a few places to be {int}.

R=ahaas@chromium.org

Change-Id: I1d204cbd9388245f97f291a469b32743457ab2c0
Reviewed-on: https://chromium-review.googlesource.com/c/1491607
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59946}
2019-02-28 13:02:21 +00:00
Maciej Goszczycki
dd98ba3197 [cleanup] Remove unused function declaration
Bug: v8:8562
Change-Id: I1ad6d2febc9327e2ef93f0409f6fddf1cebb4834
Reviewed-on: https://chromium-review.googlesource.com/c/1494012
Reviewed-by: Dan Elphick <delphick@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Maciej Goszczycki <goszczycki@google.com>
Cr-Commit-Position: refs/heads/master@{#59945}
2019-02-28 12:53:54 +00:00
Mike Stanton
f5f5cd0818 [Torque] Continue reducing code-size in Array builtins
Since the performance implications of the patch
"[Torque] Reduce code size by combining FixedArray/FixedDoubleArray paths"
are negligible, I'll extend the pattern to all the array builtins,
providing a savings of about 20% per builtin.

Bug: v8:7672
Change-Id: Ib9aace4da38369842154065f5b4bcfb3ce2355d7
Reviewed-on: https://chromium-review.googlesource.com/c/1488768
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59944}
2019-02-28 12:47:44 +00:00
Sigurd Schneider
c41b66eebb [turbofan] Remove branch hints from loop bounds checks
Some array builtins used branch hints for loop bounds checks,
causing all code after the inlined builtin to become deferred
code. This is detrimental for performance. This CL removes the
hints, which improves code scheduling a lot, on the micro
benchmark from the linked bug by 3x.

Bug: v8:8922
Change-Id: I64faaf763a385c80d80b8be5a4fb8e75dd731693
Reviewed-on: https://chromium-review.googlesource.com/c/1494011
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59943}
2019-02-28 12:43:48 +00:00
Leszek Swirski
35269f77f8 [ignition] Skip binding dead labels
BytecodeLabels for forward jumps may create a dead basic block if their
corresponding jump was elided (due to it dead code elimination). We can
avoid generating such dead basic blocks by skipping the label bind when
no corresponding jump has been observed. This works because all jumps
except JumpLoop are forward jumps, so we only have to special case one
Bind for loop headers to bind unconditionally.

Since Binds are now conditional on a jump existing, we can no longer rely
on using Bind to get the current offset (e.g. at the beginning of a try
block). Instead, we now expose the current offset in the bytecode array
writer. Conveniently, this means that we can be a bit smarter about basic
blocks around these statements.

As a drive-by, remove the unused Bind(target,label) function.

Bug: chromium:934166
Change-Id: I532aa452fb083560d07b90da99caca0b1d082aa3
Reviewed-on: https://chromium-review.googlesource.com/c/1488763
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59942}
2019-02-28 12:17:34 +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
Sigurd Schneider
7da5552ece [turbolizer] Update deploy script
after previous change, which moved icons to .png format and
to subdirectory img/.

Bug: v8:7327
Notry: true
Change-Id: Iebbbe175cc65ed1f2e505084344a2b55864732e7
Reviewed-on: https://chromium-review.googlesource.com/c/1494009
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59940}
2019-02-28 11:46:32 +00:00
Sigurd Schneider
65bc5513ca [turbolizer] Show whether block is deferred in schedule view
Change-Id: I19abd54f3c7825a99cbebd370092259cf8c21945
Notry: true
Bug: v8:7327
Reviewed-on: https://chromium-review.googlesource.com/c/1494007
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59939}
2019-02-28 11:35:32 +00:00
Michael Achenbach
47608ce626 [foozzie] Add sanity checks to avoid bug flooding
This lets foozzie call d8 with sanity output before doing the actual
correctness comparisons. This will make clusterfuzz dedupe cases on
the difference found in the sanity checks.

Also adding missing OWNERS file.

NOTRY=true

Bug: chromium:933076
Change-Id: I4229183726064cc0ad76da8fe432e1dbb601a7ba
Reviewed-on: https://chromium-review.googlesource.com/c/1491221
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59938}
2019-02-28 11:27:32 +00:00
Clemens Hammacher
e340567df8 Reland "[zone] Teach ASan about the zone segment pool"
This is a reland of b2f8280e26, fixing
asan and msan invocations to use {Segment::capacity()} instead of
{Segment::size()}.

Original change's description:
> [zone] Teach ASan about the zone segment pool
>
> This adds proper poisoning/unpoisoning to segments put into the segment
> pool of an accounting allocator, and also marks a segment uninitialized
> when returning it from the pool. This gives ASan a better chance at
> catching use-after-free and others.
>
> Drive-by: Fix type check in ASAN_POISON_MEMORY_REGION
>
> R=mstarzinger@chromium.org
>
> Change-Id: Iadbdd7c0a0c80da8e7b9bb8f3399209715436073
> Reviewed-on: https://chromium-review.googlesource.com/c/1489086
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59932}

Change-Id: I3150a7f96fefd94bd96af2fdc24c302a4a5d0ea3
Reviewed-on: https://chromium-review.googlesource.com/c/1493866
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59937}
2019-02-28 10:50:49 +00:00
Benjamin
2d08967d4a [coverage] Extend SourceRangeAstVisitor for throw statements
The SourceRangeAstVisitor has custom logic for blocks ending with a
statement that has a continuation range. In these cases, the trailing
continuation is removed which makes the reported coverage ranges a bit
nicer.

throw Error('foo') consists of an ExpressionStatement, with a
Throw expression stored within the statement. The source range itself
is stored with the Throw, not the statement.

We now properly extract the correct AST node for trailing throw
statements.

R=jgruber@chromium.org, neis@chromium.org, yangguo@chromium.org

Bug: v8:8691
Change-Id: Ibcbab79fbe54719a8993045040349c863b139011
Reviewed-on: https://chromium-review.googlesource.com/c/1480632
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59936}
2019-02-28 10:45:29 +00:00
Clemens Hammacher
6d78dbdb7b Switch Isolate to std::atomic
Remove another use of atomicops.

R=mstarzinger@chromium.org

Bug: v8:8834
Change-Id: Ide1aa87f4bb4cdc4346fe7b1bf78b8118592c7ae
Reviewed-on: https://chromium-review.googlesource.com/c/1491603
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59935}
2019-02-28 10:02:39 +00:00
Michael Achenbach
ca5a4ed9ee Revert "[zone] Teach ASan about the zone segment pool"
This reverts commit b2f8280e26.

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

Original change's description:
> [zone] Teach ASan about the zone segment pool
> 
> This adds proper poisoning/unpoisoning to segments put into the segment
> pool of an accounting allocator, and also marks a segment uninitialized
> when returning it from the pool. This gives ASan a better chance at
> catching use-after-free and others.
> 
> Drive-by: Fix type check in ASAN_POISON_MEMORY_REGION
> 
> R=​mstarzinger@chromium.org
> 
> Change-Id: Iadbdd7c0a0c80da8e7b9bb8f3399209715436073
> Reviewed-on: https://chromium-review.googlesource.com/c/1489086
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59932}

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

Change-Id: Iacf322d04822382ea8e1f5abe1d5e72758adc399
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/1493055
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59934}
2019-02-28 09:13:12 +00:00
tzik
cce33f3752 Expose MicrotaskQueue as a V8 API
This introduces v8::MicrotaskQueue backed by v8::internal::MicrotaskQueue.

The embedder will get an option to use non-default MicrotaskQueue by creating
the instance by v8::MicrotaskQueue::New(). The instance can be attached to
a Context by passing it to Context::New().

Bug: v8:8124
Change-Id: Iee0711785d5748860eb94e30a8d83199a743ffaa
Reviewed-on: https://chromium-review.googlesource.com/c/1414950
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59933}
2019-02-28 09:02:26 +00:00
Clemens Hammacher
b2f8280e26 [zone] Teach ASan about the zone segment pool
This adds proper poisoning/unpoisoning to segments put into the segment
pool of an accounting allocator, and also marks a segment uninitialized
when returning it from the pool. This gives ASan a better chance at
catching use-after-free and others.

Drive-by: Fix type check in ASAN_POISON_MEMORY_REGION

R=mstarzinger@chromium.org

Change-Id: Iadbdd7c0a0c80da8e7b9bb8f3399209715436073
Reviewed-on: https://chromium-review.googlesource.com/c/1489086
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59932}
2019-02-28 08:58:26 +00:00
Clemens Hammacher
5ebb852793 [testrunner] Print relative test command
This makes the output a lot smaller and thus makes it easier to see the
relevant part of the command.

R=machenbach@chromium.org

Change-Id: I62ac7218be4a02f0270a2d88a2f69b6ced45a041
Reviewed-on: https://chromium-review.googlesource.com/c/1491597
Commit-Queue: Tamer Tas <tmrts@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59931}
2019-02-28 08:13:38 +00:00
v8-ci-autoroll-builder
f8d96d8c2f Update V8 DEPS.
Rolling v8/build: 7cd7119..325e95d

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/f610057..827da84

Rolling v8/third_party/depot_tools: be28670..fe34723

Rolling v8/tools/clang: 987f14b..a287525

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

Change-Id: I1f645eb9c6d13cefaca46ad5f93f2712fd4a2728
Reviewed-on: https://chromium-review.googlesource.com/c/1493047
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#59930}
2019-02-28 04:09:58 +00:00
Jakob Kummerow
62bdde9242 [bigint] Fix cornercase in BigInt.asUintN
One of the early (no-op) returns forgot to check whether the
number of existing digits equals the number of required digits.

Bug: chromium:936506
Change-Id: Ic9a5b927306de3cd6b26662785ac11d866e12026
Reviewed-on: https://chromium-review.googlesource.com/c/1493133
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59929}
2019-02-28 01:42:16 +00:00
Frank Tang
e6debb13bb [Intl] add 'b' and 'B' to the skip list.
Mentioned by ICU guru during design review. Bug in theory, but
cannot find a locale has 'b' and 'B' in the 12 date/time style
canned pattern.

Bug: v8:8877
Change-Id: I126fdf979e8ea5b97773c8fd974359a7e52f18e9
Reviewed-on: https://chromium-review.googlesource.com/c/1480922
Reviewed-by: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59928}
2019-02-28 01:17:06 +00:00
Frank Tang
985301d8a4 Fix Android Arm64 N5X trybot breakage after ee3f62f
ee3f62fb0d

1. On Android, Skips mjsunit tests depending on setting LC_ALL env var.
2. With the cherrypick from ICU, locale "C" will no longer be
   canonicalized into "en-US-POSIX" since that is not part of a
   registered canonicalization. So on OS which there are no LANG,
   LC_CTYPE or LC_MESSAGE env vars, we need to also map that
   fallback locale "C" to "en-US".

Bug: v8:8242, v8:8260, v8:8903
Change-Id: I63e5db10e0a7453394787421f4d55418f286f67d
Reviewed-on: https://chromium-review.googlesource.com/c/1479030
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59927}
2019-02-28 01:14:46 +00:00
Alexei Filippov
9766289e8a [inspector] Remove now generated js_protocol.json from repository.
Change-Id: I1863f9d93ed36956f0c66540df4f44ecd809b5e8
Reviewed-on: https://chromium-review.googlesource.com/c/1492516
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59926}
2019-02-27 22:27:31 +00:00