Commit Graph

56726 Commits

Author SHA1 Message Date
Yang Guo
e77e65f159 Introduce v8::Context::ScriptExecutionCallback
Bug: chromium:965916
Change-Id: I2cb28a8c569c88631bc835b55a04e8629f56cb6f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1630684
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62034}
2019-06-06 19:17:40 +00:00
Dan Elphick
dfce0ae6af Revert "Extend IsExtensible proxy trap fast path for Reflect.isExtensible"
This reverts commit 566233ae52.

Reason for revert: Breaks the build

Original change's description:
> Extend IsExtensible proxy trap fast path for Reflect.isExtensible
> 
> The fast path for IsExtensible proxy trap is already implemented, we just need to use this for ReflectIsExtensible.
> Now, ReflectIsExtensible is now a Torque builtin (previously CPP). Other cases will fall back to runtime.
> 
> Bug: v8:6664
> Change-Id: Ib1c3f78d1f1a44c6628d351fed3bcdc91ca08cb5
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1645438
> Reviewed-by: Maya Lekova <mslekova@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Tamer Tas <tmrts@chromium.org>
> Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
> Cr-Commit-Position: refs/heads/master@{#62031}

TBR=jgruber@chromium.org,mslekova@chromium.org,tmrts@chromium.org,duongn@microsoft.com

Change-Id: I92f83d8c9cbdca1a33ddd0e875551deb62d7de89
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6664
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1648241
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62033}
2019-06-06 16:20:50 +00:00
Milad Farazmand
60a581eb48 PPC/s390: [lite] Allocate FeedbackCell arrays for create closures in lite mode
Port 4237fc378c

Port 71c66873d6

Original Commit Message:

    We want to allocate feedback vectors lazily in lite mode. To do that,
    we should create closures with the correct feedback cell. This cl
    allocates feedback cell arrays to hold these feedback cells in lite mode.
    This cl also modifies the compile lazy to builtin to expect these arrays
    in the feedback cell.

    Drive-by fix: InterpreterEntryTrampoline no longer has argument count in
    a register. So updated comments and removed unnecessary push/pop of this
    register.

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

Change-Id: I2cca35cab2c0a1bc75619ff1565e453635f6b0e4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1646891
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#62032}
2019-06-06 15:57:59 +00:00
Z Nguyen-Huu
566233ae52 Extend IsExtensible proxy trap fast path for Reflect.isExtensible
The fast path for IsExtensible proxy trap is already implemented, we just need to use this for ReflectIsExtensible.
Now, ReflectIsExtensible is now a Torque builtin (previously CPP). Other cases will fall back to runtime.

Bug: v8:6664
Change-Id: Ib1c3f78d1f1a44c6628d351fed3bcdc91ca08cb5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1645438
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#62031}
2019-06-06 15:56:53 +00:00
Ulan Degenbaev
8c9ca62a5e [heap] Introduce a min heap size and skip GCs below that threshold
If the embedder specifies an initial heap size, then we can take it
as a hint to skip full GCs below that threshold.

Bug: v8:9306
Change-Id: I42a4c597bf75c6ba9845ed7a6bd9946012979005
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1646515
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62030}
2019-06-06 15:49:50 +00:00
Toon Verwaest
699badd56b [scanner] Add fast path for converting utf8 that's ascii to utf16
Change-Id: I386261bc012d0d4556b0f9417b2880cc7f44bf2c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1647697
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62029}
2019-06-06 15:48:18 +00:00
Georg Schmid
72b9d704d0 Add BitcastTaggedSignedToWord operator
R=jarin@chromium.org, tebbi@chromium.org

Change-Id: I3f23b48d4294722d056edb0ec30f834c0169b042
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1645331
Commit-Queue: Georg Schmid <gsps@google.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62028}
2019-06-06 15:32:58 +00:00
Simon Zünd
0e53739c39 [torque] Add lint errors for unused variable and label bindings
This CL adds lint errors when 'let' bindings, arguments and labels
are not used. Note that errors for 'const' bindings will be added
later.

In cases where arguments are actually needed to match the signature,
the warning can be silenced by prefixing identifiers with "_". This
might be needed for generic specializations or builtins called from
TurboFan. Trying to use a variable or label that was marked with
"_" results in a compilation error.

Implicit arguments are not linted. They are implemented using exact
string matching. Prefixing an implicit argument with "_" in a callee
would break all callers as the names would no longer match.

Drive-by: Fix all new lint errors in the existing Torque code.

Bug: v8:7793
Change-Id: I68b3c59c76b956e9f88709e9388a40a19546ce52
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1645092
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62027}
2019-06-06 15:27:12 +00:00
Mythri A
35253de786 Fix a failing mjsunit test with lazy feedback allocation
Bug: v8:8394
Change-Id: I02551ff3d51e914f5a24f221186f23a8e3d2cc77
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1648096
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62026}
2019-06-06 14:57:38 +00:00
Igor Sheludko
1c5d113598 [cleanup][ptr-compr] Add Isolate parameter to Map::ElementsTransitionMap().
Tbr: yangguo@chromium.org
Bug: v8:9183, v8:8948
Change-Id: I7d68344479c67027be3ef63dec2c927c103b3fa6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1647165
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62025}
2019-06-06 14:54:08 +00:00
Igor Sheludko
04beaf63cb [roheap][ptr-compr] Move ReadOnlyHeap::GetReadOnlyRoots() to inl file
The implementation is already quite trivial and in addition in case of
ptr-compr this implementation becomes even simpler and C++ compiler
gets the opportunity to hoist common computation of isolate root.

Tbr: yangguo@chromium.org
Bug: v8:7464, v8:7703
Change-Id: I6e59cd43253c9ade5a0e27025ea7fabecd5b7af7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1647171
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62024}
2019-06-06 14:34:48 +00:00
Leszek Swirski
5a39c2d6b4 [test] Fix string length in generate-bytecode-expectations
Change-Id: Ieed04203b400f33dcb05eebd42b74db322c0c833
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1648097
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62023}
2019-06-06 14:11:28 +00:00
Maya Lekova
2b880d57f9 Revert "[turbofan] Brokerize reduction of API calls"
This reverts commit ca10d2babe.

Reason for revert: Breaks layout tests - https://ci.chromium.org/p/v8/builders/ci/V8-Blink%20Linux%2064%20(dbg)/17693

Original change's description:
> [turbofan] Brokerize reduction of API calls
> 
> JSCallReducer::ReduceCallApiFunction is now heap access free.
> 
> Bug: v8:7790
> Change-Id: I5718d73589d0bed14149ef0bc084b8a6ab1b9b5b
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624792
> Commit-Queue: Maya Lekova <mslekova@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Reviewed-by: Michael Stanton <mvstanton@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#62014}

TBR=mvstanton@chromium.org,neis@chromium.org,mslekova@chromium.org

Change-Id: I56d3e8e28f778858decf29d756564ac8ea04c8c5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7790
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1647170
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62022}
2019-06-06 12:54:42 +00:00
Georg Schmid
b3f3f28a51 Disable NumFuzz for load elimination const field test
Bug: v8:9314
Change-Id: I746dcdffe29ca7de144ad9c7d6310e479bff2434
Notry: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1647164
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Georg Schmid <gsps@google.com>
Cr-Commit-Position: refs/heads/master@{#62021}
2019-06-06 11:47:43 +00:00
Georg Schmid
0686e1ef70 Add very basic CsaLoadElimination phase
R=jarin@chromium.org, tebbi@chromium.org

TBR: machenbach@chromium.org

Change-Id: I82dd17b14eb086928f602395d80f0f2cf09770eb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1635449
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Schmid <gsps@google.com>
Cr-Commit-Position: refs/heads/master@{#62020}
2019-06-06 11:33:05 +00:00
Georg Neis
cdcdcb5e76 [turbofan] Clean up serializer environment
Move the closure hints out of environment_hints_ so that they are
handled similar to return value hints. That makes things a little
cleaner overall.

Also make it clear in terms of SLOW_DCHECKs why we don't need to
merge closure hints and, in the case of a dead environment, return
value hints.

Also rename environment_hints_ to ephemeral_hints_. The old name was
weird because these are not the only hints in the environment.

Bug: v8:7790
Change-Id: I2cb5389632c4827b027799985b8320f39e1e2314
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1643555
Auto-Submit: Georg Neis <neis@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62019}
2019-06-06 11:19:43 +00:00
Mythri A
333615cfc2 Reland "Enable lazy feedback allocation"
This is a reland of 8c10501be5.
Reland after fixing test failures.

Original change's description:
> Enable lazy feedback allocation
>
> Bug: v8:8394
> Change-Id: I29ffd38725bdcaa9dd11221045dba681eb0d567b
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1643430
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Commit-Queue: Mythri Alle <mythria@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#61991}

Bug: v8:8394
Change-Id: Icc9e276ab22ca6455b775f3c27e0d43c3f08b887
TBR: rmcilroy@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1647161
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62018}
2019-06-06 10:24:36 +00:00
Ulan Degenbaev
e423f00403 [api] Add a way to specify the max heap size in ResourceConstraints
The new API function is called ConfigureDefaultsFromHeapSize and
accepts two parameters: the initial and the maximum heap size.
Based on the given limits the function computes the default size
for the young and the old generation.

The patch also cleans up the existing functions to make them
consistent in terms of units and heap structure.

Bug: v8:9306
Change-Id: If2200a9cdb45b0b818a373207efe4e6426f7b688
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1631593
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62017}
2019-06-06 10:22:56 +00:00
Nico Hartmann
ea79fa426d [js-perf-test] Performance benchmark for adding random BigInts
Bug: v8:9213
Change-Id: Iee04bfe25e37cfe639964f8ab31e6702d3750bfb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1645319
Commit-Queue: Nico Hartmann <nicohartmann@google.com>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62016}
2019-06-06 10:05:16 +00:00
Maciej Goszczycki
fb4d54802e Reland "[roheap] Enable shared ro-heap by default if ptr compression is disabled"
This is a reland of 81abe8f7b6

It also disables ro-heap sharing in nosnap builds

Original change's description:
> [roheap] Enable shared ro-heap by default if ptr compression is disabled
>
> Shared read-only heap is currently incompatible with pointer compression.
> Enable sharing only if pointer compression is disabled.
>
> Bug: v8:7464
> Change-Id: I0866ac288a34eb92fc227e8beba57f4d72a69ef0
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1635509
> Reviewed-by: Dan Elphick <delphick@chromium.org>
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Commit-Queue: Maciej Goszczycki <goszczycki@google.com>
> Cr-Commit-Position: refs/heads/master@{#61963}

Bug: v8:7464
Change-Id: I6b620152d380864db2a725c25f3c916d695d4f81
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1639298
Commit-Queue: Maciej Goszczycki <goszczycki@google.com>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62015}
2019-06-06 09:23:50 +00:00
Maya Lekova
ca10d2babe [turbofan] Brokerize reduction of API calls
JSCallReducer::ReduceCallApiFunction is now heap access free.

Bug: v8:7790
Change-Id: I5718d73589d0bed14149ef0bc084b8a6ab1b9b5b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624792
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62014}
2019-06-06 08:55:19 +00:00
Jakob Gruber
65a25fed8d [regexp] Initially allocate the backtracking stack on the stack
Ideally, in the common case the backtracking stack should be
stack-allocated (and thus cheap). We should only switch to dynamic
allocation if needed. SmallVector implements exactly this strategy, so
switch to that as a backing store.

This improves Octane/RegExp scores (--regexp-interpret-all) by 50%.

Bug: v8:7777,v8:9330
Change-Id: I0d1b07bd8fd94483128e021390d054f483076f8d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1645318
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62013}
2019-06-06 08:06:04 +00:00
Jakob Gruber
b107214265 [code-serializer] Handlify in CodeSerializer::Deserialize
This section potentially contains allocations and thus gc, all object
references should be handlified.

Bug: v8:9333
Change-Id: I5814e66e8b9b75a8bd952afecae7a3a27b42a642
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1647695
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62012}
2019-06-06 06:57:37 +00:00
Mythri A
ea04708ee9 [mjsunit] Fix tests failing with lazy feedback allocation in gc stress
We need to hold onto the bytecode array so it doesn't get flushed.

Bug: v8:8394
Change-Id: Ia583a0a662740e369fcbc1c94041895e463be26e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1645329
Commit-Queue: Mythri Alle <mythria@chromium.org>
Auto-Submit: Mythri Alle <mythria@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62011}
2019-06-06 06:16:37 +00:00
Simon Zünd
0ea2a34bc2 [stack-trace] Add the last remaining fields to StackFrameInfo
This CL adds the last fields needed to stringify all stack frames from
StackFrameInfo objects instead of accessing the FrameArray directly.

Drive-by-change: The factory method that creates StackFrameInfo is
refactored to:
  1. collect all values for the fields
  2. allocate a StackFrameInfo
  3. set all the values on the allocated info object.

This fixes undefined evaluation order bugs that GCMole failed to spot,
as well as make one factory method unnecessary.

Note: More precise types on the fields that are currently "Object"
will happen in a follow up CL.

Bug: v8:8742
Change-Id: Ia8c55fc128434f27aadeba78e8483d90296abe3a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1641242
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62010}
2019-06-06 05:40:17 +00:00
v8-ci-autoroll-builder
8d5f6f9629 Update V8 DEPS.
Rolling v8/build: 388c061..03613cf

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/3344e16..d71ff5d

Rolling v8/third_party/depot_tools: d2f31cc..8a37389

Rolling v8/third_party/googletest/src: f5edb4f..31200de

Rolling v8/tools/swarming_client: 779c4f0..9b1b0ed

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

Change-Id: I3f1e0a20e06f8dba783dd6cc5e300a785de91056
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1646511
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@{#62009}
2019-06-06 03:39:39 +00:00
Ulan Degenbaev
a208d7497e Reland "[heap] Clean up Heap::ConfigureHeap"
This reverts commit ce23fd6400.

Original change's description:
> [heap] Clean up Heap::ConfigureHeap
>
> This re-arranges the implementation of the function to make it more
> consistent. The only functional change is replacement of RoundUp with
> RoundDown, which makes more sense for the limits.
>
> Bug: v8:9306
> Change-Id: Id1d4bc6cc414e3618c3878de8cb87a9ed59711f5
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1643432
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#61997}

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


Change-Id: I2352c1305ea3e617b32951e4b1aa871271800478
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1645330
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62008}
2019-06-05 20:50:25 +00:00
Toon Verwaest
2d44118519 Reland "[zone] Use 32kb instead of 1MB as high zone page size"
This is a reland of a04862021e.
It turns out that this gives ~2x speedup on highly parallel WebAssembly
compilation, so let's try again landing this in isolation.

Original change's description:
> [zone] Use 32kb instead of 1MB as high zone page size
>
> It seems that allocating smaller pages is actually quite a bit faster than
> larger pages, probably because they can be cached by malloc. Let's see what the
> bots say.
>
> In a follow-up I'll check whether the segment-pool is actually beneficial or
> whether we should just remove it.
>
> This also drops SegmentSize::kLarge as a way to make compilation deterministic.
> Turns out that by now we need >8mb anyway, and the previous 1mb wasn't enough.
> At the same time the compiler was fixed to not rely on virtual addresses of
> zone objects anymore, and there's a bot checking whether the snapshot is
> determistic.
>
> Change-Id: I38cbb0d209d68b3671fd38763b42714811f4223e
> Reviewed-on: https://chromium-review.googlesource.com/c/1346370
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57683}

Change-Id: I243ba741f0968879b4cfe9f366d81ddc53a9bf27
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1645326
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62007}
2019-06-05 20:35:56 +00:00
Z Nguyen-Huu
3167b3b600 Add fast path for proxy with isExtensible trap
ObjectIsExtensible is now a Torque builtin (previously CPP) and the Proxy path is implemented completely in Torque while everything else calls into runtime (and is thus a bit slower than previously).

Improvement in micro-benchmark
Before:
IsExtensibleWithoutTrap-Proxies(Score): 2228
IsExtensibleWithTrap-Proxies(Score): 917

After:
IsExtensibleWithoutTrap-Proxies(Score): 3683
IsExtensibleWithTrap-Proxies(Score): 3310

Bug: v8:6664
Change-Id: I1fbe1c51cb724a23d7a59fc8231bb3d1461a6add
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1637444
Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62006}
2019-06-05 17:38:27 +00:00
Suraj Sharma
8dc7da0c07 Reland "[torque] Convert few class layout to torque."
This is a reland of 42fee61a97

The in-object fields of JSModuleNamespace has been excluded from torque.
It is restored back to its existing mechanism on the C++ side and rest
of the class is ported to torque.

Original change's description:
> [torque] Convert few class layout to torque.
>
> 1. Converted Module, JSModuleNameSpace, JSCollator, JSV8BreakIterator,
>       TemplateList,
>       JSStrictArgumentsObject to torque.
>
> Bug: v8:8952
> Change-Id: I01e88ac36acd7ba18791bec609e5ae737672c731
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1619146
> Commit-Queue: Suraj Sharma <surshar@microsoft.com>
> Reviewed-by: Simon Zünd <szuend@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#61671}

Bug: v8:8952
Change-Id: Ibd41000ad96ae57bd4f452f0c0c1b890e2c6fb5c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1632833
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Suraj Sharma <surshar@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#62005}
2019-06-05 16:41:27 +00:00
Tobias Tebbi
437f680e19 [torque] generate files per Torque file instead of per namespace
TBR: yangguo@chromium.org

Bug: v8:7793
Change-Id: Ie680d72a1da23038d3136f82532496eabbd9c363
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1632227
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62004}
2019-06-05 16:12:27 +00:00
Santiago Aboy Solanes
17eb23d1f1 [ptr-compr][cleanup] Adding DecompressIfNeeded to eliminate duplicated code
Cq-Include-Trybots: luci.v8.try:v8_linux64_pointer_compression_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_arm64_pointer_compression_rel_ng
Bug: v8:7703
Change-Id: Iaeb42a7ae049dcacd90596cb541c1b1a2464953a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1645320
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62003}
2019-06-05 14:59:27 +00:00
Sigurd Schneider
5b8903db09 [arm64] Remove unnecessary constant pool block
Change-Id: I1660897803d826d6f2852186d5be7ce5650a32be
Bug: v8:8054
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1643431
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62002}
2019-06-05 14:50:08 +00:00
Simon Zünd
4dcc417335 [torque] Remove for-of loop from Torque
R=tebbi@chromium.org

Bug: v8:7793
Change-Id: Ibba7651f8bd6a8e06b7810a8190d210b4cd54be0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1645324
Auto-Submit: Simon Zünd <szuend@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62001}
2019-06-05 14:38:37 +00:00
Jakob Gruber
3416e1c11d [regexp] Skip interrupt handling if none exist
During regexp execution we usually do not expect any interrupts to
exist. This optimization doubles Octane/RegExp scores with
--regexp-interpret-all.

Drive-by: Do the same for irregexp stack checks (only applicable when
called through the runtime).
Drive-by: Slightly more specific AllowHeapAllocation scopes.

Bug: v8:7777, v8:9328, v8:9330
Change-Id: I502d54d49a1267dee4b8a086dc6c2dca318a2d97
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1645313
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62000}
2019-06-05 13:12:16 +00:00
Maya Lekova
ce23fd6400 Revert "[heap] Clean up Heap::ConfigureHeap"
This reverts commit f2823886ba.

Reason for revert: Causes TSAN timeouts in RestoreHeapLimit, see https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20TSAN/26812

Original change's description:
> [heap] Clean up Heap::ConfigureHeap
> 
> This re-arranges the implementation of the function to make it more
> consistent. The only functional change is replacement of RoundUp with
> RoundDown, which makes more sense for the limits.
> 
> Bug: v8:9306
> Change-Id: Id1d4bc6cc414e3618c3878de8cb87a9ed59711f5
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1643432
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#61997}

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

Change-Id: I635d60fdfb332cf62ab55eb32242937ebee2f6ad
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:9306
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1645323
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61999}
2019-06-05 12:38:56 +00:00
Igor Sheludko
da31c71b6a [ptr-compr] Use only Tagged_t part when comparing Object values
... as it uniquely idenifies object inside an Isolate.
This also allows comparisons between full tagged values ([Maybe]Object)
and potentially compressed tagged values ([Strong]TaggedValue).

As a side effect with this change we should generate a bit less code.

Bug: v8:7703
Change-Id: I822df24e03653fa73314e0a6f81f0fa7b5c61eba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1643433
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61998}
2019-06-05 12:01:18 +00:00
Ulan Degenbaev
f2823886ba [heap] Clean up Heap::ConfigureHeap
This re-arranges the implementation of the function to make it more
consistent. The only functional change is replacement of RoundUp with
RoundDown, which makes more sense for the limits.

Bug: v8:9306
Change-Id: Id1d4bc6cc414e3618c3878de8cb87a9ed59711f5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1643432
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61997}
2019-06-05 11:51:47 +00:00
Simon Zünd
3fcbfdaa92 [stack-trace] Add AppendInt to IncrementalStringBuilder for numbers
This CL changes the way stack trace serialization appends numbers.
Instead of converting plain int to Handle<String>, they are converted
to char*. The reason is that appending a Handle<String> causes the
IncrementalStringBuilder to shrink the current part and create two
ConsString instances to concatenate the accumulator, the current part and
the passed in Handle<String>.

This CL improves stack trace serialization micro benchmarks by ~12%.

Bug: v8:8742
Change-Id: I174667379084381245827cb979f91db3c59ce75e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1643169
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61996}
2019-06-05 11:37:43 +00:00
Georg Schmid
2911a16fa6 Fix Load Elimination crash involving transitioning const stores in loops
R=tebbi@chromium.org

Bug: chromium:964833 chromium:970120
Change-Id: I0fc179aa1e8fc5c13279342501f8639fce9ee7d7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1645315
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Georg Schmid <gsps@google.com>
Cr-Commit-Position: refs/heads/master@{#61995}
2019-06-05 10:47:58 +00:00
Nico Hartmann
91d49028df [js-perf-test] Performance benchmarks for addition of BigInts
Bug: v8:9213
Change-Id: I78e2e4b00c3dec92252adf3823138b14a7bc4a5c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1640202
Commit-Queue: Nico Hartmann <nicohartmann@google.com>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61994}
2019-06-05 10:04:31 +00:00
Thibaud Michaud
b15b2c9104 [wasm] Early compilation of import wrappers
Compile import wrappers during module compilation by introducing import
wrapper compilation units, the goal being to reduce instantiation time.

For each wrapper, we assume the imported function is going to be a
kJSFunctionArityMatchSloppy at instantiation time, which should be the
most common case. If the function turns out to have a different kind the
wrapper is going to be recompiled with the correct kind during instantiation.

R=ahaas@chromium.org, clemensh@chromium.org
CC=titzer@chromium.org

Bug: v8:9231
Change-Id: Ieb050b09d1c19f2a5a3e59132a1864dadb06775d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1630685
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61993}
2019-06-05 09:35:25 +00:00
Clemens Hammacher
fe9d6a49d1 Revert "Enable lazy feedback allocation"
This reverts commit 8c10501be5.

Reason for revert: Fails on all gc-stress bots: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20-%20gc%20stress/22909

Original change's description:
> Enable lazy feedback allocation
> 
> Bug: v8:8394
> Change-Id: I29ffd38725bdcaa9dd11221045dba681eb0d567b
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1643430
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Commit-Queue: Mythri Alle <mythria@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#61991}

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

Change-Id: Ifa2867f5cbbf72cb4bb99f50f0d782ca0642c2f8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8394
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1645314
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61992}
2019-06-05 08:53:56 +00:00
Mythri A
8c10501be5 Enable lazy feedback allocation
Bug: v8:8394
Change-Id: I29ffd38725bdcaa9dd11221045dba681eb0d567b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1643430
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61991}
2019-06-05 08:23:21 +00:00
Georg Neis
bdc4a7c75b Update an #endif annotation
Change-Id: Ibfff9d512dd94b9d086b5a39de6e6a6d089bb033
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1643554
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61990}
2019-06-05 05:47:24 +00:00
v8-ci-autoroll-builder
5ecf7eef05 Update V8 DEPS.
Rolling v8/build: c66b31d..388c061

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/fd813d1..3344e16

Rolling v8/third_party/depot_tools: 0183a1f..d2f31cc

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

Change-Id: I575df20307181db0f8d1085d373c63ce69409a10
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1644652
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@{#61989}
2019-06-05 03:43:00 +00:00
Mathias Bynens
61ce45c9e2 [test] Add %PrepareForOptimization to more tests
With bytecode flushing and lazy feedback allocation, we need to call
%PrepareForOptimization before we call %OptimizeFunctionOnNextCall,
ideally after declaring the function.

Bug: v8:8801, v8:8394, v8:9183
Change-Id: I6bf119e726426df8527d97546b6ce806112c894d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1643167
Auto-Submit: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61988}
2019-06-04 19:58:19 +00:00
Maciej Goszczycki
003473e6fd [heap] Change synchronized_heap uses to not assume heap_ is non-null
Read-only heap sharing clears heap_ in read-only memory chunks because
ReadOnlySpace is shared between multiple isolates.

Bug: v8:7464
Change-Id: I821c94303ab3710c279e6c11a8ca8537aac0d0af
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1642809
Commit-Queue: Maciej Goszczycki <goszczycki@google.com>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61987}
2019-06-04 17:43:10 +00:00
Joey Gouly
f4b6f4af9c [arm64][windows] Ensure 64-bit values in unittest
On Windows, long is 32-bits, so the 'L' suffix shouldn't be used if a
64-bit value is needed. This caused a test failure in 'Int64MulWithImmediate'.

Change-Id: I93c43a1f166aa0e5bcd53aaf7a860fffd006fd0b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627538
Commit-Queue: Martyn Capewell <martyn.capewell@arm.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61986}
2019-06-04 16:30:12 +00:00
Maciej Goszczycki
edf616e9f6 [roheap] Make nosnap and read-only heap sharing mutually exclusive
Bug: v8:7464
Change-Id: I09e5d66a2dc369d031691ef04cd8bb34bb40278e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1642808
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Maciej Goszczycki <goszczycki@google.com>
Cr-Commit-Position: refs/heads/master@{#61985}
2019-06-04 15:08:53 +00:00