Commit Graph

61066 Commits

Author SHA1 Message Date
Camillo Bruni
04bd0a15bf [tools] Fix typo in map-processor.html
Drive-by-fix: improve table layout.

Change-Id: If566e93b7f96d402a8f21715b7e6d3132817a20b
No-Try: true
No-Presubmit: true
No-Tree-Checks: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2074642
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66474}
2020-02-27 07:36:42 +00:00
Shu-yu Guo
3a04913e13 Roll test262 for upstream test fix
f6b2ccdd09

Bug: v8:7834
Change-Id: I826a5218d9a7629adffeaa840e996575b50e1606
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2076689
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66473}
2020-02-27 07:30:10 +00:00
v8-ci-autoroll-builder
a63fdc3697 Update V8 DEPS.
Rolling v8/build: 9dba72c..ff66038

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/d2b5e78..624dae6

Rolling v8/third_party/depot_tools: 227d510..005269a

Rolling v8/tools/clang: eeaa53b..f5a3941

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

Change-Id: I4d0529e4298f7413de68584d67af582261aefdad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2077057
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@{#66472}
2020-02-27 04:02:53 +00:00
Seth Brenith
74131bdd2e Move a bunch of bitfield definitions to Torque
This allows Torque code to refer to these bitfields (not currently
relevant for any of these classes), and allows the postmortem debugging
API to provide details about these bitfields.

Change-Id: I79c74a3c5ef1f77e839720a4e8ee1f8482a576ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2049870
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66471}
2020-02-26 21:07:51 +00:00
Victor Gomes
61e117d794 [runtime] Add arguments type: kRuntime and kJS.
This adds static types to the argument class that accesss the arguments in the
stack. kRuntime arguments are used by runtime functions and kJS arguments
are used to access the JS stack (eg. builtins).

The distinction allows the reversal of arguments in the JS stack without
changing the runtime arguments order.

Bug: v8:10201
Change-Id: I7c08164d53c4071c7910836fa733dee8ff7fa680
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2066985
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66470}
2020-02-26 17:52:04 +00:00
Clemens Backes
700b1b97e9 [api] Remove deprecated wasm module type check
The method was deprecated in favor of {IsWasmModuleObject}.

R=adamk@chromium.org

Bug: v8:10155
Change-Id: Id21a1b74dde5576c2c82cc209555c22209a9e5d4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2033170
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66469}
2020-02-26 17:05:34 +00:00
Clemens Backes
9a96f1bbad Reland "[wasm] Refactor callback triggering"
This is a reland of 0dc598df0c

Original change's description:
> [wasm] Refactor callback triggering
> 
> 1) Instead of passing three boolean values to |TriggerCallbacks|, pass
>    one EnumSet which contains all events to trigger.
> 2) Remember which events already happened, to avoid triggering them
>    again.
> 3) Compute triggered events once after the loop in |OnFinishedUnits|,
>    instead of checking for every finished unit.
> 4) When a new callback is registered, trigger all previous events
>    immediately. This solves issue v8:10217.
> 5) Replace |NotifyTopTierReady| by |AddCallback| which is identical now.
> 6) Do not call |OnFinishedJSToWasmWrapperUnits| if no wrappers were
>    compiled (this is a minor performance optimization; we save taking
>    and releasing a lock).
> 7) Drive-by: Make the |EnumSet| constructor really constexpr (by making
>    |Mask| constexpr).
> 
> R=ahaas@chromium.org
> 
> Bug: v8:10217
> Change-Id: Ib3688a1687ad7b523e90efd73f4073e9f1193016
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2072737
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#66459}

Bug: v8:10217
Change-Id: I9f7ca424fa7f1d0379dabe230bebf62522dfc857
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2074501
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66468}
2020-02-26 16:16:33 +00:00
Milad Farazmand
c9023c2cfc s390: [wasm-simd] Implement simd shuffle
Change-Id: I3da840cdabf6d0ed8c4d823855acb999a0167167
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2073206
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#66467}
2020-02-26 16:12:53 +00:00
Georg Neis
a8c8e87d01 Fix printing of ArrayBoilerplateDescription
It used to print the elements kind as a byte, thus producing \000 etc.
This also broke the json produced by --trace-turbo.

Change-Id: I2f9ce5cb5815ab30fd7866e52fa5ab2732904e1b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2074640
Commit-Queue: Georg Neis <neis@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Auto-Submit: Georg Neis <neis@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66466}
2020-02-26 15:56:33 +00:00
Seth Brenith
527f9de185 Reland "[torque] Support bitfield structs stored within Smis"
This reverts commit 4dc1fb4e04.

Reason for revert: the regression from the original change was likely due to unlucky factors like code alignment.

Original change's description:
> Revert "[torque] Support bitfield structs stored within Smis"
>
> This reverts commit e5e4ea962e.
>
> Reason for revert: mysterious performance regression chromium:1052756
>
> Original change's description:
> > [torque] Support bitfield structs stored within Smis
> >
> > This change moves the definition of the bits stored in DebugInfo::flags
> > to Torque, and updates the only Torque usage of that field to use more
> > natural syntax. This is intended as an example of common patterns found
> > in various other classes. Several supporting changes are required:
> >
> > 1. Add a new type representing a bitfield struct stored within a Smi. It
> >    is currently called SmiTagged, but I'm open to suggestions.
> > 2. Add an enum-style output for Torque bitfield structs whose bitfields
> >    occupy only one bit each.
> > 3. Add a new case to MachineOperatorReducer that makes the generated
> >    code for IncBlockCounter match with what was generated before this
> >    change.
> > 4. Add support for reporting these bitfields in the postmortem debugging
> >    API. The format matches existing bitfields but with an offset value
> >    that includes the SMI shift size.
> >
> > Bug: v8:7793
> > Change-Id: Icaecbe4a162da55d2d9a3a35a8ea85b285b2f1b7
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2028832
> > Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
> > Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> > Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#66182}
>
> Bug: chromium:1052756, v8:7793
> Change-Id: I9e2897efbb6321124bf4952cf09de2f179f7310d
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2062569
> Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#66349}

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: chromium:1052756, v8:7793
Change-Id: I6087928aa14c8551ebd294513bd8d6ffa402a0d4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2070635
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#66465}
2020-02-26 15:50:03 +00:00
Nico Hartmann
a6cea204df [turbofan] Allocation-free string to double conversion
Bug: v8:7790
Change-Id: Ib5fe2727e52a62931cb1bd5ae84fa423a9f6c670
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2071262
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66464}
2020-02-26 15:07:18 +00:00
Victor Gomes
bf20d7d1d3 [builtins] Reverse arguments order of TF builtins with JS linkage
Bug: v8:10201
Change-Id: Ie6dbd43ff776b7a5b777923d659edf3038783567
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2074498
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66463}
2020-02-26 15:06:13 +00:00
Clemens Backes
c626bc5e88 [wasm] Reduce size of {WasmCode} objects
This is a first step to make {WasmCode} objects smaller. Many code
offsets are currently stored in {size_t} even though there were
originally (during assembly) an int. Others are stored in {uint32_t}.

This CL switches the function index and all code lengths and offsets to
int, because
a) bigger code is not supported anyway, and
b) the style guide recommends int over unsigned types.

This makes the {WasmCode} 24 bytes smaller on x64 (from 144 to 120
bytes).

R=ahaas@chromium.org

Bug: v8:10254
Change-Id: I8f78bf4be64d59cf9393e3b6662d9d3bd153d387
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2074217
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66462}
2020-02-26 14:09:38 +00:00
Clemens Backes
6a2865d26e Revert "[wasm] Refactor callback triggering"
This reverts commit 0dc598df0c.

Reason for revert: Fails the wasm-cache-test blink test.

Original change's description:
> [wasm] Refactor callback triggering
> 
> 1) Instead of passing three boolean values to |TriggerCallbacks|, pass
>    one EnumSet which contains all events to trigger.
> 2) Remember which events already happened, to avoid triggering them
>    again.
> 3) Compute triggered events once after the loop in |OnFinishedUnits|,
>    instead of checking for every finished unit.
> 4) When a new callback is registered, trigger all previous events
>    immediately. This solves issue v8:10217.
> 5) Replace |NotifyTopTierReady| by |AddCallback| which is identical now.
> 6) Do not call |OnFinishedJSToWasmWrapperUnits| if no wrappers were
>    compiled (this is a minor performance optimization; we save taking
>    and releasing a lock).
> 7) Drive-by: Make the |EnumSet| constructor really constexpr (by making
>    |Mask| constexpr).
> 
> R=​ahaas@chromium.org
> 
> Bug: v8:10217
> Change-Id: Ib3688a1687ad7b523e90efd73f4073e9f1193016
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2072737
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#66459}

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

Change-Id: I564b053e898db5f7b51cefa4626c0625a225c89a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:10217
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2074638
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66461}
2020-02-26 14:08:33 +00:00
Dominik Inführ
4c7c6f732c [heap] Enable usage of ArrayBufferExtensions
Switch the flag to true to enable ArrayBufferExtensions by default. The
last CL (https://crrev.com/c/2065088) that tried to enable this was
reverted because of alignment issues on ARM64
(fixed in https://crrev.com/c/2071256).

Bug: v8:10064
Change-Id: I47f478c978094fb5038113eb452865748956b42e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2074157
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66460}
2020-02-26 12:35:34 +00:00
Clemens Backes
0dc598df0c [wasm] Refactor callback triggering
1) Instead of passing three boolean values to |TriggerCallbacks|, pass
   one EnumSet which contains all events to trigger.
2) Remember which events already happened, to avoid triggering them
   again.
3) Compute triggered events once after the loop in |OnFinishedUnits|,
   instead of checking for every finished unit.
4) When a new callback is registered, trigger all previous events
   immediately. This solves issue v8:10217.
5) Replace |NotifyTopTierReady| by |AddCallback| which is identical now.
6) Do not call |OnFinishedJSToWasmWrapperUnits| if no wrappers were
   compiled (this is a minor performance optimization; we save taking
   and releasing a lock).
7) Drive-by: Make the |EnumSet| constructor really constexpr (by making
   |Mask| constexpr).

R=ahaas@chromium.org

Bug: v8:10217
Change-Id: Ib3688a1687ad7b523e90efd73f4073e9f1193016
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2072737
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66459}
2020-02-26 11:57:14 +00:00
Richard Townsend
14524a2032 [arm64][msvc] fix another unsigned shift error in the tests
Bug: v8:10012
Change-Id: I8d2d95090bd45c560cbc208737f037adc433facb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2072741
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Richard Townsend <richard.townsend@arm.com>
Cr-Commit-Position: refs/heads/master@{#66458}
2020-02-26 11:29:33 +00:00
Dominik Inführ
1f35c16553 [objects] Update JSArrayBuffer::extension-field in two steps
The JSArrayBuffer::extension-field might not be aligned with pointer
compression enabled. However on AArch64 pointers need to be aligned if
you perform atomic operations on them. Therefore split extension into
two 32-bit words that each get updated atomically. There is no ABA
problem here since the extension field only transitions from
NULL --> value --> NULL. After Detach(), Attach() isn't invoked anymore.

Bug: v8:10064
Change-Id: If987ed51f0528ca7313980f3d36ffca300b75fdc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2071256
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66457}
2020-02-26 10:51:03 +00:00
Dominik Inführ
e7187a626c [heap] Ensure object ends within chunk range
When iterating objects on a page add CHECKs that we actually load a
map and ensure the object ends within the current chunk.

Bug: chromium:1055252
Change-Id: I8f2d5f08229cb1a2fce64af6e22988de87d1b572
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2072744
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66456}
2020-02-26 10:48:23 +00:00
Hannes Payer
95fa931e64 [heap] Clean up GCIdleTimeHandler.
Bug: chromium:1054771
Change-Id: Iaf1399a0ccc94f8f96cfdab4364eb918d58659d7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2073758
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66455}
2020-02-26 10:43:14 +00:00
Clemens Backes
4e2ed06f20 [wasm] Some cleanup in recompilation logic
1) Merge |AddBaselineCompilationUnits| into
   |InitializeRecompilationProgress|.
2) Rename |InitializeRecompilationProgress| to
   |InitializeRecompilation|.
3) Unify the update of |ReachedRecompilationTierField| in
   |compilation_progress_|.

R=ahaas@chromium.org
CC=duongn@microsoft.com

Bug: v8:9654
Change-Id: I58324b553bf226cacb355e387c235841fdea82d4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2071863
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66454}
2020-02-26 10:38:38 +00:00
Marcin Wiącek
b9fe8174f7 Create master files per benchmark in csuite
Before: running different suites is removing non-related master data

After: different suites have separate master data files

Change-Id: Iab46d663fdf2a1d709aeb7da77a443c2ed1bdcc2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2071870
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Marcin Wiącek <marcin@mwiacek.com>
Cr-Commit-Position: refs/heads/master@{#66453}
2020-02-26 10:37:33 +00:00
Georg Neis
3aa52a22ca Revert "[builtins] stop using imprecise fdlibm pow"
This reverts commit b12ba06edf.

Reason for revert:
After further discussion we decided to stick with fdlibm.

Original change's description:
> [builtins] stop using imprecise fdlibm pow
>
> This CL reinstates the old pow implementation which calls out to the
> system implementation of pow.
>
> Bug: v8:9622
> Change-Id: I3df997888ced3fb8b5bd4b810098e967649aaa55
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1774898
> Reviewed-by: Hannes Payer <hpayer@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Commit-Queue: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#66303}

TBR=yangguo@chromium.org,neis@chromium.org,hpayer@chromium.org,me@gus.host

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: v8:9622
Change-Id: I941f70c7432cd2fab86e0eadcb2e1a9ec8195e91
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2072746
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66452}
2020-02-26 10:36:23 +00:00
Clemens Backes
1e4b043523 [base] Extend EnumSet
This extends EnumSet by
1) adding element-wise operations (without first creating an EnumSet of
   that element in the caller),
2) adding arithmetic assignment operators, and
3) adding a subtraction operation which removes all elements in another
   EnumSet, or a single element.

R=mlippautz@chromium.org

Change-Id: Ibe694e9e111e506ad09cf9729fa0b0ba38430b79
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2071874
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66451}
2020-02-26 09:48:42 +00:00
Clemens Backes
e7fa1fbffe [wasm] Avoid adding callback that will never be called
In {InitializeRecompilationProgress}, we already have logic in place to
call the callback (all callbacks really) if no compilation units were
added.
In that case, the callback in fact does not need to be added to the list
of callbacks. Instead, it's enough to just call this one callback and
then discard it.

R=ahaas@chromium.org

Bug: v8:9654
Change-Id: I60bab2d67d67d10964404d897d13ffd628ff9964
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2071861
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66450}
2020-02-26 09:34:42 +00:00
Georg Neis
51022eb8c9 Revert "[builtins] Replace V8_INFINITY with its definition"
This reverts commit 73f91a2d11.

Reason for revert: Reverting b12ba06edf

Original change's description:
> [builtins] Replace V8_INFINITY with its definition
> 
> V8_INFINITY is not defined here.
> "src/common/globals.h" is also not allowed to be included
> in this source file.
> 
> Change-Id: Ia3b14db8ac5099b6ce65839eb0fc59340dc59555
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2062930
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
> Cr-Commit-Position: refs/heads/master@{#66336}

TBR=neis@chromium.org,clemensb@chromium.org,me@gus.host,miladfar@ca.ibm.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: Ia43c3f7f735dfb622d4f5464a52a142d19ddeb26
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2072745
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66449}
2020-02-26 09:32:55 +00:00
Emanuel Ziegler
abb727a3d9 [wasm][reference-types] Check type on Table.Init & Table.Copy
Added a type field to elements to distinguish anyref, funcref and
nullref elements and do a proper type checking at compile time as
the spec requires.

R=ahaas@chromium.org

Change-Id: I31be7aa1170439859ca7ec5e20aabb2720c290b3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2069330
Commit-Queue: Emanuel Ziegler <ecmziegler@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66448}
2020-02-26 09:29:43 +00:00
Clemens Backes
151b85a0a5 [base] Pass EnumSet by value
EnumSet hold a single integral field, hence it should be passed by
value. All users already do this, we are just inconsistent within the
declaration of EnumSet itself.

R=mlippautz@chromium.org

Change-Id: Ic2cac35fbd8fe3e98c1fe135bd334547dca30ab5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2071872
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66447}
2020-02-26 09:21:33 +00:00
Hannes Payer
eb201d6ff3 [heap] Remove idle Scavenge task and schedule regular foreground tasks.
Bug: chromium:1054771
Change-Id: I0773d60e5cd3d3b181446c11943eb19d5336b420
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2066982
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66446}
2020-02-26 09:10:22 +00:00
Tobias Tebbi
645ca25595 [turbofan] fix nondeterminism in mksnapshot
This CL fixes two unrelated issues in Turbofan that contributed to
non-determinism:
- Most importantly, external references included their address in the
  node hash, but they're unpredictable due to ASLR. Fix by only looking
  at the lowest bits assuming a 4K page size.
- BranchElimination didn't properly trigger revisits for the
  IfTrue/IfFalse projections.

Bug: chromium:1046815
Change-Id: I9ba3535cc748890708e4638017e245a3f4e2a7d8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2069332
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66445}
2020-02-26 08:54:37 +00:00
Simon Zünd
e5ffd0ce90 Updated documentation for {replMode} parameter in {Runtime.evaluate}
R=yangguo@chromium.org

Change-Id: Icafeeccdcbe854d6986d3930ec6fcb2c856d274a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2072743
Auto-Submit: Simon Zünd <szuend@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66444}
2020-02-26 08:53:32 +00:00
Shu-yu Guo
9c35cbc0de Roll test262
31f1bb5a..6d4b62614

Bug: v8:7834
Change-Id: Iecb139feb3db4001bc87d662f5acc006a521caad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2073380
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66443}
2020-02-26 07:34:42 +00:00
Ng Zhi An
86508e21dd [wasm-simd][arm64] Implement integer absolute
Implements i8x16.abs, i16x8.abs, and i32x4.abs.

Bug: v8:10233
Change-Id: I350ceca7ee75037615985ea955c5f17997996aac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2067842
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66442}
2020-02-26 04:59:24 +00:00
v8-ci-autoroll-builder
43c317e3ab Update V8 DEPS.
Rolling v8/build: 11be0fc..9dba72c

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/8fd825d..d2b5e78

Rolling v8/third_party/depot_tools: 9aa1a96..227d510

Rolling v8/third_party/fuchsia-sdk: 493c55d..2457e41

Rolling v8/third_party/icu: 9f40209..49ee7b1

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

Change-Id: I8085056f080300b80449bc2ec186acc37746a9ea
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2073019
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@{#66441}
2020-02-26 03:59:03 +00:00
Ng Zhi An
fa350b5bf4 [wasm-simd][x64] Implement integer absolute on x64 and interpreter
Implements i8x16.abs, i16x8.abs, and i32x4.abs.

Bug: v8:10233
Change-Id: Iefe3c70bdc229c6da6a0ef07273ca654ca1e937e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2063200
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66440}
2020-02-26 03:57:11 +00:00
Ng Zhi An
a67a16aae4 [wasm-simd] Fix OpcodeLength of load splat/extend ops
Move load splat and load extend ops into the list of SIMD memory
opcodes, since they similarly take an i32 and an memarg. This fixes the
OpcodeLength calculation in function-body-decoder-impl.h.

And in turn, fixes the mjsunit test code that the fuzzer generates. See
the regress-1055692.js file for the weird S8x16LoadSplat followed by 2
kExprUnreachable, where the kExprUnreachable really is a memarg
{0x0, 0x0}. This bug was caught by the fuzzer, and that was the
generated test (with small fixes to add kExprDrop), so leaving it as it
is.

Bug: chromium:1055692
Change-Id: I743b6beb82350b5fea22c8dd10b546a02741cfed
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2071401
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66439}
2020-02-26 02:57:20 +00:00
Ng Zhi An
f9dc259a2d [wasm-simd] Expect fused results on Liftoff
FMA tests that are running on Liftoff can use fused results, since the
tests will fall back to TurboFan.

Bug: v8:9415
Change-Id: I02edea5ce1447263f7bc7574573418b0055aef8f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2063202
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66438}
2020-02-26 02:39:50 +00:00
Shu-yu Guo
ff89c6bc6f [weakrefs] Rename FinalizationGroup to FinalizationRegistry for JS
The deprecated legacy FinalizationGroup APIs are left unchanged for
compat.

Bug: v8:8179
Change-Id: I9bdcaa92360db318c96fc8524c04163ece25118e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2071236
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66437}
2020-02-25 22:53:20 +00:00
Milad Farazmand
4c357f203b [wasm-simd] Scalar lowering for load extends on BE machines
LoadMem already does the proper sign extension based on the
passed memtype, so all is left is splatting it to the desired
number of lanes.

Change-Id: I54317b6e2b4d3daf2e980315198577f61c3f556a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2068031
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66436}
2020-02-25 21:01:53 +00:00
Milad Farazmand
bab898de2b PPC/s390: [arm][arm64] Remove dead code
Port cc12e94784

R=georgia.kouveli@arm.com, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: I58e35c6fc007b01db4a51f93bff995ce8c14c37a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2071512
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#66435}
2020-02-25 20:50:52 +00:00
Z Nguyen-Huu
560d366df9 [wasm] Adopt WAT compatible naming
We want to be consistent with wasdk/wasmparser.

The names used in V8 should follow the WAT convention and always start
with a dollar, both for names from the "names" section as well as
generated names.

Bug: v8:10242
Change-Id: If4dbd4c38208c9dd9377dd2f79120635a531d881
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2070637
Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66434}
2020-02-25 20:14:52 +00:00
Clemens Backes
fc55d73343 [wasm] Extend liftoff breakpoint test for scope inspection
This extends the existing test to also print scope information on every
break. Note that the currently printed information is not correct, since
register values are not reconstructed yet. We just always print {-11}
for register values.
Thus the expected output will change with follow-up CL.

R=thibaudm@chromium.org

Bug: v8:10222
Change-Id: I7be13ecb02957454c875a4280cec154a08c2deb7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2062403
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66433}
2020-02-25 17:09:48 +00:00
Victor Gomes
4717c9a223 [runtime] Change kDontAdaptArgumentsSentinel to be a global constant.
Context: This is part of a bigger CL:
https://chromium-review.googlesource.com/c/v8/v8/+/2043840

In order to get rid of the arguments adaptor frame, we will reverse
the JS arguments in the stack. Some macros will need to reverse its
arguments as well, we will do that using helper macros in another CL
(see src/builtins/builtins-descriptors.h in 2043840).
For that we need to stringify the name kDontAdaptArgumentsSentinel,
which cannot be done if '::' is in its name.

This CL should not have any impact performace/memory on V8.

Bug: v8:10201
Change-Id: If76b7f457c179fbddddfe1a0ae038d2f1210ad2b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2066969
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66432}
2020-02-25 16:43:58 +00:00
Andreas Haas
7a31813024 Reland "[wasm] The name of a custom section can cause a validation error"
This is a reland of 03d5a7ba9b

Nothing changed here compared to the original test. The tests on the
blink side were invalid, I fixed them in https://crrev.com/c/2066907.

Original change's description:
> [wasm] The name of a custom section can cause a validation error
>
> The WebAssembly spec defines that the name of a custom section can cause
> a validation error. The streaming decoder, however, used a separate
> Decoder object to decode the name, and thereby avoided a validation
> error. With this CL the streaming decoder uses the main decoder to
> decode the name of the custom section.
>
> In addition this CL removes the test mjsunit/regress/wasm/regress-789952.
> This test defined an invalid WebAssembly module and expected it to
> compile. As it is a regression test, it makes no sense to fix the test.
> The module is invalid because it defines the length of the custom section
> to be '0', so there are no bytes in the custom section for its name.
>
> R=clemensb@chromium.org
> CC=thibaudm@chromium.org
>
> Bug: v8:10126
> Change-Id: I8cfc77c9a5916570d5362d5922e0179a29774da8
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2041446
> Commit-Queue: Andreas Haas <ahaas@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#66348}

Bug: v8:10126
Change-Id: I48aaed8eb9899da1703030fb6809fe46a6e66191
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2069325
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66431}
2020-02-25 15:38:27 +00:00
Omer Katz
a2a50d7fec Revert "[heap] Align v8 and oilpan worklists"
This reverts commit 6cfba48b65.

Reason for revert: Removing dynamic parameter caused regressions for scavenger.

Original change's description:
> [heap] Align v8 and oilpan worklists
>
> This CL makes the following changes:
> 1) Size of allocated buffer is set by a template parameter
>    (with a default value instead of hardcoded size)
> 2) Remove dynamic parameter for initializing number of
>    tasks (see comment in scavenger.cc)
>
> This CL aligns the v8 and oilpan heaps so that they provide
> the same interface and functionality.
>
> Change-Id: I77d63793f0a54ea29198ddd6bd298eae2c15cf42
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2030920
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Commit-Queue: Omer Katz <omerkatz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#66158}

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

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: Iab127d59882ded33d0df3897326031bfc2d2aaf2
Bug: chromium:1052750
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2071862
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66430}
2020-02-25 15:34:12 +00:00
Andreas Haas
c8e10a1693 [wasm][liftoff] Implement Atomic(Compare)Exchange on x64
R=clemensb@chromium.org

Bug: v8:10108
Change-Id: Ic9ef9ba35218450d3f9e7838890c82b785c34da4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2037433
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66429}
2020-02-25 14:24:46 +00:00
Andreas Haas
6e452a1c9c [cleanup][wasm] Use early return in validation of FunctionIndexImmediate
R=clemensb@chromium.org

Bug: v8:10155
Change-Id: Ia89724ed5f8af4199bbce41ed12a0dace578c43f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2069326
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66428}
2020-02-25 14:21:16 +00:00
Camillo Bruni
fc2f00d3d9 [counters] CPU time for RCS
The newly introduced --rcs-cpu-time flag enables CPU time for all
runtime call stats timers. By default we still keep on using good
old wall time.

This CL also adds the long-awaited --rcs short flag.

Change-Id: I3173e3a0f846ec3bf0d319624a37741c56914be5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2060304
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66427}
2020-02-25 13:37:57 +00:00
Mythri A
443721bd7f Set bytecode budget to interrupt_budget when allocating feedback vector
We use the same interrupt to both allocate feedback vectors and
for updating the profiler ticks. If there is a feedback vector already
available, we just increment the profiler ticks that we use to mark
for optimizing function. Calling JSFunction::EnsureFeedbackVector
allocates a feedback vector, but doesn't reset the budget, so we
optimize much earlier than expected. This is currently only a problem
with %PrepareFunctionForOptimize that doesn't reset the budget. Other
code paths do also reset the interrupt budget.

Bug: chromium:10243
Change-Id: I611a9202e5e71077bf897def5959bcfe11b8fdf4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2064980
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66426}
2020-02-25 13:24:06 +00:00
Mike Stanton
8a492221d2 [TurboFan] Fix error in FastApiCall simplified lowering
CL Reland "[turbofan] Fast API calls from TurboFan
https://chromium-review.googlesource.com/c/v8/v8/+/2066971
had an off-by-one error in simplified lowering for fast
api calls.

Bug: chromium:1052746

Change-Id: I31bed7d1bb9564c6991521e84fd1a8edad6d0e32
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2071259
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66425}
2020-02-25 12:48:26 +00:00