Commit Graph

52038 Commits

Author SHA1 Message Date
Jakob Gruber
bd8ed720cf Reland "[snapshot] Emit the embedded blob as assembly instead of inline assembly"
This is a reland of 0b13f0f517

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

Tbr: yangguo@chromium.org,mvstanton@chromium.org
Bug: v8:6666, v8:8349
Change-Id: Ib35696b60a9cd01bc2edf459c8e8d84716e3438d
Reviewed-on: https://chromium-review.googlesource.com/c/1337733
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57546}
2018-11-15 14:53:51 +00:00
Mike Stanton
66e0c16424 ScheduleLateNodeVisitor: check if dominator block is marked
R=mstarzinger@chromium.org

Change-Id: Ifc6411f4825b5056ab35f9b7d0a604bed4004110
Reviewed-on: https://chromium-review.googlesource.com/c/1337732
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57545}
2018-11-15 14:48:21 +00:00
Toon Verwaest
9486f220c2 [parser] Remove ContextSlotCache
Now that we always cache lookups through scope-info-backed scopes on the
entry-point scope-info-backed scope, we don't need additional caching
per scope-info. The one missing piece was negative lookups, but they
automatically turn into DynamicGlobals which we also cache on the entry
scope.

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


Change-Id: I23186d2b085d2042fafa32fb3cca88f88c61074c
Reviewed-on: https://chromium-review.googlesource.com/c/1337731
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57544}
2018-11-15 14:31:50 +00:00
Ross McIlroy
6b916b620d [Compiler] Strongly hold onto BytecodeArray from DeoptimizationData.
With BytecodeArray flushing the SFI->BytecodeArray pointer will become pseudo weak.
In order to avoid having to recompile (and potentially stack-overflow) on
deoptimization, we explicitly add strong references to any BytecodeArray's we
might deopt into into the DeoptimizationData, as such the BytecodeArrays won't
be flushed while there is optimized code referencing it.

BUG=v8:8395

Change-Id: If3336dfa9c17b7bccafdb73752c58dfa1f14a371
Reviewed-on: https://chromium-review.googlesource.com/c/1314579
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57543}
2018-11-15 14:25:11 +00:00
Toon Verwaest
11a2522933 [parser] Cache scope-info-backed lookup results on entry scope
We'll always lookup variables in the entry scope-info-backed chain through a
single entrypoint, hence we can cache any variables we create in that chain on
the entry-point's VariableMap. Otherwise we always have to redo all negative
lookups until we hit the scope that introduces it (the script scope being the
final possible scope to introduce it).

This should allow us to get rid of the ContextSlotCache as well.

Change-Id: I2dc2c9c35d69f35dab3fe3d0353aba1ac68515a5
Reviewed-on: https://chromium-review.googlesource.com/c/1337729
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57542}
2018-11-15 14:15:45 +00:00
Georg Neis
b434ee9795 [csa] Respect --force-slow-path in array iterator's next().
This might have enabled our fuzzing to find the recent bug.

R=bmeurer@chromium.org

Bug: v8:8449
Change-Id: Iaa485061e132a9d20b995478dd9a642e2224f435
Reviewed-on: https://chromium-review.googlesource.com/c/1337588
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57541}
2018-11-15 14:02:05 +00:00
Jakob Gruber
e1044d1007 Reland "[builtins] Support embedded builtins in nosnapshot builds"
This is a reland of bf2f0a0227

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

Tbr: ulan@chromium.org,yangguo@chromium.org
Bug: v8:6666, v8:8350
Change-Id: I13b523c9e7406b39a3cd28465c06f17f1744a738
Reviewed-on: https://chromium-review.googlesource.com/c/1337578
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57540}
2018-11-15 13:56:25 +00:00
Toon Verwaest
5dcc4d86e5 [parser] Make sure that a deserialized ScriptScope always has a scope_info
Change-Id: Iee70b82742aa6399b211a5d3efe06b93c0508a7d
Reviewed-on: https://chromium-review.googlesource.com/c/1337587
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57539}
2018-11-15 13:31:37 +00:00
Clemens Hammacher
3ad032b769 [base] Introduce VectorOf helper
We often need to create a {Vector} view of data owned by a container
like {std::vector}. The canonical way to do this is this:
Vector<T>{vec.data(), vec.size()}

This pattern is repeating information which can be deduced
automatically, like the type T.

This CL introduces a {VectorOf} helper which can construct a {Vector}
for any container providing a {data()} and {size()} accessor, and uses
it to replace the pattern above.

R=ishell@chromium.org

Bug: v8:8238
Change-Id: Ib3a11662acc82cb83f2b4afd07ba88e579d71dba
Reviewed-on: https://chromium-review.googlesource.com/c/1337584
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57538}
2018-11-15 13:02:22 +00:00
Toon Verwaest
11a108611e [parser] Better separate scope_info-backed lookup from other lookup
Change-Id: Id81b028629d552e2f3ebbab8bc3ab1f0e9cff3fb
Reviewed-on: https://chromium-review.googlesource.com/c/1337572
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57537}
2018-11-15 12:45:23 +00:00
Ross McIlroy
fed1364adf [Compiler] Ensure TurboFan holds onto BytecodeArray to keep it alive.
With Bytecode flushing, the a SharedFunctionInfo's bytecode might be flushed
while the compiler is expecting it to still exist. Rather than continually
getting the bytecode from the SFI, instead bottleneck the points where we get
BytecodeArray from SFIs and maintain an explicit strong reference to the
BytecodeArray from that point onwards to prevent flushing.

BUG=v8:8395

Change-Id: I6a18adec99402838690971eb37ee0617cdc15920
Reviewed-on: https://chromium-review.googlesource.com/c/1309763
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57536}
2018-11-15 12:33:32 +00:00
Benedikt Meurer
a2f7867da7 [turbofan] Preserve NaN properly for NumberMin and NumberMax.
When one of the inputs to NumberMin or NumberMax is NaN we need to
return NaN, ignoring whatever else was passed. Specifically we cannot
lower `NumberMin(x,y)` to `(x < y) ? x : y` if `x` can be NaN. So
limit this optimization to only perform the above lowering if we
know that `x` is an OrderedNumber and `y` is a PlainNumber (or if
the difference between zeros doesn't matter, an OrderedNumber as
well).

Bug: chromium:905457
Change-Id: If05f19255e14789ab0e277e072469c40e161b85b
Reviewed-on: https://chromium-review.googlesource.com/c/1337576
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57535}
2018-11-15 12:32:03 +00:00
Michael Achenbach
09afb027bf [build] Don't build cctest on windows archive builds
The archive builder is broken since https://crrev.com/c/1330912, see:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Official%20Win64/3279

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

TBR=sergiyb@chromium.org

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

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

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

Bug: v8:7777
Change-Id: Ieea404a14c7859a66e18175d1740d73182db9b1b
Reviewed-on: https://chromium-review.googlesource.com/c/1335559
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57533}
2018-11-15 12:14:37 +00:00
Jaroslav Sevcik
ee8d9f2eba [constant-tracking,turbofan] Check @@hasInstance is callable.
This fixes several problems with instanceof and constant field tracking
in the compiler:
- properly bailout on numbers and non-functions at @@hasInstance.
- deopt on changes of @@hasInstance property.

Bug: v8:8361
Change-Id: I4a1cf9e29d72076f2d37a7c703f18cb2fb8f4040
Reviewed-on: https://chromium-review.googlesource.com/c/1322449
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57532}
2018-11-15 12:07:36 +00:00
Daniel Clifford
33f41e41d8 [builtins] Implement LoadKeyValuePair in Torque
Change-Id: I0652a75f6d1f6abfb40ba9bf35afeadfd4533336
Reviewed-on: https://chromium-review.googlesource.com/c/1328801
Commit-Queue: Daniel Clifford <danno@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57531}
2018-11-15 11:26:06 +00:00
Michael Starzinger
5eef688616 [wasm] Slightly simplify {PipelineData} class.
R=clemensh@chromium.org

Change-Id: I57183c306a4b0b38822ae3136a8c49ab94992010
Reviewed-on: https://chromium-review.googlesource.com/c/1337575
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57530}
2018-11-15 10:58:15 +00:00
Jakob Gruber
856be9c21c Revert "[builtins] Support embedded builtins in nosnapshot builds"
This reverts commit bf2f0a0227.

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

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

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

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

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

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

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

Change-Id: I35f7763f86b4de01e74827a95706b969b43af55e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6666, v8:8349
Reviewed-on: https://chromium-review.googlesource.com/c/1337574
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57528}
2018-11-15 10:13:39 +00:00
Michael Starzinger
53d47216d9 [wasm] Avoid redundant code copy for interpreter entry.
This avoids creating an on-heap copy for interpreter entry wrappers by
directly adding the {WasmCode} into the native heap instead. It reduces
compilation time as well as useless GC pressure.

R=clemensh@chromium.org
BUG=v8:8423

Change-Id: I91a8f3fc9fe542233d8700a58585f4715eed695a
Reviewed-on: https://chromium-review.googlesource.com/c/1337570
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57527}
2018-11-15 10:09:28 +00:00
Jakob Gruber
ea39a98109 [watchlist] Add csa and torque watchlists and add myself
Change-Id: Ia30702060cdcd63a3b429e05e700928a32824604
Reviewed-on: https://chromium-review.googlesource.com/c/1328944
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57526}
2018-11-15 10:01:08 +00:00
Michael Starzinger
a245611a3b [wasm] Remove obsolete {OptimizedCompilationInfo::wasm_code}.
R=clemensh@chromium.org

Change-Id: I2ec2fdb2406efeaf3b48d0c58711db7e5172aa58
Reviewed-on: https://chromium-review.googlesource.com/c/1335699
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57525}
2018-11-15 09:28:13 +00:00
Jakob Gruber
0b13f0f517 [snapshot] Emit the embedded blob as assembly instead of inline assembly
The motivation behind this is that MSVC doesn't support inline assembly
on x64. Emitting the embedded blob as a plain assembly file will give us
MSVC support (and possibly faster compilation times as a side-effect).

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

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

Complications arise from the different workflows we need to support:

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

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

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

These are described in more detail in isolate.cc.

Tbr: ulan@chromium.org
Bug: v8:6666, v8:8350
Change-Id: I3842e40cdaf45d2cadd05c6eb1ec2f5e3d83568d
Reviewed-on: https://chromium-review.googlesource.com/c/1310195
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57523}
2018-11-15 09:18:58 +00:00
Mike Stanton
df19854c63 [cleanup] Introduce IsMarked() predicate to ScheduleLateNodeVisitor
R=jarin@chromium.org

Change-Id: Ia585398db7e9c69283450def924bc10edc37448f
Reviewed-on: https://chromium-review.googlesource.com/c/1335563
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57522}
2018-11-15 08:58:30 +00:00
Frank Tang
e734cc6ea8 [Intl] Fix CHECK(array->HasFastPackedElements())
Add regression test to verify array with packed, holey and
dictionary elements.
Change ToUnicodeStringArray to return vector<UnicodeString>
instead allocate raw UnicodeString before calling.
Simplify ToUnicodeStringArray to loop only once.

Bug: chromium:903566
Change-Id: I7ad74179be97d3cf929d2949384dbaa8b66a9a02
Reviewed-on: https://chromium-review.googlesource.com/c/1328642
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57521}
2018-11-15 08:05:11 +00:00
v8-ci-autoroll-builder
12d99b8b88 Update V8 DEPS.
Rolling v8/build: 6600235..ccf9ff5

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/6b8b30c..8a6451c

Rolling v8/third_party/depot_tools: ef71a5f..f66e551

Rolling v8/tools/luci-go:infra/tools/luci/isolate/${platform}: https://chrome-infra-packages.appspot.com/infra/tools/luci/isolate/${platform}/+log/git_rev..git_rev

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

Change-Id: Id6ee2891245ec1ce147c83ba1f9715646bb15c56
Reviewed-on: https://chromium-review.googlesource.com/c/1336783
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57520}
2018-11-15 07:54:38 +00:00
Deepti Gandluri
aba38b3c35 [wasm] Update SIMD opcodes to match toolchain/spec
BUG:v8:6020

Change-Id: I289a43d834765635425276afb80c2361152fdcb0
Reviewed-on: https://chromium-review.googlesource.com/c/1336113
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Aseem Garg <aseemgarg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57519}
2018-11-15 06:28:55 +00:00
Erik Luo
b11cedb472 [inspector] restore console.table limits
`console.table` used to have a 1k limit on preview properties, which
regressed to 100 during refactoring.

This CL restores the 1k limit, and ensures that `buildEntryPreview`
does not use the 1k limit.

Bug: chromium:903623
Change-Id: I8fab3182a79d1bb6b662e2ff9b229db3d3a889ca
Reviewed-on: https://chromium-review.googlesource.com/c/1332127
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Erik Luo <luoe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57518}
2018-11-15 00:23:05 +00:00
Sergiy Byelozyorov
fa306d4372 Update V8 DEPS.
Rolling v8/build: 8af70c5..6600235

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

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

Rolling v8/third_party/googletest/src: 2e68926..879ac09

Rolling v8/tools/luci-go:infra/tools/luci/isolate/${platform}: https://chrome-infra-packages.appspot.com/infra/tools/luci/isolate/${platform}/+log/git_rev..git_rev

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

Change-Id: I0cbffcb71b49e1d54e2aedb19f6dab65448586a0
Reviewed-on: https://chromium-review.googlesource.com/c/1336187
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57517}
2018-11-14 20:08:33 +00:00
Jakob Kummerow
8c3b97b562 Fix webkit/run-json-stringify in Debug mode
Clang is known to use a lot of stack space for Debug builds, so
this patch lowers the recursion depth of that test after recent
changes made Debug-mode stack frames a bit larger.

a bit of Debug-mode stack space.

Bonus: drops an unnecessary cast from SerializeJSObject to save
Change-Id: I22696a1d80a6a73b5049b018e72cc8a3d8693042
Reviewed-on: https://chromium-review.googlesource.com/c/1334448
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57516}
2018-11-14 18:53:34 +00:00
Tobias Tebbi
3a8c808221 [torque] infer generic arguments
This allows to call generic callables without mentioning all type
parameters, if they can be deduced from the types passed as arguments.

Bug: v8:7793
Change-Id: Idb37bb6b93c48bd6344c5be19da4e5b19d29593f
Reviewed-on: https://chromium-review.googlesource.com/c/1335936
Reviewed-by: Daniel Clifford <danno@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57515}
2018-11-14 18:18:59 +00:00
Toon Verwaest
80e9f18a0d [scopes] Separate CollectNonLocals from AnalyzePartially
The functions are sufficiently different and AnalyzePartially is
performance-sensitive so it's helpful to see what exact code is in there.

Change-Id: I8807684e58a7af48bdba62f0adf41e78f7b6557d
Reviewed-on: https://chromium-review.googlesource.com/c/1335701
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57514}
2018-11-14 17:42:19 +00:00
Michael Starzinger
bbdaaee8c8 [wasm] Remove obsolete {PipelineWasmCompilationJob}.
R=clemensh@chromium.org

Change-Id: I1b6a54b73be163386be6915402f7d8f9ba838a25
Reviewed-on: https://chromium-review.googlesource.com/c/1335697
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57513}
2018-11-14 17:22:32 +00:00
Toon Verwaest
e6eb2863d0 [parser] Only write into the active preparsed_scope_data_builder
Change-Id: I3d07bb2d1ae8c77a6b245f5e4ca6f755e2617730
Reviewed-on: https://chromium-review.googlesource.com/c/1335698
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57512}
2018-11-14 16:48:02 +00:00
Michael Starzinger
ebb0f30f65 [wasm] Avoid redundant code copy for import wrappers.
This avoids creating an on-heap copy for import wrappers by directly
adding the {WasmCode} into the native heap instead. It reduces
compilation time as well as useless GC pressure.

R=clemensh@chromium.org
BUG=v8:8423

Change-Id: Ia063523834c963591027c7d1ed78b795d24907bf
Reviewed-on: https://chromium-review.googlesource.com/c/1335566
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57511}
2018-11-14 16:10:19 +00:00
Igor Sheludko
98de0a63df [serializer][ptr-compr] Add byte code for cleared weak reference
in order to be able to properly deserialize the latter in case of enabled
pointer compression where the cleared weak reference value is Isolate-dependent.

Bug: v8:7703
Change-Id: Ied995bc15317c83fcc03cf27de3fbf135659a9d5
Reviewed-on: https://chromium-review.googlesource.com/c/1333676
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57510}
2018-11-14 16:08:32 +00:00
Jaroslav Sevcik
18de765e1e [constant-tracking] Properly check regexp proto symbols in string search.
This updates fast path checks in string's search/match/replace/split/matchAll
methods.

Bug: v8:8361
Change-Id: I0377aff21e380d6c718e7471f8964e10c030281b
Reviewed-on: https://chromium-review.googlesource.com/c/1333668
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57509}
2018-11-14 15:56:04 +00:00
Toon Verwaest
40b06bc450 [parser] Make IsValidPattern a range-check over Object/Array literal
Change-Id: I53fc5b8ff39c91fe509e292cf32f54ff4f8e2eb7
Reviewed-on: https://chromium-review.googlesource.com/c/1335694
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57508}
2018-11-14 15:51:13 +00:00
Toon Verwaest
96cf84763f [parser] Only clear invalid template escape messages if we have them
Change-Id: I9925db0d74ef96bf91ea261f275e37c10908c9ef
Reviewed-on: https://chromium-review.googlesource.com/c/1335695
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57507}
2018-11-14 15:49:19 +00:00
Leszek Swirski
7aac6bc905 [cleanup] Make unicode predicate cache tables static
Moves the unicode predicate cache tables out of the unicode cache,
and turns them into generic predicates in char-predicates.h which
use static constexpr tables.

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

Change-Id: I9a7a8b7c9b22d3e9ede824ab4e27f133ce20a399
Reviewed-on: https://chromium-review.googlesource.com/c/1335564
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57506}
2018-11-14 15:33:45 +00:00
Maya Lekova
607033a9e4 [async-hooks] Fix Promise.resolve optimization with async hooks enabled
Promise.resolve shouldn't be optimized when the async hooks are enabled.

Bug: chromium:900674
Change-Id: I225c3d9002f293395993ded37a1d475635467a94
Reviewed-on: https://chromium-review.googlesource.com/c/1335693
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57505}
2018-11-14 15:29:09 +00:00
Toon Verwaest
f84919d4b8 [parser] Drop if (builder_) check, it's never null
Change-Id: I3331676ac226da976d7123ead81e05703272b14a
Reviewed-on: https://chromium-review.googlesource.com/c/1335929
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57504}
2018-11-14 15:20:16 +00:00
Michael Starzinger
c9a3ff456d [heap] Make {Factory::CopyCode} use finer scope.
This makes the above factory function use a fine-grained scope when
unlocking code space for modification. It now uses a cumulative per-page
scope that collects only those memory chunks that needed to be touched
during allocation.

R=ulan@chromium.org

Change-Id: I22de0fae8be507ba9d51868f668b902b3bae3d6a
Reviewed-on: https://chromium-review.googlesource.com/c/1335558
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57503}
2018-11-14 14:10:17 +00:00
Clemens Hammacher
4e5883c582 [wasm] Rename mode to tier where it makes sense
Variables of type {ExecutionTier} should be called "tier", not "mode".

R=ahaas@chromium.org

Bug: v8:8238
Change-Id: I09c640398ab8ad34ac6591d42ea7b0f9ba83d620
Reviewed-on: https://chromium-review.googlesource.com/c/1335688
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57502}
2018-11-14 13:37:15 +00:00
Clemens Hammacher
3858368d18 [wasm] Check event order to async compilation callbacks
The callbacks must follow a specific order. This CL adds checks for
that. This helped debugging an issue in a follow-up CL.

R=ahaas@chromium.org

Bug: v8:7921
Change-Id: I78e1caf9923e95401652d2a3952dcf29c2967062
Reviewed-on: https://chromium-review.googlesource.com/c/1325965
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57501}
2018-11-14 12:59:34 +00:00
Igor Sheludko
a667c0ce86 [classes] Fix DCHECK for a case when data property overwrites one accessor
Also add comments and regression tests.

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

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

R=ulan@chromium.org

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

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

Change-Id: I8c3ac7a5453547abeb09fc90826a26390b15a415
Reviewed-on: https://chromium-review.googlesource.com/c/1335547
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57497}
2018-11-14 12:14:22 +00:00