Commit Graph

56281 Commits

Author SHA1 Message Date
Michaël Zasso
f89e555956 [api] Fix compilation issue with macOS
Fixes the following error caught by the Node.js CI:

../deps/v8/src/api.cc:8943:10:
  error: no viable conversion from returned value of type
  'unique_ptr<v8::internal::MicrotaskQueue, default_delete<v8::internal::MicrotaskQueue>>'
  to function return type
  'unique_ptr<v8::MicrotaskQueue, default_delete<v8::MicrotaskQueue>>'

  return microtask_queue;
         ^~~~~~~~~~~~~~~

Change-Id: Ic09dab46bb8f87a2b3b59f5836e0883bfe0e9681
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627533
Commit-Queue: Michaël Zasso <mic.besace@gmail.com>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61789}
2019-05-23 13:54:14 +00:00
Toon Verwaest
5cf05dca69 [json] Restore string two-to-one-byte conversion during internalization
This was accidentally dropped when unifying the internalization code.

Change-Id: I2fd7127f85f0e3e9abd1ae834130f0c9da37363e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627529
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61788}
2019-05-23 13:42:44 +00:00
Jakob Gruber
7b38639496 [mksnapshot] Remove target OS defines
These were added to support specific cross-compile scenarios that
should now be covered by the --target-os and --target-arch flags.

Bug: v8:9103
Change-Id: I848f4f39cecc83f9ec8529c4f8855662059e3dc5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624219
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61787}
2019-05-23 13:31:54 +00:00
Clemens Hammacher
c8e6a633ed Remove d8 from .gitignore
We now have a src/d8 directory, and having "d8" in .gitignore makes git
ignore all new files in this directory, and also hides the directory in
some IDEs.

R=yangguo@chromium.org

No-Try: true
Change-Id: I3106378417c1fe9ebc369275eb52d5438cee8825
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627530
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61786}
2019-05-23 13:21:45 +00:00
Jakob Gruber
649d759f82 [mksnapshot] Split out platform embedded file writers
Split out embedded file writers for AIX, Windows, and macOS. These are
no longer selected by compile-time defines (e.g. V8_OS_WIN,
V8_TARGET_ARCH_X64) but by --target-os and --target-arch runtime
flags.

Bug: v8:9103
Change-Id: I5d5cac15e48b5c743d74f8a382606a6194ba7865
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624216
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61785}
2019-05-23 12:47:49 +00:00
Simon Zünd
2b7ab6ad3e [stack-trace] Add additional fields to StackFrameInfo
This CL adds all fields to StackFrameInfo that are necessary to
stringify a stack trace frame. This is another step towards
disentangling symbolizing and serializing:

  - Symbolization collects all the necessary strings, numbers and
    flags for a stack trace frame.
  - Serialization turns the symbolized stack trace frame into a
    string.

Drive-by: Moves the lazy initialization of StackFrameInfo into the
private getter.

Bug: v8:8742
Change-Id: Ic3e0fb6b3d0f0e260014af44380f1f30216b1b26
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627346
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61784}
2019-05-23 12:36:10 +00:00
Peter Marshall
4861df10b8 [tracing] Fix perfetto tests
I accidentally broke this with the last CL because the FYI bot does not
block landing.

Add initialization of perfetto when building with perfetto enabled.

Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng
Bug: v8:8339
Change-Id: I10378b72bff731fac6caa75df37a355df4b804dc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627345
Auto-Submit: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61783}
2019-05-23 12:30:59 +00:00
Jakob Gruber
302a49c6b3 [logging] Systematically emit CodeCreateEvents for builtins
Introduce a single point to emit CodeCreateEvents for all builtins in
Isolate::Init. At this location, we cover both the case of builtin generation
(e.g. in mksnapshot) and deserialized builtins (in standard builds),
whereas previously we only emitted events post-builtin-generation.

In order to preserve behavior for bytecode handler events, pack the bytecode
and operand scale into our existing builtin metadata table.

Drive-by: Update way-out-of-date comment in the static initializer
check.

Bug: v8:8674
Change-Id: Iced8f73568e920846cde6f7b0a9c1e61844258ad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627337
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61782}
2019-05-23 11:55:36 +00:00
Georg Neis
c2f029af5c [turbofan] Teach serializer about soft deopts
When encountering uninitialized feedback, mark the environment as dead
such that we skip over the following bytecodes. Start full processing
again when we reach a bytecode that is either a jump target or an
exception handler entry. For now, don't support this optimization when
compiling for OSR.

Bug: v8:7790
Change-Id: I8177b7fa31ea43d205a2708310b0b0e67302001e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1621930
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61781}
2019-05-23 11:36:11 +00:00
Peter Marshall
d5688b1f23 Reland "[tracing] Add a configurable output stream for perfetto tracing"
This is a reland of a03ed62679

Removed the added test which was failing on win32. The test was unrelated
to the CL; we can add it later.

Original change's description:
> [tracing] Add a configurable output stream for perfetto tracing
>
> Add the ability to provide perfetto with an output stream for the JSON
> consumer rather than hardcode it. D8 will use this interface exclusively
> once the old trace controller is removed.
>
> Also add a test for scope-managed trace events and their duration - this
> was leftover from a previous CL.
>
> Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng
> Bug: v8:8339
> Change-Id: I1c45e17e528b549a4cfdaecabd33c7ac4ab4af77
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1611801
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Peter Marshall <petermarshall@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#61753}

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

Bug: v8:8339
Change-Id: I3442a4d111e12947c107e7d0c226ae934acd06e4
Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627334
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61780}
2019-05-23 11:35:07 +00:00
Georg Neis
ee687e4325 [turbofan] Remove obsolete always-on flag --inline-into-try
Change-Id: Ib1233607236c991af0125f0197b9f89b10b4519d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1625990
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61779}
2019-05-23 11:31:56 +00:00
Tobias Tebbi
f589d56101 [torque] move class tests to unittests
This avoids the generation of fake external classes.

Bug: v8:7793
Change-Id: I9744b299d3ec474d72b298b4f6143f95e345d1d9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1625991
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61778}
2019-05-23 11:00:31 +00:00
Georg Neis
b509f21ec1 [turbofan] Be consistent about printing ObjectRefs
We were sometimes printing the data pointer, and sometimes the handle
location. This CL always uses the existing operator<< overload to print
ObjectRefs, which currently means printing the data pointer.

Bug: v8:7790
Change-Id: Ic5e2dad075678d2250bc0bcb170046d055680572
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1625989
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Auto-Submit: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61777}
2019-05-23 10:59:27 +00:00
Clemens Hammacher
e1933eb647 Add recent code rewrite to .git-blame-ignore-revs
R=leszeks@chromium.org

No-Try: true
Bug: v8:9183
Change-Id: I9372bdc5d3789a1bbc50ef2737577c4f60173bce
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627342
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61776}
2019-05-23 10:38:45 +00:00
Frederik Gossen
842557322d [wasm-hints] Add tool to read Wasm compilation hints
The python script allows to read the custom section "compilationHints"
from a Wasm module. It prints all hints to standard out.

Bug: v8:9003
Change-Id: Ife8173e3267557d8adf4b6739f45060d386f25dd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1619764
Commit-Queue: Frederik Gossen <frgossen@google.com>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61775}
2019-05-23 09:57:53 +00:00
Clemens Hammacher
0adf11f709 Fix compile errors on tsan and no-i18n
This fixes compile errors after https://crrev.com/c/1624788.

TBR=jkummerow@chromium.org

No-Try: true
Bug: v8:9183, v8:3770
Change-Id: I982e77e86389163f1549bbb02621b17972bbc158
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627336
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61774}
2019-05-23 09:35:11 +00:00
Peter Marshall
626b952562 [cleanup] Remove name from ElementsAccessor
This is only used by ElementsKindToString(!).

Implement ElementsKindToString with a big 'ol switch. The compiler
will give us an error if we forget an ElementsKind.

Bug: v8:9183
Change-Id: I1ed73ecac33aa7318a97f31794473d9afa16961c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624802
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61773}
2019-05-23 09:29:15 +00:00
Benedikt Meurer
130f919217 [test] Make tests pass with the GC fuzzer.
The tests need to properly hold on to the original fast-mode map,
otherwise the GC might clear that, and so the NormalizedMapCache
lookup would fail due to that.

Bug: chromium:963411, v8:9114, v8:9183, v8:9267
Change-Id: Ic41ed363959a5c182c74097767dc14c366076e17
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627333
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61772}
2019-05-23 09:08:45 +00:00
Benedikt Meurer
99a927c692 [api] Remove obsolete FunctionTemplate::SetHiddenPrototype().
The `FunctionTemplate::SetHiddenPrototype()` API was deprecated
beginning of the year and all uses in Node.js and Chrome have been
removed appropriately. This removes the implementation of the method
and the bit in the `FunctionTemplateInfo`, but retains the bit in
the Map for now. That will be cleaned up as a second step later.

Bug: v8:9183, v8:9267
Change-Id: I9aa2fc484b3321f4f42a29a0a38d72a6d30054a7
Cq-Include-Trybots: luci.chromium.try:linux-rel,win7-rel
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627329
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61771}
2019-05-23 09:05:56 +00:00
Benedikt Meurer
5b46f5736f [cleanup] Remove the Map::IsDictionaryMap() method.
There's a `Map::IsDictionaryMap()` method in addition to the
`Map::is_dictionary_map()`, which apparently do very different things:
The former checks whether the instance type of the Map is in a certain
range (FIRST_DICTIONARY_TYPE to LAST_DICTIONARY_TYPE), while the latter
checks the `is_dictionary_map` bit (which means that the backing store
for the properties of a JSObject is in slow mode). To make matters worse
there's also `CodeStubAssembler::IsDictionaryMap()`, which does the bit
check similar to `Map::is_dictionary_map()`. And to make matters even
worse the FIRST_DICTIONARY_TYPE to LAST_DICTIONARY_TYPE range also
contains instance types for classes that aren't subclass of `Dictionary`
(despite a comment stating the opposite).

So in conclusion it's best to remove the confusing
`Map::IsDictionaryMap()` method, which is anyways wrong, and just test
explicitly for `NameDictionary`, `NumberDictionary` or
`GlobalDictionary` in the appropriate places.

Bug: v8:9183
Change-Id: If35f73261e3cc96938ebf499bf32be3ec725288b
Cq-Include-Trybots: luci.chromium.try:linux-rel,win7-rel
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627330
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61770}
2019-05-23 09:02:26 +00:00
Yang Guo
a0c3797461 Move more relevant files to src/objects
TBR=bmeurer@chromium.org,leszeks@chromium.org

Bug: v8:9247
Change-Id: I8d14d0192ea8c705f8274e8e61a162531826edb6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624220
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61769}
2019-05-23 08:52:30 +00:00
Clemens Hammacher
d95f82e6e7 [cleanup] Remove {operator->} on Object and subtypes
For consistency, {Object} members should only be accessed via ".".
CL https://crrev.com/c/1624209 cleaned up the code base already. This
CL removes the now dead operator.

R=jkummerow@chromium.org

Bug: v8:9183, v8:3770
Change-Id: I599dcd49d79bfc68f970fe872b64b3b2680cddd5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624788
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61768}
2019-05-23 08:44:34 +00:00
Yang Guo
7b12e3b94b Remove some unused string constant
R=szuend@chromium.org

Change-Id: I7d8eb6f26dd0cecd749a66cd2b240ff27cbba985
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1621927
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61767}
2019-05-23 08:34:04 +00:00
Yang Guo
b72941e8b0 Move src/callable.h to src/codegen
Bug: v8:9247
Change-Id: Iaed837e146603c37b0ad64605405c442154cf1b0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624222
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61766}
2019-05-23 08:18:05 +00:00
Sigurd Schneider
9aa8b51704 [runtime] Remove explicit OneByte/TwoByte from InternalizeString
The type of the argument makes it clear what we're internalizing, and this
allows us to choose either one based on a template parameter.

Change-Id: I6d7865e7fdef364f6cf10ff9267034df182d7539
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624212
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61765}
2019-05-23 08:02:32 +00:00
Clemens Hammacher
878ccb33bd [cleanup] Avoid {Object::operator->}
This CL was generated by an automatic clang AST rewriter using this
matcher expression:

  callExpr(
    callee(
      cxxMethodDecl(
        hasName("operator->"),
        ofClass(isSameOrDerivedFrom("v8::internal::Object"))
      )
    ),
    argumentCountIs(1)
  )

The "->" at the expression location was then rewritten to ".".

R=jkummerow@chromium.org
TBR=mstarzinger@chromium.org,verwaest@chromium.org,yangguo@chromium.org

Bug: v8:9183, v8:3770
No-Try: true
No-Tree-Checks: true
Change-Id: I0a7ecabdeafe51d0cf427f5280af0c7cab96869e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624209
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61764}
2019-05-23 07:52:07 +00:00
Jun Lim
f1d016229c [regexp-builtins] avoid calling substring in @@match
In fast mode, this CL try to avoid calling substring in @@match.
For an ATOM type regexp, hold the literal string to search for before the loop
and reuse the string instead of calling substring in the loop.

Change-Id: Ice314ebf146261cf206c21cb1530a2a44d3c42ae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1618435
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61763}
2019-05-23 06:19:45 +00:00
Yang Guo
4c986c625f Move handles-related files to src/handles
Bug: v8:9247
Change-Id: I0023200c54fa6499ae4e2cf5e4c89407cc35f187
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624218
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61762}
2019-05-23 06:00:15 +00:00
v8-ci-autoroll-builder
7cf9ec6a31 Update V8 DEPS.
Rolling v8/build: 0742a14..97564df

Rolling v8/buildtools: 9ea486b..6884242

Rolling v8/buildtools/third_party/libc++/trunk: 9b96c3d..5938e05

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/535dc1d..4d346fb

Rolling v8/third_party/depot_tools: c7e440c..181e44c

Rolling v8/tools/clang: 2db48c7..9d46446

Rolling v8/tools/swarming_client: 1b65f4e..779c4f0

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

Change-Id: I7b2824622066da423b7f7584338a42e06902701d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627110
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@{#61761}
2019-05-23 03:51:05 +00:00
Mathias Bynens
b17b72e0a3 Roll Test262 to update RegExp/Unicode tests
https://github.com/tc39/ecma262/issues/1530
https://github.com/tc39/test262/pull/2161

Bug: v8:7834, v8:9131
Change-Id: I9c5efe9d6eec6c5dabc120d1b1089341ed5b1088
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1625992
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Auto-Submit: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61760}
2019-05-22 21:57:03 +00:00
Frank Tang
9f7dec9380 Stage calendar/numberingSystem options.
Adds
"calendar" and "numberingSystem" options for Intl.DateTimeForamt and
"numberingSystem" for Intl.NumberFormat.

Plan to flip to ship in early June (after m76 branch) for chrome m77.
Spec: https://github.com/tc39/ecma402/pull/175
I2I: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!searchin/v8-dev/ftang%7Csort:date/v8-dev/7sk-rEHuCY4/n7kH0WzyAwAJ

Tests:
test262/intl402/NumberFormat/numbering-system-options
test262/intl402/DateTimeFormat/numbering-system-calendar-options
intl/number-format/check-numbering-system
intl/date-format/check-numbering-system
intl/date-format/check-calendar

Bug: v8:9154
Change-Id: I80020b9af6bf9c87f5a1efc7aac3080e723eea34
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1622728
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61759}
2019-05-22 17:22:47 +00:00
Toon Verwaest
4f6bcc1d34 [unicode] Fix Utf8Decoder::is_one_byte to actually include latin1
Change-Id: Ibb3f6d5a0f2f24ff5359ca280f058a20c8215ac1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624801
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61758}
2019-05-22 17:01:37 +00:00
Paolo Severini
c6bf94fa05 Fix a race condition in win64_unwindinfo::RegisterNonABICompliantCodeRange
Function win64_unwindinfo::RegisterNonABICompliantCodeRange() calls
LoadNtdllUnwindingFunctions() to dynamically load from ntdll a couple of
functions that are not available on Windows 7. Unfortunately there is a
race condition in LoadNtdllUnwindingFunctions() that can cause a crash
when multiple isolates are initialized concurrently.
This can be fixed using base::CallOnce().

Bug: v8:9204
Change-Id: I5c57708ab5f16e9ef9f897efce1ccdf591e2f828
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1623592
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Paolo Severini <paolosev@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#61757}
2019-05-22 16:59:03 +00:00
Z Duong Nguyen-Huu
aaecb43329 Port StringPrototypeConcat to Torque
Bug: v8:8996
Change-Id: Icb454f8ff5f0964b019f360e71119158341307de
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1622743
Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61756}
2019-05-22 16:57:57 +00:00
Clemens Hammacher
5d0b4ad649 Reland "[wasm] Compile big functions first"
This is a reland of 2ce5da9a70

Original change's description:
> [wasm] Compile big functions first
>
> Add a special queue to {CompilationUnitQueues} to handle big functions
> specially. They are organized in a priority queue (ordered by their
> body size), and all threads check this queue first, before executing
> the tasks from their own queue. In some benchmarks, this shortens
> overall compilation time by 10-20 percent.
>
> R=ahaas@chromium.org
>
> Bug: v8:8916, chromium:950493
> Change-Id: I45f36a05304e2f1c4f3ce6b8821ddd4bd08fbba3
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1622122
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#61746}

Bug: v8:8916, chromium:950493
No-Presubmit: true
Change-Id: I26c949ce6a0f5efee684561dc0b4eba44921cddf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624799
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61755}
2019-05-22 16:43:40 +00:00
Clemens Hammacher
2de2bc8838 Revert "[tracing] Add a configurable output stream for perfetto tracing"
This reverts commit a03ed62679.

Reason for revert: Fails on win32: https://ci.chromium.org/p/v8/builders/ci/V8%20Win32/21252

Original change's description:
> [tracing] Add a configurable output stream for perfetto tracing
> 
> Add the ability to provide perfetto with an output stream for the JSON
> consumer rather than hardcode it. D8 will use this interface exclusively
> once the old trace controller is removed.
> 
> Also add a test for scope-managed trace events and their duration - this
> was leftover from a previous CL.
> 
> Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng
> Bug: v8:8339
> Change-Id: I1c45e17e528b549a4cfdaecabd33c7ac4ab4af77
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1611801
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Peter Marshall <petermarshall@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#61753}

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

Change-Id: Ie7dbe4fc5f9e496fafc8e3ad2b05011b88c9e2c3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8339
Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1625465
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61754}
2019-05-22 15:58:11 +00:00
Peter Marshall
a03ed62679 [tracing] Add a configurable output stream for perfetto tracing
Add the ability to provide perfetto with an output stream for the JSON
consumer rather than hardcode it. D8 will use this interface exclusively
once the old trace controller is removed.

Also add a test for scope-managed trace events and their duration - this
was leftover from a previous CL.

Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng
Bug: v8:8339
Change-Id: I1c45e17e528b549a4cfdaecabd33c7ac4ab4af77
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1611801
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61753}
2019-05-22 15:25:31 +00:00
Andreas Haas
d56ee2e3df [wasm][anyref] Cache export wrappers per signature
Up until now, we cached export wrappers per export index. With the
anyref proposal potentially many more functions will need export
wrappers, e.g. any function that is stored in a table, and any
function accessed by the new ref.func instruction.

With this CL, we change the caching scheme an do the caching per
signature. Thereby we can guarantee that any export wrapper which
potentially exists can be stored in the cache.

For cctests which use wasm-run-utils, we don't know the size of the
cache anymore ahead of time. However, we assume that no more than
5 signatures will be used in any cctest. If this assumption is not
true, we can just adjust the number.

The cache is now accessed in all code paths where we need an export
wrapper.

Bug: chromium:962850

Change-Id: I32df60dfa7801d1e71f7d837da091f388198af1f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1615247
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61752}
2019-05-22 14:59:50 +00:00
Andreas Haas
4088c521f6 [wasm] Update spec tests
The core spec tests need to be generated manually for now, because our
bots don't have an ocaml installation.

This CL was created automatically by running
./tools/wasm/update-wasm-spec-tests.sh.

R=adamk@chromium.org

Change-Id: I4c6199b51f30b29f150914a9bffe6009452c8c47
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624794
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61751}
2019-05-22 14:58:45 +00:00
Clemens Hammacher
f5f63d0e3b [torque] Use "." instead of "->" on Object
{Object::operator->} will be removed soon.

R=tebbi@chromium.org

Bug: v8:9183, v8:3770
Change-Id: Ifb7754c16055aec41dd30a92e81521a830de4f26
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624210
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61750}
2019-05-22 14:57:40 +00:00
Clemens Hammacher
a69be08a9e Revert "[wasm] Compile big functions first"
This reverts commit 2ce5da9a70.

Reason for revert: Fails on several bots, e.g. https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20TSAN/26607

Original change's description:
> [wasm] Compile big functions first
> 
> Add a special queue to {CompilationUnitQueues} to handle big functions
> specially. They are organized in a priority queue (ordered by their
> body size), and all threads check this queue first, before executing
> the tasks from their own queue. In some benchmarks, this shortens
> overall compilation time by 10-20 percent.
> 
> R=​ahaas@chromium.org
> 
> Bug: v8:8916, chromium:950493
> Change-Id: I45f36a05304e2f1c4f3ce6b8821ddd4bd08fbba3
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1622122
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#61746}

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

Change-Id: Ib47b23ff878d4a561df1993d532e5eeafea64ff6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8916, chromium:950493
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624797
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61749}
2019-05-22 14:56:36 +00:00
Jakob Gruber
f0bb837f1b [mksnapshot] Hide details of the embedded file writer
Refactor-only: move the more involved EmbeddedFileWriter methods into
the .cc file.

Bug: v8:9103
Change-Id: I546c23544a0425a32cbd04cecc759f9b553b7071
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624207
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61748}
2019-05-22 14:25:35 +00:00
Georg Neis
30a1def786 [turbofan] Avoid using LookupIterator to read constant field
Use JSObject::FastPropertyAt instead. Also, to avoid adding an
immutable-flag to PropertyAccessInfo, use DataConstant (instead of
DataField) for properties that are immutable according to their
attributes.

This is in preparation for serializing the property value for
concurrent inlining.

Bug: v8:7790
Change-Id: Ib40059bde2e5eb14b26400bcab72d6ea6bb57666
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624790
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61747}
2019-05-22 14:14:43 +00:00
Clemens Hammacher
2ce5da9a70 [wasm] Compile big functions first
Add a special queue to {CompilationUnitQueues} to handle big functions
specially. They are organized in a priority queue (ordered by their
body size), and all threads check this queue first, before executing
the tasks from their own queue. In some benchmarks, this shortens
overall compilation time by 10-20 percent.

R=ahaas@chromium.org

Bug: v8:8916, chromium:950493
Change-Id: I45f36a05304e2f1c4f3ce6b8821ddd4bd08fbba3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1622122
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61746}
2019-05-22 14:10:04 +00:00
Jakob Gruber
a35e79ee58 [mksnapshot] Add abstract base class for platform embedded file writers
This is in preparation for better cross-compile support in mksnapshot.
Specifically, this CL series will introduce runtime switches to select
the target platform for generated embedded.S assembly.

Each platform writer will derive from the abstract base class
PlatformEmbeddedFileWriterBase. Currently, the code remains
functionally unmodified and was just moved to
PlatformEmbeddedFileWriterGeneric. This will be split up in future
CLs.

Bug: v8:9103
Change-Id: Ie7e29bb60ba5a8ff6c0c1edec676943b80a1781b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1622854
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61745}
2019-05-22 14:01:00 +00:00
Ross McIlroy
6908209dbb [OWNERS] Add solanes@ to COMMON_OWNERS
Change-Id: I68e716ee664ae2295089ee4d6af6a0ea6dbf1c1e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624789
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Auto-Submit: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61744}
2019-05-22 13:50:51 +00:00
Mythri A
6cb093cd4c [ic] In KeyedStoreIC use the new receiver map instead of computing transitions
KeyedStoreIC computes the expected transition to the map based on the
incoming receiver map, the index and the value that is being stored.
Since we already store the element into the object, the runtime would
have already computed these transitions and it is possible to use the
new map of the object instead of recomputing the map. Though we would
need additional checks to see the newly transitioned map is indeed
a more generic elements transition and not an unexpected transition.

Bug: v8:8394
Change-Id: If6819895e5d20dd76bb062c6064593bf3a920778
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1621937
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61743}
2019-05-22 13:32:39 +00:00
Simon Zünd
5c6fd450e5 [cleanup] Remove ExitFrameType enum on the Builtins class
This CL also removes the AdaptorWithExitFrame builtin and simplifies
respective use-sites.

Bug: v8:9183
Change-Id: I97c4e35aa551f586faedcb09cc0b2b837e5307f1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624215
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61742}
2019-05-22 13:23:52 +00:00
Mythri A
7b10b36fdb [map] In FindElementsKindTransitionedMap only check for required element kinds
FindElementsKindTransitionedMap checks if we could transition from
the source map to one of the target maps without requiring any instance
rewriting. It does this by replaying all the property transitions of the
source map on each elements kind map and seeing if it needs a instance
rewrite. Since we already know the elements kind of the target maps, we can
avoid doing this for element kinds that are not in target map.

Change-Id: Ief9ba89992a411535a0335c3b67221666647f55e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624208
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61741}
2019-05-22 13:01:18 +00:00
Igor Sheludko
1f0543af7a Revert "Reland "[ptr-compr][x64] Temporarily enable pointer compression on x64""
This reverts commit 2d7102004f.

Reason for revert: It's not ready for shipping in M76.

> Reland "[ptr-compr][x64] Temporarily enable pointer compression on x64"
>
> This is a reland of d61a9347c8
>
> 6th attempt. Relanding after fixing TSan/UBSan issues.
>
> Original change's description:
> > [ptr-compr][x64] Temporarily enable pointer compression on x64
> >
> > ... and make sure that the x64 ptr-compr bots proceed testing V8 without
> > pointer compression in order to keep testing the full pointer mode.
> >
> > Bug: v8:7703
> > Change-Id: Ib1498609603cb03be2464043658131d5a2f1e012
> > Cq-Include-Trybots: luci.v8.try:v8_linux64_ubsan_rel_ng,v8_linux64_tsan_rel
> > Cq-Include-Trybots: luci.chromium.try:fuchsia_x64,linux-rel,mac-rel
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1559850
> > Commit-Queue: Igor Sheludko <ishell@chromium.org>
> > Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#61416}
>
> Bug: v8:7703
> Change-Id: I1fa0989aef9ea08e54fd6dfd32d6989367332ce3
> Cq-Include-Trybots: luci.v8.try:v8_linux64_ubsan_rel_ng,v8_linux64_tsan_rel
> Cq-Include-Trybots: luci.v8.try:v8_linux64_cfi_rel_ng
> Cq-Include-Trybots: luci.chromium.try:fuchsia_x64,linux-rel,mac-rel
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1607654
> Commit-Queue: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#61559}

Tbr: machenbach@chromium.org
Bug: v8:7703
Change-Id: Ic73b57203bbcb637e33b3577ce8142d43c364796
Cq-Include-Trybots: luci.v8.try:v8_linux64_ubsan_rel_ng,v8_linux64_tsan_rel
Cq-Include-Trybots: luci.v8.try:v8_linux64_cfi_rel_ng
Cq-Include-Trybots: luci.chromium.try:fuchsia_x64,linux-rel,mac-rel
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1621942
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61740}
2019-05-22 12:51:53 +00:00