Commit Graph

54123 Commits

Author SHA1 Message Date
Ross McIlroy
9c2dff0a09 [Heap] Only reset JSFunctions that have been flushed in the old space
A JSFunction that is in the old space could move during a scavenge
between being marked and the ClearFlushedJSFunctions, therefore only add
candidates that are in the old generation.

BUG=v8:8755,v8:8395

Change-Id: I3850188e8a0f9f39de994e170b4cda4fe6961079
Reviewed-on: https://chromium-review.googlesource.com/c/1448277
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59281}
2019-02-01 11:02:52 +00:00
Marja Hölttä
0c34e2fe77 [iwyu] Detach v8threads.h from Giant Include Cluster
BUG=v8:7490,v8:8562

Change-Id: I156b0123ed2da3143c353b164fb80e89f279545e
Reviewed-on: https://chromium-review.googlesource.com/c/1449572
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59280}
2019-02-01 10:52:10 +00:00
Michael Achenbach
f4a4104fe5 [tools] Clean up presubmit and run all unittests
NOTRY=true

Bug: v8:8763
Change-Id: I9b4e2edbb5f1eeeaa88d35efaa25a4eb0c35c95c
Reviewed-on: https://chromium-review.googlesource.com/c/1449612
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59279}
2019-02-01 10:27:29 +00:00
Tamer Tas
101fd4ddb7 [testrunner] catch unforeseen exceptions
Testrunner doesn't catch exceptions except TestRunnererror, KeyboardInterrupt.

Unforeseen exceptions should fail the CI step.

This CL returns an error exit code for uncaught exceptions.

R=machenbach@chromium.org
CC=yangguo@chromium.org,sergiyb@chromium.org

Bug: v8:8731
Change-Id: I7fb20dad4a3eea29f1dfa87ef91d45381ee08692
Reviewed-on: https://chromium-review.googlesource.com/c/1434034
Commit-Queue: Tamer Tas <tmrts@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59278}
2019-02-01 10:25:39 +00:00
Clemens Hammacher
a9e93572d4 [test] Check for illegal uses of mjsunit methods
The assertThrows and assertDoesNotThrow methods expect either a
function to execute, or a string to eval. In several tests however we
accidentally passed the *result* of the statement to be tested instead
of the code.
This CL adds check to catch such error early, and removes wrong uses.
In most places, we do not need to use assertDoesNotThrow anyway,
because exceptions are handled as test failures.

Drive-by: Unify catch syntax in mjsunit.js and make sure to propagate
MjsUnitAssertionErrors correctly.

R=mathias@chromium.org

Bug: v8:8562
Change-Id: I88894a667cbe0570774f748a9a23e8a527887a49
Reviewed-on: https://chromium-review.googlesource.com/c/1439238
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59277}
2019-02-01 10:13:30 +00:00
Marja Hölttä
a03581e4f3 [iwyu] Misc iwyu fixes
Discovered when working on other stuff.

BUG=v8:7490,v8:8562

Change-Id: I9707c95c33e52b1565cca238494e3349a472f604
Reviewed-on: https://chromium-review.googlesource.com/c/1449532
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59276}
2019-02-01 10:08:19 +00:00
Tamer Tas
0b23bb1e4b [fuzzer] fix names
R=machenbach@chromium.org

No-Try: true
Change-Id: I3ec0adc9be2ea09f63c12bf71803865f224fba09
Reviewed-on: https://chromium-review.googlesource.com/c/1449611
Commit-Queue: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59275}
2019-02-01 09:58:19 +00:00
Tamer Tas
9d41bbc7c6 [fuzzer] fix missing argument
R=machenbach@chromium.org

No-Try: true
Change-Id: Iadb464e55fd30cc01ad6f250efd01588610407d0
Reviewed-on: https://chromium-review.googlesource.com/c/1449534
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59274}
2019-02-01 09:44:58 +00:00
Michael Starzinger
a392e4a301 [wasm] Fix interpreter stack height on type error trap.
This fixes stack height management when a call to an external function
raises a type error trap. It also adds a test case that such exceptions
can be caught locally.

R=clemensh@chromium.org
TEST=cctest/test-run-wasm-exceptions
BUG=v8:8729

Change-Id: I54b19ba86eb937695584229753d7f6cfa7e1a15d
Reviewed-on: https://chromium-review.googlesource.com/c/1447773
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59273}
2019-02-01 09:37:18 +00:00
Maya Lekova
5942be932e Revert "Reland "Enable 31bit Smis everywhere""
This reverts commit b43e9d5e75.

Reason for revert: Speculative revert, possibly breaking layout tests - https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8-Blink%20Linux%2064/29678

Original change's description:
> Reland "Enable 31bit Smis everywhere"
> 
> This is a reland of c1bf25bb68
> 
> Node bot will turn green after github.com/v8/node/pull/89/
> has landed.
> 
> Original change's description:
> > Enable 31bit Smis everywhere
> >
> > This is a experiment to see how performance is impacted. If we tank
> > too much, we can revert this change.
> >
> > Change-Id: I01be33f5dd78aee6a5beecdc62adbaa6c3850eb1
> > Bug: v8:8344
> > Reviewed-on: https://chromium-review.googlesource.com/c/1355279
> > Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> > Reviewed-by: Igor Sheludko <ishell@chromium.org>
> > Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#58157}
> 
> Bug: v8:8344
> Change-Id: I85a6e5c479f1090f50df3df042571227279a0692
> Reviewed-on: https://chromium-review.googlesource.com/c/1448314
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59251}

TBR=jarin@chromium.org,sigurds@chromium.org,ishell@chromium.org

Change-Id: Ie388de7e1cc28fcf8bc576f564f3b463002bf1b4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8344
Reviewed-on: https://chromium-review.googlesource.com/c/1449533
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59272}
2019-02-01 09:17:47 +00:00
Simon Zünd
4863a5505f [typedarray] Replace quicksort with mergesort to make TA#sort stable
This CL replaces the current TypedArray#sort with a simpler mergesort.
The fastpath when the user does not provide a comparison function
is still used.

In addition, TypedArray#sort now converts all elements in the
TypedArray to tagged values upfront, sorts them and writes them
back into the TypedArray as the final step.

R=jgruber@chromium.org, tebbi@chromium.org

Bug: v8:8567
Change-Id: Ib672c5cf510f7c0a2e722d1baa2704305a9ff235
Reviewed-on: https://chromium-review.googlesource.com/c/1445987
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59271}
2019-02-01 09:08:53 +00:00
Takuto Ikuta
238ccdef91 Extract Map class from objects.cc
I extracted following class member functions to map.cc
* Map
* NormalizedMapCache

Declaration of all above class are in map.h.

This patch makes compile time of objects.cc from 18.9s to 17.6s on Z840 Linux.
And map.cc takes 6.14s for compile.

Bug: v8:7629
Change-Id: Id1e45dff243ab3f5449c0a7e2a861fba0bc7abf6
Reviewed-on: https://chromium-review.googlesource.com/c/1447914
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59270}
2019-02-01 08:31:09 +00:00
Jakob Gruber
4373f89013 Fix isolate verification in noembed builds
Tbr: sigurds@chromium.org
Bug: v8:8723
Change-Id: Ieffeccf9b4f3f23a61f8247594eac2ea8c2a5ca4
Reviewed-on: https://chromium-review.googlesource.com/c/1448326
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59269}
2019-02-01 08:29:39 +00:00
Michael Achenbach
028a06b6a2 [CQ] Remove obsolete CQ config
The config migrated here:
https://crrev.com/c/1435917

NOTRY=true

Bug: chromium:916292
Change-Id: Ia74b631d53b8ac999f2a0d62ef7c1c43a0871bfa
Reviewed-on: https://chromium-review.googlesource.com/c/1444955
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59268}
2019-02-01 08:24:49 +00:00
Clemens Hammacher
a1cc076e93 [isolate] Remove unused save_context field
R=mstarzinger@chromium.org

Bug: v8:8562
Change-Id: I05abb6d9e594c797cad558befac4376b376bc514
Reviewed-on: https://chromium-review.googlesource.com/c/1448274
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59267}
2019-02-01 07:29:19 +00:00
Clemens Hammacher
7539549e28 [api] Accept Extensions via unique_ptr
This way we can remove them correctly and avoid leaks.

R=mstarzinger@chromium.org, ulan@chromium.org

Bug: v8:8725
Change-Id: I52cbbf34a94171aaeb581b55aecb25311465544d
Reviewed-on: https://chromium-review.googlesource.com/c/1446453
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59266}
2019-02-01 07:15:18 +00:00
v8-ci-autoroll-builder
f9748aeb2a Update V8 DEPS.
Rolling v8/build: f27d150..c1ab94d

Rolling v8/test/wasm-js/data: 96c4188..d52eade

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/bc2b64b..b6cc5a6

Rolling v8/third_party/depot_tools: 1131ccb..39b0b8e

Rolling v8/tools/clang: 3a06ff3..3114fbc

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

Change-Id: Ieebaf197c097dd917a4561618feb2b66fc51c895
Reviewed-on: https://chromium-review.googlesource.com/c/1449041
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@{#59265}
2019-02-01 03:47:23 +00:00
Frank Tang
930143666c [Intl] Implement intl-datetime-style
See https://github.com/tc39/proposal-intl-datetime-style
Design Doc: https://goo.gl/v7n7zV


Bug: v8:8702
Change-Id: If45a901e369003ded6c0c690a65f0429800d5ecc
Reviewed-on: https://chromium-review.googlesource.com/c/1417372
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59264}
2019-02-01 03:10:04 +00:00
Tobias Tebbi
73aaa19f01 [torque] cleanup CastHeapObject
Since the improvement of overload resolution (https://crrev.com/c/1304294),
overload resolution of generics doesn't take into account existing
specializations anymore. This means that the issue of infinite recursion
when an overload of Cast for HeapObject is missing doesn't exist anymore.
Thus we can get rid of the CastHeapObject workaround.

Bug: v8:7793
Change-Id: I8442cfb81b78aaa8234bcee673647261c25f9a63
Reviewed-on: https://chromium-review.googlesource.com/c/1448324
Reviewed-by: Daniel Clifford <danno@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59263}
2019-01-31 21:29:46 +00:00
Jakob Kummerow
80d7ce6e9b [bigint] Add interrupt checks to slow operations
Multiplication, division, and toString can take a very long
time for large inputs. This patch adds stack checks to each
of these operations so embedders can interrupt them.

Bug: chromium:922032
Change-Id: Idae9d32d6f78a028de4d2ba3abdb79c624f0dca1
Reviewed-on: https://chromium-review.googlesource.com/c/1444913
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59262}
2019-01-31 20:10:36 +00:00
Ben Smith
70c94dfab0 [wasm] Rename memory.drop and table.drop
The new names for memory.drop and table.drop are data.drop and elem.drop
respectively. See
https://github.com/WebAssembly/bulk-memory-operations/issues/23 and
https://github.com/WebAssembly/bulk-memory-operations/pull/46.

Change-Id: I07aab8448fabe24eb9734dc7dac6f91c570cb553
Reviewed-on: https://chromium-review.googlesource.com/c/1446148
Commit-Queue: Ben Smith <binji@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59261}
2019-01-31 19:27:57 +00:00
Frank Tang
bf18ee82b8 Roll test262
Bug: v8:7834
Change-Id: I5eec99773ac6f366ec5850350083379b4978446e
Reviewed-on: https://chromium-review.googlesource.com/c/1446334
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59260}
2019-01-31 18:31:47 +00:00
Ben Smith
787d83c57c [wasm] Update bulk-memory instruction immediates
* There are now two indexes for table.copy and memory.copy, one for the
source and the one for the destination table/memory. (see
https://github.com/WebAssembly/bulk-memory-operations/pull/43)

* Reverse the order of the table.init and memory.init indexes, so the
segment index is first and the table/memory index is second. (see
https://github.com/WebAssembly/bulk-memory-operations/pull/45)

Change-Id: I1781edd4200a7b693e3d0814999e6292aafa58d3
Reviewed-on: https://chromium-review.googlesource.com/c/1446149
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Ben Smith <binji@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59259}
2019-01-31 18:24:17 +00:00
Z Duong Nguyen-Huu
1db56cb5ca Maintain order of keys for object.assign as spec
According to spec https://tc39.github.io/ecma262/#sec-object.assign,
https://tc39.github.io/ecma262/#sec-ordinaryownpropertykeys, object.assign should copy symbols last. The current implementation ignores that order.
The idea of the fix here is to do iteration twice, one to skip symbol first then one to skip string.

Bug: v8:6705
Change-Id: I27a353e0c44a8f7adcf55d7143dd3ce26bea2724
Reviewed-on: https://chromium-review.googlesource.com/c/1432597
Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59258}
2019-01-31 17:55:57 +00:00
Deepti Gandluri
7cae825355 [wasm] Simplify checking of externalized buffer on Grow
Change-Id: I62eaed997f4bf590f6cc09f3cb874340e1cd7ac6
Bug: v8:8564
Reviewed-on: https://chromium-review.googlesource.com/c/1447493
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59257}
2019-01-31 17:13:50 +00:00
Clemens Hammacher
889730afda [wasm] Inline single-use CompileFailed step
This factors out one part of the "Remove finisher task" CL
(https://crrev.com/c/1400781), which I would like to test in isolation.

R=ahaas@chromium.org

Bug: v8:8423
Change-Id: I7c598f60c4757df8e26508e68da4b3c300a511cb
Reviewed-on: https://chromium-review.googlesource.com/c/1448316
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59256}
2019-01-31 17:10:20 +00:00
Marja Hölttä
1387d5a25a [js weak refs] Expand WeakCell::WeakCellVerify + minor fix
(The bug didn't affect any functionality; we just left detached WeakCells in
inconsistent state.)

BUG=v8:8179

Change-Id: I28f6c27532383b94bdfd746db903096f1dc6f1cc
Reviewed-on: https://chromium-review.googlesource.com/c/1447651
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59255}
2019-01-31 16:50:20 +00:00
Michael Spang
9bf9717192 Revert "[build] Port "Add patched eu-strip in third_party""
This is no longer necessary after
https://chromium-review.googlesource.com/c/chromium/src/+/1427781

This reverts commit 571076ecb1.

Change-Id: Id754864022171fd3da8f7274b5d3b526603337ce
Reviewed-on: https://chromium-review.googlesource.com/c/1446136
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59254}
2019-01-31 16:44:20 +00:00
Camillo Bruni
8b1b7deed6 [scope] Add Scope::ForEach helper to avoid recursion
Drive-by-fix:
- Inline Scope::num_parameters
- Provide inlineable DataGatheringScope destructor precheck

Change-Id: I337a79e0d5cf0f26c526e2ac53de8aa632d86c53
Reviewed-on: https://chromium-review.googlesource.com/c/1445879
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59253}
2019-01-31 16:22:59 +00:00
Benedikt Meurer
e004fe75f7 [ic] Don't unroll the loop in AccessorAssembler::HandlePolymorphicCase().
Previously AccessorAssembler::HandlePolymorphicCase() had 4 versions of
the inner loop unrolled, but we always had to check against the length
after 1 (POLYMORPHIC with name) or 2 (regular POLYMORPHIC) unrolled
iterations anyways, so there's not a lot of benefit to unrolling besides
the potentially better branch prediction in some cases. But that doesn't
seem to be beneficial even in extreme cases (in fact on ARM cores we
might get some benefit from having less code instead), and probably
doesn't justify the additional C++ / generated code.

I used the following extreme micro-benchmark to check the worst case
performance impact:

```js
function test(o, n) {
  var result;
  for (var i = 0; i < n; ++i) {
    result = o.x;
  }
  return result;
}

const N = 1e8;
const objs = [{x: 0}, {x:1,a:1}, {x:2,b:2}, {x:3,c:3}];
for (var j = 0; j < objs.length; ++j) test(objs[j], N);

console.time('Time');
for (var j = 0; j < objs.length; ++j) test(objs[j], N);
console.timeEnd('Time');
```

Running this with --noopt shows a ~1% performance regression with this
patch on a beefy z840 gLinux workstation, which gives me some confidence
that overall this patch is going to be neutral and maybe beneficial in
case of less powerful ARM cores.

Note to performance sheriffs: This could potentially tank some
performance tests. In that case we may need to revisit the unrolling.

Bug: v8:8562
Change-Id: I731599a7778da1992d981d36022c407ef5c735eb
Reviewed-on: https://chromium-review.googlesource.com/c/1448275
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59252}
2019-01-31 16:14:34 +00:00
Sigurd Schneider
b43e9d5e75 Reland "Enable 31bit Smis everywhere"
This is a reland of c1bf25bb68

Node bot will turn green after github.com/v8/node/pull/89/
has landed.

Original change's description:
> Enable 31bit Smis everywhere
>
> This is a experiment to see how performance is impacted. If we tank
> too much, we can revert this change.
>
> Change-Id: I01be33f5dd78aee6a5beecdc62adbaa6c3850eb1
> Bug: v8:8344
> Reviewed-on: https://chromium-review.googlesource.com/c/1355279
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58157}

Bug: v8:8344
Change-Id: I85a6e5c479f1090f50df3df042571227279a0692
Reviewed-on: https://chromium-review.googlesource.com/c/1448314
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59251}
2019-01-31 16:07:33 +00:00
Jakob Gruber
354e34ac22 Reland "Reland "[builtins] Verify Isolate compatibility with the embedded blob""
This is a reland of 1e3582b5ae

Original change's description:
> Reland "[builtins] Verify Isolate compatibility with the embedded blob"
>
> This is a reland of b022e825bd
>
> Original change's description:
> > [builtins] Verify Isolate compatibility with the embedded blob
> >
> > Embedded builtins (= the embedded blob) have a few dependencies on the
> > snapshot state. For instance, they require that metadata stored on
> > builtin Code objects as well as the builtins constant table remain
> > unchanged from mksnapshot-time. Embedders may violate these
> > assumptions by accident, e.g. by loading a snapshot generated with
> > different build flags, leading to seemingly unrelated failures later
> > on.
> >
> > This CL introduces an Isolate hash stored in the embedded blob which
> > hashes relevant parts of builtin Code objects and the builtins
> > constant table. It's verified in Isolate::Init in debug builds.
> >
> > Bug: v8:8723
> > Change-Id: Ifc9bdbe6f56ea67d8984f162afa73a3572cfbba8
> > Reviewed-on: https://chromium-review.googlesource.com/c/1442641
> > Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> > Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#59177}
>
> Tbr: yangguo@chromium.org,sigurds@chromium.org
> Bug: v8:8723
> Change-Id: I1dd001783f0f1fae21a9809c8639e40f55b8f663
> Reviewed-on: https://chromium-review.googlesource.com/c/1445985
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59236}

Tbr: yangguo@chromium.org,sigurds@chromium.org
Bug: v8:8723
Change-Id: I8e4ae2f09d16b693c1fb814477d8487385046ee4
Reviewed-on: https://chromium-review.googlesource.com/c/1448312
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59250}
2019-01-31 16:06:28 +00:00
Clemens Hammacher
659347f9aa [wasm] Slighly modify some error messages
This CL revises some of our error messages to be more precise or more
aesthetically appealing.

R=titzer@chromium.org, ahaas@chromium.org

Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
Bug: chromium:926311
Change-Id: I38eaee09fd37f9b67fdb08bc7b0df64a6eaf96f9
Reviewed-on: https://chromium-review.googlesource.com/c/1445980
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59249}
2019-01-31 15:52:42 +00:00
Sigurd Schneider
0194eb5867 Fix pointer-compression related #defines
1) Ensure 31bit Smis are enabled if pointer compression is.
2) Enable some code for 31bit Smis

Bug: v8:8344
Change-Id: Ib1e68ebfcfd49e16d1548879b7670c88dc73449b
Reviewed-on: https://chromium-review.googlesource.com/c/1445979
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59248}
2019-01-31 15:27:16 +00:00
Sigurd Schneider
f0d94ede62 [turbofan] Introduce LoadMessage/StoreMessage simplified operators
These allow to write a tagged uncompressed pointer even if pointer
compression is enabled. This is the least intrusive option; once
TurboFan supports pointer compression better, this CL likely
needs to be revised.

Bug: v8:8183
Change-Id: I56451c364b8620f687d8b9deb9553099ba95b928
Reviewed-on: https://chromium-review.googlesource.com/c/1445978
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59247}
2019-01-31 15:09:52 +00:00
Georg Neis
83c1a36a4e [turbofan] Add tracing to SharedFunctionInfo::IsInlineable
In particular, print the reason for returning false (when
FLAG_trace_turbo_inlining is enabled).

Change-Id: I8924562b16612e5030d5870648ff4827d2a0ecc6
Reviewed-on: https://chromium-review.googlesource.com/c/1445981
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59246}
2019-01-31 14:44:50 +00:00
Igor Sheludko
e8c3d743cb [cleanup][x32] Remove x32 leftovers, pt.3
Bug: v8:8621, v8:8562
Change-Id: I79014f92ba95d21b31ff28cb615a01aa00d0d5d6
Reviewed-on: https://chromium-review.googlesource.com/c/1448271
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59245}
2019-01-31 14:43:20 +00:00
Jakob Gruber
b5bfad7baf Accept serialization of full builtins in noembed builds
In noembed builds we serialize all builtins as full on-heap code
objects.

Bug: v8:8716
Cq-Include-Trybots: luci.v8.try:v8_linux_noembed_rel_ng
Change-Id: I48f25a12e05a6d8599e5f9c31f9f56f2ebb9f2d6
Reviewed-on: https://chromium-review.googlesource.com/c/1448272
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59244}
2019-01-31 14:09:31 +00:00
Igor Sheludko
0d809f9d9b [cleanup][x32] Remove x32 leftovers from x64 assembler, pt.2
movXXXp are replaced with respective movXXXq.

Drive-by cleanup: unified the way we generate movq with other mov instructions.

Bug: v8:8621, v8:8562
Change-Id: I5c65dccf4e460cad5c3cee3dfabfd6ce39abc244
Reviewed-on: https://chromium-review.googlesource.com/c/1446096
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59243}
2019-01-31 14:00:41 +00:00
Michael Starzinger
75eb52c7f4 [wasm] Remove dead {WasmDebugInfo::GetScopeDetails}.
R=clemensh@chromium.org
BUG=v8:8562

Change-Id: I13e566b95785edf788de842b833cb7f5bc2b731d
Reviewed-on: https://chromium-review.googlesource.com/c/1447771
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59242}
2019-01-31 13:10:18 +00:00
Clemens Hammacher
2c6e96a6f0 Revert "Reland "[builtins] Verify Isolate compatibility with the embedded blob""
This reverts commit 1e3582b5ae.

Reason for revert: Still fails nosnap: https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20nosnap%20-%20debug/22789

Original change's description:
> Reland "[builtins] Verify Isolate compatibility with the embedded blob"
> 
> This is a reland of b022e825bd
> 
> Original change's description:
> > [builtins] Verify Isolate compatibility with the embedded blob
> >
> > Embedded builtins (= the embedded blob) have a few dependencies on the
> > snapshot state. For instance, they require that metadata stored on
> > builtin Code objects as well as the builtins constant table remain
> > unchanged from mksnapshot-time. Embedders may violate these
> > assumptions by accident, e.g. by loading a snapshot generated with
> > different build flags, leading to seemingly unrelated failures later
> > on.
> >
> > This CL introduces an Isolate hash stored in the embedded blob which
> > hashes relevant parts of builtin Code objects and the builtins
> > constant table. It's verified in Isolate::Init in debug builds.
> >
> > Bug: v8:8723
> > Change-Id: Ifc9bdbe6f56ea67d8984f162afa73a3572cfbba8
> > Reviewed-on: https://chromium-review.googlesource.com/c/1442641
> > Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> > Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#59177}
> 
> Tbr: yangguo@chromium.org,sigurds@chromium.org
> Bug: v8:8723
> Change-Id: I1dd001783f0f1fae21a9809c8639e40f55b8f663
> Reviewed-on: https://chromium-review.googlesource.com/c/1445985
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59236}

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

Change-Id: If6082452c739d4de44ed70d3c6355f5282684ac1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8723
Reviewed-on: https://chromium-review.googlesource.com/c/1448311
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59241}
2019-01-31 13:03:19 +00:00
Michael Starzinger
329e35fbac [wasm] Simplify {InterpreterHandle::Unwind} a bit.
R=clemensh@chromium.org

Change-Id: I09cc32bbb43c8659805d7d93637d5be7f61e9fd5
Reviewed-on: https://chromium-review.googlesource.com/c/1447711
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59240}
2019-01-31 11:41:40 +00:00
Simon Zünd
3974a6558e [cleanup] Remove duplicate getter in Signature class
R=tebbi@chromium.org

Bug: v8:7793, v8:8562
Change-Id: I783a6d76edd20b73b25cc81395ecadbedd346e8b
Reviewed-on: https://chromium-review.googlesource.com/c/1447775
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59239}
2019-01-31 11:40:35 +00:00
Simon Zünd
d3b5cbeaaa [torque] Add error message when using Structs as builtin arguments
This CL fixes a crash when Structs are used as builtin arguments.

R=tebbi@chromium.org

Bug: v8:7793
Change-Id: Ib9488cdd924894dd9a9aa9fe35f57d93894565e2
Reviewed-on: https://chromium-review.googlesource.com/c/1447774
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59238}
2019-01-31 11:39:29 +00:00
Marja Hölttä
93fbbfff55 [js weak ref] Make JSWeakRef / WeakCell target handling more robust
1) JSWeakRef and WeakCell targets are HeapObjects (SMIs are no longer used for
signalling cleared / dead JSWeakRefs / WeakCells.) Make this explicit.

2) There's no need to assert that the target of JSWeakRef cannot be undefined
when handled by MarkCompactCollector::ClearJSWeakRefs, since the code handles
undefined just fine. (The removed comment was true though, since this is the only place
which can set the target to undefined. But maybe in the future there's some
other way to clear a JSWeakRef, e.g., explicit API for it.)

BUG=v8:8179

Change-Id: I762c2b4487770712c7538be799dc188943c92587
Reviewed-on: https://chromium-review.googlesource.com/c/1445986
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59237}
2019-01-31 11:20:59 +00:00
Jakob Gruber
1e3582b5ae Reland "[builtins] Verify Isolate compatibility with the embedded blob"
This is a reland of b022e825bd

Original change's description:
> [builtins] Verify Isolate compatibility with the embedded blob
>
> Embedded builtins (= the embedded blob) have a few dependencies on the
> snapshot state. For instance, they require that metadata stored on
> builtin Code objects as well as the builtins constant table remain
> unchanged from mksnapshot-time. Embedders may violate these
> assumptions by accident, e.g. by loading a snapshot generated with
> different build flags, leading to seemingly unrelated failures later
> on.
>
> This CL introduces an Isolate hash stored in the embedded blob which
> hashes relevant parts of builtin Code objects and the builtins
> constant table. It's verified in Isolate::Init in debug builds.
>
> Bug: v8:8723
> Change-Id: Ifc9bdbe6f56ea67d8984f162afa73a3572cfbba8
> Reviewed-on: https://chromium-review.googlesource.com/c/1442641
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59177}

Tbr: yangguo@chromium.org,sigurds@chromium.org
Bug: v8:8723
Change-Id: I1dd001783f0f1fae21a9809c8639e40f55b8f663
Reviewed-on: https://chromium-review.googlesource.com/c/1445985
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59236}
2019-01-31 10:34:31 +00:00
Takuto Ikuta
26321c072c Extract String class from objects.cc
I extracted following class member functions to string.cc
* String
* SeqString
* SeqOneByteString
* SeqTwoByteString
* ConsString
* ThinString
* SlicedString
* ExternalString
* FlatStringReader
* ConsStringIterator

Declaration of all above class are in string.h.

This patch makes compile time of objects.cc from 20.6s to 19.2s on Z840 Linux.

Bug: v8:7629
Change-Id: If74b868b3a3d9a1df2887f82e2557da43ad221f0
Reviewed-on: https://chromium-review.googlesource.com/c/1446342
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59235}
2019-01-31 10:24:51 +00:00
Pierre Langlois
77a643e393 [arm64] Correctly print V registers.
The arm64 backend defines registers with a common base `CPURegister` class which
can represent both general purpose and vector registers. We would use it to
define the `RegisterName` function which results in printing all registers with
`xN` when using the --trace-turbo-graph flag:

~~~
[x0|R|f64] = Arm64LdrD : MRR [x7|R|tp] [x5|R|w64]
 ^^
 This is the d0 register, not x0
~~~

We have `Register` and `VRegister` classes to distinguish general purpose
registers from vector registers, use those to define `RegisterName` functions
and print vector registers as `vN` intead:

~~~
[v0|R|f64] = Arm64LdrD : MRR [x7|R|tp] [x5|R|w64]
~~~

Since FloatRegister, DoubleRegister and Simd128Register are typedef of
VRegister, we cannot differentiate them with the current `DEFINE_REGISTER_NAMES`
abstraction. Architecturaly, S, D and Q registers are aliases of V registers so
that's not a problem.

Change-Id: Ic43036117c834070d3311b65c99ad1e24e1f9c3f
Reviewed-on: https://chromium-review.googlesource.com/c/1445990
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#59234}
2019-01-31 10:21:06 +00:00
Tamer Tas
cc70b55046 [fuzzer] fix the missing parenthesis
R=machenbach@chromium.org
CC=​yangguo@chromium.org,sergiyb@chromium.org

No-Try: True
Bug: v8:8174
Change-Id: Ia77a42f3dce741f661f3d7aee3af2237e53ae0f0
Reviewed-on: https://chromium-review.googlesource.com/c/1447713
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Tamer Tas <tmrts@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59233}
2019-01-31 10:20:01 +00:00
Georg Neis
e1bc9dead7 Revert "[builtins] [turbofan] Refactor Float64Pow to use single implementation"
This reverts commit 595aafeb21.

Reason for revert:
https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket.appspot.com/8922824501209195616/+/steps/Mozilla/0/logs/15.8.2.13/0

Original change's description:
> [builtins] [turbofan] Refactor Float64Pow to use single implementation
> 
> Remove platform-specific Float64Pow implementations and utils Pow in
> favor of a base::ieee754::pow implementation.
> 
> This unifies the implementation of pow for the compiler, wasm, and
> runtime.
> 
> Bug: v8:5848, v8:5086
> Change-Id: I968a08cef6a6d49350aa79185b2c6fb856d15f23
> Reviewed-on: https://chromium-review.googlesource.com/c/1403018
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59229}

TBR=yangguo@chromium.org,jarin@chromium.org,neis@chromium.org,clemensh@chromium.org,me@gus.host

Change-Id: I266df4b8350cfcebcea8f6063ad75ad962381105
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:5848, v8:5086
Reviewed-on: https://chromium-review.googlesource.com/c/1447715
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59232}
2019-01-31 10:13:53 +00:00