Commit Graph

59649 Commits

Author SHA1 Message Date
Mike Stanton
6b638e0d41 [Builtins] Math.random() moves to Torque
Bug: v8:9810
Change-Id: If793739dd24ff6249bbec6e2ffddaf9111995e34
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1918254
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65007}
2019-11-18 12:59:32 +00:00
Andreas Haas
9c3249c281 [wasm] Update spec tests
R=mstarzinger@chromium.org

Change-Id: I1eefd4cbb2a00535a8d6a9c830aadf3620011ea9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1921788
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65006}
2019-11-18 12:55:02 +00:00
Dan Elphick
832eeef262 [cleanup] Tnodify functions in CodeStubAssembler
Converts Node*s to TNode<>s in the following functions:
GotoIfNotNumber
GotoIfNumber
BitwiseOp
InitializePropertyArrayLength
LoadFixedDoubleArrayElement
GotoIfContextElementEqual
LoadJSFunctionPrototype
AllocateCellWithValue
AllocateSmiCell
LoadCellValue
StoreCellValue
AllocateOrderedHashTable
AllocateJSObjectFromMap
InitializeJSObjectFromMap

Bug: v8:9810
Change-Id: I323da8d72a0e164c70bd6026b32fa46010c7c256
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1910109
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65005}
2019-11-18 11:50:31 +00:00
Dan Elphick
3f254fd2fa [builtins] Put all JS linkage builtins in CODE_SPACE
Since WASM can generate direct calls to any function that it knows the
arity of and these can be any JS linkage builtin, we need to ensure that
CPP builtins also go into CODE_SPACE.

This moves 276 builtins (~25KiB) from RO_SPACE back to CODE_SPACE.

Bug: chromium:1022695, v8:7464
Change-Id: I4cda8b68ddf6a5ddad09c6e7d4e6a08c8e6c2ccb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1916600
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65004}
2019-11-18 11:09:32 +00:00
Deepti Gandluri
184e7bb8b3 Remove incorrect length check
The DCHECK in the lookup method compares the stashed length of the backing store
and the byte_length queried on lookup. These two are not guaranteed to be equal
as there can be grow calls that update the lenght of the buffer between the
length being stashed and the equality check.

Bug: chromium:1010272
Change-Id: I754fa0a9ab676cd838e893d12ef6b13fc7d335e1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1911490
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65003}
2019-11-18 10:34:01 +00:00
Michael Starzinger
880ca11900 [wasm] Fix detection of Simd128 globals in compiler.
This makes sure that the {WasmGraphBuilder} properly detects the
presence of Simd128 global.get and global.set opcodes and triggers
scalar lowering on architectures without Simd128 support.

R=clemensb@chromium.org
TEST=cctest/test-run-wasm-simd/RunWasm_S128Globals
BUG=v8:9973

Change-Id: I1538bd1d3fea40cc78e82b125d4f113842faf68a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1917148
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65002}
2019-11-18 10:05:01 +00:00
Michael Achenbach
37e6217599 Revert "[heap] Reduce size of possibly empty buckets"
This reverts commit 80caf2cf53.

Reason for revert: Breaks gpu tests:
https://ci.chromium.org/p/v8/builders/ci/Win%20V8%20FYI%20Release%20(NVIDIA)/5570
# Debug check failed: !possibly_empty_buckets->Contains(bucket_index).

Original change's description:
> [heap] Reduce size of possibly empty buckets
> 
> Before this CL a byte was used per bucket to store whether the bucket
> is possibly empty or not. This CL changes this such that each bucket
> only needs a single bit.
> 
> PossiblyEmptyBuckets is now a word in the page header. If more bits
> are needed than fit into a single word, an external bitmap is
> allocated using AlignedAlloc. Storing this on the page header, allows
> to remove initial_buckets from the SlotSet. The SlotSet allocation is
> then again a power-of-2 in release mode.
> 
> Change-Id: If61fd5cfa153f98757beeb444a530f6e2803fdb6
> Bug: chromium:1023139
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1906376
> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#64991}

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

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

Bug: chromium:1023139
Change-Id: Ia90b07b9562af934dacba012da31e4f172f2922d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1918258
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65001}
2019-11-18 09:56:54 +00:00
Michael Achenbach
909f0be976 Revert "[ptr-compr][x64] Temporarily enable pointer compression on x64"
This reverts commit 0e31eb9e62.

Reason for revert: Need to land:
https://chromium-review.googlesource.com/c/v8/v8/+/1918258

Original change's description:
> [ptr-compr][x64] Temporarily enable pointer compression on x64
>
> Bug: v8:7703
> Change-Id: I50bb3d336d48f0fe176d2bae3536f049e2bf5cf8
> 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/+/1918253
> Commit-Queue: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#64994}

TBR=machenbach@chromium.org,ishell@chromium.org,verwaest@chromium.org

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

Bug: v8:7703
Change-Id: If80aeee94844f0d855f9d6d02cabf9d9f979779d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1921787
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65000}
2019-11-18 09:01:31 +00:00
Michael Achenbach
f85339de5f [test] Add unittests to fuchsia trybot
TBR=tmrts@chromium.org

No-Try: true
Bug: chromium:1021522
Change-Id: I54574e451487c497b478bc084e97f3ec450b2fa8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1910105
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64999}
2019-11-18 07:56:21 +00:00
Jakob Gruber
f9c5bbef29 Revert "Reland "[regalloc] Use an adaptive data structure for live sets""
This reverts commit a9ea67d4bb.

Reason for revert: Regressions https://crbug.com/1025160.

Original change's description:
> Reland "[regalloc] Use an adaptive data structure for live sets"
>
> This is a reland of b3d748a282
>
> Original change's description:
> > [regalloc] Use an adaptive data structure for live sets
> >
> > Live sets represent sets of live virtual registers at block entry and
> > exit points. They are usually sparsely populated; for example, a sample
> > taken from Octane2 shows 80% of sampled live sets with a fill ratio of
> > 10% or less.
> >
> > Prior to this CL, live sets were implemented as a statically-sized bit
> > vector. This is fine for low-ish virtual register counts, but becomes
> > wasteful at higher numbers.
> >
> > This CL attempts to address this issue through an adaptive
> > implementation. Small live sets remain bit vectors, while larger sets
> > switch to a PersistentMap-based implementation. PersistentMap has very
> > memory-efficient add/remove/copy operations.
> >
> > Of course, with adaptive data structures we enter the territory of
> > parameter fiddling. In this case, two parameters are used:
> > kMaxSmallSetSize controls when to switch implementations, and
> > kMaxDeletionsBeforePrune controls when pruning (= managing the # of
> > deleted entries in the map) sets in.
> >
> > On the (degenerate) test case from the linked bug, the register
> > allocation zone shrinks from 1008MB to 475MB. For more realistic cases
> > I expect savings on the order of 10s of KB.
> >
> > Bug: v8:9574
> > Change-Id: Id903bbe23f030b418e8d887ef4839c8d65126c52
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1891693
> > Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> > Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
> > Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#64872}
>
> Bug: v8:9574
> Change-Id: I5a95d56c33a98cc5c6c58ff9308314e2eefa462c
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1910953
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#64950}

TBR=jgruber@chromium.org,tebbi@chromium.org,thibaudm@chromium.org

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

Bug: v8:9574,chromium:1025160
Change-Id: I177d64eed588cd09c999e15b04d37630c2c6538b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1918255
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64998}
2019-11-18 07:26:01 +00:00
v8-ci-autoroll-builder
4d8eb92fd6 Update V8 DEPS.
Rolling v8/build: a4ee526..253c17c

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

Change-Id: I80448ebe9b366d3d71a501682847b3a3808df90e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1921165
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@{#64997}
2019-11-18 03:22:11 +00:00
jiepan
33b96b0c8c Fix the parameter name of vmovdqu function
Switch the parameter name src and dst.

Change-Id: I4bd07959dd9e9da3a32ebb8d4b61dd6b92e90592
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1918094
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Jie Pan <jie.pan@intel.com>
Cr-Commit-Position: refs/heads/master@{#64996}
2019-11-18 02:23:11 +00:00
Milad Farazmand
4352853192 Revert "Fix an error caused by a bug in Python < 2.7.9"
This reverts commit 0c3906f4dc.

Reason for revert: <broken compatibility with Python 3>

Original change's description:
> Fix an error caused by a bug in Python < 2.7.9
> 
> There seems to be a bug in Python versions prior
> to 2.7.9 where running exec could produce the following error:
> 
> SyntaxError: unqualified exec is not allowed in function
> '_ParsePythonTestTemplates' it contains a nested function
> with free variables (testcfg.py, line 71)
> 
> https://bugs.python.org/issue21591
> 
> It's causing an issue on all Ubuntu 14 and RHEL 7 machines.
> 
> The proposed change is an equivalent syntax which doesn't
> produce an error:
> https://docs.python.org/2/reference/simple_stmts.html#the-exec-statement
> 
> 
> Change-Id: I159cc1be58ff375f313ae5c4fb814763704b880e
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1893647
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
> Cr-Commit-Position: refs/heads/master@{#64736}

TBR=machenbach@chromium.org,bmsdave@gmail.com,tmrts@chromium.org,miladfar@ca.ibm.com

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

Change-Id: Ib62143645184d768f54272b7c2d7745f6b700369
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1921171
Reviewed-by: Milad Farazmand <miladfar@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#64995}
2019-11-17 17:46:51 +00:00
Igor Sheludko
0e31eb9e62 [ptr-compr][x64] Temporarily enable pointer compression on x64
Bug: v8:7703
Change-Id: I50bb3d336d48f0fe176d2bae3536f049e2bf5cf8
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/+/1918253
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64994}
2019-11-17 07:27:50 +00:00
v8-ci-autoroll-builder
3099172750 Update V8 DEPS.
Rolling v8/build: 6613a83..a4ee526

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

Change-Id: I7b2ff3c4afa602b7d5ab13ea93dac9f8bb1d63df
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1917057
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@{#64993}
2019-11-17 03:46:20 +00:00
Mike Stanton
a19e76c7a5 [Builtins] Move of Math.max, min, ceil, trunc, floor, round to Torque
Bug: v8:9810
Change-Id: I29bb3db071c1957cc2a94fa7a47109cc0bab56f1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1916599
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64992}
2019-11-16 21:01:50 +00:00
Dominik Inführ
80caf2cf53 [heap] Reduce size of possibly empty buckets
Before this CL a byte was used per bucket to store whether the bucket
is possibly empty or not. This CL changes this such that each bucket
only needs a single bit.

PossiblyEmptyBuckets is now a word in the page header. If more bits
are needed than fit into a single word, an external bitmap is
allocated using AlignedAlloc. Storing this on the page header, allows
to remove initial_buckets from the SlotSet. The SlotSet allocation is
then again a power-of-2 in release mode.

Change-Id: If61fd5cfa153f98757beeb444a530f6e2803fdb6
Bug: chromium:1023139
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1906376
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64991}
2019-11-16 16:31:39 +00:00
Igor Sheludko
be306c925b Revert "[ptr-compr] Temporarily enable double fields unboxing"
This reverts commit 1ec2ca266f.

Reason for revert: Preparing for re-enabling pointer compression.

Original change's description:
> [ptr-compr] Temporarily enable double fields unboxing
>
> We are not shipping ptr-compr in M79 on x64 because chromium:1009439
> blocks 31-bit Smis on 64-bit architectures, so these's no point in
> disabling double fields unboxing.
>
> This CL will be reverted after the M79 branch point.
>
> Bug: v8:9799, chromium:1009439
> Change-Id: I28d0013d3ab06ce41d5028ba4f66c9b249de52d7
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1862556
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#64288}

Bug: v8:9799, chromium:1009439
Change-Id: I18e22422725777ad8bfbb19243158228f3559c32
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1919320
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64990}
2019-11-16 04:42:49 +00:00
v8-ci-autoroll-builder
9a7f8f67e2 Update V8 DEPS.
Rolling v8/build: ad957be..6613a83

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/9413ab0..a6bbfb9

Rolling v8/third_party/depot_tools: 90c88f0..1f392b8

Rolling v8/tools/clang: ebea19a..fdd6048

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

Change-Id: I755fed9b869a0d21b4b7a559fa88a72a41a838d5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1918930
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@{#64989}
2019-11-16 03:52:09 +00:00
Dan Elphick
397c4c7907 [cleanup] Move HashTable::IsKey from -inl.h into main header
It was perhaps incorrectly not declared inline while still appearing in
the main header file and then appearing in the -inl.h. MSVC doesn't like
it being declared inline however, so just inline it directly into the
main header.

Bug: v8:8510
Change-Id: I16106b91b3b4dff31e70382f2e66aa4f42fb290b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1918249
Commit-Queue: Dan Elphick <delphick@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Auto-Submit: Dan Elphick <delphick@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64988}
2019-11-15 18:09:08 +00:00
Seth Brenith
332290e46e [torque] Generate more detailed errors when instantiating generics
Currently it's pretty easy to write Torque code that generates an error
in some common generic function such as Convert<To: type, From: type>,
and unless your change is very small, it can be hard to figure out what
part of it caused that macro specialization. This CL updates the Torque
compiler to emit some extra information about the stack of code
positions that caused a specialization of a macro or builtin, similar to
what Clang does for C++ templates. Obviously there might be multiple
places that require a particular specialization, but we only report the
first one that caused the specialization to be created.

Bug: v8:7793
Change-Id: I4c0fbf1fd437d0eb0d7d5002baef7a5361aea5ee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1911019
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64987}
2019-11-15 17:11:48 +00:00
Dan Elphick
946c59bd33 [cleanup] Remove redundant RuntimeCallTimerScope constructor
The constructor taking an Isolate and HeapObject never uses the
HeapObject value and just calls through to the Isolate constructor.

Bug: v8:9810
Change-Id: Ia2553b4d1f31cf24549980dbb5c2bfa38fe91f8c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1918247
Auto-Submit: Dan Elphick <delphick@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64986}
2019-11-15 16:22:38 +00:00
Benedikt Meurer
c9c2471e4a [debug] More diagnostics in GetReturnValue().
Still trying to find the culprit for https://crbug.com/893973,
which seems to be some internal inconsistency in the debug stack
trace iterator.

Bug: chromium:893973
Tbr: yangguo@chromium.org
Change-Id: Id8d62a371cb957d3e78f4919e1ed8b9f54c5738b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1918246
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64985}
2019-11-15 15:21:28 +00:00
Georg Neis
50dcf2af54 [turbofan] Fix printing of parameter registers in serializer trace
Bug: v8:7790
Change-Id: Ibfc83828c8677901caa4e04e2b88915ddabeed49
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1918245
Auto-Submit: Georg Neis <neis@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64984}
2019-11-15 14:29:08 +00:00
Dan Elphick
84f3877c15 [cleanup] Split out bit-field.h and bounds.h from utils/utils.h
utils.h itself is fairly large and contains lots of unrelated functions
as well as having a fair number of dependencies itself, so this splits
bounds checking and bit field operations into their own headers in base
and replaces uses of utils.h with the more appropriate header where
possible. (Also fixes some cases where other headers were previously
brought in transitively).

Bug: v8:9810, v8:8912
Change-Id: I76c53f953848a57e2c5bfad6ce45abcd6d2a4f1b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1916604
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64983}
2019-11-15 13:00:08 +00:00
Milad Farazmand
28f3229a30 [Builtins] Use Bitcast instead of Conversion on Math.abs
Changes introduced in a5376b7 "Convert" the Smi values to int64 and
back to Smi. This behaviour fails as the 64-bit overflow check will
not work due to the conversion making Smi to the lower 32-bit.


Change-Id: Ida57baed13d8ad048cf2484e6984b4d26eb3fda5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1917421
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#64982}
2019-11-15 12:41:38 +00:00
Maya Lekova
2ac7ed8b0d [cleanup] Refactor Smi::kZero to Smi::zero()
This helps reduce the number of false positives encountered by
the dead variable analysis in gcmole.

TBR=jgruber@chromium.org, verwaest@chromium.org, yangguo@chromium.org

Bug: v8:9810
Change-Id: I1a34ccaab340e6abc37832b4ce1a0cabc56fa438
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1917146
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64981}
2019-11-15 11:26:48 +00:00
Eric Leese
6ec6ed9cbe Report real module in addition to fake scripts
Currently the inspector reports Wasm in one of two ways:
 - If there is a source map, report one script per Wasm script, with
   bytecode but no source.
 - If there is no source map, report one script per Wasm function, with
   source (Wasm disassembly) but no bytecode.

With this change, behavior with source map is same, but without source
map it will report both ways. This will allow us to change the frontend
to do its own disassembly, allowing us to remove the per-function scripts
in a future change.

Bug: chromium:1013527
Change-Id: I0c559ad08896e8d0da419e3c6ad8d1edff3976fc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1899782
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Eric Leese <leese@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64980}
2019-11-15 09:59:58 +00:00
Michael Achenbach
dce12b6349 [foozzie] Refactor argument abstraction
This adds an abstraction for command-line arguments for each of the
two comparison runs done in correctness fuzzing. No functional
changes intended.

No-Try: true
Bug: chromium:1023091
Change-Id: I9421715c4904416b9aaf53848954a5248c79ffd9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1906372
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64979}
2019-11-15 09:48:18 +00:00
Igor Sheludko
d85f497264 [csa] Remove ParameterMode from CSA::AllocateUninitializedJSArrayWithElements
Bug: v8:9708
Change-Id: I8ae79b0a5ec43497b43fa6c98c9d33ba91fc7e59
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1917145
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64978}
2019-11-15 06:31:08 +00:00
v8-ci-autoroll-builder
59a8baa945 Update V8 DEPS.
Rolling v8/build: fed8abf..ad957be

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/f6fc149..9413ab0

Rolling v8/third_party/depot_tools: e6e5db5..90c88f0

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

Change-Id: I56f35578ec03fde15638ca518d123e2743476f8b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1916677
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@{#64977}
2019-11-15 03:47:29 +00:00
Igor Sheludko
3008427cf9 [csa] Remove ParameterMode from CSA::AllocateJSArray
Bug: v8:9708
Change-Id: If60deb14e8031b121c9e1415dfc9f7308cb251f4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1917144
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64976}
2019-11-15 02:13:58 +00:00
Igor Sheludko
d4b6f4756b [csa] Remove ParameterMode from src/builtins/builtins-proxy-gen.*
Bug: v8:9708
Change-Id: I874a04b817cc7b38011f7db9226540aa92608ac0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1917143
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64975}
2019-11-15 01:32:39 +00:00
Ng Zhi An
477c4d7c8e [liftoff] Record spill offset of value on stack
We calculate the spill offset of a value by examining the top of the
stack, checking its offset, and adding the size of the value.

The offset is passed around for creations of other VarState, but is
otherwise not used in any meaningful way yet.

Bug: v8:9909
Change-Id: Id06f0e1cf932ba63dc291c94a3e513f4d815c554
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1913501
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64974}
2019-11-15 01:02:17 +00:00
Igor Sheludko
73d0c17121 [csa] Remove ParameterMode from CSA::CloneFastJSArray
Bug: v8:9708
Change-Id: I40e45eeb660f22f649b8e9e0a3e14201098f464b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1917142
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64973}
2019-11-14 23:41:09 +00:00
Igor Sheludko
a50719d685 [test] Remove CSA::AllocateStruct() used only in tests
Bug: chromium:1024264
Change-Id: Ibb3965bb0619a2cefe64d2f8190dbc1959e5ef3d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1915419
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64972}
2019-11-14 22:59:59 +00:00
Igor Sheludko
7788f1ea8a Revert "[ptr-compr] Temporarily disable 31 bit Smis on 64-bit architectures"
This reverts commit 64c09f67d2.

Reason for revert: We already support up to max int32 sized TypedArrays
regardless of the smi size, so the chromium:1009439 issue should no longer be a blocker.

Original change's description:
> [ptr-compr] Temporarily disable 31 bit Smis on 64-bit architectures
>
> The reason is to unblock M79 blocked by chromium:1009439 while full
> solution is not ready yet.
>
> This CL will be reverted after the M79 branch point.
>
> Bug: v8:9767, chromium:1009439
> Change-Id: I5302d86fe953ecd94d9a4bba0d29c807b7b9d703
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1862554
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#64286}

Bug: v8:9767, chromium:1009439
Change-Id: I92c43c8b27feb4f99e948bca03551e3e0316f2b5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1916692
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64971}
2019-11-14 22:04:29 +00:00
Mythri A
8aa1a85693 [cleanup][ic] Tnodify accessor-assembler.cc
Bug: v8:9810
Change-Id: I202c63bc759bca0c542ae56831c34709f53b9497
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1914562
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64970}
2019-11-14 21:36:18 +00:00
Igor Sheludko
bc9e4675d0 [builtins] Fix sorting of huge shared TypedArrays
Bug: v8:4153, chromium:1024099
Change-Id: Ia7a53c710ad2e2abcfa6fbc4ea1b2229b8690308
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1914564
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64969}
2019-11-14 21:03:08 +00:00
Igor Sheludko
bcdbf97877 [builtins] Move %TypedArray%.prototype.sort to typed-array-sort.tq
Bug: v8:4153
Change-Id: I63d2ad673639b28b84e9f594be63cbebd931f636
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1914563
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64968}
2019-11-14 20:30:18 +00:00
Z Nguyen-Huu
abfbe7687e [builtins] Port some RegExp functions to Torque
RegExpPrototypeExecBodyWithoutResult, LoadLastIndex, StoreLastIndex.

Bug: v8:8976
Change-Id: I205d6a02c5a97e8c7e484bea3c9441b433197344
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1913330
Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64967}
2019-11-14 19:56:48 +00:00
Michael Achenbach
2475c91bb3 Reland "[foozzie] Refactor command abstraction"
This is a reland of 1d493d31ce

Original change's description:
> [foozzie] Refactor command abstraction
> 
> This moves code for running d8 into its own class. No functional
> changes intended.
> 
> No-Try: true
> Bug: chromium:1023091
> Change-Id: I7cbfeebd2911dc758322f89cf93666550f2956d9
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1906378
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Reviewed-by: Tamer Tas <tmrts@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#64928}

Bug: chromium:1023091
Change-Id: I7df6e12084e20510a400ce209827c2bba8325f86
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1914209
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64966}
2019-11-14 18:51:57 +00:00
Seth Brenith
72d440d97d [torque] Strict verification of weak fields
Now that we can represent specific weak types with Weak<T>, this CL
updates the generated verifier functions so that they permit weak
references only to the specified type. As an example, consider the
verifier emitted for the following field in PrototypeInfo:

  object_create_map: Weak<Map>|Undefined;

We used to emit the following, which allowed any weak reference:

  CHECK(object_create_map__value.IsWeakOrCleared()
      || object_create_map__value.GetHeapObjectOrSmi().IsOddball());

With this change, we emit a stricter check:

  CHECK(object_create_map__value.IsCleared()
      || (!object_create_map__value.IsWeak()
          && object_create_map__value.GetHeapObjectOrSmi().IsOddball())
      || (object_create_map__value.IsWeak()
          && object_create_map__value.GetHeapObjectOrSmi().IsMap()));

Bug: v8:7793
Change-Id: I4be236d97dedbcdd6c98207928aee8bda2a77f00
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1914613
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64965}
2019-11-14 18:24:47 +00:00
Michael Starzinger
908274fc0c [wasm] Fix detection of Simd128 loads/stores in compiler.
This makes sure that the {WasmGraphBuilder} properly detects the
presence of Simd128 loads and store opcodes and triggers then scalar
lowering of the graph on architectures that don't support Simd128.

R=clemensb@chromium.org
TEST=mjsunit/wasm/exceptions-simd
BUG=v8:9973

Change-Id: I118f72135ddc9011efa3f75aaf120bb67e708d8a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1916605
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64964}
2019-11-14 17:46:27 +00:00
Pierre Langlois
6a4bd4c1bf [instruction-scheduler] Do not re-order nodes around kArchDebugBreak.
When debugging CSA builtins, it's useful to place a 'DebugBreak();' in the
code. However, the instruction scheduler re-orders instructions around it which
can be a little frustrating.

Change-Id: Ic4288bbc24e78987c7cbf3616e80cf5915f474c4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1916602
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#64963}
2019-11-14 17:08:08 +00:00
Clemens Backes
bcb78e6c05 [cleanup] Make Register::reg_code_ private
Subclasses can now access it via {code()}, even in constexpr contexts.

R=tebbi@chromium.org

Bug: v8:9810
Change-Id: I3cc6872f568f38db8cdbcda69ac0e203f839cda5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1914216
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64962}
2019-11-14 16:45:37 +00:00
Igor Sheludko
20f6f21cae [builtins] Ensure constructor has a prototype slot
Drive-by-cleanup: simplify related helper functions in CSA.

Bug: chromium:1022855
Change-Id: Icb15e6a35275708af313ec5776e92be4b6ce2524
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1910939
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64961}
2019-11-14 15:34:41 +00:00
Igor Sheludko
4550cdf552 [test] Update TypedArray tests
... that started failing on AIX where the allocation of a huge
ArrayBuffer succeeds.

Bug: v8:4153
Change-Id: I322c71e01edccb254a523f7f85817971b6c68242
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1914561
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64960}
2019-11-14 15:32:26 +00:00
v8-ci-autoroll-builder
e8f6e384e8 Update V8 DEPS.
Rolling v8/build: 8929104..fed8abf

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/3992f65..f6fc149

Rolling v8/third_party/depot_tools: ea1884b..e6e5db5

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

Change-Id: I95beda0bc4397fb8fe2372329a3a5fe00bef3330
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1916665
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@{#64959}
2019-11-14 15:31:22 +00:00
Clemens Backes
89e0902d57 [codegen] Reduce kMinimalBufferSize and add kDefaultBufferSize
In Liftoff, we have a good estimate about how big the generated code
might get. Also, we often compile hundreds of functions which each hold
an assembler buffer alive until we finally add that code to the wasm
module.
In order to reduce memory consumption in Liftoff, this CL reduces
{AssemblerBase::kMinimalBufferSize} from 4096 to 128, and adds
{AssemblerBase::kDefaultBufferSize} to be used instead.

R=jkummerow@chromium.org

Change-Id: I7029bf501244770f4824a86b233d7f99c4b7910b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1914559
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64958}
2019-11-14 15:05:31 +00:00