Commit Graph

51012 Commits

Author SHA1 Message Date
Benedikt Meurer
7cd2cacf50 [turbofan] Avoid unnecessary bit materialization in CheckedInt32Mod.
The slow-path of CheckedInt32Mod(x,y) when x is found to be negative
still had the power of two right hand side optimization, and thus would
perform a dynamic check on y. Now the same dynamic check was done for
the fast-path, and the word operations for this check were pure, leading
to weird bit materialization in TurboFan (due to sea of nodes). But
there's not really a point to be clever for the slow-path, so we just
insert the Uint32Mod operation directly here, which completely avoids
the problem.

This improves the Kraken/audio-oscillator test from around 73ms to 69ms.

Bug: v8:8069
Change-Id: Ie8ea667136c95df2bd8c5ba56ebbc6bd2442ff23
Reviewed-on: https://chromium-review.googlesource.com/c/1259063
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56370}
2018-10-04 09:43:03 +00:00
Benedikt Meurer
513a5bdd04 [turbofan] Fix Word32 (Signed32OrMinusZero) conversions that identify zeros.
When converting a Signed32\/MinusZero value from Word32 to Float64
representation or just passing it through as Word32 (with potential
type checks on it) we don't need to worry about -0 as long as the uses
identify 0 and -0.

Drive-by-fix: Fix the CheckChange() helper in the representation
changer test to pass Truncation::Any() by default.

Bug: chromium:891639, chromium:891612, chromium:891627, v8:8015, v8:8178
Change-Id: I06948ec0cdb8e778cb3678124ef927277a5f40ee
Reviewed-on: https://chromium-review.googlesource.com/c/1258902
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56369}
2018-10-04 09:13:18 +00:00
Dan Elphick
df625be0f7 [heap] Skip marking of read-only roots
Adds new VisitModes VISIT_ALL_BUT_READ_ONLY and
VISIT_STRONG_FOR_SERIALIZATION.

GC-related methods like MarkReachableObjects now now use
VISIT_ALL_BUT_READ_ONLY instead of VISIT_ALL. All GC-related VisitModes
skip iterating over the read-only roots.

All Serializer methods should always use a _FOR_SERIALIZATION value to
ensure they do visit the read-only roots.

Also adds RootsTable::read_only_roots_begin and end methods.

Bug: v8:7464
Change-Id: I468d7ae9f345d9fc0e10837f01dc5b92bd996412
Reviewed-on: https://chromium-review.googlesource.com/c/1256245
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56368}
2018-10-04 09:09:59 +00:00
Clemens Hammacher
469c7ee975 Add cancelable lambda tasks
Often, tasks just need to call a single API method. By implementing
such tasks via a lambda, we save a lot of boilerplate. Additionally,
since lambdas are defined inside other function bodies, they have
access to private methods, which sometimes allows for better
encapsulation.

This CL introduces {CancelableLambdaTask} and
{CancelableIdleLambdaTask} and uses them to replace some custom tasks.
More can be refactored later.

R=ahaas@chromium.org

Bug: v8:8238
Change-Id: I88bd2c9bd57ebc32d082528f2e4251d741a0d021
Reviewed-on: https://chromium-review.googlesource.com/c/1256773
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56367}
2018-10-04 09:07:58 +00:00
Sigurd Schneider
f5d6ea17d9 [ia32,root] Fix atomic operations to not reference ebx
This is a hack to make sure the atomic operations don't
use the kRootRegister ebx before code generation.

I've filed v8:8254 to track that a larger clean-up operation
will be needed to remove this and other hacks.

Change-Id: I6f28f01ba2f96257a9e65eaa36fcad66b01906dd
Bug: v8:6666, v8:8254
Reviewed-on: https://chromium-review.googlesource.com/c/1256862
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56366}
2018-10-04 08:55:38 +00:00
Maya Lekova
19594301f2 Revert "Add fast path for spreading primitive strings."
This reverts commit ef2a19a211.

Reason for revert: Broken layout tests: https://ci.chromium.org/p/chromium/builders/luci.chromium.try/linux_chromium_rel_ng/201392

Original change's description:
> Add fast path for spreading primitive strings.
> 
> This improves the performance on primitive strings of
> IterableToListWithSymbolLookup, which implements the
> CreateArrayFromIterable bytecode. The fast path is only
> taken if the string iterator protector is valid (that is,
> String.prototype[Symbol.iterator] and
> String.prototype[Symbol.iterator]().next are untouched).
> 
> This brings spreading of primitive strings closer to the
> performance of the string iterator optimizations.
> (see https://docs.google.com/document/d/13z1fvRVpe_oEroplXEEX0a3WK94fhXorHjcOMsDmR-8/).
> 
> Bug: chromium:881273, v8:7980
> Change-Id: Ic8d8619da2f2afcc9346203613a844f62653fd7a
> Reviewed-on: https://chromium-review.googlesource.com/1243110
> Commit-Queue: Hai Dang <dhai@google.com>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#56329}

TBR=ulan@chromium.org,neis@chromium.org,sigurds@chromium.org,bmeurer@chromium.org,dhai@google.com

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

Bug: chromium:881273, v8:7980
Change-Id: I4868160b87bdebf9fd2ff346aefd4cdce23681a1
Reviewed-on: https://chromium-review.googlesource.com/c/1261022
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56365}
2018-10-04 08:50:59 +00:00
Michael Achenbach
26f6e418ff [build] Remove catapult dependency for node.js
This undoes the workaround from https://crrev.com/c/1223426.

Bug: chromium:887888
Change-Id: Id7a68354b1f1020d7d001ba4120be8a11f896067
Reviewed-on: https://chromium-review.googlesource.com/c/1260942
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56364}
2018-10-04 08:06:06 +00:00
Benedikt Meurer
f537d77845 [async] First prototype of zero-cost async stack traces.
This introduces a new flag --async-stack-traces, which enables zero-cost
async stack traces. This enriches the non-standard Error.stack property
with async stack frames computed from walking up the promise chains and
collecting all the await suspension points along the way. In Error.stack
these async frames are marked with "async" to make it possible to
distinguish them from regular frames, for example:

```
Error: Some error message
    at bar (<anonymous>)
    at async foo (<anonymous>)
```

It's zero-cost because no additional information is collected during the
execution of the program, but only the information already present in the
promise chains is used to reconstruct an approximation of the async stack
in case of an exception. But this approximation is limited to suspension
points at await's in async functions. This depends on a recent ECMAScript
specification change, flagged behind --harmony-await-optimization and
implied the --async-stack-traces flag. Without this change there's no
way to get from the outer promise of an async function to the rest of
the promise chain, since the link is broken by the indirection introduced
by await.

For async functions the special outer promise, named .promise in the
Parser desugaring, is now forcible allocated to stack slot 0 during
scope resolution, to make it accessible to the stack frame construction
logic. Note that this first prototype doesn't yet work fully support
async generators and might have other limitations.

Bug: v8:7522
Ref: nodejs/node#11865
Change-Id: I0cc8e3cdfe45dab56d3d506be2d25907409b01a9
Design-Document: http://bit.ly/v8-zero-cost-async-stack-traces
Reviewed-on: https://chromium-review.googlesource.com/c/1256762
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56363}
2018-10-04 08:02:06 +00:00
v8-ci-autoroll-builder
25aa6c51d0 Update V8 DEPS.
Rolling v8/build: 3d9873f..29568c1

Rolling v8/third_party/depot_tools: 0daedf7..b250ec1

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

Change-Id: Ifbe08a9e1f1dc077c7e5e253c483dfab6a648ebe
Reviewed-on: https://chromium-review.googlesource.com/c/1260255
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@{#56362}
2018-10-04 03:38:17 +00:00
Frank Tang
b07081f2e2 [Intl] Split the failed tests into different bugs
Bug: v8:7684
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I0f83c37dd1f5bd85dc3f444b6583fda404812b92
Reviewed-on: https://chromium-review.googlesource.com/c/1260402
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56361}
2018-10-04 00:55:52 +00:00
Deepti Gandluri
e444e3c788 [arm-atomics] Use unique registers for atomic operations
When projection nodes are optimized, TempRegisters are used, which
don't check to see if the registers are already in use.
UseUniqueRegisters instead.

Change-Id: I6a327098067daa3328355380da666d404fcc8b46
Bug: v8:8202, v8:6532
Reviewed-on: https://chromium-review.googlesource.com/c/1259107
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56360}
2018-10-03 23:25:30 +00:00
Mathias Bynens
ae956fd94d Roll Test262
Bug: v8:7834
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I146f32f9f71beb58efefa12ffcf7beca67d6c850
Reviewed-on: https://chromium-review.googlesource.com/c/1259865
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56359}
2018-10-03 22:57:47 +00:00
Frank Tang
6029498ea8 [Intl] Add CountUsage for intl objects/functions
Chrome side changes in https://chromium-review.googlesource.com/c/chromium/src/+/1255629

Bug: v8:8250
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Icba3e73217919c71925774d0cfbab69a7ffa1bba
Reviewed-on: https://chromium-review.googlesource.com/c/1255628
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56358}
2018-10-03 22:36:55 +00:00
Mathias Bynens
77f917bafb Stage well-formed JSON.stringify
The proposal is currently at Stage 3 of the TC39 process.

Repository: https://github.com/tc39/proposal-well-formed-stringify

Bug: v8:7782
Change-Id: Id46054ec6873ca2d1bc8113b8c82b58b1b8427d2
Reviewed-on: https://chromium-review.googlesource.com/c/1257921
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56357}
2018-10-03 19:55:30 +00:00
Vasili Skurydzin
ab6462e883 ppc64,aix: fixed Abort() calling sequence on Aix
fixed Abort() calling sequence on platforms with function descriptors by taking
function descriptor of the External Reference object into account when calling
C code.

Change-Id: I54c04a5f1774f2768380cc5c95b1b807204335ce
Reviewed-on: https://chromium-review.googlesource.com/c/1258186
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#56356}
2018-10-03 19:40:59 +00:00
Igor Sheludko
99791dc5ab [disassembler] Better support for root-relative values
In particular, recognize builtins' values accesses and direct accesses
to external reference values. For example:

  REX.W leaq rax,[r13+0x47a0]
  REX.W leaq rbx,[r13+0x80b0]

turns into

  REX.W leaq rax,[r13+0x47a0] (builtin (RecordWrite))
  REX.W leaq rbx,[r13+0x80b0] (external value (Isolate::context_address))

Bug: v8:8238
Change-Id: I3b049a1e82de7450bf04135c0c8d76b4dca4ee10
Reviewed-on: https://chromium-review.googlesource.com/c/1256830
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56355}
2018-10-03 19:38:09 +00:00
Alexei Filippov
e06ada18c9 [sampling profiler] replace samples std::set with unordered_map
unordered_map is supposedly faster on deleting items.

BUG=chromium:889545

Change-Id: Id92d9d663e8b9ab2978b8016ef5dccfc93dc104e
Reviewed-on: https://chromium-review.googlesource.com/1255554
Reviewed-by: Ali Ijaz Sheikh <ofrobots@google.com>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56354}
2018-10-03 18:20:19 +00:00
andrew-cc-chen
4ab8215e7e [ppc] Implemented Atomic64 operations
Change-Id: Ic99e2e02ae644382873d9cf0621145bcde23b6b2
Reviewed-on: https://chromium-review.googlesource.com/1257807
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#56353}
2018-10-03 17:36:25 +00:00
Junliang Yan
28a9235c43 s390x: Fix turbofan c linkage
In C to WASM stubs, when number of parameters is more than 5, or
anything requires stack arguments, current linkage is faulty
because of missing STACK_SHADOW_WORDS

Drive-by: Also cleanup s390 code which is not supported anymore.

R=joransiu@ca.ibm.com

Change-Id: I7405c32fd94e158e6868f9ce7d4390c995078dbb
Reviewed-on: https://chromium-review.googlesource.com/c/1257269
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#56352}
2018-10-03 16:30:56 +00:00
Hans Wennborg
cb8d93e13d Fix -Wdefaulted-function-deleted warnings
This is part of clean-up for a new Clang warning that we'd like to
enable. This patch addresses all warnings from V8 that I saw in a full debug
build of Chromium on Linux.

../../v8/src/reloc-info.h:405:18: warning: explicitly defaulted move assignment
operator is implicitly deleted [-Wdefaulted-function-deleted]
  RelocIterator& operator=(RelocIterator&&) = default;
                 ^
../../v8/src/reloc-info.h:447:13: note: move assignment operator of
'RelocIterator' is implicitly deleted because field 'mode_mask_' is of
const-qualified type 'const int'
  const int mode_mask_;
            ^

../../v8/src/wasm/baseline/liftoff-compiler.cc:111:36: warning: explicitly
defaulted move constructor is implicitly deleted [-Wdefaulted-function-deleted]
  MOVE_ONLY_NO_DEFAULT_CONSTRUCTOR(LiftoffCompiler);
                                   ^
../../v8/src/wasm/baseline/liftoff-compiler.cc:1834:20: note: move constructor
of 'LiftoffCompiler' is implicitly deleted because field 'asm_' has a deleted
move constructor
  LiftoffAssembler asm_;
                   ^

../../v8/src/wasm/wasm-debug.cc:95:3: warning: explicitly defaulted move
assignment operator is implicitly deleted [-Wdefaulted-function-deleted]
  MOVE_ONLY_NO_DEFAULT_CONSTRUCTOR(InterpreterHandle);
  ^
../../v8/src/wasm/wasm-debug.cc:98:19: note: move assignment operator of
'InterpreterHandle' is implicitly deleted because field 'interpreter_' has a
deleted move assignment operator
  WasmInterpreter interpreter_;
                  ^
../../v8/src/wasm/wasm-interpreter.h:211:35: note: copy assignment operator of
'WasmInterpreter' is implicitly deleted because field 'internals_' is of
const-qualified type 'v8::internal::wasm::WasmInterpreterInternals *const'
  WasmInterpreterInternals* const internals_;
                                  ^

Bug: chromium:890307
Change-Id: Idfc5827f24821212081a006c4329c466c4576bcc
Reviewed-on: https://chromium-review.googlesource.com/c/1256863
Commit-Queue: Bill Budge <bbudge@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56351}
2018-10-03 15:42:01 +00:00
Mathias Bynens
fa911fc68e Remove always-true --harmony-function-tostring runtime flag
It was shipped in Chrome 66.

Bug: v8:4958, v8:8255, v8:8238
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I52fb826f4f245bc6484d8f406ecf99bc17d268ee
Reviewed-on: https://chromium-review.googlesource.com/c/1254123
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56350}
2018-10-03 15:04:16 +00:00
Mathias Bynens
38feca55da [esnext] Add cctests for well-formed JSON.stringify
The proposal is currently at Stage 3 of the TC39 process.

Repository: https://github.com/tc39/proposal-well-formed-stringify

Bug: v8:7782
Change-Id: Ice2125ffd3dbc5381c81193eb64d460e0d5485cd
Reviewed-on: https://chromium-review.googlesource.com/c/1255728
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56349}
2018-10-03 09:53:19 +00:00
v8-ci-autoroll-builder
d5b9d0ffaa Update V8 DEPS.
Rolling v8/build: 64ce4b0..3d9873f

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/2ba11d1..2dd9144

Rolling v8/third_party/depot_tools: 95d4c85..0daedf7

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

Change-Id: I4cebb87b89dbd10a350cd6349c72eab428b6df57
Reviewed-on: https://chromium-review.googlesource.com/c/1258125
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@{#56348}
2018-10-03 04:05:48 +00:00
Yang Guo
471fef0469 [coverage] change block range to avoid ambiguity.
By moving the block range end to left of closing bracket,
we can avoid ambiguity where an open-ended singleton range
could be both interpreted as inside the parent range, or
next to it.

R=verwaest@chromium.org

Bug: v8:8237
Change-Id: Ibc9412b31efe900b6d8bff0d8fa8c52ddfbf460a
Reviewed-on: https://chromium-review.googlesource.com/1254127
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56347}
2018-10-02 19:27:02 +00:00
Sigurd Schneider
4130d6162b [wasm] Reflect unavailability of root register in linkage
The root register is not available in JS-to-Wasm functions, and
this was not reflected in the linkage. Similarily, it is not
available in C-to-Wasm functions.

Change-Id: I2dbfd06ef99d6f9b9940e9489f563441d9ebfabd
Bug: v8:6666
Reviewed-on: https://chromium-review.googlesource.com/1256766
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56346}
2018-10-02 16:31:48 +00:00
Toon Verwaest
4788f205e4 [parser] Drop always-true accept_IN from ParseExpression
Change-Id: Ia5f0a4d7635a1944f1d7fbadce4497d1914d2191
Reviewed-on: https://chromium-review.googlesource.com/1256967
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56345}
2018-10-02 16:30:43 +00:00
andrew-cc-chen
39e96a108d s390: Implemented Atomic64 operations
Change-Id: I7591ccc55405a2fbd258bf28d53cd40a4bddf2c2
Reviewed-on: https://chromium-review.googlesource.com/1255102
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#56344}
2018-10-02 16:16:57 +00:00
Junliang Yan
3daa6a1dd1 [turbofan] fix Int64AbsWithOverflow opcode table
Int64AbsWithOverflow should have 2 return value, the 2nd one should
indicate whether it's overflow or not.

This causes a debug failure on s390x.

Change-Id: I2874227751d5874b47e63fed9e8f085f5165a44d
Reviewed-on: https://chromium-review.googlesource.com/1255642
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#56343}
2018-10-02 16:15:49 +00:00
Sigurd Schneider
bd16cc8aee [ia32,root] Use root register config in tests
Change-Id: Iaa48cf1b7682aecfcb163e0b30538b9d8bd396db
Bug: v8:6666
Reviewed-on: https://chromium-review.googlesource.com/1256767
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56342}
2018-10-02 15:53:03 +00:00
Michael Lippautz
33d5cf9adc [heap] Avoid scheduling tasks for callbacks during teardown
Instead run them synchronously.

Bug: chromium:890631
Change-Id: I3af68e335551d3754267ec0f51b895785ab7cd89
Reviewed-on: https://chromium-review.googlesource.com/1256925
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56341}
2018-10-02 15:24:16 +00:00
Peter Marshall
6bd923b53f [cleanup] Save binary size in macro use inside UpdateFeedbackType.
We can call FeedbackTypeOf before the switch statement to avoid
generating callsites for every operation. This CL saves 4 KiB binary
size.

Bug: v8:8238
Change-Id: I0f9d7a155e0cec219306ca1fb35f1eb9ff18a36f
Reviewed-on: https://chromium-review.googlesource.com/1254207
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56340}
2018-10-02 14:54:54 +00:00
Ulan Degenbaev
5301210379 Fix String::Is{One,Two}ByteRepresentationUnderneath for thin strings.
Bug: chromium:876759
Change-Id: I9ea3c84b477e03f96cbef79a4a0b546a53a674ce
Reviewed-on: https://chromium-review.googlesource.com/1256771
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56339}
2018-10-02 14:46:04 +00:00
Sigurd Schneider
52bd944db8 [wasm,test] Pass correct code kind in Wasm tests
Change-Id: I8fd0ce9ac2dc37e2daa0728b5d4c119a2bd1f340
Bug: v8:6666
Reviewed-on: https://chromium-review.googlesource.com/1256865
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56338}
2018-10-02 14:21:53 +00:00
Sergiy Byelozyorov
1e25524841 [tools] Implement --exit-after-n-failures functionality via a flag
R=machenbach@chromium.org

Bug: v8:8239
Change-Id: I2451230f92fa6ad66ce6446f97efaa7fafd04e12
Reviewed-on: https://chromium-review.googlesource.com/1251524
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56337}
2018-10-02 14:18:48 +00:00
Peter Marshall
525b396195 [cpu-profiler] Fix a leak caused by re-logging existing functions.
Don't re-log all existing functions during StartProcessorIfNotStarted().
They will already be in the CodeMap attached to the ProfileGenerator and
re-logging them causes leaks. See the linked bug for more details.

Bug: v8:8253
Change-Id: Ibb1a1ab2431c588e8c3a3a9ff714767cdf61a88e
Reviewed-on: https://chromium-review.googlesource.com/1256763
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56336}
2018-10-02 13:40:20 +00:00
Michael Achenbach
aabed218f7 Revert "[disassembler] Better support for root-relative values"
This reverts commit 574daf034d.

Reason for revert: Seems to break native arm:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Android%20Arm64%20-%20N5X/1051
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Arm%20GC%20Stress/8462

Original change's description:
> [disassembler] Better support for root-relative values
> 
> In particular, recognize builtins' values accesses and direct accesses
> to external reference values. For example:
> 
>   REX.W leaq rax,[r13+0x47a0]
>   REX.W leaq rbx,[r13+0x80b0]
> 
> turns into
> 
>   REX.W leaq rax,[r13+0x47a0] (builtin (RecordWrite))
>   REX.W leaq rbx,[r13+0x80b0] (external value (Isolate::context_address))
> 
> This CL also extends the via-root-register-accessible region to the
> whole Isolate object.
> 
> Bug: v8:8238
> Change-Id: I218d8589690579919cfa01b2f3c3094af0e73c51
> Reviewed-on: https://chromium-review.googlesource.com/1251550
> Commit-Queue: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#56332}

TBR=mstarzinger@chromium.org,ishell@chromium.org

Change-Id: I28ad24c923f04fffbc2fd5a5d2248740302fae02
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8238
Reviewed-on: https://chromium-review.googlesource.com/1256772
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56335}
2018-10-02 13:19:46 +00:00
Michael Achenbach
67383be998 [build] Remove configs for removed mipsel builder
NOTRY=true
TBR=sergiyb@chromium.org

Bug: chromium:890231
Change-Id: Id5934d864f5e90bb3ec918567afe7542a2cf28c6
Reviewed-on: https://chromium-review.googlesource.com/1256770
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56334}
2018-10-02 13:12:27 +00:00
Marja Hölttä
c7b1ceb801 [objects.h splitting] Move StackFrameInfo
BUG=v8:5402,v8:8238

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I6cdc27cc8e687e32e08dfbd4f16b014f60ec2747
Reviewed-on: https://chromium-review.googlesource.com/1256243
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56333}
2018-10-02 12:01:06 +00:00
Igor Sheludko
574daf034d [disassembler] Better support for root-relative values
In particular, recognize builtins' values accesses and direct accesses
to external reference values. For example:

  REX.W leaq rax,[r13+0x47a0]
  REX.W leaq rbx,[r13+0x80b0]

turns into

  REX.W leaq rax,[r13+0x47a0] (builtin (RecordWrite))
  REX.W leaq rbx,[r13+0x80b0] (external value (Isolate::context_address))

This CL also extends the via-root-register-accessible region to the
whole Isolate object.

Bug: v8:8238
Change-Id: I218d8589690579919cfa01b2f3c3094af0e73c51
Reviewed-on: https://chromium-review.googlesource.com/1251550
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56332}
2018-10-02 11:45:43 +00:00
Ivica Bogosavljevic
408896a8b4 MIPS: Implement 64-bit atomics in software
MIPS architecture doesn't have support for 64-bit atomics.
It is possible to implement them using 32-bit atomics,
but the process is involved and takes time. For the time
being support 64-bit atomics using runtime.

Bug: v8:8100
Change-Id: I8c732ea9975c46be70643a1e722d78938c8a70de
Reviewed-on: https://chromium-review.googlesource.com/1251521
Commit-Queue: Ivica Bogosavljevic <ibogosavljevic@wavecomp.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56331}
2018-10-02 09:42:47 +00:00
Michael Achenbach
393b17a554 [test] Add test configs for experimental builder
TBR=sergiyb@chromium.org
NOTRY=true

Bug: chromium:890222
Change-Id: I5a48dca2a4c1dec61d21d068eee4b49d138a5c4b
Reviewed-on: https://chromium-review.googlesource.com/1256244
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56330}
2018-10-02 09:25:01 +00:00
Hai Dang
ef2a19a211 Add fast path for spreading primitive strings.
This improves the performance on primitive strings of
IterableToListWithSymbolLookup, which implements the
CreateArrayFromIterable bytecode. The fast path is only
taken if the string iterator protector is valid (that is,
String.prototype[Symbol.iterator] and
String.prototype[Symbol.iterator]().next are untouched).

This brings spreading of primitive strings closer to the
performance of the string iterator optimizations.
(see https://docs.google.com/document/d/13z1fvRVpe_oEroplXEEX0a3WK94fhXorHjcOMsDmR-8/).

Bug: chromium:881273, v8:7980
Change-Id: Ic8d8619da2f2afcc9346203613a844f62653fd7a
Reviewed-on: https://chromium-review.googlesource.com/1243110
Commit-Queue: Hai Dang <dhai@google.com>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56329}
2018-10-02 08:41:27 +00:00
v8-ci-autoroll-builder
abbf58ee9e Update V8 DEPS.
Rolling v8/build: 79a709e..64ce4b0

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/98289bc..2ba11d1

Rolling v8/third_party/fuchsia-sdk: ff74025..6e1868c

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

Change-Id: I54af669d392f12b7f57076381869a8655b400b8f
Reviewed-on: https://chromium-review.googlesource.com/1255560
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#56328}
2018-10-02 03:37:43 +00:00
andrew-cc-chen
5dddbef19f PPC/s390: skipping Wasm Simd x64 conversion
R=jyan@ca.ibm.com

Change-Id: Ib60ccc5f78af73afe3212c480aa2bd82f38d2678
Reviewed-on: https://chromium-review.googlesource.com/1255543
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#56327}
2018-10-01 19:59:41 +00:00
Aseem Garg
1e250a75e4 [wasm] fix source maps for relative path
For wasm modules with non-absolute sourceMappingURL, the source needs
to be empty so that devtools can look for the source map at the origin
of the module.

R=clemensh@chromium.org,adamk@chromium.org

Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I74c40addc1a7cb1be0442e9f2b272590c0b81f60
Reviewed-on: https://chromium-review.googlesource.com/1250402
Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56326}
2018-10-01 18:32:31 +00:00
Benedikt Meurer
8ead569818 [turbofan] Unify handling of zeros.
Following up on the earlier work regarding redundant Smi checks in
https://chromium-review.googlesource.com/c/v8/v8/+/1246181, it was
noticed that the handling of the 0 and -0 and how some operations
identify these is not really consistent, but was still rather ad-hoc.
This change tries to unify the handling a bit by making sure that all
number comparisons generally pass truncations that identify zeros, since
for the number comparisons in JavaScript there's no difference between
0 and -0. In the same spirit NumberAbs and NumberToBoolean should also
pass these truncations, since they also don't care about the differences
between 0 and -0.

Adjust NumberCeil, NumberFloor, NumberTrunc, NumberMin and NumberMax
to pass along any incoming kIdentifiesZeros truncation, since these
operations also don't really care whether the inputs can be -0 if the
use nodes don't care.

Also utilize the kIdentifiesZeros truncation for NumberModulus with
Signed32 inputs, because it's kind of common to do something like
`x % 2 === 0`, where it doesn't really matter whether `x % 2` would
eventually produce a negative zero (since that would still be considered
true for the sake of the comparison).

This also adds a whole lot of tests to ensure that not only are these
optimizations correct, but also that we do indeed perform them.

Drive-by-fix: The `NumberAbs(x)` would incorrectly lower to just `x` for
PositiveIntegerOrMinusZeroOrNaN inputs, which was obviously wrong in
case of -0. This was fixed as well, and an appropriate test was added.

The reason for the unification is that with the introduction of Word64
for CheckBounds (which is necessary to support large TypedArrays and
DataViews) we can no longer safely pass Word32 truncations for the
interesting cases, since the index might be outside the Signed32 or
Unsigned32 ranges, but we still identify 0 and -0 for the sake of the
bounds check, and so it's important that this is handled consistently
to not regress performance on TypedArrays and DataViews accesses.

Bug: v8:8015, v8:8178
Change-Id: Ia1d32f1b726754cea1e5793105d9423d84a6393a
Reviewed-on: https://chromium-review.googlesource.com/1246172
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56325}
2018-10-01 17:51:16 +00:00
Alexei Filippov
9a5377780c [cpu profiler] Make profiler work even if enabled before isolate creation.
TracingCpuProfiler wrapper uses API interrupt to start the profiling
on the Isolate thread. However it could do it before Isolate is
initialized, so the interrupt it requested got lost.

The patch moves TracingCpuProfiler creation after ThreadLocal object
for isolate is initialized.

BUG=v8:8247

Change-Id: I5b0b3d18e017396f9860faeab909abbfab4616df
Reviewed-on: https://chromium-review.googlesource.com/1252762
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56324}
2018-10-01 16:23:39 +00:00
Mathias Bynens
6f59af6dba Remove always-true --harmony-string-trimming runtime flag
It was shipped in Chrome 66.

Bug: v8:6530, v8:8238
Change-Id: I07e95073ffcf388659b9d0b16a081e0f5a5eedaf
Reviewed-on: https://chromium-review.googlesource.com/1253603
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56323}
2018-10-01 16:19:19 +00:00
Torne (Richard Coles)
e2a577c105 Remove support for obsolete bionic versions.
The current Android NDK defines __BIONIC_HAVE_UCONTEXT_T for all
architecures, so the old paths are no longer needed.

Bug: chromium:437330
Change-Id: I6314971e9ee1d78c4b73f8c1b37af7aa6f419b71
Reviewed-on: https://chromium-review.googlesource.com/1252282
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Richard Coles <torne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56322}
2018-10-01 15:50:19 +00:00
Michael Starzinger
d3be9d17bb [wasm] Remove dead {GetCodeFromStartAddress} method.
R=clemensh@chromium.org

Change-Id: I1fd7f103968dc0964f44777c6610ed758eb363bf
Reviewed-on: https://chromium-review.googlesource.com/1254129
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56321}
2018-10-01 15:39:01 +00:00