Commit Graph

65469 Commits

Author SHA1 Message Date
Zhi An Ng
7d7b25d95c [wasm-simd][x64] Optimize integer splats of constant 0
Integer splats (especially for sizes < 32-bits) does not directly
translate to a single instruction on x64. We can do better for special
values, like 0, which can be lowered to `xor dst dst`. We do this check
in the instruction selector, and emit a special opcode kX64S128Zero.

Also change the xor operation for kX64S128Zero from xorps to pxor. This
can help reduce any potential data bypass delay (search for this on
agner's microarchitecture manual for more details.). Since integer
splats are likely to be followed by integer ops, we should remain in the
integer domain, thus use pxor.

For i64x2.splat the codegen goes from:

  xorl rdi,rdi
  vmovq xmm0,rdi
  vmovddup xmm0,xmm0

to:

  vpxor xmm0,xmm0,xmm0

Also add a unittest to verify this optimization, and necessary
raw-assembler methods for the test.

Bug: v8:11093
Change-Id: I26b092032b6e672f1d5d26e35d79578ebe591cfe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2516299
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70977}
2020-11-05 01:56:30 +00:00
Devlin Cronin
2ccd4dc564 Introduce Function::FunctionProtoToString()
Add a new function on the public API to allow serializing a function to
a string using the built-in toString() implementation, allowing
serialization without worrying about untrusted author script overriding
the toString() implementation. This is similar in nature to
Object::ObjectProtoToString() (but that only returns "[object Function]"
for any passed function).

Add tests for the same.

Bug: chromium:1144841
Change-Id: Ie4c29b870034c0817c23bf91f9424f956098823d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2514768
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70976}
2020-11-05 00:38:40 +00:00
Milad Fa
a3e67fea74 PPC: [wasm-simd] Use P9 vector insert to implement ReplaceLane
Power 9 offers new Vector Insert instructions which now can be used
to implement Replace Lane opcodes. Also changed the input
register to be the same as output.

Change-Id: Ie71b4d44bf715d2f619ee55144ef18e9e727ed9a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2518617
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#70975}
2020-11-04 21:55:10 +00:00
Michael Achenbach
d0c6deb4f6 Revert "[wasm] Fix code offset after module cache hit"
This reverts commit c6c86944ec.

Reason for revert:
https://ci.chromium.org/p/v8/builders/ci/V8%20Blink%20Linux%20Debug/6762
https://test-results.appspot.com/data/layout_results/V8_Blink_Linux_Debug/6762/blink_web_tests%20%28retry%20shards%20with%20patch%29/layout-test-results/results.html

Original change's description:
> [wasm] Fix code offset after module cache hit
>
> If the module cache was hit, we didn't set the code offset in the
> decoded module. Hence it was reported as 0 to the DevTools frontend,
> leading to subsequent errors.
> Note that this error can only happen if multiple isolates share the same
> module, which we cannot easily test in v8. Sharing within a single
> isolate is implemented via the script cache, so we won't report another
> script via CDP.
>
> R=​thibaudm@chromium.org
>
> Bug: chromium:1114143
> Change-Id: I3218a3b12cf5be09d685e3f371f858ab799cef80
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2519560
> Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#70967}

TBR=clemensb@chromium.org,thibaudm@chromium.org

Change-Id: I61528d5000d703ce36ad2ba88cae043220f5f9f5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1114143
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2519569
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70974}
2020-11-04 20:33:22 +00:00
Victor Gomes
f383a92396 Reland "[x64][ia32] Add stack overflow check in InvokePrologue"
This is a reland of adceb45979
Redesign test to not be OS dependent.

Original change's description:
> [x64][ia32] Add stack overflow check in InvokePrologue
>
> In case of no arguments adaptor frame, we massage the arguments in InvokePrologue pushing undefined objects if the actual argument count is below the parameter count. This CL adds a stack overflow check before pushing these undefined objects to the stack.
>
> Change-Id: I2a88bf6fdfd17958f6f6884143a67d50ea842fd2
> Bug: v8:10201
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2491039
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Commit-Queue: Victor Gomes <victorgomes@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#70927}

Bug: v8:10201
Change-Id: Ifab3413b748cdf3bb998a5080cd1fcb3b67a737b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2517921
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70973}
2020-11-04 19:26:09 +00:00
Frank Tang
b0a7f56911 Update to ICU68-1
ICU68-1 change the output skeleton format. So we need to change
resolvedOptions code for 68 migration.

Chromium roll
https://chromium-review.googlesource.com/c/chromium/src/+/2474093

Bug: v8:10945
Change-Id: I3b2c7fbe8abb22df8fa51287c498ca3245b8c55b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2477431
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70972}
2020-11-04 19:14:59 +00:00
Victor Gomes
18d79f90cf [deoptimizer] Fix define typo and inlined frame base
Change-Id: I81ace5b6abf883c80bea1fada94a66888b16745a
Bug: chromium:1144672, v8:10201
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2512923
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70971}
2020-11-04 18:39:04 +00:00
Daniel Vogelheim
543e5633af [api] TC39 Dynamic Code Brand checks - rename for consistency.
Rename-only CL: Rename "code kind" to "code like".

The reason is CL feedback when using this feature, and a desire for
consistency across V8 + Blink. An additional benefit would be to
disambiguate from the v8::internal::CodeKind type, which is unrelated to
any of this.

Original CL: crrev.com/c/v8/v8/+/2339618
CL whose review prompted this change: crrev.com/c/2340905

Bug: chromium:1096017
Change-Id: Id59016fc2906ab6cd1414e598338b3963811b92f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2509598
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Daniel Vogelheim <vogelheim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70970}
2020-11-04 16:35:21 +00:00
Camillo Bruni
a8eea87933 [tools] Port more tools to ES6 classes
Convert Profile, CodeMap and their helpers to ES6 classes.
Code cleanup will happen in a separate step.

Bug: v8:10667
Change-Id: Icfb28f6d9ef7f00efba93b347fdf210a9af36a49
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2509591
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70969}
2020-11-04 14:45:41 +00:00
Almothana Athamneh
73ed5430bf Disassociate runtime_deps from the stamp file
Bug: v8:11102
Change-Id: I40ce923a42097bf76a4b53c61bab1ef983523f64
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2519557
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70968}
2020-11-04 14:37:41 +00:00
Clemens Backes
c6c86944ec [wasm] Fix code offset after module cache hit
If the module cache was hit, we didn't set the code offset in the
decoded module. Hence it was reported as 0 to the DevTools frontend,
leading to subsequent errors.
Note that this error can only happen if multiple isolates share the same
module, which we cannot easily test in v8. Sharing within a single
isolate is implemented via the script cache, so we won't report another
script via CDP.

R=thibaudm@chromium.org

Bug: chromium:1114143
Change-Id: I3218a3b12cf5be09d685e3f371f858ab799cef80
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2519560
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70967}
2020-11-04 14:02:51 +00:00
Jakob Gruber
93a8c4c9d7 [objects] Documentation, minor refactors in compilation cache
The various compilation caches are tricky to understand. Hopefully
some addtl. documentation helps.

Bug: v8:8888
Change-Id: I20f2778b5548fcc38724aca600ccf770c240758d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2516476
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70966}
2020-11-04 12:39:51 +00:00
Camillo Bruni
5ce10a0b5e [api] Add updated ScriptCompiler::StartStreaming API
The new api removes the unused CompileOptions argument.

Change-Id: Ie3c48cda5247da9ce87d70a90b7ab9c43d5e8e37
Bug: chromium:1061857
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2498698
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70965}
2020-11-04 12:38:46 +00:00
Liu Yu
7257dc93c0 [mips] Remove arguments adaptor frame
Port: 958d8e9f32

Bug: v8:10201

Change-Id: I27d29f2a1f1d5f659d558b5fd776b88474d9b140
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2513867
Auto-Submit: Liu yu <liuyu@loongson.cn>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70964}
2020-11-04 12:37:41 +00:00
Jakob Gruber
0593cb7218 [regexp] Don't recognize the 'l' flag unless enabled
.. by the runtime flag --enable-experimental-regexp-engine.

Introduced in https://chromium-review.googlesource.com/c/v8/v8/+/2461244

Tbr: neis@chromium.org
Bug: v8:10765
Change-Id: Ic32464ced7e5ddb4c31fe165eddb6b9d19260efc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2516920
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70963}
2020-11-04 12:36:36 +00:00
Mike Stanton
1ef2936adf [TurboFan] Concurrency test needs to accept that worker thread exits
Timeouts occurred in test-concurrent-feedback-vector/CheckLoadICStates
because the main thread could enter "handshaking" mode precisely at
the moment when the worker thread successfully saw all states.
The main thread would miss this, and end up waiting forever on
a signal from the worker thread.

Bug: v8:11082
Change-Id: I0441785d908c5e27562a3620bb2195483727f118
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2519553
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70962}
2020-11-04 12:35:31 +00:00
Clemens Backes
4f4dda3f84 Revert "[wasm-simd][x64] Optimize pmin/pmax and add horiz for AVX"
This reverts commit 3c4e434f0c.

Reason for revert: Fails noavx tests: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20-%20debug/34613

Original change's description:
> [wasm-simd][x64] Optimize pmin/pmax and add horiz for AVX
>
> The AVX versions of these instructions can take 3 operands, so we don't
> need to force dst == src.
>
> Bug: v8:9561
> Change-Id: If346a05f7d599bf0d636263cafc3bc823c3b8452
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2515337
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#70958}

TBR=clemensb@chromium.org,zhin@chromium.org

Change-Id: I5fcdd2e51d418cb32a1b1e2bec7c0dff19f29154
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:9561
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2519558
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70961}
2020-11-04 11:15:12 +00:00
Maya Lekova
ccce6f2a59 Revert "Update V8 DEPS."
This reverts commit 6e780005f7.

Reason for revert: GN roll in v8/buildtools is causing an MB error - https://bugs.chromium.org/p/v8/issues/detail?id=11102

Original change's description:
> Update V8 DEPS.
>
> Rolling v8/build: 92c40db..ef5fe70
>
> Rolling v8/buildtools: 98881a1..95fa84e
>
> Rolling v8/buildtools/linux64: git_revision:e002e68a48d1c82648eadde2f6aafa20d08c36f2..git_revision:f5f465b52e5df6d4de9fbe67cc79f1914ba4dbfc
>
> Rolling v8/third_party/aemu-linux-x64: uqYfh08DTmvjUgXl-HxNY1ptIb0KpyuY0I9MFaci9-AC..QCu1udNpe84cj5K2ZaTcAwnDUyjm45HgGJgtnoFkp7gC
>
> Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/888c272..c5bd411
>
> Rolling v8/third_party/depot_tools: 655afeb..5bdfcd8
>
> Rolling v8/third_party/zlib: 8cd0fc1..e84c9a3
>
> Rolling v8/tools/clang: 4c43492..c37ae57
>
> Rolling v8/tools/luci-go: git_revision:1a022d3a4c50be4207ee93451255d71896416596..git_revision:576741d3eed0fa33971fb34cd823650e6f5b47fb
>
> Rolling v8/tools/luci-go: git_revision:1a022d3a4c50be4207ee93451255d71896416596..git_revision:576741d3eed0fa33971fb34cd823650e6f5b47fb
>
> Rolling v8/tools/luci-go: git_revision:1a022d3a4c50be4207ee93451255d71896416596..git_revision:576741d3eed0fa33971fb34cd823650e6f5b47fb
>
> TBR=machenbach@chromium.org,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com
>
> Change-Id: I2395c6577e023d2aa48cf15b1f88e0207bd3f381
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2518492
> 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@{#70959}

TBR=machenbach@chromium.org,v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: I2f86e73d2991a2d4617b67c6646d2e7b5a83b50b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2518672
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70960}
2020-11-04 09:16:00 +00:00
v8-ci-autoroll-builder
6e780005f7 Update V8 DEPS.
Rolling v8/build: 92c40db..ef5fe70

Rolling v8/buildtools: 98881a1..95fa84e

Rolling v8/buildtools/linux64: git_revision:e002e68a48d1c82648eadde2f6aafa20d08c36f2..git_revision:f5f465b52e5df6d4de9fbe67cc79f1914ba4dbfc

Rolling v8/third_party/aemu-linux-x64: uqYfh08DTmvjUgXl-HxNY1ptIb0KpyuY0I9MFaci9-AC..QCu1udNpe84cj5K2ZaTcAwnDUyjm45HgGJgtnoFkp7gC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/888c272..c5bd411

Rolling v8/third_party/depot_tools: 655afeb..5bdfcd8

Rolling v8/third_party/zlib: 8cd0fc1..e84c9a3

Rolling v8/tools/clang: 4c43492..c37ae57

Rolling v8/tools/luci-go: git_revision:1a022d3a4c50be4207ee93451255d71896416596..git_revision:576741d3eed0fa33971fb34cd823650e6f5b47fb

Rolling v8/tools/luci-go: git_revision:1a022d3a4c50be4207ee93451255d71896416596..git_revision:576741d3eed0fa33971fb34cd823650e6f5b47fb

Rolling v8/tools/luci-go: git_revision:1a022d3a4c50be4207ee93451255d71896416596..git_revision:576741d3eed0fa33971fb34cd823650e6f5b47fb

TBR=machenbach@chromium.org,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: I2395c6577e023d2aa48cf15b1f88e0207bd3f381
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2518492
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@{#70959}
2020-11-04 03:47:42 +00:00
Zhi An Ng
3c4e434f0c [wasm-simd][x64] Optimize pmin/pmax and add horiz for AVX
The AVX versions of these instructions can take 3 operands, so we don't
need to force dst == src.

Bug: v8:9561
Change-Id: If346a05f7d599bf0d636263cafc3bc823c3b8452
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2515337
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70958}
2020-11-04 00:45:23 +00:00
Milad Fa
35ecf0cde9 PPC: [wasm-simd] Saturate swizzle indices to 5 bits
`vperm` indices are taken from the five least significant bits
of the input byte. We need to make sure bigger values
are saturated to 31 to make vperm select 0 as the output.

Change-Id: I27ad77684b99f32a7fd7f690dec0b127be3ad9e7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2518343
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#70957}
2020-11-03 22:00:42 +00:00
Shu-yu Guo
e1fd3f6916 [flags] Remove --harmony-promise-all-settled
It's shipped since M76.

Bug: v8:9060
Change-Id: Ifb107f3ef77ab803d5c0ce34f0a31ac33088c41a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2510610
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70956}
2020-11-03 19:34:42 +00:00
Shu-yu Guo
5a03fbeba4 [flags] Remove --harmony-namespace-exports
It's shipped since M72.

Bug: v8:8101
Change-Id: I80856b9e1acfb6e434f20b6174e864f8c4e2896a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2509945
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70955}
2020-11-03 18:51:32 +00:00
Shu-yu Guo
a5e33a57d7 [flags] Remove --harmony-import-meta
It's shipped since M64.

Bug: v8:6693
Change-Id: Ifc547c0036dd7e5f7bab9bcb169abee0157f73b3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2509943
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70954}
2020-11-03 18:05:52 +00:00
Shu-yu Guo
49dc0e311a [flags] Remove --harmony-dynamic-import
It's shipped since M63.

Bug: v8:5785
Change-Id: Iaa591890edc560bc58b7a6b18ad5787d747f1ba4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2509942
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70953}
2020-11-03 17:11:52 +00:00
Frank Emrich
4b6455aab6 [dict-proto] Add support for ordered property dicts, pt.1
This CL adds partial support for objects whose slow mode dictionaries
are OrderedNameDictionaries. This is the case for all slow mode objects
if V8_DICT_MODE_PROTOTYPES is enabled.

Bug: v8:7569
Change-Id: I0b5a0d751e6551e78121569ddefd9e00c164cc5a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2489692
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Frank Emrich <emrich@google.com>
Cr-Commit-Position: refs/heads/master@{#70952}
2020-11-03 16:22:42 +00:00
Mythri A
5326c4f86e [turboprop] Turnoff inlining for Turboprop based on compilation target
Turboprop adds a negative implication for inlining to disable inlining
with turboprop. When we add tiering up support from Turboprop, this
implication means we would no longer inline functions even with
Turbofan. This cl instead turns off inlining for turboprop compilations
so we still don't inline for Turboprop compilations but support
inlining for Turbofan.

Bug: v8:9684
Change-Id: I5c7d2ca02f591ea007d66725200f12a4b0025d85
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2517119
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70951}
2020-11-03 15:11:57 +00:00
Etienne Pierre-doray
b6d1fc1669 [test] Fix platform lifetime in test-streaming-compilation
Currently MockPlatform has shorter lifetime than the isolate that uses
it. Creating isolate before MockPlatform leads to races in concurrent
tasks that were scheduled before the MockPlatform replaced the default
TestPlatform. This caused issues after landing
https://chromium-review.googlesource.com/c/v8/v8/+/2502808

This CL ensures that MockPlatform is valid throughout the whole
lifetime of the isolate

Change-Id: Ia888fba93819ea98b935a1d36307d98dd358fcad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2507379
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70950}
2020-11-03 15:06:26 +00:00
Jakob Gruber
c3b2b64be4 [nci] Enable --turbo-nci behind --future to gather perf data
.. to be reverted in a day or two.

Bug: v8:8888
Change-Id: Iee156da614b50c351ca9a07cc497177c92de865d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2512907
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Lutz Vahl <vahl@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70949}
2020-11-03 14:52:07 +00:00
Andreas Haas
4c2fd721d6 [wasm][interpreter] Check for shared memory in atomic.wait
For atomic.wait we have to check in generated code if the memory is
shared. If not, the code has to trap. In compiled code, this is done in
the runtime function. In the interpreter, however, this check was
missing. This CL adds the check to the interpreter.

R=thibaudm@chromium.org

Bug: chromium:1144603
Change-Id: If897e3f10b404ff677341ee14ad9eda7f5e64d16
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2512922
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70948}
2020-11-03 13:21:26 +00:00
Mike Stanton
8574179a90 [feedback] Only take read lock for data pairs on the background thread
Slight performance regression by adding locking around feedback
vector get/set. The lock isn't necessary for reads on the main thread,
since the main thread is the only source of change.

Bug: chromium:1144777
Change-Id: I7cc9898ad0d8e8c468ba150c0bc6bef3176fd256
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2516475
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70947}
2020-11-03 12:53:06 +00:00
Dominik Inführ
70a1de97c6 [heap] Fix flaky test failure in concurrent allocation
Concurrent allocation test was failing flakily. Do not fix this simply
by increasing heap size since this would reduce frequency of GCs.
Instead allow allocations to fail. Even in this case the allocation
code path is still executed which we want to test.

Bug: v8:11084, v8:10315
Change-Id: I0daa9ad9177aab8b02b7decf2ccfd50e0d8ab9b6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2516471
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70946}
2020-11-03 12:48:16 +00:00
Santiago Aboy Solanes
fd1111a486 [object] Ensure FlatContent and FlatStringReader are main thread only
String::FlatContent and FlatStringReader are ways of reading a flat
String. Both of them provide a speedy interface to read a String since
they bypass the dynamic dispatch of String::Get. For this very same
reason, they are not safe to be used from background threads.

Bug: v8:7790
Change-Id: I919ae5e3862df81ff3ebb5131144ff5961197b35
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2509596
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70945}
2020-11-03 12:43:56 +00:00
Jakob Gruber
ee9cc344db [objects] Extract compilation-cache-table.cc
Rename files to match contents (src/objects/compilation-cache-table*),
and extract implementations from objects.cc into dedicated .cc file.

Bug: v8:8888
Change-Id: I02915316ee62186f94373b1859c7d8119a1953f1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2516473
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70944}
2020-11-03 12:18:49 +00:00
Jakob Gruber
19463165f7 [feedback] Minor name and type changes
Minor refactors to improve readability and consistency between
FeedbackVectorSpec and FeedbackMetadata:

- Rename FeedbackVectorSpec::slots to slot_count.
- Rename FeedbackVectorSpec::closure_feedback_cells to
  create_closure_slot_count, likewise all related fields.
- Store FeedbackVectorSpec::slot_kinds_ as an array of
  FeedbackSlotKind.

Bug: v8:8888
Change-Id: I3a45177163d1484b1625de8dfba5c6c05cfc426d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2512908
Reviewed-by: Mythri Alle <mythria@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70943}
2020-11-03 11:50:29 +00:00
Eric Seckler
7c437e989c tracing: Add v8.stack_trace category to perfetto category list.
This broke building with the use_perfetto_client_library gn flag.

Change-Id: Ifbcaf77286c0d121b463e4867913d63b85da7fc6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2516701
Commit-Queue: Eric Seckler <eseckler@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Auto-Submit: Eric Seckler <eseckler@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70942}
2020-11-03 11:43:59 +00:00
Liu Yu
b1033eb61f [mips64][liftoff] Fix shift instructions
Port 42e8c2310a

Because the shift amount may not a 5-bit or 6-bit value, remove the
DCHECK in shift operations like x86 and arm platforms;

Change-Id: I50e8f4662ced9eadcc4d867c5862077174619f1d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2509089
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Auto-Submit: Liu yu <liuyu@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#70941}
2020-11-03 10:46:19 +00:00
Sathya Gunasekaran
df7a86c3bf Revert "GetCurrentStackPosition() -> base::Stack::GetCurrentStackPosition()"
This reverts commit 8156dd85fc.

Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Win64%20ASAN/15800/overview

Original change's description:
> GetCurrentStackPosition() -> base::Stack::GetCurrentStackPosition()
>
> Remove the duplicate utility function and use the base::Stack
> equivalent instead which provides more stack utilitiy functionality.
>
> Change-Id: Ia7a79f2530b64ceb6e2ce33445c876980b4b2a3d
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2509595
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#70930}

TBR=mlippautz@chromium.org,clemensb@chromium.org,verwaest@chromium.org

Change-Id: Id18949a3c82171e74370e729cd303607d46c8805
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2515431
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Commit-Queue: Sathya Gunasekaran  <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70940}
2020-11-03 09:42:42 +00:00
Simon Zünd
4a26b54d63 Remove dead code in the CommandlineAPI destructor
The CommandlineAPI destructor retrieves the property descriptors for
every function it installed on the global object, but it doesn't do
anything with the descriptor directly, just verifies that it could
retrieve them.

As there are cases where 'getOwnPropertyDescriptor' can actually fail,
such as stack overflow or termination exceptions, we remove the check.

R=yangguo@chromium.org

Bug: chromium:914286
Change-Id: I01147195bdf107131de602789f448abe0afa6b0e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2516470
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70939}
2020-11-03 09:37:59 +00:00
Sathya Gunasekaran
91ace57f43 Reland "[presubmit] Add JS formatting for tools/system-analyzer"
This is a reland of 1ec8f1da4f

Original change's description:
> [presubmit] Add JS formatting for tools/system-analyzer
>
> Bug: v8:10670
> Change-Id: Ifb653ada003719faff261b6e5b2169db37cffdaf
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2282522
> Reviewed-by: Tamer Tas <tmrts@chromium.org>
> Commit-Queue: Sathya Gunasekaran  <gsathya@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#68909}

Bug: v8:10670
Change-Id: I4903b3eb8ff39a76594324076f0840b06290044e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2307229
Commit-Queue: Sathya Gunasekaran  <gsathya@chromium.org>
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70938}
2020-11-03 09:18:49 +00:00
Zhao Jiazhong
efff3d18ec [mips64][wasm-simd] Implement v128.load32_zero v128.load64_zero
Port 9124b7f973
https://chromium-review.googlesource.com/c/v8/v8/+/2485250

Port f89869a213
https://chromium-review.googlesource.com/c/v8/v8/+/2486236

Bug: v8:11038
Change-Id: Ia524e6ca11650b35916f1a78e7c859a570146a50
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2513870
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#70937}
2020-11-03 09:11:39 +00:00
Liu Yu
a63243f8f6 [mips][turboprop] Fix IET to check optimization marker before optimized code
Port 808a5d76dc

Change-Id: Ibdff3a17ac7f2aab12543eb913e8b739559287bd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2515326
Auto-Submit: Liu yu <liuyu@loongson.cn>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70936}
2020-11-03 07:09:29 +00:00
Andreas Haas
239b1621e1 [wasm] Add wasm.WasmToJSWrapperCompilation tracing category
R=clemensb@chromium.org

Bug: v8:11074
Change-Id: Ic65dd7c1f7beac65ae24aab1d657715374434500
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2507721
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70935}
2020-11-03 05:56:19 +00:00
v8-ci-autoroll-builder
133e65efd5 Update V8 DEPS.
Rolling v8/build: eb675d7..92c40db

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/dcd4fb3..888c272

Rolling v8/third_party/depot_tools: 9396c2b..655afeb

Rolling v8/tools/clang: e5230a2..4c43492

TBR=machenbach@chromium.org,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: Iac7c9de526c2a1a176fac96bd804cdf5fbf9c68c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2516079
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@{#70934}
2020-11-03 03:58:59 +00:00
Zhi An Ng
c53ae8d566 [arm][simulator] Break up DecodeAdvancedSIMDTwoOrThreeRegisters
Following the disassembler, break up these opcodes into a separate
function.  The decoding follows the disassembler quite closely, except
in places where the simulator implementation grouped opcodes together to
share code.

Code is all copy paste, more clean ups to follow.

Bug: v8:11074
Change-Id: I426d3542715a27e7c3a49e2118efebe595c7baa4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2509091
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70933}
2020-11-03 02:15:18 +00:00
Zhi An Ng
94720ab94e [arm][simulator] Break up Advanced SIMD data processing instructions
These correspond to the SpecialValue 4 and 6, I extracted them out into
their own section, following the decoding guide in the manual (and used
in the disassembler).

Mostly copy paste, actual code changes limited to breaking up logic for
separate opcodes so they end up in different clauses.

Bug: v8:11074
Change-Id: I15d9ed4a65291a55c76a11db3d24803cd79100ef
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2509090
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70932}
2020-11-03 01:16:18 +00:00
Zhi An Ng
71733d2891 [wasm-simd] Clean up test-run-wasm-simd
IWYU some headers, remove/inline helpers that were only used once.

Bug: v8:11074
Change-Id: I3e3d7e22b56e77076f1a2faac07ca727fb6e4f46
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2513871
Reviewed-by: Ben Smith <binji@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70931}
2020-11-03 00:18:28 +00:00
Michael Lippautz
8156dd85fc GetCurrentStackPosition() -> base::Stack::GetCurrentStackPosition()
Remove the duplicate utility function and use the base::Stack
equivalent instead which provides more stack utilitiy functionality.

Change-Id: Ia7a79f2530b64ceb6e2ce33445c876980b4b2a3d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2509595
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70930}
2020-11-02 20:27:38 +00:00
Junliang Yan
37a38eba65 PPC: Disable CP on builtins
Also updated LoadConstantPoolPointerRegisterFromCodeTargetAddress
to add instruction size to the new constant_pool_offset.

Bug: v8:11036
Change-Id: Ib92a1b0606c60f82628d3e63ade54b312e4cf196
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2508691
Commit-Queue: Junliang Yan <junyan@redhat.com>
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70929}
2020-11-02 18:21:58 +00:00
Victor Gomes
5d122bdc59 Revert "[x64][ia32] Add stack overflow check in InvokePrologue"
This reverts commit adceb45979.

Reason for revert:
- ConcurrentAllocationInLargeSpace fails in verify CSA bot: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20-%20verify%20csa/20547
- New test fail on Windows bot: https://ci.chromium.org/p/v8/builders/ci/V8%20Win32/29622

Original change's description:
> [x64][ia32] Add stack overflow check in InvokePrologue
>
> In case of no arguments adaptor frame, we massage the arguments in InvokePrologue pushing undefined objects if the actual argument count is below the parameter count. This CL adds a stack overflow check before pushing these undefined objects to the stack.
>
> Change-Id: I2a88bf6fdfd17958f6f6884143a67d50ea842fd2
> Bug: v8:10201
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2491039
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Commit-Queue: Victor Gomes <victorgomes@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#70927}

TBR=neis@chromium.org,ishell@chromium.org,victorgomes@chromium.org

Change-Id: I7371e1603659ce512a39c0c0a8bb01baf7b916e0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:10201
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2514505
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70928}
2020-11-02 18:10:50 +00:00