Commit Graph

61603 Commits

Author SHA1 Message Date
Anna Henningsen
bb9f0c2b2f [snapshot] Improve snapshot docs and error printing
- Minor improvements to the documentation for snapshotting.
- Add newlines to printed errors where necessary.

Change-Id: I822e7e850adb67eae73b51c23cf34e40ba3106f0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2144954
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67111}
2020-04-14 13:04:29 +00:00
Leszek Swirski
0c2530ffd1 [test] Create one Isolate per unit test (not test suite)
Change the unittests Isolate mixin to create one Isolate per test,
rather than one per test suite. We usually run these tests independently
in separate processes anyway, so this shouldn't affect normal test
execution, but it will avoid Isolate state leaking across tests when
running the unittests binary directly.

Take this opportunity to also clean up the mixins, changing counter
initialization and forcing pointer compression into template traits.

Bug: v8:10142
Change-Id: If92046f9c6f2056252d099faed04d97844ef7319
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2143818
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67110}
2020-04-14 11:36:25 +00:00
Michael Lippautz
e83936120e cppgc: Provide Visitor::Trace for WeakMember
Provides the infrastructure to register weak callbacks for
WeakMember<T> through visitor. The WeakCallbackInfo broker is used to
query objects for liveness. In a future CL the same broker object is
passed to custom weak callbacks.

Change-Id: I8b5a66354e0e457521989d40ae64a9558c339503
Bug: chromium:1056170
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2142265
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67109}
2020-04-14 10:37:35 +00:00
Shu-yu Guo
667c0d3606 Support the o?.#foo syntax
Bug: v8:10371, v8:10396
Change-Id: I55359ac5d96369962d472f8a7e5d01303b823be0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2145240
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67108}
2020-04-14 10:16:25 +00:00
Michael Lippautz
bc12982d51 cppgc: LivenessBroker
Introduce LivenessBroker which is a temporary broker object to expose
liveness during specific garbage collection phases.

This broker can be used to handle:
- PreFinalizer
- Custom weak callbacks
- Internal weak callbacks used for WeakMember

Change-Id: I3870c2b89b2538f04feabf2eb7a4676ce2fe7d61
Bug: chromium:1056170
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2144059
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67107}
2020-04-14 08:57:12 +00:00
Omer Katz
3a4b9940b3 heap: Add Oilpan folks to COMMON_OWNERS
This adds ownership of tests.

Bug: chromium:1056170
Change-Id: Ibed6ee0024d34c886817d273660922d5cc6865ec
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2141734
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67106}
2020-04-14 08:55:52 +00:00
Zhao Jiazhong
22b09a61c2 [mips][wasm-simd][liftoff] Implement sub_saturate
Port c054847d0c
https://crrev.com/c/2131323

Change-Id: I21e534399eed573affd3bf65004b3e570c549ff4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2147573
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#67105}
2020-04-14 07:30:10 +00:00
Zhou, Zhiguo
4558c1dfc5 [wasm-simd][liftoff] Implement abs on x64 and ia32
As a drive-by, the order of rounding_average_u is adjusted according to src/wasm/wasm-opcodes.h.

Bug: v8:9909
Change-Id: Ia3a2ed5869f8df8a2191afa034e0b9438de98bc5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2141654
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Zhiguo Zhou <zhiguo.zhou@intel.com>
Cr-Commit-Position: refs/heads/master@{#67104}
2020-04-13 23:43:47 +00:00
Clemens Backes
335c9941a9 [wasm] Temporarily disable native module cache
v8.1 has a stability issue where we free code too early. Thus disable
for now, such that we can merge this back to v8.1.
v8.2 does not have this problem, since https://crrev.com/c/2078583 fixed
it. This CL is not easily backmergable though.

R=tebbi@chromium.org

Bug: chromium:1070199, chromium:1070182
Change-Id: I4bf468b3e7b5b1e66b314907f844d4195b3ff029
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2144966
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67103}
2020-04-13 17:51:52 +00:00
Zhao Jiazhong
0d011fb21f [mips][wasm-simd][liftoff] Implement neg
Port 445f9ef13c
https://crrev.com/c/2107511

Change-Id: Ib3517c186da6e49574b873ac568afd0e8e4336c5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2143980
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#67102}
2020-04-13 16:01:27 +00:00
Milad Farazmand
0b15ec3fbe PPC/s390: [wasm-simd][liftoff] Implement neg on x64 and ia32
Port 445f9ef13c

R=zhiguo.zhou@intel.com, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: I3b383071ea26286e9d1d5121565020a0c6f31a91
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2147030
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#67101}
2020-04-13 14:33:51 +00:00
Milad Farazmand
d29853c5c3 PPC/s390: [wasm-simd] [liftoff] Implement rounding average on x64 and ia32
Port bd04ee0864

R=fanchen.kong@intel.com, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: I3b8e2625816a8517a0557882d6acdb6d6f28766b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2147029
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#67100}
2020-04-13 13:58:02 +00:00
Kong, Fanchen
c054847d0c [wasm-simd] [liftoff] Implement sub_saturate on x64 and ia32
Bug: v8:9909
Change-Id: I13d7ae7b304fe55645ef7bcc9ac404782bb55d4e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2131323
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Fanchen Kong <fanchen.kong@intel.com>
Cr-Commit-Position: refs/heads/master@{#67099}
2020-04-13 12:05:31 +00:00
Zhao Jiazhong
ffb4f2b77f [mips][wasm-simd][liftoff] Implement rounding average
Port bd04ee0864
https://crrev.com/c/2143386

Change-Id: I547c9b5b341abe76d6983a07633129299c32e017
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2143978
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#67098}
2020-04-11 01:41:28 +00:00
Milad Farazmand
bf7e23afba S390: Fix a typo within the conservative stack comments
Change-Id: Iaa39a9fd8ee0a80b04c5664328931383545e074b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2144747
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#67097}
2020-04-10 15:50:36 +00:00
Zhou, Zhiguo
445f9ef13c [wasm-simd][liftoff] Implement neg on x64 and ia32
Bug: v8:9909
Change-Id: I21980ee97e0d2483c064e40cae181297b4d563a1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2107511
Commit-Queue: Zhiguo Zhou <zhiguo.zhou@intel.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67096}
2020-04-10 01:43:25 +00:00
Kong, Fanchen
bd04ee0864 [wasm-simd] [liftoff] Implement rounding average on x64 and ia32
Bug: v8:9909
Change-Id: I5dd3e88ab6f7508a07b2a8e5adb033fff7e28fe2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2143386
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Fanchen Kong <fanchen.kong@intel.com>
Cr-Commit-Position: refs/heads/master@{#67095}
2020-04-10 01:37:44 +00:00
Zhao Jiazhong
2bfc26581e [mips][wasm-simd][liftoff] Reorder SIMD opcodes
Port 04b6e0de24
https://crrev.com/c/2135074

Original Commit Message:

  This reorders the SIMD opcodes together with their implementations
  on x64, ia32 according to src/wasm/wasm-opcodes.h.

Change-Id: I82c8b678eb65b616d02d20333d479ee4ae0564d0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2143974
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#67094}
2020-04-10 00:48:16 +00:00
Milad Farazmand
216e2f4d6f PPC/s390: cppgc: Conservative stack scanning
Port 1a7f568987

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

Change-Id: I4db697c6a0fab9bd3c9dda4761c3af3ade509ffa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2144691
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67093}
2020-04-09 22:37:06 +00:00
Milad Farazmand
51af323d71 AIX: base: Add Stack utilities
Port da4099299f

Original Commit Message:

    Adds:
    - GetStackStart
    - GetCurrentStackPosition
    - GetStackSlot which translates a stack slot through ASAN
      if needed

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

Change-Id: Icdf50db1c4d0b6ce3c9819cda4663dc640ec6f43
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2144292
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#67092}
2020-04-09 21:52:46 +00:00
Ng Zhi An
affc364620 Reland "[wasm-simd][x64] Cleanup unnecessary CpuFeatureScope"
This relands commit df20428886 with the
addtional fix to Haddps to enable SSE3 scope.

There are a couple more left in some i64x2 ops, but those are not in the
proposal, so I've left them as it is.

Bug: v8:9561
Change-Id: I88fd5f88809e629f53a65d67ea5b11562111b44a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2136067
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67091}
2020-04-09 18:34:04 +00:00
Clemens Backes
e652f8da77 [wasm][debug] Test debug side tables in debug mode
In production, the debug side tables will always be produced with
Liftoff in debug mode ({CompilationEnv::debug} being set).
Thus, this CL switches the tests to also test this configuration.

R=thibaudm@chromium.org

Bug: v8:10410
Change-Id: I3fa16f099d2bb612c7abf8c3ef518e1446564306
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2144119
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67090}
2020-04-09 16:16:04 +00:00
Richard Townsend
ec3731d7f7 [arm64] fix: PushAllRegistersAndIterateStack name for Windows on Arm
Bug: v8:10407
Change-Id: I4fb6544ca575e115ed84c1e15911794f3fb4a627
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2144112
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Richard Townsend <richard.townsend@arm.com>
Cr-Commit-Position: refs/heads/master@{#67089}
2020-04-09 16:05:24 +00:00
Camillo Bruni
8bdfb966f1 [tools] Fix map-processor
- Fix property name table with very long names
- List all keyboard shortcuts

Change-Id: I4eba14143a0cf71f4e8c02159a1f16113aa2600a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2142267
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67088}
2020-04-09 15:21:04 +00:00
Thibaud Michaud
a874463aff Reland "[wasm] Cleanup wasm script creation"
This is a reland of f902ef3257

Original change's description:
> [wasm] Cleanup wasm script creation
> 
> - Do not expose CreateWasmScript since we should now use
> WasmEngine:GetOrCreateScript instead,
> - Initialize all Script fields in CreateWasmScript, not in
> WasmModuleObject::New,
> - Do not pass code size estimate argument, since we can always use the
> actual native module's committed code space.
> 
> R=clemensb@chromium.org
> 
> Bug: v8:10349
> Change-Id: If9250d62ffc271ab6efc3b9c45958a305c9d1827
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2135633
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#67083}

Bug: v8:10349
Change-Id: I38c8b6beb07a1e5d565c6a5fd749daea147817bb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2144064
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67087}
2020-04-09 14:43:54 +00:00
Mathias Bynens
93b4f186dd Improve terminology for internal promise state
Per the spec [1], a resolved promise may be “pending, fulfilled, or
rejected”, but previously V8 incorrectly used the term “resolved”
instead of “fulfilled”. This change is user-observable through the
`d8` REPL and the DevTools Console.

Corresponding DevTools CL:
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2141673

Corresponding Chromium CL:
https://chromium-review.googlesource.com/c/chromium/src/+/2144095

[1]: https://tc39.es/ecma262/#sec-properties-of-promise-instances

Bug: v8:6751, v8:5416
Change-Id: I6c5302c280d01cf681c6358add3d2e88fbffa36f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2144011
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67086}
2020-04-09 13:44:24 +00:00
Clemens Backes
e24b8bf751 Revert "[wasm] Cleanup wasm script creation"
This reverts commit f902ef3257.

Reason for revert: Makes gc-stress unhappy: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20-%20gc%20stress/27404

Original change's description:
> [wasm] Cleanup wasm script creation
> 
> - Do not expose CreateWasmScript since we should now use
> WasmEngine:GetOrCreateScript instead,
> - Initialize all Script fields in CreateWasmScript, not in
> WasmModuleObject::New,
> - Do not pass code size estimate argument, since we can always use the
> actual native module's committed code space.
> 
> R=​clemensb@chromium.org
> 
> Bug: v8:10349
> Change-Id: If9250d62ffc271ab6efc3b9c45958a305c9d1827
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2135633
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#67083}

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

Change-Id: Iac2978af1a300ec079baebab0feb8c9598711738
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:10349
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2144058
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67085}
2020-04-09 12:39:13 +00:00
Nico Hartmann
a056cea51e Revert "Reland "cppgc: Add page memory allocation backend""
This reverts commit 3e1c70402e.

Reason for revert: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20TSAN%20-%20concurrent%20marking/12665

Original change's description:
> Reland "cppgc: Add page memory allocation backend"
> 
> This is a port of src/components/gc that was added recently.
> 
> Differences:
> - Added back bucketing to the page pool, as that guarantees that
>   arenas used for specific types do not have their pages used by other
>   arenas.
> - Replaced base::flat_map with std::map. This may cause performance
>   regressions when using PageMemoryRegionTree in hot paths. A
>   vector-like representation may be used to fix such a regression
> 
> This reverts commit 656c68a781.
> 
> Bug: chromium:1056170
> Change-Id: I638183c944255ebcaab47d2b94b1980d54479746
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2143814
> Reviewed-by: Maya Lekova <mslekova@chromium.org>
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#67080}

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

Change-Id: I04b048dd979c32e9275c972307796d5f75865037
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1056170
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2144114
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67084}
2020-04-09 12:37:33 +00:00
Thibaud Michaud
f902ef3257 [wasm] Cleanup wasm script creation
- Do not expose CreateWasmScript since we should now use
WasmEngine:GetOrCreateScript instead,
- Initialize all Script fields in CreateWasmScript, not in
WasmModuleObject::New,
- Do not pass code size estimate argument, since we can always use the
actual native module's committed code space.

R=clemensb@chromium.org

Bug: v8:10349
Change-Id: If9250d62ffc271ab6efc3b9c45958a305c9d1827
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2135633
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67083}
2020-04-09 11:55:03 +00:00
Thibaud Michaud
cecf826277 [liftoff][mv] Support multi-value loops in Liftoff
R=ahaas@chromium.org

Bug: v8:10408
Change-Id: I6a4a1d82333cf31520526c766357c78d3d8dd206
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2140941
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67082}
2020-04-09 11:47:03 +00:00
Clemens Backes
b9976edb10 [liftoff] Replace i32 cmp op macro by template
Templates provide better error messages and make debugging easier.

R=zhin@chromium.org

Bug: v8:10364
Change-Id: Ia3581c4458e8edb3b24371605000b0b00bb5069d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2140936
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67081}
2020-04-09 11:11:53 +00:00
Michael Lippautz
3e1c70402e Reland "cppgc: Add page memory allocation backend"
This is a port of src/components/gc that was added recently.

Differences:
- Added back bucketing to the page pool, as that guarantees that
  arenas used for specific types do not have their pages used by other
  arenas.
- Replaced base::flat_map with std::map. This may cause performance
  regressions when using PageMemoryRegionTree in hot paths. A
  vector-like representation may be used to fix such a regression

This reverts commit 656c68a781.

Bug: chromium:1056170
Change-Id: I638183c944255ebcaab47d2b94b1980d54479746
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2143814
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67080}
2020-04-09 10:57:03 +00:00
Omer Katz
46a1fa1a2c cppgc: Fix GetHeapFromPayload
GetHeapFromPayload returned the page header address instead of the
value of the first field of the header.

Bug: chromium:1056170
Change-Id: I4de5be975accced32460d6fab91543e6a5b07ba0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2143825
Auto-Submit: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67079}
2020-04-09 10:10:23 +00:00
Clemens Backes
8e755eaa02 [liftoff] Inline simple cmp op macros
This increases source code size, but the code is simple and repetitive.
Complexity is reduced by removing the macros.

R=zhin@chromium.org

Bug: v8:10364
Change-Id: I989c4d78aaebe00c7fbb525d88a6670cd0fe3b92
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2141732
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67078}
2020-04-09 09:07:43 +00:00
Leszek Swirski
db8491c38c [heap] Fix off-thread merging tests
Fix off-thread space merging unit tests, by

  a) Doing a GC on each test teardown (avoiding leaking GC state between
     tests), and
  b) Removing the AllocationStep when merging, which could cause a
     deadlock if incremental marking triggered a free-list refill.

Bug: v8:10142
Change-Id: Id2670115f96ab3b13613ea357bd44a639d0151e1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2142260
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67077}
2020-04-09 08:11:53 +00:00
Michael Lippautz
66cfc31581 cppgc: Provide basic allocation to have access to Heap backref
This CL provides a basic allocator that allocates normal-sized objects
on pages without ever reusing them. This allows for already using the
backref from page to heap which is used in some critical places
(pre-finalizers, write barrier, Persistent).

Bug: chromium:1056170
Change-Id: Ifada9b7e984827906c267d1a3a521576587feaeb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2141736
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67076}
2020-04-09 08:00:23 +00:00
Dominik Inführ
bedf467cd2 [heap] Add flag to synchronize runtime allocations in old space
Add flag FLAG_concurrent_allocation that when enabled protects all runtime allocations in the old space with a mutex. Prerequisite for concurrent allocation. Still disabled by default.

Bug: v8:10315
Change-Id: I37e59b3d51fe3aad112f0b556ea867cc0a2496e2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2140937
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67075}
2020-04-09 07:49:53 +00:00
Maya Lekova
656c68a781 Revert "cppgc: Add page memory allocation backend"
This reverts commit d4056c61d5.

Reason for revert: Fails on GCC, please check https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20gcc/6184

Original change's description:
> cppgc: Add page memory allocation backend
> 
> This is a port of src/components/gc that was added recently.
> 
> Differences:
> - Added back bucketing to the page pool, as that guarantees that
>   arenas used for specific types do not have their pages used by other
>   arenas.
> - Replaced base::flat_map with std::map. This may cause performance
>   regressions when using PageMemoryRegionTree in hot paths. A
>   vector-like representation may be used to fix such a regression
> 
> Bug: chromium:1056170
> Change-Id: I03e3abe55faf7bb50c8011dafc23396889bf66db
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2139586
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Reviewed-by: Omer Katz <omerkatz@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Hannes Payer <hpayer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#67073}

TBR=ulan@chromium.org,hpayer@chromium.org,mlippautz@chromium.org,bikineev@chromium.org,omerkatz@chromium.org

Change-Id: I1e421898bb8a08f32d8eb2355ed547e0ee38b429
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1056170
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2140949
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67074}
2020-04-09 07:36:13 +00:00
Michael Lippautz
d4056c61d5 cppgc: Add page memory allocation backend
This is a port of src/components/gc that was added recently.

Differences:
- Added back bucketing to the page pool, as that guarantees that
  arenas used for specific types do not have their pages used by other
  arenas.
- Replaced base::flat_map with std::map. This may cause performance
  regressions when using PageMemoryRegionTree in hot paths. A
  vector-like representation may be used to fix such a regression

Bug: chromium:1056170
Change-Id: I03e3abe55faf7bb50c8011dafc23396889bf66db
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2139586
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67073}
2020-04-09 07:03:53 +00:00
Ng Zhi An
e2f666184c [x64] Add some ops to disasm tests
While working on some AVX stuff, saw that these ops were missing from
the test cases.

Change-Id: Ie41be465a0715323096c6549b21aa9e994eaac3e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2137472
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67072}
2020-04-09 01:16:07 +00:00
Ng Zhi An
f711f5a1de [wasm-simd][fuzzer] Add S8x16Shuffle to fuzzer
Bug: v8:10180
Change-Id: I5e7e83c23b6029cc5b55c2aadee77898173a77f0
Fixed: v8:9543
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2110951
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67071}
2020-04-09 01:02:57 +00:00
Shu-yu Guo
e3e81892a4 [weakrefs] Split out FinalizationRegistry#cleanupSome to a different flag
Apple currently objects to cleanupSome but agrees to shipping the rest
of WeakRefs. Separate out cleanupSome to its own flag so the rest of
WeakRefs may ship.

Bug: v8:8179
Change-Id: I6159fc743c9cb658860d4260b0dcb95e54630fdc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2141011
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67070}
2020-04-09 00:05:07 +00:00
Shu-yu Guo
f902b9dd8d [weakrefs] Update FinalizationRegistry to take a per-item callback
Bug: v8:8179
Change-Id: I0cd43db6558db616690de2dd012bf7518c49345d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2138563
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67069}
2020-04-08 17:54:24 +00:00
Emanuel Ziegler
e2e42338a2 [wasm] Allow throwing Wasm errors from Blink
Expose Wasm error classes to the V8 API such that they can be accessed
from embedding environments like Blink.

Follow-up in change I19568e6c0906de518fd6e5b417ef7e045e9d43c8

R=ahaas@chromium.org
R=ulan@chromium.org

Change-Id: I238288de73283a06c5075d0060977b366c0fbe09
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2137416
Commit-Queue: Emanuel Ziegler <ecmziegler@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67068}
2020-04-08 17:45:55 +00:00
Clemens Backes
29d188ae31 [wasm] Skip debug-step-into-wasm entirely
This test is already skipped in different configuration, but it still
generally flakes. We need to investigate more before re-enabling it in
all configuration that we want to support.

R=nicohartmann@chromium.org

Bug: v8:10410
Change-Id: I382e168add952d8e9f4802306a9029ea9651a389
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2142263
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67067}
2020-04-08 16:03:10 +00:00
Milad Farazmand
d7755bb454 PPC/s390: [wasm] Debug in Liftoff by default
Port 4482650907

Original Commit Message:

    This flips the --debug-in-liftoff flag to be on by default.
    There are still some outstanding issues with that configuration, but not
    more than with the interpreter configuration. Thus flip now, such that
    we can fully focus on stabilizing that config.

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

Change-Id: Ie18137fe5f1b9533a0882b5e57d8c320ee340387
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2142311
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67066}
2020-04-08 16:02:04 +00:00
Paolo Severini
24c4b77669 [wasm] Fix ClearBreakPoint when debugging in Liftoff
This fixes an issue in WasmScript::ClearBreakPoint, which is was still removing
breakpoints in the interpreter, even when debugging in Liftoff.
The existing test inspector/debugger/wasm-stepping-liftoff.js does not require
any changes.

Change-Id: I5c60839ffde91cdd11d9f808a3102f2cc1324087
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2136872
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Paolo Severini <paolosev@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#67065}
2020-04-08 15:57:14 +00:00
Clemens Backes
3b224b0c0b [debug] Skip another test on stress_incremental_marking
Several JS tests are already skipped in that config. This CL adds a wasm
test that also started flaking.

TBR=thibaudm@chromium.org

Bug: v8:10410, chromium:772010
Change-Id: Ie16d60a5066a56005d9cf1e4951d6ed1c17e4dc7
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2142256
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67064}
2020-04-08 14:58:04 +00:00
Daniel Clifford
6e11cfdc29 [torque]: Export methods for Torque @export-ed C++ classes
This fix is a bit of overkill, but ensures that verifier methods are
available across library boundaries.

Change-Id: I120560f8e8e0be0ffcba43b46197efca4db0a62c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2141739
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67063}
2020-04-08 14:22:21 +00:00
Philip Pfaffe
d5f07e76f8 Fix two bugs in wasm debug evaluate.
Change-Id: If7691bc70aac4a8f2ba8fe383bd44a829a9a0bdb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2132265
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67062}
2020-04-08 13:34:31 +00:00