Commit Graph

66632 Commits

Author SHA1 Message Date
Dan Elphick
553def5ffa [build] Add header for externally-visible defines
Adds a v8-gn.h file containing defines that are used in the
externally-visible headers files like v8.h. This must be included by
include/v8config.h which includes it if the GN flag
v8_generate_external_defines_header is on. (Currently off by default).

To enable the v8config.h file to be included without the other v8
headers (as required by cppgc), this moves it into its own header set
which sets up the include path correctly.

Also updates some headers to ensure v8config.h is included before using
externally-visible defines.

Bug: v8:11292
Change-Id: I5be634f4adfbef144bf684071461d64f1cb30899
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2608212
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72140}
2021-01-18 16:57:26 +00:00
Andreas Haas
18534a4214 [wasm][liftoff] Fix index in the initialization of locals
There was a bug that only the last local with a reference type got
initialized to null, all other locals kept the initial value of 0. This
CL fixes this bug.

Additionally this CL optimizes the code slightly. Before this CL, the
null reference was loaded from the instance for every local with
reference type. Now the null reference is cached after the first load
and then used for all other locals.

R=thibaudm@chromium.org

Bug: chromium:1167587
Change-Id: Ic11fc76b650e6daa029491154744fc132778f70d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2632695
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72139}
2021-01-18 15:52:26 +00:00
Seth Brenith
e3f8b5dba5 [heap-profiler][torque] Report types of all internal objects
Heap-profiler changes:

Currently, a whole lot of types are all reported as just "system" in
heap snapshots. With this change, we can use Torque-generated macro
lists to easily report type names such as "system / BytecodeArray".
Those objects still show up in a single category named "(system)" in the
dev tools UI, so they don't clutter the output. For V8 developers or
anybody who is interested in an extra-detailed view, this change also
includes a runtime flag that instructs V8 to upgrade nodes of type
kHidden to type kNative. After a snapshot is collected with this flag
enabled, the dev tools UI then shows each internal object type
separately.

Torque changes:

Currently, Torque emits several macro lists containing pairs of
(ClassName, CLASS_NAME_TYPE) which can be used to associate instance
types with Torque class names. However, some Torque classes are not
included in any of these three lists. In cases like the heap profiler,
it would be nice to easily generate a complete list including every
instance type, so this CL includes two changes:

- Include classes in TORQUE_INSTANCE_CHECKERS_MULTIPLE_FULLY_DEFINED
  even if they're not marked `extern`. I'm not sure what exactly we
  were hoping to accomplish in filtering by extern-ness, but it's
  simpler not to and slightly reduces clutter in a couple of files that
  use that macro list.
- Add a fourth macro list for the previously-ignored category: classes
  which have their own instance type (are not `abstract`), and have
  subtypes, but do not have their fields defined in Torque. This list
  contains just a single item (HashTable), but I like the consistency of
  generating the full set of lists.

Change-Id: Ib24953e12ed13ce353206bbec23a52d8f684dfcc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2610172
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72138}
2021-01-18 15:49:46 +00:00
Marja Hölttä
4d5b878b61 [super] Store home object in Context instead of JSFunction
This saves memory (the home object doesn't need to be stored for each
method, but only once per class) and hopefully makes the home object
a constant in the optimized code.

Detailed documentation of the changes:
https://docs.google.com/document/d/1ZVXcoQdf9IdMsnRI9iyUjyq9NDoEyx9nA3XqMgwflMs/edit?usp=sharing

Bug: v8:9237
Change-Id: Ia0925bdc8bfe54cbefcba6d10f64746d63a530c7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2563275
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72137}
2021-01-18 15:47:06 +00:00
Thibaud Michaud
a80d51d488 [wasm][mac][arm64] Enable OOB trap handler
R=ahaas@chromium.org,mark@chromium.org,mseaborn@chromium.org

Bug: v8:11098
Change-Id: Ic4eb02a96805e49da71f301269567a6e0ac1b843
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2519555
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72136}
2021-01-18 15:32:56 +00:00
Junliang Yan
c92aa9e17b s390x: [liftoff] implement Load/StoreTaggedPointer
Change-Id: Ia8e8600cabb7e317befca480e734915239e10f69
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2634828
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72135}
2021-01-18 15:20:16 +00:00
Nico Hartmann
2800584800 Reland "[TurboFan] Move SFI and BytecodeArray to kNeverSerialized"
This reverts commit ff606a06b1.

This fix makes a handle persistent that was missing in the original CL.

Bug: v8:7790, chromium:1158322
Change-Id: I53079f5c32523313cff76130d2a40c3de5bb0638
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2629270
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72134}
2021-01-18 14:52:41 +00:00
Victor Gomes
574ac5d626 [cleanup] Remove arguments adaptor code
Removes:
- v8_disable_arguments_adaptor GN flag
- ArgumentsAdaptorTrampoline
- ArgumentsAdaptorFrame class

Change-Id: I382ebe6c25c3c172bee5df3e86e762fca10fa392
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2622911
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72133}
2021-01-18 14:51:36 +00:00
Clemens Backes
7d167bde93 [wasm][memory64] Fix typing of memory.size
memory.size returns in i64 if memory64 is enabled.
This CL fixes typing and adds a decoder test. Execution will be tested
and fixed in a follow-up CL.

R=manoskouk@chromium.org

Bug: v8:10949
Change-Id: I15818a6273b579d0faacec7f77dc813ae9ba218f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2632593
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72132}
2021-01-18 14:05:13 +00:00
Clemens Backes
5147463590 [wasm][memory64] Implement 64-bit init expressions
For memory64, the init expressions for data segments provide a 64-bit
value. This CL adds a new {EvalUint64InitExpr} function alongside
{EvalUint32InitExpr}. It supports i64.const and global.get operations.

R=manoskouk@chromium.org

Bug: v8:10949
Change-Id: I58acbb28acb8771a0947f9d5df1c14e6ca0f79cf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2632589
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72131}
2021-01-18 12:47:43 +00:00
Sami Kyostila
c65456bfa4 tracing: Initialize track events conditionally
If V8 is running in a context where Perfetto hasn't been initialized
(e.g., as part of mksnapshot), don't try to initialize track events
either.

Since perfetto::Tracing::IsInitialized() was only added recently, we
also roll Perfetto to the latest revision. This also requires updating
the proto_library GN template together with the underlying libprotobuf
dependency.

Bug: chromium:1006541
Change-Id: Icec626b7ed78264a81f1a80d73d60be3bde0d908
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2632590
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Auto-Submit: Sami Kyöstilä <skyostil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72130}
2021-01-18 12:39:03 +00:00
Ross McIlroy
a75b129acb [TurboFan] Only serialize JSFunction feedback and code if needed.
The feedback_vector/cell and code fields of a JSFunctionRef are only
used when generating code for the function (e.g., for the function
being optimized or inlined functions). This CL explicitly serializes
these fields only when the function will be used for codegen, otherwise
avoiding their serialization.

BUG=v8:7790,v8:9684

Change-Id: If76bc0b77e51aa10517699e0a9198358fe77f009
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2617083
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72129}
2021-01-18 12:02:35 +00:00
Mythri A
d7f767e16c [turboprop][runtime-profiler] Fix a bug that disabled OSR
This cl: https://chromium-review.googlesource.com/c/v8/v8/+/2632588
introduced a bug by bailing out early if we have top tier code early.
However, we still need to check if the frame is still interpreted
so that we could OSR. The early bailout isn't correct and also the
DCHECK isn't correct. This cl removes both.

Bug: chromium:1167638, v8:9684
Change-Id: I5a4aa406b05b6cbb5f98b63e015298c5b45160eb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2632696
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72128}
2021-01-18 11:08:10 +00:00
Clemens Backes
589677bcec [wasm][liftoff] Check for unexpected bailout
We are working on getting Liftoff feature complete. Eventually, bailout
should only happen if experimental features are enabled. Until we are
there, we also need to allow some more bailouts, which should be removed
in the near future.

This CL adds a check for expected bailout reasons. The new function
serves as a burndown list of issues to be fixed.

Drive-by: Make some methods constexpr such that they can be used in
static assertions.

R=ahaas@chromium.org

Change-Id: I5d3cd8f49a30d01f89ac6cf5321e1314b63eba40
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2629513
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72127}
2021-01-18 10:30:41 +00:00
Jakob Gruber
0ef84f9930 [compiler] Use StateValuesAccess to access frame state parameters
FrameState parameters must not be iterated directly since parameters
can be encoded into StateValues (i.e. parameter i is not necessarily
InputAt(i)). Instead, they should be accessed through the
StateValuesAccess helper class.

One example:

 82: StateValues[sparse:^^^^^^](81, 31, 32, 33, 34, 35)
  81: StateValues[sparse:^^^^^^^^](110, 24, 25, 26, 27, 28, 29, 30)
  31: NumberConstant[8]
  32: NumberConstant[9]
  33: NumberConstant[10]
  34: NumberConstant[11]
  35: NumberConstant[13]

Here, node 81 holds multiple parameters. These are properly iterated
by the StateValuesAccess class.

Bug: chromium:1166136
Change-Id: I12725f83994e1c05571bcba153ff45154b16d93f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2625879
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72126}
2021-01-18 07:56:20 +00:00
v8-ci-autoroll-builder
8ba6fb7fbc Update V8 DEPS.
Rolling v8/build: 3ecdb5e..43dd249

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/f46e9e7..cf567b6

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

Change-Id: I22b2eb5734c9578289d1700b1fae88f2c338d3e7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2635361
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@{#72125}
2021-01-18 03:50:50 +00:00
v8-ci-autoroll-builder
7480994d41 Update V8 DEPS.
Rolling v8/build: 670a905..3ecdb5e

Rolling v8/buildtools: 235cfe4..c38b5ab

Rolling v8/buildtools/linux64: git_revision:595e3be7c8381d4eeefce62a63ec12bae9ce5140..git_revision:d62642c920e6a0d1756316d225a90fd6faa9e21e

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/b2af2da..f46e9e7

Rolling v8/third_party/depot_tools: 091f5ac..dabd965

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

Change-Id: Ib0c53b119f960f4d8d41d7bd1b4355ea82b0b009
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2632878
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@{#72124}
2021-01-16 03:42:08 +00:00
Santiago Aboy Solanes
c92572ba2f Revert "[objects] Remove MakeExternal case for uncached internal strings"
This reverts commit 3a6f75ac94.

Reason for revert: performance regressions https://bugs.chromium.org/p/chromium/issues/detail?id=1163063

Original change's description:
> [objects] Remove MakeExternal case for uncached internal strings
>
> Concurrently accessing internal external uncached strings is not
> thread-safe. We are removing a case where we can make such a string
> through MakeExternal.
>
> Bug: v8:7790
> Change-Id: I958062c15cf40ccc330600bb572de98620866e54
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2565511
> Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#71573}

TBR=leszeks@chromium.org,solanes@chromium.org

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

Bug: v8:7790
Change-Id: I5dcc734869c3c921eacd89426309141127a85f47
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2633547
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72123}
2021-01-15 20:57:04 +00:00
Santiago Aboy Solanes
bccf387072 Revert "[objects] Remove uncached internal external string type"
This reverts commit b3d09001eb.

Reason for revert: https://chromium-review.googlesource.com/c/v8/v8/+/2565511 has to be reverted, and this was a follow-up to that

Original change's description:
> [objects] Remove uncached internal external string type
>
> We shouldn't be creating those anymore since they are not thread-safe.
>
> Bug: v8:7790
> Change-Id: I4546d995fa32eb076c8dfe9d95301fad719c9e07
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2615347
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72006}

TBR=rmcilroy@chromium.org,leszeks@chromium.org,solanes@chromium.org

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

Bug: v8:7790
Change-Id: I4eb1a6b8446fa602eeb5bf29fbf1fe57182cdbf3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2627605
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72122}
2021-01-15 19:48:34 +00:00
Andreas Haas
af343b5e04 [wasm] Enable --experimental-liftoff-extern-ref by default
R=thibaudm@chromium.org

Bug: v8:7581
Change-Id: I717466f045473015c8d99d1e640492486d05a832
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2625886
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72121}
2021-01-15 18:27:04 +00:00
Michael Lippautz
70fbfb0cc4 api: Make Context a Data object
Context objects are allocated on the heap and thus should be Data
objects. This allows handling them through tracing in the GC through
the API.

Bug: chromium:1013149
Change-Id: Id3a7bfd57fab19a5669062ccf61c2f8588faf0bb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2627307
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72120}
2021-01-15 17:46:44 +00:00
Andreas Haas
088205f068 [predictable] Disable tests that use --wasm-tier-up
There is an implication from --predictable => --single-threaded =>
--no-wasm-tier-up. This implication introduces conflicting flags for
all tests that set --wasm-tier-up. This CL disables all these tests.

R=machenbach@chromium.org

Bug: v8:11319
Change-Id: I32452d74ae33fc0e081971c5c0ed840334f274d5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2632598
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72119}
2021-01-15 17:37:14 +00:00
Thibaud Michaud
1f1710d1b1 [wasm][eh] Fix delegate opcode
Replace 0x16 with 0x18 for the delegate opcode, to avoid a conflict with
the function reference proposal.
See https://github.com/WebAssembly/exception-handling/issues/145

R=clemensb@chromium.org

Bug: v8:8091
Change-Id: Ib012f8680dfece200973e18fdf6c82877f10d5de
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2632604
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72118}
2021-01-15 17:28:53 +00:00
Sathya Gunasekaran
a90e9891b0 [test262] Remove myself from OWNERS
I haven't done any test262 rolls in forever and won't be doing any for
the foreseeable future, there's no need for me to be an OWNER.

Change-Id: I51d5915f5704d0c15c0735c95cfbff9464a0e929
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2632592
Auto-Submit: Sathya Gunasekaran  <gsathya@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72117}
2021-01-15 17:13:56 +00:00
Thibaud Michaud
d1a2d787cb [wasm][eh] Remove exnref type
Exception ref is not part of the latest exception handling
proposal. Remove the corresponding value type, the type opcode and some
obsolete tests.

R=clemensb@chromium.org

Bug: v8:8091
Change-Id: I5e068ba3426f4b56b90ef056193acdd8cc8fe7d7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2632599
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72116}
2021-01-15 16:37:26 +00:00
Bill Budge
ce793786ef Reland "[compiler] Rework calculation to start of return slots"
This is a reland of 2f3cda580b

GetFirstUnusedStackSlot is restored, and used for finding the padding
slot location, if any.

Original change's description:
> [compiler] Rework calculation to start of return slots
>
> - Changes GetOffsetToReturns to take into account return slot padding
>   and argument padding.
> - Changes GetStackParameterDelta to use GetOffsetToReturns for the SP
>   delta calculation.
> - Removes GetFirstUnusedStackSlot.
>
> Change-Id: I13df72e86750c62798bae262f0560cf1d7f981db
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2593306
> Commit-Queue: Bill Budge <bbudge@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72078}

Change-Id: I954d7e7487728dbd6a545a6c84efb8f8f65d894d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2626979
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72115}
2021-01-15 15:27:08 +00:00
Santiago Aboy Solanes
9b606e3ee4 Revert "[test] Update MakeExternal tests"
This reverts commit 37c3e05e81.

Reason for revert: https://chromium-review.googlesource.com/c/v8/v8/+/2565511 has to be reverted, and this was a follow-up to that

Original change's description:
> [test] Update MakeExternal tests
>
> They weren't initializing the VM at the start of the test. Also updated
> the test description.
>
> Bug: v8:7790
> Change-Id: I7b9df9e3aebb43fc526e16ec260aa071c0fdeb92
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2615019
> Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#71978}

TBR=leszeks@chromium.org,solanes@chromium.org

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

Bug: v8:7790
Change-Id: I35bc0090c3beed4ef11a458f0e26c44b22f7b654
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2627606
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72114}
2021-01-15 14:31:09 +00:00
Andreas Haas
9d3a38ae33 [wasm] Add testing opcode to test unsupported opcodes in Liftoff
Liftoff is not fully feature complete yet. To test that Liftoff can
bailout to TurboFan also for debugging, this CL adds
* an opcode that is only implemented in TurboFan
* a flag that allows that opcode to be compiled with TurboFan
* a bailout for this opcode to Liftoff.

R=clemensb@chromium.org

Bug: v8:7581
Change-Id: Ie4b4654d0d36ab937a7dfe9b1bb6a187b17615fb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2629284
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72113}
2021-01-15 13:55:09 +00:00
Alex Kodat
bf9e8d2c00 [cpu-profiler] Don't sample wrong thread's stack in profiler
76217f5 fixed the profiler so it would only sample a thread if
it had the Isolate lock. Unfortunately, this fix missed a timing
window where a thread might have the Isolate lock but might not
have restored the thread-specific data such as thread_local_top_
for the locked thread yet, so the sampler might end up using data
from a different thread.

This doesn't cause any seg faults or the like because the thread
we *meant* to sample has the Isolate lock so the thread we're
accidentally sampling can't mess with any Isolate data but we can
still get incorrect sample data which can be especially obvious if
the accidentally sampled thread is inside code that would never
run on the thread we meant to sample.

Fortunately, we can tell when all thread-specific data has been
restored to the Isolate because thread_state_ in the
PerIsolateThreadData for a thread is set to a non-null value
until everything has been restored, at which point it gets set
to null. So the fix adds a check after the test for the Isolate
lock to check if thread_state_ is null for the thread we mean to
sample. If so, we know all the data in the Isolate is good to go
for sampling.

Bug: v8:11316
Change-Id: I02d6361d8cbd6ec809ad8fb7ef07f5e9c94c7d1e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2628133
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72112}
2021-01-15 12:27:40 +00:00
Andreas Haas
ecdf9cb543 [wasm] Update spec tests
R=zhin@chromium.org

Change-Id: Ibf94191615d0081f089065e59c78b685e68f5bae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2629507
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72111}
2021-01-15 12:13:40 +00:00
Mythri A
3a6920d2e0 Reland "[turboprop] Enable tierup to TurboFan with FLAG_turboprop"
This is a reland of e38cb7572b. This
was reverted as a potential culprit for a wasm failure. The
actual revert that fixed the bots is here:
https://chromium-review.googlesource.com/c/v8/v8/+/2630736.
This should be safe to reland. I verified locally that the test is
failing with or without this change.

Original change's description:
> [turboprop] Enable tierup to TurboFan with FLAG_turboprop
>
> FLAG_turboprop was used to test the turboprop compiler without any
> further tierup to TurboFan. This cl changes:
> - FLAG_turboprop to also tier up to TurboFan.
> - Introduces FLAG_turboprop_as_toptier to continue running the
>   configuration without tierup.
> - Removes FLAG_turboprop_as_midtier which is same as FLAG_turboprop.
>
> Bug: v8:9684
> Change-Id: I487bda13d226434837770ecc43b3ced7c31ccf19
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2622214
> Commit-Queue: Mythri Alle <mythria@chromium.org>
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72101}

Bug: v8:9684
Change-Id: I8b61fd8e562190c3c7bf5a003273f2a058542dad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2632588
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72110}
2021-01-15 11:21:00 +00:00
Liu Yu
c87ad0629c [mips][wasm-simd][liftoff] Implement some SIMD operations
Implement i64x2 widen i32x4, and saturating rounding multiply high.

Port: 9cb7e57163

Port: 39f2e3de65
Change-Id: Ib88aca3e3f66eb4a12be4d2cf4e51ac930849cc0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2632353
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Auto-Submit: Liu yu <liuyu@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#72109}
2021-01-15 11:03:39 +00:00
Liu Yu
68bf491fbe [mips][wasm-simd] Prototype i64x2 widen i32x4 instructions
Port: 646bdbf843

Bug: v8:10972
Change-Id: I9b199dc75d0e759a768da55298af383ebeb30e90
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2632351
Auto-Submit: Liu yu <liuyu@loongson.cn>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72108}
2021-01-15 09:09:38 +00:00
v8-ci-autoroll-builder
d44ab87f1b Update V8 DEPS.
Rolling v8/build: d64e599..670a905

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/178c01b..b2af2da

Rolling v8/third_party/depot_tools: 64d94de..091f5ac

Rolling v8/tools/clang: b12d1c8..ba4ee03

Rolling v8/tools/luci-go: git_revision:16e6d735358b0166f06fd2e4daa0da4cff9918e9..git_revision:77944aa535e42e29faadf6cfa81aee252807d468

Rolling v8/tools/luci-go: git_revision:16e6d735358b0166f06fd2e4daa0da4cff9918e9..git_revision:77944aa535e42e29faadf6cfa81aee252807d468

Rolling v8/tools/luci-go: git_revision:16e6d735358b0166f06fd2e4daa0da4cff9918e9..git_revision:77944aa535e42e29faadf6cfa81aee252807d468

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

Change-Id: Ie4615747dd11f2ce6c969dfa7f4cf661198d4c5a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2631788
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@{#72107}
2021-01-15 03:50:14 +00:00
Zhi An Ng
9db3cb75ba [wasm-simd][liftoff][arm] Prototype load lane
Prototype load lane instructions on ARM Liftoff.

We had a helper function for load lane that was living in
instruction-selector. Move it out to assembler-arm so we can reuse that
in Liftoff.

Bug: v8:10975
Change-Id: Ic6e15c23eb778fb94a882609be622d2ca1f61ddb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2614225
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72106}
2021-01-15 02:11:14 +00:00
Ben Noordhuis
ee3f5ba10b [api] Make ScriptOrigin take isolate as parameter
Remove the ambient dependency on the currently entered isolate, let the
embedder pass it in explicitly.

Bug: v8:11287
Change-Id: I03690390a308a59e2c6ea5c6ae268780d836b717
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2608209
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72105}
2021-01-14 23:51:04 +00:00
Milad Fa
2da23e0e71 PPC/s390: [codegen] Handle alignment holes when pushing arguments
Port f9e76d6dff

Original Commit Message:

    - Modify InstructionSelectors to track both padding and multiple
      slot values to correctly adjust stack pointers when pushing
      arguments. Pass stack offset as an immediate operand.
    - Modify CodeGenerators to handle alignment padding.

R=bbudge@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N

Change-Id: I639b6394f33e5e694882cb98c43b58edf5d93775
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2629947
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72104}
2021-01-14 23:38:04 +00:00
Francis McCabe
e451d996fb Revert "[wasm] Unskip a test"
This reverts commit 7fc1351bf5.

Reason for revert: creating new flakiness?
See https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20TSAN%20-%20isolates/13052

Original change's description:
> [wasm] Unskip a test
>
> Debugging with multiple isolates involved is fixed now, thus unskip the
> test.
>
> R=​thibaudm@chromium.org
>
> Bug: v8:10359, v8:10099
> Change-Id: I0134fe9da21c86dd40a559dbd4cf8c998a70be20
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2629512
> Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72099}

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

Change-Id: Ie328a3af76ba2070cbd0971395d6414d48f4d973
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:10359
Bug: v8:10099
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2630736
Reviewed-by: Francis McCabe <fgm@chromium.org>
Commit-Queue: Francis McCabe <fgm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72103}
2021-01-14 23:06:28 +00:00
Francis McCabe
053b3c44c9 Revert "[turboprop] Enable tierup to TurboFan with FLAG_turboprop"
This reverts commit e38cb7572b.

Reason for revert: Test failing: https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket.appspot.com/8858103866497469056/+/steps/Check/0/logs/tier-down-to-liftoff/0

Original change's description:
> [turboprop] Enable tierup to TurboFan with FLAG_turboprop
>
> FLAG_turboprop was used to test the turboprop compiler without any
> further tierup to TurboFan. This cl changes:
> - FLAG_turboprop to also tier up to TurboFan.
> - Introduces FLAG_turboprop_as_toptier to continue running the
>   configuration without tierup.
> - Removes FLAG_turboprop_as_midtier which is same as FLAG_turboprop.
>
> Bug: v8:9684
> Change-Id: I487bda13d226434837770ecc43b3ced7c31ccf19
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2622214
> Commit-Queue: Mythri Alle <mythria@chromium.org>
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72101}

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

Change-Id: Ic3e87c311fba001460e4f1561a2e5f74391a06a7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:9684
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2630526
Reviewed-by: Francis McCabe <fgm@chromium.org>
Commit-Queue: Francis McCabe <fgm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72102}
2021-01-14 22:08:35 +00:00
Mythri A
e38cb7572b [turboprop] Enable tierup to TurboFan with FLAG_turboprop
FLAG_turboprop was used to test the turboprop compiler without any
further tierup to TurboFan. This cl changes:
- FLAG_turboprop to also tier up to TurboFan.
- Introduces FLAG_turboprop_as_toptier to continue running the
  configuration without tierup.
- Removes FLAG_turboprop_as_midtier which is same as FLAG_turboprop.

Bug: v8:9684
Change-Id: I487bda13d226434837770ecc43b3ced7c31ccf19
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2622214
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72101}
2021-01-14 18:47:34 +00:00
Santiago Aboy Solanes
8327ce716e Revert "[compiler] Mark String as kNeverSerialized"
This reverts commit 16e5dca30d.

Reason for revert: https://chromium-review.googlesource.com/c/v8/v8/+/2565511 has to be reverted, and this was a follow-up to that

Original change's description:
> [compiler] Mark String as kNeverSerialized
>
> Bug: v8:7790
> Change-Id: I2deb462c3467f7239d55b0f295feed1de5ca1c2f
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2616198
> Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72010}

TBR=neis@chromium.org,solanes@chromium.org

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

Bug: v8:7790
Change-Id: Ie8b628fc5d0b0d90637515d7d3a2f1a9f64a0a09
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2629747
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72100}
2021-01-14 17:48:13 +00:00
Clemens Backes
7fc1351bf5 [wasm] Unskip a test
Debugging with multiple isolates involved is fixed now, thus unskip the
test.

R=thibaudm@chromium.org

Bug: v8:10359, v8:10099
Change-Id: I0134fe9da21c86dd40a559dbd4cf8c998a70be20
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2629512
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72099}
2021-01-14 17:28:43 +00:00
Andreas Haas
1ac46e46a1 [wasm] Decoder should fail on 0-length unknown sections
R=clemensb@chromium.org

Bug: v8:10994
Change-Id: I2145559f6b9f4d378a0b8c063133e8d59b7ce4d2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2629510
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72098}
2021-01-14 17:08:03 +00:00
Santiago Aboy Solanes
b95210bf9c Revert "[compiler] Mark Name as kNeverSerialized"
This reverts commit 73875e9585.

Reason for revert: https://chromium-review.googlesource.com/c/v8/v8/+/2565511 has to be reverted, and this was a follow-up to that

Original change's description:
> [compiler] Mark Name as kNeverSerialized
>
> Bug: v8:7790
> Change-Id: I44469e08131ad6a5f95a465cf2d461da0785221e
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2616218
> Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72012}

TBR=neis@chromium.org,solanes@chromium.org

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

Bug: v8:7790
Change-Id: I300c7050522de3c5f44cb4466e87f3388f221725
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2627603
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72097}
2021-01-14 17:00:33 +00:00
Ulan Degenbaev
d09d32bc52 [heap] Fix GcTracer scopes for GC jobs
Bug: v8:11181
Change-Id: I8ca8b7249ef660874da761c11f192ffd06748ff5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2558219
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72096}
2021-01-14 15:40:42 +00:00
Patrick Thier
3466daa7e4 [regexp] Throw when length of text nodes in alternatives is too large.
Offsets in regular expressions are limited to 16 bits.
It was possible to exceed this limit when emitting greedy loops where
the length of text nodes exceeded 16 bits, resulting in overflowing
offsets.
With this CL we throw a SyntaxError "Regular expression too large" to
prevent this overflow.

Bug: chromium:1166138
Change-Id: Ica624a243bf9827083ff883d9a976f13c8da02e5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2629286
Commit-Queue: Patrick Thier <pthier@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72095}
2021-01-14 14:58:04 +00:00
Manos Koukoutos
a358c2eb42 [wasm] Mark loop exits in wasm-generated TurboFan graphs
Changes:
- Add --wasm-loop-unrolling flag. Everything in this CL happens behind
  this flag.
- In decoding, DoReturn does not take returned values as an argument.
  It is now the responsibility of graph-builder-interface.cc to extract
  these values. Note that this is what was already happening in Liftoff.
- In pipeline.cc, add phase to remove loop exits after generating the
  turbofan graph.
- Explicitly disallow calling FallThruTo() on loops.
- Add loop assignments and loop header node to Control type in
  graph-builder-interface.cc. Assign them in Loop().
- Main change: Add loop exit nodes to wasm-generated graphs. For
  details, consult this design doc: https://docs.google.com/document/d/1AsUCqslMUB6fLdnGq0ZoPk2kn50jIJAWAL77lKXXP5g
- Inline PrepareForLoop().

Bug: v8:11298
Change-Id: I65058f1b5df3f862f4a62f4dcb0bd7e1f1dcf4ee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2621082
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72094}
2021-01-14 14:08:11 +00:00
Dan Elphick
a494232f3b [build] Add the include dirs to the v8_headers target
This means that targets like pdfium don't have to manually set up the
include dir.

Bug: v8:11292
Change-Id: Idde914592a86f2f5a3fc5cf97060d5650467cc7a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2629280
Commit-Queue: Dan Elphick <delphick@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Dan Elphick <delphick@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72093}
2021-01-14 13:51:41 +00:00
Liu Yu
9004dedf75 [mips][wasm-simd] Implement saturating rounding multiply high
Port: e14de8b986

Bug: v8:10971
Change-Id: Ia193010133ffc4ac49268ed095cdda8f7b732234
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2629110
Auto-Submit: Liu yu <liuyu@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#72092}
2021-01-14 13:49:11 +00:00
Lutz Vahl
21dac87bc7 Changed version number to 9.0
TBR=vahl@chromium.org

Change-Id: I4a1ebf06681f7618392b8d4915396e6edaf5dc10
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2629277
Reviewed-by: Lutz Vahl <vahl@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Lutz Vahl <vahl@chromium.org>
Auto-Submit: Lutz Vahl <vahl@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72091}
2021-01-14 13:15:05 +00:00