Commit Graph

65135 Commits

Author SHA1 Message Date
Camillo Bruni
2061656704 [tools] System-Analyzer: Remove timeline overview
This has been broken ever since we added multiple timeline-tracks.

Drive-by-fix: Rename selectionMouseMove to selectTimeRange.

Bug: v8:10644
Change-Id: Icff06a2d636a4a7302ac406f99e1012be4c7f25f
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2463240
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70443}
2020-10-12 10:43:08 +00:00
Santiago Aboy Solanes
58d56eb792 [cleanup] Several small clean-ups in our concurrent tests
Clean-ups:
 * Remove the detaching of persistent handles from the LocalHeap if the
main thread will not get the handles from the background thread.
 * Remove unused isolate member.
 * Make members private/protected as needed.

Bug: v8:7790
Change-Id: I23bf4a41124bd04d4a848edfa1ef8f9e8e77182c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2463234
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70442}
2020-10-12 10:42:04 +00:00
Jakob Gruber
f91acaa165 Reland "[regexp] Protect against reentrant RegExpStack use"
This is a reland of e2408c2521

Changes since last time: also accept CRASH test results. For some
reason, the CHECK failure is detected as a CRASH on mac bots.

Original change's description:
> [regexp] Protect against reentrant RegExpStack use
>
> Irregexp, and in particular the RegExpStack, are not reentrant.
> Explicitly guard against reentrancy.
>
> Bug: chromium:1125934
> Change-Id: I0fc295f6986a89221982e6a2ccefed46193974f6
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2460820
> Commit-Queue: Yang Guo <yangguo@chromium.org>
> Auto-Submit: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#70436}

Tbr: yangguo@chromium.org
Bug: chromium:1125934
Change-Id: I2116ca5944c49f6114228d4402847bdd426bdd7f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2465823
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70441}
2020-10-12 10:40:58 +00:00
Santiago Aboy Solanes
242a498382 [cleanup] Remove extra AcquireLoads in methods
A handful of methods were loading the same member twice in the same
method.

Bug: v8:7790
Change-Id: I20a1a95ed9dae2ff75bfdbf4c571d26ad02b1f94
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2454717
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70440}
2020-10-12 10:39:53 +00:00
Ulan Degenbaev
e09beb98a4 [heap] Fix ProcessEphemeronsUntilFixpoint
This removes redundant worklist draining in the fix-point iteration. It
may discover more ephemerons and break the assertion.

The draining is not needed because FinishConcurrentMarking ensures
that all background threads drain their worklists.

Bug: chromium:1136405
Tbr: etiennep@chromium.org
Change-Id: I3a311dca36dd2f88ab5006f995be235c74c1a0f6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2464933
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70439}
2020-10-12 10:38:49 +00:00
Camillo Bruni
4d47881b06 [tools] Fix system-analyzer CSS
- simplify CSS in index.css
- fix start-page layout
- reduce timeline-track height
- fix timeline-track legend layout
- fix scrollbar colors in dark theme

Bug: v8:10644
Change-Id: If3bb7422e6866bac766e7851f489a42ecbcf1d78
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2463239
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Sathya Gunasekaran  <gsathya@chromium.org>
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70438}
2020-10-12 09:14:47 +00:00
Nico Hartmann
f9a31e424c Revert "[regexp] Protect against reentrant RegExpStack use"
This reverts commit e2408c2521.

Reason for revert: https://ci.chromium.org/p/v8/builders/ci/V8%20Mac64/36733?1

Original change's description:
> [regexp] Protect against reentrant RegExpStack use
>
> Irregexp, and in particular the RegExpStack, are not reentrant.
> Explicitly guard against reentrancy.
>
> Bug: chromium:1125934
> Change-Id: I0fc295f6986a89221982e6a2ccefed46193974f6
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2460820
> Commit-Queue: Yang Guo <yangguo@chromium.org>
> Auto-Submit: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#70436}

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

Change-Id: I7b51659d21fe2d49ff343f4de0f6bb9720281b86
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1125934
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2465822
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70437}
2020-10-12 08:55:49 +00:00
Jakob Gruber
e2408c2521 [regexp] Protect against reentrant RegExpStack use
Irregexp, and in particular the RegExpStack, are not reentrant.
Explicitly guard against reentrancy.

Bug: chromium:1125934
Change-Id: I0fc295f6986a89221982e6a2ccefed46193974f6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2460820
Commit-Queue: Yang Guo <yangguo@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70436}
2020-10-12 08:32:38 +00:00
Ng Zhi An
0fc5906fb1 [wasm-simd][scalar-lowering] Enable more lowering tests
These tests were disabled because scalar lowering wasn't fully
implemented yet. Now we are at a stage when we can enable them.

The only remaining tests with lowering test disabled are prototype
instructions, once they are merged into the proposal proper, scalar
lowering should be implemented for them, and relevant tests enabled.

Bug: v8:10507
Change-Id: I4b7c8778f70e226ebda3bf5a2a7dd5efa343bc0c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2460841
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70435}
2020-10-09 22:00:55 +00:00
Ng Zhi An
a28144e5a3 [wasm-simd][scalar-lowering] Lower float pmin/pmax
Lowering for f32x4 and f64x2 pmin and pmax.

Bug: v8:10501,v8:10507
Change-Id: I2d92d337835a62e6adb979ed573b616cc2b86c25
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2461453
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70434}
2020-10-09 18:12:34 +00:00
Ng Zhi An
fbab1b5419 [wasm-simd] Remove some duplicated helper functions in tests
Some of these functions don't need to be defined, we can directly call
the same helpers defined elsewhere.

Bug: v8:10933
Change-Id: I31464195b11ed14f0725d9ed9711fa72ddbb4e92
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2461478
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70433}
2020-10-09 18:05:34 +00:00
Andreas Haas
58547c2a45 [wasm] Update spec tests
A previous update got reverted due to a SIMD test,see
https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket.appspot.com/8867662180901819968/+/steps/Check_-_ODROID/0/logs/simd_f32x4_pmin_pmax/0.

R=zhin@chromium.org

Bug: v8:10938
Change-Id: Id1e7e35112f127ccd8d5420b96f247d4fa2b52fb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2454711
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70432}
2020-10-09 17:51:14 +00:00
Milad Fa
e4878aab8d AIX: Skip all the ceilf and truncf tests
ceilf and truncf do not preserve the sign bit when its input
is passed by value and the output is rounded to 0:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97086

Change-Id: I2e3e4fc8822be9da0a16d99b4173641a91fa5957
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2463505
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#70431}
2020-10-09 16:08:06 +00:00
Samuel Groß
977b77a332 [sandbox][x64] Add a type tag to external pointers
This change tags pointers in the external pointer table with a type
dependent value in order to prevent type confusions between different
external pointers.

Bug: v8:10391
Change-Id: I5a83178e5ac46d49a99c91047816926120d801d3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2443133
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Samuel Groß <saelo@google.com>
Cr-Commit-Position: refs/heads/master@{#70430}
2020-10-09 15:39:44 +00:00
Omer Katz
8ac2d54aa2 cppgc: Add bailout for concurrent marking
Tracing JSMembers uses the bailout mechanism.
The bailout is implemented as a dynamic mechanism named
DeferTraceToMutatorThreadIfConcurrent that is called from
relevant Trace methods.

Bug: chromium:1056170
Change-Id: I90e6feae25c4c832be256693f9e44a963a6794b7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2426613
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70429}
2020-10-09 15:04:32 +00:00
Michael Lippautz
4569ffae0b Migrate CrossThreadPersistent
Adds a cross-thread reference for strongly and weakly retaining
objects on a thread other than the thread that owns the object.

The intended use of the reference is by setting it up on the
originating thread, holding the object alive from another thread, and
ultimately accessing the object again on the originating thread.

The reference has known caveats:
- It's unsafe to use when the heap may terminate;
- It's unsafe to transitively reach through the graph because of
  compaction;

Change-Id: I84fbdde69a099eb54af5b93c34e2169915b17e64
Bug: chromium:1056170
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2436449
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70428}
2020-10-09 14:33:57 +00:00
Ross McIlroy
c97e79c06a [TurboProp] Enable mid-tier register allocator for TurboProp
BUG=v8:9684

Change-Id: I064b552b021597a80e57303cab3c2fbf552be6a2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2463228
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70427}
2020-10-09 14:32:52 +00:00
Clemens Backes
cb03097d7d [wasm-gc] Fix gc-stress error on WasmJSFunctionData
Always install the Abort builtin first, because heap validation might
get triggered while we compile the wasm-to-js wrapper, and it would find
an illegal WasmJSFunctionData object otherwise.

TBR=manoskouk@chromium.org

Bug: v8:9495
Change-Id: I959eb3b6e9944db8b7ad7ecd0a51eefdab98c751
No-Tree-Checks: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2463230
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70426}
2020-10-09 13:00:02 +00:00
Ulan Degenbaev
32d7ec1af4 [heap] Handle partially initialized objects in NativeContextInferrer
Since GC can now happen during deserialization, object fields may
contain the Smi sentinel value instead of pointers. This adds the
required guards to methods of NativeContextInferrer

Bug: chromium:1136801
Change-Id: I7338f31bf6ee34b8dee8431b8250d2cc2978e0c2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2461241
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70425}
2020-10-09 12:43:42 +00:00
Ulan Degenbaev
ceeee0c78d [test] Remove unused variable in test-spaces/SizeOfInitialHeap
This fixes a GCC compile error

Tbr: mlippautz@chromium.org
Change-Id: Ia6239894c86c3131ab501128192177f30ef09d59
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2461744
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70424}
2020-10-09 12:38:22 +00:00
Marja Hölttä
fec98619a9 [properties] Fix SetLazyDataProperty for indices
(Thanks jbroman@ for the strawperson fix.)

Bug: chromium:1136800
Change-Id: I4aee55ef40069b460f59ef5b7ba7fc50ab7033cd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2463225
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70423}
2020-10-09 12:09:02 +00:00
Mythri A
1f858b3fea [handles] Fix is_identical_to to correctly work with Smis
HandleBase::is_identical_to() is_identical_to in handle base is used to
do the exact comparison by just comparing the locations. When the
locations are different the values are compared. For Smis it
compares 64 bits which might lead to incorrect behaviour. Smis loaded as
a TaggedField has the root address added. It is expexted that we don't
use higher order bits on Smi. Hence, is_identical_to shouldn't use these
bits when comparing Smis. This cl fixes it by comparing the objects
created from the given location. That takes care of correctly comparing
the required bits.

Change-Id: I574dfbea4c1fffc7a9e3a6a10ad7631d40c518ce
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2461743
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70422}
2020-10-09 11:53:22 +00:00
Manos Koukoutos
da3c731894 [wasm-gc] Cleanup/preparation to enable call_ref with WasmJSFunction
Changes:
- Add wasm-to-js wrapper field to WasmJSFunction. A WasmJSFunction might
  be called with call_ref without being imported to a module, and this
  provides a call target for this scenario. The wrapper is only compiled
  if --experimental-wasm-typed-funcref is set.
- Add CompileWasmToJSWrapper in wasm-compiler.
- Rename  BuildLoadFunctionDataFromExportedFunction ->
  BuildLoadFunctionDataFromJSFunction to reflect its wider usage.
- Rename BuildWasmImportCallWrapper -> BuildWasmToJsWrapper to reflect
  this function is now also used by CompileWasmToJSWrapper (unrelated to
  imports).
- (Drive-by) Remove dead arguments from wasm-module-builder.js.

Bug: v8:9495
Change-Id: I23468b69d42310cb8e96da5286ce68c701188876
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2459371
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70421}
2020-10-09 11:24:22 +00:00
Camillo Bruni
3935dc4909 [d8] Fix Realm.owner on detached global proxy
Return undefined instead of hard-crashing.

Bug: chromium:1130213
Change-Id: I7e573f46607fc0e7b91db62d881b4209b919028e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2456087
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70420}
2020-10-09 09:55:32 +00:00
Michael Lippautz
d3e8c837eb cppgc: Fix compile-time typename for release builds
Bug: chromium:1056170
Change-Id: I3320a0b8c740067ea1e424c37ae8db4e87753c1a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2461738
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70419}
2020-10-09 09:33:02 +00:00
Etienne Pierre-doray
69388737c5 Reland "[wasm] Use NumOutstandingCompilations() in BackgroundCompileJob:GetMaxConcurrency()"
This is a reland of 84eec6e920

Original change's description:
> [wasm] Use NumOutstandingCompilations() in BackgroundCompileJob:GetMaxConcurrency()
>
> This simplifies current_compile_job_ since ScheduleCompileJobForNewUnits
> is only called on the main thread.
>
> From pinpoint:
> v8:wasm:sync_instantiate:wall_time: 19.1% improvement
> v8-gc-incremental-step: 20.5% improvement
> https://pinpoint-dot-chromeperf.appspot.com/job/152920d8520000
>
> Change-Id: Id560080937f5439cf3321ce9306c7cae49e74798
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2442383
> Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#70386}

Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng
Change-Id: Ic989b64f130a00ce52228cdd2f57f4c1ade354f2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2458147
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70418}
2020-10-09 09:00:52 +00:00
Ulan Degenbaev
11513893c5 [test] Remove fragile assertion in test-spaces/SizeOfInitialHeap
The assertion states that compilation of an empty script does not add
new pages. This doesn't not necessarily hold if the existing pages are
almost full.

Bug: v8:10988
Change-Id: I71735e6736fb94e1ccde7f6430a2c4b0d48c43f3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2461728
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70417}
2020-10-09 08:43:42 +00:00
Etienne Pierre-doray
b2925688c3 Reland "Reland "[Heap]: Marking use Jobs.""
This is a reland of 4848de2ab2
Issue 1136405: non empty ephemeron list after FinishConcurrentMarking
Fix: COMPLETE_TASKS_FOR_TESTING Join()s instead of Cancel()
Issue: Failing TSAN failures
Fix: Safe to reland after
https://chromium-review.googlesource.com/c/v8/v8/+/2461726

Original change's description:
> Reland "[Heap]: Marking use Jobs."
>
> This is a reland of 4a2b2b2e56
>
> Original change's description:
> > [Heap]: Marking use Jobs.
> >
> > StopRequest is removed in favor of:
> > COMPLETE_TASKS_FOR_TESTING -> JoinForTesting()
> > PREEMPT_TASKS -> Pause()
> > COMPLETE_ONGOING_TASKS now has the same behavior as PREEMPT_TASKS
> > - we should avoid waiting on the main thread as much as possible.
> >
> > Change-Id: Icceeb4f0c0fda2ed234b2f26fe308b11410fcfb7
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2376166
> > Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#70037}
>
> Change-Id: I386f619501ad07997278543868bc889a60afcc8b
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2423938
> Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#70387}

Bug: chromium:1136405
Change-Id: I511c3d1747ef79ed6e7066c9a5bba052f9d4cd37
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2458246
Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70416}
2020-10-09 02:16:21 +00:00
Ng Zhi An
fdc22f58f5 [wasm-simd][scalar-lowering] Lower floating-point rounding ops
Missed this earlier when it was merged into the proposal.

f32x4 and f64x2 ceil, floor, trunc, nearestint. Also enable cctests.

Bug: v8:10507,v8:10906
Change-Id: I2de00e615cd63d81303649774db2a2ab800f6f72
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2461451
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70415}
2020-10-08 23:24:01 +00:00
Anton Bikineev
d21c89bb4a cppgc: Support compile-time typename computation
Bug: chromium:1056170
Change-Id: If4d4d08b4a50312b7a3cd1d11bb2cccc2272c96b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2461733
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70414}
2020-10-08 20:58:52 +00:00
Omer Katz
0b96f711cb cppgc: Provide TraceTraitBase that users can inherit from
The TraceTrait for JSMember is currently missing GetTraceDescriptor.
We missed it because we don't have proper tests for JSMember, but it
would fail to build if it was ever actually traced.

Bug: chromium:1056170
Change-Id: I45fd2c7c666e791f866813f762b488958f65f3cf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2460815
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70413}
2020-10-08 19:22:21 +00:00
Omer Katz
65bec1aa79 cppgc: Use libplatform as default platform
Bug: chromium:1056170
Change-Id: I4214978f31ae754e4940dfca4182ada202d17c01
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2456688
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70412}
2020-10-08 18:16:52 +00:00
Leszek Swirski
c212d10da0 [serializer] Introduce HandleScopes for object contents
Create a HandleScope when serializing an object's contents, to reduce
the number of live handles during serialization. There's only a couple
of cases where these handles have to outlive the serialized contents,
and for these cases we introduce GlobalHandleVector or similar manual
strong root mechanisms.

In particular, backrefs don't actually need to exist as a handle vector
(the object addresses are already referred to by the reference map's
IdentityMap), except for DCHECKs, so this becomes a DEBUG-only global
handle vector.

To support this manual strong-rooting, the HotObjectList is split up
into a strong-rooted find-only class in Serializer, and a Handle
vector in Deserializer.

Bug: chromium:1075999
Change-Id: I586eeeb543e3f6c934c168961b068f2c34e72456
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2449980
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70411}
2020-10-08 18:03:51 +00:00
Camillo Bruni
4ddb034776 [d8] Avoid printing unhandled rejected Promises in Shell::RunMain
This simplification helps with correctness fuzzers where Promises
created during error printing are flakily handled.

We might skip over certain rejected Promises that were created after
finishing running the script. This seems to be a reasonable compromise
in helping debugging scripts with unhandled rejections in d8.

Bug: chromium:1126309
Change-Id: Ia87c80cfd390bf8c6a724dc2f0e9e5fd1599e332
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2460814
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70410}
2020-10-08 16:55:51 +00:00
Maya Lekova
e78f4c7e6d [turbofan] Optimize stack slot usage for fast API calls
With this CL, fast API calls reuse the same stack slot they are
using for the {fallback} parameter. This relies on the fact that
the fast calls are non-reentrant, due to their inability to call
into JavaScript.

Bug: chromium:1052746
Change-Id: I2c56fcbe425023244a566bb39439e8e04072f316
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2461729
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70409}
2020-10-08 16:45:21 +00:00
Clemens Backes
c4a7bd8698 [wasm] Add a fast path for LEB decoding
It turns out that most LEBs are rather small (especially when used for
locals). This CL adds a fast path for single-byte LEBs which is supposed
to be inlined into callers. The more expensive slow path is then
explicitly outlined to avoid excessive binary size growth.

R=thibaudm@chromium.org

Change-Id: I0dcdf597b9be3055acc2b878b6bee3fa21839758
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2449974
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70408}
2020-10-08 15:55:31 +00:00
Ulan Degenbaev
dae268e404 [test] Fix platform lifetime in test-wasm-metrics
Currently MockPlatform has shorter lifetime than the isolate that uses
it. This leads to use-after-free races in concurrent tasks that fetch
the mock platform just before it is freed.

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

Change-Id: Ib94dc7674b9f94833be3372de68209ec38577ca1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2461726
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Emanuel Ziegler <ecmziegler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70407}
2020-10-08 15:26:51 +00:00
Georg Neis
e5ea75ba76 [compiler] Never serialize ScopeInfo
Bug: v8:7790
Change-Id: I1ffb2289f613a03d0246db2d66c3caaf0e4d6d2a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2448796
Auto-Submit: Georg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70406}
2020-10-08 14:58:41 +00:00
Sylvain Defresne
92e6d33170 build: Remove no-op calls to set_sources_assignment_filter
Chromiun no longer use set_sources_assignment_filter() anywhere in the
build, so these are no longer needed.

Bug: chromium:1018739
Change-Id: I7b33612d925563ebca0d93a7d3c9183d7305b7b0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2456988
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70405}
2020-10-08 14:44:01 +00:00
Clemens Backes
5bf16197ec [wasm] Simplify LEB decoding
Remove one "mode" of LEB decoding by eliminating the {AdvancePCFlag},
and doing the PC advance in the caller instead.
The returned length is now always zero in case of an error, thus remove
the respective checks from the unit tests. The returned length does not
really matter if we ran into an error.

R=thibaudm@chromium.org

Change-Id: Ibfd94dd981cefa2fc24c7af560c85afd1c826f2c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2449972
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70404}
2020-10-08 13:58:01 +00:00
Peter Marshall
637d1fc00b Make the StartProfilingAfterOsr profiler test more robust
1. Set profiling interval to 100us to get 10x the samples
2. Guarantee we spend at least 1ms per iteration, instead of only
bailing out if we spend more than 1ms. This gives us enough samples on
release mode.
3. Increase the time spent profiling optimized code

Bug: v8:10996
Change-Id: I1348ebce48fe998e79b5847f3e3d037148302dcc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2460823
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70403}
2020-10-08 13:20:01 +00:00
Michael Achenbach
373a9a8cfc [test] Switch to flattened json output
This flattens the json output to one result record as a dict. In
the past several records with different arch/mode combinations
could be run, but this is deprecated since several releases.

We also drop storing the arch/mode information in the record as it
isn't used on the infra side for anything.

This was prepared on the infra side by:
https://crrev.com/c/2453562

Bug: chromium:1132088
Change-Id: I944514dc00a671e7671bcdbcaa3a72407476d7ad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2456987
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70402}
2020-10-08 13:05:11 +00:00
Clemens Backes
0ce4c51ce7 [wasm] Last fixes for boolean validation
Found some more direct calls to {Decoder::error} which should be wrapped
in {DecodeError} to do some less work in boolean validation mode.

R=thibaudm@chromium.org

Bug: v8:10969
Change-Id: I5f7b5553a0c0cc2123904380625d50f25ea1ffc2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2456686
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70401}
2020-10-08 12:54:21 +00:00
Michael Lippautz
f50c64bdfe cppgc: Add naming infrastructure
Adds NameProvider to allow specifying names of objects. The
corresponding internal NameTrait is registered with the GCInfo object.

Use name infrastructure to provide a hint on encountering an unmarked
object in the marking verifier.

Bug: chromium:1056170
Change-Id: I95bb290660f5905500f861bd5cc85148a1b47184
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2454087
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70400}
2020-10-08 12:25:21 +00:00
Leszek Swirski
be2f7d64de [snapshot] Print allocation stats for memory tests
Since we're not reserving memory anymore, we don't log reserved memory
when profiling serialization. So, instead log the allocation counts used
by OutputStatistics as a pseudo-reserved size.

Bug: v8:10998
Bug: chromium:1075999
Change-Id: I64dc6086b14c0e720ef8d0c1ea99a6f8ccabcf9c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2460808
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70399}
2020-10-08 11:25:51 +00:00
Shu-yu Guo
c97feb94ee [top-level-await] Make Module::IsGraphAsync const
Bug: v8:9344
Change-Id: Id91afc60989afd45c4c0d00696afb4c81489f0ee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2458146
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70398}
2020-10-08 10:09:28 +00:00
Dominik Inführ
ee3df92b90 [heap] Fix DCHECK in NewSpace::Grow
NewSpace::Grow isn't in a safepoint when FLAG_local_heaps is disabled.

Bug: chromium:1136292
Change-Id: I18c4d42b73450d11ce9b685276b239481a4c5c83
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2459372
Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70397}
2020-10-08 07:50:57 +00:00
Jakob Gruber
f56bfe8520 Revert "[heap] Turn on RO_SPACE sharing for pointer compression"
This reverts commit bbecd8d5b3.

Reason for revert: https://bugs.chromium.org/p/v8/issues/detail?id=10999

Original change's description:
> [heap] Turn on RO_SPACE sharing for pointer compression
>
> Makes the read-only space sharing the default even with pointer
> compression if on Linux, Android or Chrome OS.
>
> This won't have any immediate impact on Chrome since the platform page
> allocator in chrome does not yet support allocation and remapping of
> shared pages.
>
> Bug: v8:10454
> Change-Id: I3bc57080827efe38095a4bb1d02a53518727056a
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2454077
> Auto-Submit: Dan Elphick <delphick@chromium.org>
> Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#70383}

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

Change-Id: I0e96f6b901adeb5569a545eb24b15fb8d45bf544
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:10454
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2460806
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70396}
2020-10-08 07:43:09 +00:00
Ng Zhi An
9f0b3413b1 [wasm-simd][arm64] prototype i64x2 widen i32x4
Prototype these 4 instructions:

- i64x2.widen_low_i32x4_s
- i64x2.widen_high_i32x4_s
- i64x2.widen_low_i32x4_u
- i64x2.widen_high_i32x4_u

Bug: v8:10972
Change-Id: I3cc3bfdd6dfd0f0bab1dfef63399ed9fa68bd2d2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2441369
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70395}
2020-10-08 00:09:40 +00:00
Ng Zhi An
23b5d936cd [wasm-simd] No need to mask immediates for i8x16.shuffle
The immediates would have been checked by the validation, so we can skip
masking them.

Bug: v8:10696
Change-Id: I18e4746b1eb08a2436311a633341be0c88f52139
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2453456
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70394}
2020-10-08 00:05:10 +00:00