Commit Graph

61038 Commits

Author SHA1 Message Date
v8-ci-autoroll-builder
503692b7c4 Update V8 DEPS.
Rolling v8/build: 295ae0d..bc497ad

Rolling v8/buildtools: 713b351..feb2d0c

Rolling v8/buildtools/linux64: git_revision:97cc440d84f050f99ff0161f9414bfa2ffa38f65..git_revision:4166e9fbc1fa5ceab69b69710a0f8b430c50127b

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/4a3fef3..672b17e

Rolling v8/third_party/depot_tools: 7aa6824..1773f37

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

Change-Id: Ib8215dff29ba7d5b8c279d9da66611e19c8d9cff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2068565
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@{#66396}
2020-02-22 04:02:05 +00:00
Frank Tang
96dda2fac2 [Intl] Clean up Intl code.
Move functions into anonymous namespce.
Remove dead code.
Move GetCaseFirst into JSCollator
Move HourCycle, ToHourCycle and GetHourCycle into JSDateTimeFormat

Change-Id: Ie6089e7f33677dd40169c56198b52d87ba490b20
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2067689
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66395}
2020-02-21 22:31:42 +00:00
Frank Tang
6f112a0807 Replace FATAL with exception throw in Intl objects
Bug: v8:10224
Change-Id: I852d3b1e3468086b36e357aceeb0167951205bcc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2067695
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66394}
2020-02-21 22:15:02 +00:00
Lei Zhang
6b08f2e6bd Fix a GCC warning in Thread::set_name().
GCC emits a stringop-truncation warning because set_name() uses the
entire buffer for strncpy(). This looks potentially unsafe, though
set_name() does the right thing and add a NUL terminator immediately
after strncpy() finishes.

To make GCC happy, reduce the number of characters copied by 1.

Change-Id: I151ba3ac67e82f5ffc092a49a94e4e1769479c71
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2067514
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66393}
2020-02-21 19:09:12 +00:00
Frank Tang
3d075d2975 Save memory by removing type from JSV8BreakIterator
Type is usually not used by Intl.v8BreakIterator unless
resolvedOptions() is called. Therefore we can save memory by
removing it from the object and using a slow test from the
iterator to find out the type when needed.

Bug: v8:10252
Change-Id: I7a8dfdc8310eab0d1c90278fbadfbae48e49668e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2067694
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66392}
2020-02-21 17:37:10 +00:00
Mike Stanton
4f28e6d9a1 Reland "[turbofan] Fast API calls from TurboFan"
Relanding the Fast C API code with fix for UBSan undefined behavior
issue.

Design doc:
http://doc/1SAHn7d8M7CoazTd1laVF8gduFC_ikZWiYuytrR9c4Oc/

This CL implements basic API with integer and pointer types marshaling.

What is not supported yet:
- sequences
- annotations
- floating point arguments
- 64-bit arguments
- exception handling
- InstanceOf checks for the pointer types
- functions with non-void return type

Bug: chromium:1052746

TBR=yangguo@chromium.org,mvstanton@chromium.org,neis@chromium.org,leszeks@chromium.org,verwaest@chromium.org,mslekova@chromium.org

Change-Id: Ifca9de3156cf18c9dac0d14c19f8d6a7004cad83
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2066971
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66391}
2020-02-21 15:51:40 +00:00
Wouter Vermeiren
8199a7ac23 [ppc64][ppc] Split up ARCH_PPC and ARCH_PPC64
After support for ARCH_PPC was dropped, it became a subset of
ARCH_PPC64. If you compile for ppc64, then you set the ARCH_PPC64
define which also sets the ARCH_PPC define.
To be able to again support ppc (32 bit) those defines should be
split up again.

This commit only splits up the defines but does not introduce a
working ARCH_PPC variant.

Bug: v8:10102
Change-Id: I64e0749f8e5a7dc078ee7890d92e57b82706a849
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1989826
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Milad Farazmand <miladfar@ca.ibm.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66390}
2020-02-21 15:42:20 +00:00
Dominik Inführ
1a6df63f4b [heap] Report reduce memory GCs in --trace-gc
Let --trace-gc now also emit whether the GC is a memory reducing GC or not.

Change-Id: If0efd9e9a52d9cb861ca9692a2c93812effeabaa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2064220
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66389}
2020-02-21 14:01:10 +00:00
Michael Lippautz
16cf6c0686 heap: Avoid allocating a code range when running in jitless mode
Jitless mode does not allocate executable memory, so we can avoid reserving
memory in such configurations.

Bug: v8:10033
Change-Id: Ie6a943084e3bade85848e3219cb4d8779ed34830
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1981505
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66388}
2020-02-21 12:41:50 +00:00
Nico Hartmann
c4e944cb26 [torque] Port ToInteger to Torque
Bug: v8:10155
Change-Id: I032b27ad7c71d240453e33bef33a447a1530ace9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2060005
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66387}
2020-02-21 12:39:50 +00:00
Nico Hartmann
86a6ce454b [turbofan] Fixes Array constructor with single string argument
Bug: chromium:1034449
Change-Id: Id121b60af0c8c8621464f15aa754056cecb04595
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2064985
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66386}
2020-02-21 12:26:09 +00:00
Clemens Backes
2598687c21 [wasm] Add missing ClearThreadInWasmScope scopes
The atomics.wait implementations need to reset the "thread in wasm" flag
during their execution, as they might handle interrupts, at which point
we assume (and occasionally check) that the "thread in wasm" flag is not
set.
Also for security it's better to reset the flag as soon as we leave wasm
code.

R=ahaas@chromium.org

Bug: chromium:1054507
Change-Id: Iad03a54819d271968568505445890fde732e6844
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2066967
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66385}
2020-02-21 10:16:09 +00:00
Clemens Backes
fc1d233900 [wasm] Extend debug side table test
This extends the debug side table test to check that the two methods
{ExecuteLiftoffCompilation} and {GenerateLiftoffDebugSideTable} return
the same debug side table.
This is important, because for code without breakpoints, we generate the
debug side table lazily via the {GenerateLiftoffDebugSideTable} method,
and it needs to match the code generated previously via
{ExecuteLiftoffCompilation}.

R=thibaudm@chromium.org

Bug: v8:10147
Change-Id: I267f599beb3fe39a1ccf22840a9d0a7f9bc5143e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2066957
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66384}
2020-02-21 08:21:39 +00:00
v8-ci-autoroll-builder
5518ce82e9 Update V8 DEPS.
Rolling v8/build: 448b7bc..295ae0d

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/a657f87..4a3fef3

Rolling v8/third_party/depot_tools: 56c9bd5..7aa6824

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

Change-Id: Ide0328aad4c9f1e0926e81d115584051b24fbb2e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2067878
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@{#66383}
2020-02-21 04:07:28 +00:00
Ng Zhi An
b31ef394b6 [x64] Extract packed absolute value instructions
The AVX versions of pabsb, pabsw, and pabsd have an incorrect function
signature, they should only have two operands. So, extract them into
another macro list. And separately generate the right signatures and
implementations. Also update the disasm and tests.

Bug: v8:10233
Change-Id: I95ee0bf12bb285d10324ecedcec28e941f64d2dc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2063199
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66382}
2020-02-21 03:48:28 +00:00
Ng Zhi An
4b7bd7d0ff [wasm-simd] Optimize codegen when shift is constant
Define macros to identify constant shift values, we can emit better
codegen in these cases. Otherwise we need to mask the shift value before
shifting. We also need separate cases for left and right shifts, since
right shifts require the shift value to be negated.

Bug: v8:10115
Change-Id: I307051b0bcc3c05ebc5cbbf423fb7d068ea9b196
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2061658
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66381}
2020-02-21 03:26:48 +00:00
Ng Zhi An
35effde9bc [wasm-simd] Scalar lowering for load extends
Implements lowering for:
- i16x8.load8x8_s
- i16x8.load8x8_u
- i32x4.load16x4_s
- i32x4.load16x4_u

As before, i64x2 is not implemented since 64-bit lowering and scalar
lowering don't work together yet.

Bug: v8:9886
Change-Id: I3728d009e053acf82baacbcf1c6c08ea636ef241
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2044546
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66380}
2020-02-21 03:22:38 +00:00
Paolo Severini
03fc414908 Add initial support for Wasm debugging with LLDB: implements a GDB-remote stub
This is the first piece of the wasm debugging prototype (besides the changes to
add/remove breakpoints in WasmModuleObject made with
e699f39cae).

This changelist adds the infrastructure for a GDB-remote stub that will be used
to manage debugging sessions via the gdb-remote protocol.
It enables the creation and termination of debugging sessions over TCP
connections that are managed in a separate thread.
The logic to actually send, receive and decode GDB-remote packets will be part
of a future changelist.

Build with: v8_enable_wasm_gdb_remote_debugging = true
Run with:
  --wasm-gdb-remote                  Enables Wasm debugging with LLDB
                                     (default: false)
  --wasm-gdb-remote-port             TCP port to be used for debugging
                                     (default: 8765)
  --wasm-pause-waiting-for-debugger  Pauses the execution of Wasm code waiting
                                     for a debugger (default: false)
  --trace-wasm-gdb-remote            Enables tracing of Gdb-remote packets
                                     (default: false)

Note that most of this code is "borrowed" from the code of the Chromium NaCL
GDB-remote stub (located in Chromium in src\native_client\src\trusted\debug_stub).

Implementation details:
- class GdbServer acts as a singleton manager for the gdb-remote stub. It is
  instantiated as soon as the first Wasm module is loaded in the Wasm engine.
- class GdbServerThread spawns the worker thread for the TCP connection.
- class Transport manages the socket connection, in a portable way.
- class Session represents a remote debugging session.
- class Target represents a debugging target and it’s the place where the
  debugging packets will be processed and will implement the logic to debug
  a Wasm engine.

Bug: chromium:1010467
Change-Id: Ib2324e5901f5ae1d855b96b99ef0995d407322b6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1923407
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Paolo Severini <paolosev@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#66379}
2020-02-20 22:27:58 +00:00
Leszek Swirski
9bb73365eb [offthread] Add OffThreadIsolate support to bytecode generator
Bug: chromium:1011762
Change-Id: I58284d50acaf349ed5c56654972e2c2bcece1ec3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2061550
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66378}
2020-02-20 20:18:18 +00:00
Michael Achenbach
edad3a0f0f [foozzie] Make date mock more reliable.
TBR=mathias@chromium.org

Bug: chromium:1054390
Change-Id: I9533a0ca0faa0afa7032aa7dde144df48408c9d5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2066958
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66377}
2020-02-20 17:44:51 +00:00
Michael Lippautz
04eed2946a heap: Fix scheduling tasks when delaying marking
Delaying marking requires tasks to be scheduled.

Bug: chromium:1054398
Change-Id: Ib92a0f5541f0e37cbbabfb3dd8185b56680d0142
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2066977
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66376}
2020-02-20 16:47:11 +00:00
Toon Verwaest
4b0916a2bc [keys] Make sure we don't leak the enum cache in slow-mode for/in
An enum cache can only be referenced together with the map that owns the
entries that are needed. Otherwise the entires can be trimmed away if
the map dies because of transitions.

Bug: chromium:1050046
Change-Id: I5bc9dd65ca092c3d5ebc08ce553f6f1dc980d41b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2066959
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66375}
2020-02-20 16:44:41 +00:00
Clemens Backes
93d3527948 [wasm] Refactor debug side table
This refactors the debug side table such that we can easily add
register information later.
In particular
- vectors for types and stack offsets are combined into one;
- constants are stored in the same vector;
- locals and operand stack values are stored in the same vector.

A follow-up CL will extend the DebugSideTable to also encode locals
or operand stack values held in registers.

R=thibaudm@chromium.org

Bug: v8:10147, v8:10222
Change-Id: I97adb56b31afdb22896530c7ba2e8a24b5d31da9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2062405
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66374}
2020-02-20 16:17:06 +00:00
Dan Elphick
7ccfcbb2a8 [cleanup] TNodify Property and Prototype functions
This fully tnodifies TryHasOwnProperty, TryLookupProperty,
CheckPrototypeEnumCache, CheckEnumCache and
ExtractFixedDoubleArrayFillingHoles.

CopyElementsOnWrite is also converted except for parameters passed with
ParameterMode.

Also fixes the type of TryLookupProperty, which fails tests if the
object parameter is actually forced to be JSReceiver.

Bug: v8:10155
Change-Id: I3a925f1fd3f8a1b610d63d08a49af48ef6da505c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2064979
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66373}
2020-02-20 16:16:01 +00:00
Michael Lippautz
48ca5b6568 heap: Fix maximum embedder step size
Bug: chromium:1054345
Change-Id: Ic26cacfff024fada079b72a0bd26a49dfd0ef709
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2064984
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66372}
2020-02-20 15:00:59 +00:00
Frank Tang
77c4a66bf9 [Intl] Fix Intl.NumberFormat performance
Skip setting 'latn' numberingSystem and depend on it as default
to speed up the performance.
Fix ~10% of the regression

Bug: chromium:1052751
Change-Id: I8255fefd95476270e14981f1ffe1fd0da71223ba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2065334
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66371}
2020-02-20 14:41:39 +00:00
Clemens Backes
3e3deb4bdf [wasm] Fix name used for code logging
Different loggers had different logic to handle unnamed wasm functions.
This CL makes sure that we always set a reasonable name when logging
wasm code, and removes handling for unnamed code in individual loggers.

Since logging only happens on user action, the code is not optimized for
performance (i.e. we always just write to a {std::string}, even if the
length of the string is known to be limited).

R=jkummerow@chromium.org

Bug: chromium:863205
Change-Id: I941f7e8050c97dc938afd7883aaeb3b6347b762d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2064977
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66370}
2020-02-20 13:50:38 +00:00
Toon Verwaest
5bc05aa598 [ast] Remove unused StoreInArrayLiteral
Change-Id: I1499b15c18fde43193a5e6312b71b29892dad70b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2049849
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66369}
2020-02-20 12:25:18 +00:00
Pierre Langlois
9c6b1099fa [arm64][simulator] Support --stop-sim-at flag.
Every simulator supports this flag except for Arm64 so let's add it. The
ExecuteInstruction() loop being performance sensitive, we avoid updating a
counter on a every loop unless the flag is set.

Change-Id: I5d40e9f3f03b743b4f354e31e9bfda32789ec098
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2061555
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#66368}
2020-02-20 11:47:28 +00:00
Leszek Swirski
f2d63de216 [csa] Skip SmallOrderedHash(Map|Set)Allocate test on MSAN
Bug: v8:10244
Change-Id: I868f664f8398e08fee41a868669e71e40f963fc9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2064973
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66367}
2020-02-20 11:40:20 +00:00
Thibaud Michaud
9457f48eb4 [wasm] Add missing mutex guard for tier down flag
R=clemensb@chromium.org

Bug: v8:10245
Change-Id: If99608d12034c241c37e8b0b345e92dce8847b9f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2064976
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66366}
2020-02-20 11:27:29 +00:00
Michael Achenbach
9491d5eaa4 [numfuzz] Temporarily don't use --budget-for-feedback-vector-allocation=0
No-Try: true
Bug: v8:10243
Change-Id: Ief8ef4b39bffbfa30abf32010eb3ae25c05e25f6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2064972
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66365}
2020-02-20 10:54:33 +00:00
Clemens Backes
1403fd7deb [wasm] Avoid unnecessary jump tables
If multiple code spaces are created, each of them currently gets its own
jump table (on 64 bit platforms). Since we try to allocate new code
spaces right after existing ones, this is often not necessary. We could
instead reuse the existing jump table(s).
This saves code space for the unneeded jump tables and avoid the cost of
patching the redundant jump tables when we replace code objects.

This CL implements this by checking whether an existing jump table (or
pair of far jump table and (near) jump table) fully covers a new code
space, and reuses the existing jump table in that case.

R=ahaas@chromium.org

Change-Id: Id8751b9c4036cf8f85f9baa2b0be8b2cfb5716ff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2043846
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66364}
2020-02-20 10:21:08 +00:00
Kim-Anh Tran
01fbaed024 [wasm][debug] Add test case to check if wasm stack trace contains url
Add a test case to ensure that a wasm stack trace prints the
source url if it is available.

Bug: v8:9762
Change-Id: If44f440529d6017d08e477aa03328c9f40f4244c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2064215
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66363}
2020-02-20 09:01:18 +00:00
Shiyu Zhang
206b59c719 [runtime] Handle element in for-in fast path that uses PrototypeInfo cache
This can speed up the below micro-bench by 3x and improve JetStream2-tagcloud-SP case by ~2%.

Object.prototype.foo = function() {};
let array = ['a','b','c','d','e'];
let start = Date.now();
for (let i = 0; i < 1e5; i++) {
	for (let j in array) {}
}
console.log(Date.now() - start);

Contributed by tao.pan@intel.com

Change-Id: I44c948c2e4c28b8e42192f36802a5ea0f82bbe25
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2049903
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Shiyu Zhang <shiyu.zhang@intel.com>
Cr-Commit-Position: refs/heads/master@{#66362}
2020-02-20 08:37:38 +00:00
Zhao Jiazhong
4fa721c6ca [mips32][turbofan] Don't assume that some Word32AtomicPair nodes has a projection-0
Port e56a7ed https://crrev.com/c/2002547
Port e15f5ba https://crrev.com/c/2011829
Port bc436ed https://crrev.com/c/2030731

Original Commit Message:

  The instruction selector assumed for Word32AtomicPair{Load, Binops,
  CompareExchange} nodes that if there exists a Projection(1) user, then
  there also exists a Projection(0) user. This, however, is not the case,
  because TurboFan eliminates unreachable nodes. The missing projection
  node lead to a failed DCHECK in the register allocator.

Change-Id: I498f751c0c0a4a609f0016d17269eab8f6727229
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2056886
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Auto-Submit: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#66361}
2020-02-20 07:51:28 +00:00
v8-ci-autoroll-builder
3241aa10dd Update V8 DEPS.
Rolling v8/build: 6fddc00..448b7bc

Rolling v8/buildtools: afc5b79..713b351

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/83f5cce..a657f87

Rolling v8/third_party/depot_tools: 8515328..56c9bd5

Rolling v8/third_party/fuchsia-sdk: d3720fa..493c55d

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

Change-Id: I56050cb023028325d9225d05858d06b372ae7f40
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2064380
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@{#66360}
2020-02-20 04:02:38 +00:00
Frank Tang
218a679d67 Reland "Avoid UTF8 conversion in JSNumberFormat"
This is a reland of f70e5abf43

Fix by casting std::strlen() to int32_t
Original change's description:
> Avoid UTF8 conversion in JSNumberFormat
>
> Change-Id: Idf4e95e6979adfbca24f8fd213967f821a136d87
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2057930
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Frank Tang <ftang@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#66353}

Change-Id: I764265217202151b6c02d1d7b01b7c71af677e36
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2062743
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66359}
2020-02-20 03:35:18 +00:00
Adam Klein
013312582a Add syg to COMMON_OWNERS
Change-Id: Ib72254dfa29a8f875febb147b63c9681cd34e83b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2063413
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66358}
2020-02-19 22:03:38 +00:00
Milad Farazmand
ee13cd3ebc [foozzie] Use Uint16Array to detect endianness
Converting from Uint32Array to Uint8Array will have"0"
set as the first byte on BE machines:
[0,0,AB,CD]
Using Uint16Array will produce the correct result:
[AB,CD]

Change-Id: I9069f14c60a088a52af6d287c88be4ad437ee04d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2064528
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#66357}
2020-02-19 21:43:18 +00:00
Michael Achenbach
43accc8b7f Revert "[wasm] The name of a custom section can cause a validation error"
This reverts commit 03d5a7ba9b.

Reason for revert: Needs rebaseline:
https://ci.chromium.org/p/v8/builders/ci/V8%20Blink%20Linux/3243

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}

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

Change-Id: I5a7ea265ce47b9e685a5056bb83db6dc58f774a9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:10126
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2065168
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66356}
2020-02-19 21:38:28 +00:00
Michael Achenbach
51eacdd1e0 Revert "[heap] Enable usage of ArrayBufferExtensions"
This reverts commit 4b1fd35b1c.

Reason for revert: Breaks a lot of tests on native Android:
https://ci.chromium.org/p/v8/builders/ci/V8%20Android%20Arm64%20-%20N5X/7863

Original change's description:
> [heap] Enable usage of ArrayBufferExtensions
> 
> Switch the flag to true to enable ArrayBufferExtensions by default.
> 
> Bug: v8:10064
> Change-Id: I9b772fbd36372e3454ac66a476d33cba121b45c9
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2064208
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#66339}

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

Change-Id: I00f6c1b2f58bc937a1521045b4853e88300204d9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:10064
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2065088
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66355}
2020-02-19 20:05:38 +00:00
Shu-yu Guo
4bca8f744e Revert "Avoid UTF8 conversion in JSNumberFormat"
This reverts commit f70e5abf43.

Reason for revert: Arm64 build breakage: https://ci.chromium.org/p/v8/builders/ci/V8%20Android%20Arm64%20-%20builder/30710

Original change's description:
> Avoid UTF8 conversion in JSNumberFormat
> 
> Change-Id: Idf4e95e6979adfbca24f8fd213967f821a136d87
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2057930
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Frank Tang <ftang@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#66353}

TBR=jkummerow@chromium.org,ftang@chromium.org

Change-Id: I01300a6eec5cb3f2e97da74744328d58d9e51d14
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2062742
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66354}
2020-02-19 19:42:37 +00:00
Frank Tang
f70e5abf43 Avoid UTF8 conversion in JSNumberFormat
Change-Id: Idf4e95e6979adfbca24f8fd213967f821a136d87
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2057930
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66353}
2020-02-19 19:26:02 +00:00
Frank Tang
eadd2a22df Simplify JSRelativeTimeFormat
Remove the style from flag and use value return from ICU object instead.

Change-Id: I89732c4cd9f093136d18fcd1122e8858c6ca50dc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2057975
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66352}
2020-02-19 19:23:18 +00:00
Thibaud Michaud
c0de0ef311 [liftoff][debug] Update stack on new Liftoff code
After compiling a function with a different set of breakpoints, update
return addresses on the stack so that execution resumes in the new
code.
This allows new breakpoints to take effect immediately, which is the
expected behavior and a prerequisite for stepping.

R=clemensb@chromium.org

Bug: v8:10147
Change-Id: I67eb3b4ce23a1f3b0519935447f8b847ec888ead
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2064218
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66351}
2020-02-19 18:43:35 +00:00
Thibaud Michaud
e287b61fa3 [liftoff][debug] Add source positions after calls
To fully support debugging in Liftoff, we need to OSR active frames by
updating their return address. Introducing source positions after
each call will help us find the correct return address in the new code.

R=clemensb@chromium.org

Bug: v8:10147
Change-Id: I0a97fa86929c471abb4cd1ed75ac6724fc385944
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2064216
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66350}
2020-02-19 18:41:35 +00:00
Seth Brenith
4dc1fb4e04 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}
2020-02-19 18:40:30 +00:00
Andreas Haas
03d5a7ba9b [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}
2020-02-19 18:39:25 +00:00
Shu-yu Guo
ea274cc79e Revert "[turbofan] Fast API calls from TurboFan"
This reverts commit 4e11ad92f3.

Reason for revert: Signed int overflow in TestFastApiCalls in UBSan https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20UBSan/9976

Original change's description:
> [turbofan] Fast API calls from TurboFan
> 
> Relanding the Fast C API code with fix for arm sim lite build.
> 
> Design doc:
> http://doc/1SAHn7d8M7CoazTd1laVF8gduFC_ikZWiYuytrR9c4Oc/
> 
> This CL implements basic API with integer and pointer types marshaling.
> 
> What is not supported yet:
> - sequences
> - annotations
> - floating point arguments
> - 64-bit arguments
> - exception handling
> - InstanceOf checks for the pointer types
> - functions with non-void return type
> 
> Bug: chromium:1052746
> 
> TBR=yangguo@chromium.org,mvstanton@chromium.org,neis@chromium.org,leszeks@chromium.org,verwaest@chromium.org,mslekova@chromium.org,nicohartmann@chromium.org
> 
> Change-Id: I4421ce817e3b6159a38d2cb39fb97847f128e648
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2064223
> Reviewed-by: Michael Stanton <mvstanton@chromium.org>
> Commit-Queue: Michael Stanton <mvstanton@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#66344}

TBR=mvstanton@chromium.org

Change-Id: I63bde3e0b7f92506fd8ec6d39683524bc9811aa6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1052746
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2062739
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66347}
2020-02-19 18:35:06 +00:00