Commit Graph

54493 Commits

Author SHA1 Message Date
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
Francis McCabe
4c9c6c5804 [wasm] ReturnCall Implementation (interpreter)
Implement the ReturnCall functionality for the interpreter.

Note that some tests have had to be deferred to the implementation
of ReturnCall for TurboFan.

This a reland of https://chromium-review.googlesource.com/c/v8/v8/+/1467343

Bug: v8:7431
Change-Id: Iac9392a6a81995e30009dac74035e4d728ac3dbb
Cq-Include-Trybots: luci.v8.try:v8_linux64_ubsan_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/1484905
Commit-Queue: Francis McCabe <fgm@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59925}
2019-02-27 19:34:50 +00:00
Georg Neis
a25279df8b [turbofan] Canonicalize uses of DependOnProtector
This merges the check if a protector is intact with the recording of
the dependency on it, at least in many cases.

Also introduce convenience functions to avoid the heap broker clutter.

Change-Id: I35508c4685a2f0df77819bf81075dd14a30e7e4f
Reviewed-on: https://chromium-review.googlesource.com/c/1487491
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59924}
2019-02-27 18:56:30 +00:00
Georg Neis
9c5cd06611 [turbofan] Don't assume we have receiver maps in preprocessed feedback
This was an oversight in my previous CL.

Bug: chromium:936077, v8:7790
Change-Id: Ic1034c1754d10c72df8f61d1e2c34333e1565e3e
Reviewed-on: https://chromium-review.googlesource.com/c/1491222
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59923}
2019-02-27 18:46:20 +00:00
Junliang Yan
8308ba0864 PPC: [ptr-compr] Prepare for changing kTaggedSize, pt.1
Port f70bb59b57

Original Commit Message:

    Includes various fixes and cleanups here and there.

R=ishell@chromium.org, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com, miladfar@ca.ibm.com

LOG=N

Bug: v8:7703, v8:8852
Change-Id: I1e25c6da6677aab64dabc052aee555f534386df7
Reviewed-on: https://chromium-review.googlesource.com/c/1491698
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#59922}
2019-02-27 18:32:29 +00:00
Irina Yatsenko
1f2d9475fb Torquefy a few simple types
Creates Torque classes for JSProxy, JSAccessorPropertyDescriptor, JSCollection, JSProxyRevocableResult, JSValue

Change-Id: I01eec27b158b4beb778cb5efce44f241c09ef0f7
Reviewed-on: https://chromium-review.googlesource.com/c/1489184
Commit-Queue: Irina Yatsenko <irinayat@microsoft.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59921}
2019-02-27 18:12:47 +00:00
Sathya Gunasekaran
9550604183 [class] Expose private fields through GetPrivateFields
This will allow the devtools UI to display private fields on the scope
panel.

Instead of extending GetInternalProperties, we expose a separate
GetPrivateFields method on the debug interface. This allows us to do
better type checking, for example, we can directly cast to a
v8::Private as this can only contain private fields.

This also allows us to have better constraints on the input type --
v8::Object, as opposed to a v8::Value.

The KeyAccumulator is extended to collect private names for the
PRIVATE_NAMES_ONLY PropertyFilter.

Bug: v8:8773
Change-Id: Id47c551186c59dae9a06721074ef78144f25892f
Reviewed-on: https://chromium-review.googlesource.com/c/1475664
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Daniel Ehrenberg <littledan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59920}
2019-02-27 18:04:57 +00:00
Sven Sauleau
a427f31332 [testrunner] handle timeout param in file
WebAssembly's specification tests use a timeout annotation.
This change allows the shared testrunner to use it to calculate
the testcase timeout.

Currently, the allowed timeout values are: long. Other values will
emit a warning.

Change-Id: Id7f453f5fd49854c8f53ff86ef2ec58aa0ae8748
Reviewed-on: https://chromium-review.googlesource.com/c/1480376
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Sven Sauleau <ssauleau@igalia.com>
Cr-Commit-Position: refs/heads/master@{#59919}
2019-02-27 17:49:17 +00:00
Benedikt Meurer
4f62b4bb61 [arm] Port the skipping of arguments adaptor frames.
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).

Bug: v8:8895
Doc: http://bit.ly/v8-faster-calls-with-arguments-mismatch
Change-Id: I96a0425d390f041001df0356d4bfd71ad1e98b5a
Reviewed-on: https://chromium-review.googlesource.com/c/1491592
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59918}
2019-02-27 17:45:27 +00:00
Daniel Clifford
0a6ae5b485 [torque] Simplify class and struct construction
Constructors have been removed. Initialization syntax with {}
for structs and classes is now limited to the initialization
expressions for the fields, so "constructors" deviating from
that explicit and complete list of field initialization
values must be declared as separate macros.

Bug: v8:7793
Change-Id: Ibc26e685c0c8a182732df90b1631eae9371309cb
Reviewed-on: https://chromium-review.googlesource.com/c/1489080
Commit-Queue: Daniel Clifford <danno@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59917}
2019-02-27 17:36:37 +00:00
Jakob Gruber
f819fd4475 Reland "[nojit] Don't flush the icache in jitless mode"
This is a reland of 71d29f7892

Original change's description:
> [nojit] Don't flush the icache in jitless mode
> 
> We don't allocate executable memory in jitless mode hence there's no
> need to flush the icache.
> 
> Bug: v8:7777
> Change-Id: I70a1884e6c9f11405465f5741f2eccd4f7a273fb
> Reviewed-on: https://chromium-review.googlesource.com/c/1488765
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59887}

Bug: v8:7777
Change-Id: Id48455cf4e6d28ad2a0b753580ca51cbe0e983d3
Reviewed-on: https://chromium-review.googlesource.com/c/1491601
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59916}
2019-02-27 17:18:55 +00:00
Toon Verwaest
b7302e4be6 [preparser] Check duplicate '__proto__' using the underlying literal
That way we don't need to internalize kValue property names on object literals
(both STRING and identifier tokens). This speeds up object literal preparsing
by quite a bit (15% on a microbenchmark; 7-8% on actual object literals looking
like json from FB).

Change-Id: I9d7baeb94f1a8e4f7e3b7cd6406a826ba37017f3
Reviewed-on: https://chromium-review.googlesource.com/c/1491605
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59915}
2019-02-27 17:10:06 +00:00
Ross McIlroy
2cb8a6e349 [Compile] Avoid flushing code that's marked for optimization in tests.
Bytecode flushing can make tests using assertOptimized flaky if the bytecode is
flushed between marking and optimization. It can also be flaky if the feedback vector
is collected before optimization. To prevent this, a new %PrepareForOptimization
runtime-test function is added that hold onto the bytecode strongly until it is
optimized after being explicitly marked for optimization by %OptimizeFunctionOnNextCall.

BUG=v8:8801,v8:8395

Change-Id: Idbd962a3a2044b915903f9c5e92d1789942b5b41
Reviewed-on: https://chromium-review.googlesource.com/c/1463525
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59914}
2019-02-27 16:44:24 +00:00
Clemens Hammacher
087727d1fc [zone] Switch AccountingAllocator to std::atomic
Instead of using our own atomic utils, use std::atomic.

R=mstarzinger@chromium.org

Bug: v8:8916, v8:8834
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
Change-Id: I663d7f28dbaaa476a62407cf42dca1927c69f68b
Reviewed-on: https://chromium-review.googlesource.com/c/1491631
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59913}
2019-02-27 16:43:19 +00:00
Igor Sheludko
6a5cd5987d [ptr-compr] Prepare for changing kTaggedSize, pt.2
This CL also unifies CopyWords() and CopyBytes() implementations.

Bug: v8:7703
Change-Id: I0b2e2f35c0c651e46231c4e4286c705634dce02b
Reviewed-on: https://chromium-review.googlesource.com/c/1491602
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59912}
2019-02-27 16:00:05 +00:00
Peter Marshall
b3139bddeb Revert "[cpu-profiler] Disable failing tests on arm simulator only"
This reverts commit 9215ac2c2a.

Reason for revert: Turns out it fails on windows too: https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket.appspot.com/8920360960120786848/+/steps/Check_-_extra__flakes_/0/logs/SampleWhenFrameIsNotS../0

Original change's description:
> [cpu-profiler] Disable failing tests on arm simulator only
> 
> These tests still fail on arm simulators and don't appear easily fixable
> but are low priority. Let's still run them on other build configs.
> 
> Bug: v8:8917
> Change-Id: If0a2f44b746eff5e82eb750103304e788dfbbfb5
> Reviewed-on: https://chromium-review.googlesource.com/c/1491593
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Commit-Queue: Peter Marshall <petermarshall@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59903}

TBR=sigurds@chromium.org,petermarshall@chromium.org

Change-Id: Ic77791ddfd37e67307af6ec7b064e31e2db92039
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8917
Reviewed-on: https://chromium-review.googlesource.com/c/1491604
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59911}
2019-02-27 15:54:47 +00:00
Georg Neis
6a6e907afe [log] Canonicalize printing of object addresses
This avoids having occurrences of both 0x000012345678 and
0x12345678 in the log.

Change-Id: Id3603993362d1dd327aad567ef3448d00ce3a8fd
Reviewed-on: https://chromium-review.googlesource.com/c/1491514
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59910}
2019-02-27 15:50:45 +00:00
Igor Sheludko
f70bb59b57 [ptr-compr] Prepare for changing kTaggedSize, pt.1
Includes various fixes and cleanups here and there.

Bug: v8:7703, v8:8852
Change-Id: I603eb0212cab3fecabfa15dceb70ee23b81cdb5a
Reviewed-on: https://chromium-review.googlesource.com/c/1491595
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59909}
2019-02-27 15:26:09 +00:00
Jakob Gruber
3852a9d199 Revert "[nojit] Don't flush the icache in jitless mode"
This reverts commit 71d29f7892.

Reason for revert: Needs test skips https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Arm/9744

Original change's description:
> [nojit] Don't flush the icache in jitless mode
> 
> We don't allocate executable memory in jitless mode hence there's no
> need to flush the icache.
> 
> Bug: v8:7777
> Change-Id: I70a1884e6c9f11405465f5741f2eccd4f7a273fb
> Reviewed-on: https://chromium-review.googlesource.com/c/1488765
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59887}

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

Change-Id: I548bcbbd5c6df542dd647b8bbb8accae62e197e6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7777
Reviewed-on: https://chromium-review.googlesource.com/c/1491600
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59908}
2019-02-27 15:03:42 +00:00
Clemens Hammacher
12a69b70a2 [wasm] Merge PublishCode into AddCode
A small refactoring to reduce complexity. It also moves the call to
{RegisterTrapHandlerData} out of the mutex to reduce the time in this
critical section.

R=mstarzinger@chromium.org

Bug: v8:8916
Change-Id: I644f03db6099ebef22b2e33b607a2dc038b36423
Reviewed-on: https://chromium-review.googlesource.com/c/1478196
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59907}
2019-02-27 14:51:29 +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
Raphael Kubo da Costa
2a4c36fa98 IWYU: Include <cmath> for std::isnan()
This fixes the libstdc++ build after commit 4b6b8cf610 ("[cleanup] Start
cleaning up utils.h"), as string-util.cc was including <cmath> indirectly
via src/conversions.h.

Bug: chromium:819294
Change-Id: I5be7eac355d0c316a432eab4c50ae66d885b03d7
Reviewed-on: https://chromium-review.googlesource.com/c/1491591
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59905}
2019-02-27 14:27:54 +00:00
Dan Elphick
6a80efc1d3 [snapshot] Add delphick to OWNERS
Change-Id: I73532f4cba643032c5fad6e9bca70c901bf71f85
Reviewed-on: https://chromium-review.googlesource.com/c/1491513
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59904}
2019-02-27 14:26:49 +00:00
Peter Marshall
9215ac2c2a [cpu-profiler] Disable failing tests on arm simulator only
These tests still fail on arm simulators and don't appear easily fixable
but are low priority. Let's still run them on other build configs.

Bug: v8:8917
Change-Id: If0a2f44b746eff5e82eb750103304e788dfbbfb5
Reviewed-on: https://chromium-review.googlesource.com/c/1491593
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59903}
2019-02-27 14:22:43 +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