Commit Graph

48192 Commits

Author SHA1 Message Date
jgruber
1086bb7f92 Only enable embedded builtins in snapshot builds
Currently, nosnap builds do not run mksnapshot and thus do not have a
chance to generate the embedded blob. In theory we could support this,
but let's just ensure we don't crash for now.

Bug: v8:6666,v8:7835
Change-Id: I7d3b1f772b296ae3bcaed1604e0d1e44834da1c0
Reviewed-on: https://chromium-review.googlesource.com/1092491
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53600}
2018-06-08 07:44:26 +00:00
v8-ci-autoroll-builder
7783fa1a23 Update V8 DEPS.
Rolling v8/build: 2e17643..41d1fdd

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/93a962f..09b82f4

Rolling v8/third_party/depot_tools: e89dcf7..8e6f58c

Rolling v8/third_party/fuchsia-sdk: adae55a..5131d44

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

Change-Id: Icdea3ae3d892ccb6132196903753a40e19e3ba95
Reviewed-on: https://chromium-review.googlesource.com/1091477
Reviewed-by: <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53599}
2018-06-08 07:42:37 +00:00
Kanghua Yu
14bed9bd8c [turbofan][x64] Optimize moving constant to stack for GapResolver
Before:
    movl r10,0x1
    REX.W movq [rbp-0x40],r10

After:
    REX.W movq [rbp-0x40],0x1

Change-Id: Iebc77e14a947fd89f7ed4702cea703c15dcb6718
Reviewed-on: https://chromium-review.googlesource.com/1092159
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53598}
2018-06-08 07:34:16 +00:00
Ben Smith
bbea16727c Add a sample that uses the JS API to create wasm
This updates 'hello-world.cc' sample.

Change-Id: Id1f3fd222ddd89946e3ab50a8eff5c6477d1f665
Reviewed-on: https://chromium-review.googlesource.com/1089816
Commit-Queue: Ben Smith <binji@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53597}
2018-06-07 23:43:38 +00:00
Joyee Cheung
d7829ba681 [esnext] stage --harmony-symbol-description
Bug: v8:7807
Change-Id: Ie86329580551b3364da6fdf7f5bd1cdceb8ad88d
Reviewed-on: https://chromium-review.googlesource.com/1091498
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53596}
2018-06-07 21:59:51 +00:00
Aseem Garg
63b32e2747 [wasm] disable SIMD interpreter tests for mips
The globals tests for simd are failing on mips big endian. Will re-enable
after fixing.

R=clemensh@chromium.org
BUG=v8:6020

Change-Id: I8a8a17c4e947b69ccc2eb6bbe79c308b1129d1af
Reviewed-on: https://chromium-review.googlesource.com/1089814
Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53595}
2018-06-07 19:53:57 +00:00
Dominik Inführ
e2325ccd78 Reland "Add InstanceType for EphemeronHashTable"
This is a reland of 3b93e695bb

Original change's description:
> Add InstanceType for EphemeronHashTable
>
> This will allow the GC to differentiate between regular HashTables and EphemeronHashTables.
>
> Bug: chromium:844008
> Change-Id: I2f9009ac25eb117de03786b110dd362b829c5e9e
> Reviewed-on: https://chromium-review.googlesource.com/1089066
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Commit-Queue: Dominik Inführ <dinfuehr@google.com>
> Cr-Commit-Position: refs/heads/master@{#53577}

TBR=tebbi@chromium.org

Bug: chromium:844008
Change-Id: Ia5da3d15e28ace94063f9db4fdd4997d88696501
Reviewed-on: https://chromium-review.googlesource.com/1091090
Commit-Queue: Dominik Inführ <dinfuehr@google.com>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53594}
2018-06-07 19:33:57 +00:00
Joran Siu
7ea34a90f5 s390: Fix LOCR/LOCGR disassembly
z/Architecture Principles of Operation details LOCR/LOCGR to be RRF-c
format, with the operands printed in the form LOCR/LOCGR R1,R2,M3,
where M3 is binary encoded in bits 16-20.  Current disassembler
is printing the operands in the wrong order, and extracting the Mask
from the wrong bits.

R=jyan@ca.ibm.com, michael_dawson@ca.ibm.com

Change-Id: I30baaab16ab3dbf879df381cd1f0978a66a214a6
Reviewed-on: https://chromium-review.googlesource.com/1091139
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Joran Siu <joransiu@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#53593}
2018-06-07 18:55:17 +00:00
Joyee Cheung
ca489d39da [esnext] Implement Symbol.prototype.description
Proposal repo: https://github.com/tc39/proposal-symbol-description

Add new Builtin SymbolPrototypeDescriptionGetter.

Bug: v8:7807
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I7353bd00b172e91d8624e3373d2a4b55aced8b5c
Reviewed-on: https://chromium-review.googlesource.com/1088871
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53592}
2018-06-07 18:26:46 +00:00
Vasili Skurydzin
81e75305de s390: assembler-s390 instruction format cleanup
Change-Id: I7736314257bba44b4336d584020744c05874aa64
Reviewed-on: https://chromium-review.googlesource.com/1067607
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#53591}
2018-06-07 18:23:01 +00:00
Igor Sheludko
afd6351dcd [csa][builtins] Port CompileLazy* to CSA.
This CL introduces CSA::TailCallJSCode() for tail calling code objects
with JSCall linkage.

Bug: v8:5269, v8:7703
Change-Id: I97370dc4355dc658a9cd62166efcbe7f03d6daca
Reviewed-on: https://chromium-review.googlesource.com/1087459
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53590}
2018-06-07 18:21:55 +00:00
Bill Budge
8d2bda5509 Revert "Add InstanceType for EphemeronHashTable"
This reverts commit 3b93e695bb.

Reason for revert: Breaks Linux nosnap:
https://ci.chromium.org/buildbot/client.v8/V8%20Linux%20-%20nosnap%20-%20debug/19064

Original change's description:
> Add InstanceType for EphemeronHashTable
> 
> This will allow the GC to differentiate between regular HashTables and EphemeronHashTables.
> 
> Bug: chromium:844008
> Change-Id: I2f9009ac25eb117de03786b110dd362b829c5e9e
> Reviewed-on: https://chromium-review.googlesource.com/1089066
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Commit-Queue: Dominik Inführ <dinfuehr@google.com>
> Cr-Commit-Position: refs/heads/master@{#53577}

TBR=ulan@chromium.org,tebbi@chromium.org,dinfuehr@google.com

Change-Id: I8f92d76e35ae419af937add9a0e70a288c604781
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:844008
Reviewed-on: https://chromium-review.googlesource.com/1090973
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53589}
2018-06-07 15:55:23 +00:00
Bill Budge
d4cb533a07 Revert "Add Visitor for EphemeronHashTable"
This reverts commit 4f9455994c.

Reason for revert: Changed break Linux Bot:
https://ci.chromium.org/buildbot/client.v8/V8%20Linux%20-%20nosnap%20-%20debug/19064

Original change's description:
> Add Visitor for EphemeronHashTable
> 
> JSWeakCollection does not have any weak references anymore. Special
> handling of Ephemerons can now be implemented in
> VisitEphemeronHashTable.
> 
> Bug: chromium:844008
> Change-Id: I9f4d8ad6a32cc7a55b715803f6a83ff8d2743ce8
> Reviewed-on: https://chromium-review.googlesource.com/1090274
> Commit-Queue: Dominik Inführ <dinfuehr@google.com>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53584}

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

Change-Id: Ifba31e75b0ca221da3a3905db829af586d342e26
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:844008
Reviewed-on: https://chromium-review.googlesource.com/1090971
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53588}
2018-06-07 15:52:39 +00:00
Michael Starzinger
a593bb4856 [assembler] Optimize RelocInfo::WASM_STUB_CALL encoding.
This uses an optimized single-byte encoding for WASM_STUB_CALL reloc
entries when possible, by sacrificing size from DEOPT_REASON. Note that
stub calls in WebAssembly are used for trap handlers, which are fairly
common on regular WasmCode.

R=clemensh@chromium.org
BUG=chromium:850111,chromium:850413

Change-Id: I153fdd775290dece2884d438d5defd441486b369
Reviewed-on: https://chromium-review.googlesource.com/1090831
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53587}
2018-06-07 15:08:44 +00:00
Simon Zünd
e21933c17c [csa] Extract LoadNumberDictionaryElement from AccessorAssembler
This CL extracts code for loading a NumberDictionary element
from "EmitElementLoad" to its own function in the CSA.

This is done in preparation for a fast path in Torque for dictionary
elements.

R=jgruber@chromium.org

Change-Id: I3bb9897910183cd50be127bae771e531a61d57be
Reviewed-on: https://chromium-review.googlesource.com/1090832
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Simon Zünd <szuend@google.com>
Cr-Commit-Position: refs/heads/master@{#53586}
2018-06-07 15:00:54 +00:00
Junliang Yan
8fcd3f8f4d PPC/s390: skip regress-2185 on ppc and s390
R=szuend@google.com, cbruni@chromium.org, jgruber@chromium.org

Bug: v8:7382,v8:7806,chromium:849293
Change-Id: I95874713038d14fa6ae294a23679dfaff70c65ba
Reviewed-on: https://chromium-review.googlesource.com/1089141
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#53585}
2018-06-07 14:48:34 +00:00
Dominik Inführ
4f9455994c Add Visitor for EphemeronHashTable
JSWeakCollection does not have any weak references anymore. Special
handling of Ephemerons can now be implemented in
VisitEphemeronHashTable.

Bug: chromium:844008
Change-Id: I9f4d8ad6a32cc7a55b715803f6a83ff8d2743ce8
Reviewed-on: https://chromium-review.googlesource.com/1090274
Commit-Queue: Dominik Inführ <dinfuehr@google.com>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53584}
2018-06-07 13:50:14 +00:00
Simon Zünd
3896cdc25c Reland "[array] Use random middle element to determine pivot during sorting"
This is a reland of 91bab5588c

This CL contains two major changes w.r.t to the original CL:

The random state is removed from the Smi root list and we pre-seed the RNG
on each sort with the length of the array.

To cut down on the length of the arguments list and to keep track of the
random state across recursive calls, we move most of the sort arguments into
a FixedArray and reload from the array for each recursion.

Original change's description:
> [array] Use random middle element to determine pivot during sorting
>
> This CL adds a "random state" to the Smi Root list and implements a
> basic Linear congruential pseudo random number generator in Torque.
>
> The RNG is used to determine the pivot element for sorting. This will
> prevent the worst cases for certain data layouts.
>
> Drive-by-fix: Make sorting of ranges and execution pauses for profviz
> deterministic by adding a secondary sorting criteria.
>
> Bug: v8:7382
> Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
> Change-Id: Ieb871e98e74bdb803f821b0cd35d2f67ee0f2868
> Reviewed-on: https://chromium-review.googlesource.com/1082193
> Reviewed-by: Hannes Payer <hpayer@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Commit-Queue: Simon Zünd <szuend@google.com>
> Cr-Commit-Position: refs/heads/master@{#53524}

Bug: v8:7382
Change-Id: Ia7bef7ed1c0e904ffe43bc428e702f64f9c6a60b
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/1087888
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@google.com>
Cr-Commit-Position: refs/heads/master@{#53583}
2018-06-07 13:33:14 +00:00
Clemens Hammacher
67d449c361 [assembler] [cleanup] Fix field names in {IsolateData}
Struct fields should not end in an underscore according to the style
guide.

Drive-by: Add {TurboAssembler} constructor which receives an
{IsolateData} directly, to allow creating a {TurboAssembler} in a
background thread.

R=mstarzinger@chromium.org

Change-Id: I32800476690f4c8619059519b7d27b06f5d4be95
Reviewed-on: https://chromium-review.googlesource.com/1090278
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53582}
2018-06-07 12:51:14 +00:00
Tobias Tebbi
bca6b58e5a [torque] fix memory leak in DeclareGeneric
Bug: v8:7824
Change-Id: Ifdf0fbe13b3c8229bc6d44cb6d68298b016fa071
Reviewed-on: https://chromium-review.googlesource.com/1090724
Reviewed-by: Daniel Clifford <danno@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53581}
2018-06-07 12:44:06 +00:00
Rodrigo Bruno
db4b7e7598 [heap] Refactoring heap growing strategy from Heap to HeapController class.
Bug: chromium:845409
Change-Id: I377d6f9d26a193f7fd829f7b74f9fdabc1337dc0
Reviewed-on: https://chromium-review.googlesource.com/1089053
Commit-Queue: Rodrigo Bruno <rfbpb@google.com>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53580}
2018-06-07 12:38:34 +00:00
Creddy
e838e75e39 [CSA] Typing LoadFeedbackVector
Bug: v8:7796
Change-Id: If5e40fa943798cdc0d7dbdc640750c7b7ad4439b
Reviewed-on: https://chromium-review.googlesource.com/1087957
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53579}
2018-06-07 12:37:25 +00:00
Michael Starzinger
c5ba2a6083 [liftoff] Make runtime calls load CEntry from instance.
This makes all runtime calls compiled by Liftoff load the respective
CEntry builtin from the instance object instead of embedding it into the
instruction stream. Another step towards making the code independent of
the originating Isolate.

As a drive-by this also changes one implicit runtime call in the stack
check in the TurboFan backend in a similar fashion.

R=clemensh@chromium.org
BUG=v8:7424

Change-Id: Ifab5995aa95250d6fae60ef5debb98aee2b6fc0c
Reviewed-on: https://chromium-review.googlesource.com/1089067
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53578}
2018-06-07 11:59:07 +00:00
Dominik Inführ
3b93e695bb Add InstanceType for EphemeronHashTable
This will allow the GC to differentiate between regular HashTables and EphemeronHashTables.

Bug: chromium:844008
Change-Id: I2f9009ac25eb117de03786b110dd362b829c5e9e
Reviewed-on: https://chromium-review.googlesource.com/1089066
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@google.com>
Cr-Commit-Position: refs/heads/master@{#53577}
2018-06-07 11:42:57 +00:00
Clemens Hammacher
2725f3957e [wasm] Remove {WasmExportedFunction::GetWasmCode}
With lazy compilation, not every exported function has code assiciated
with it. {WasmExportedFunction} provides the function index though,
which can be used to check whether code exists and access that code.

R=mstarzinger@chromium.org

Bug: v8:7758
Change-Id: Id80285fec46bf5be4af49875734aa0fe28d732c9
Reviewed-on: https://chromium-review.googlesource.com/1090273
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53576}
2018-06-07 11:06:57 +00:00
Michael Starzinger
1e7d34b8dd [wasm] Make runtime stubs load CEntry from instance.
This makes the WebAssembly runtime stubs load the correct CEntry stub
from the instance object instead of embedding the address within the
instruction stream. It effectively makes those stubs independent of the
underlying Isolate.

R=clemensh@chromium.org
BUG=v8:7424

Change-Id: I0e7f3ecf7642d3fb1ee7adf83a8f0e6cc4d38fdf
Reviewed-on: https://chromium-review.googlesource.com/1086997
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53575}
2018-06-07 10:50:47 +00:00
Clemens Hammacher
0a9c3a0a3a [wasm] [cleanup] Use {code_table} accessor for iteration
This reads much nicer than the for loop with {num_imported_functions_}
and {num_functions}, and is potentially even faster, because we access
the code table directly and not via function index.

R=mstarzinger@chromium.org

Bug: v8:7754
Change-Id: I83e5c0253d8f78c22982a79d878431ba75cfc027
Reviewed-on: https://chromium-review.googlesource.com/1090271
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53574}
2018-06-07 09:32:27 +00:00
Leszek Swirski
b6888b63ca Revert "[sfi] Remove SFI function literal id field"
This reverts commit ceb9c8127f.

Reason for revert: Tanks compile time

Original change's description:
> [sfi] Remove SFI function literal id field
> 
> SharedFunctionInfos store their original function literal's id. This is
> also their index in the Script's SFI list.
> 
> Since the function literal id is only needed for lazy compilation and live
> edit, we can calculate it on-the-fly by linear search in the Script SFI list,
> and save a field on the SFI.
> 
> If this regresses compile performance, we could alternatively store the
> function literal id on the preparsed scope data as future work.
> 
> Bug: chromium:818642
> Change-Id: I5468cea0e115921f1c864d94e567d749a4349882
> Reviewed-on: https://chromium-review.googlesource.com/1082480
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Hannes Payer <hpayer@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53523}

TBR=hpayer@chromium.org,leszeks@chromium.org,verwaest@chromium.org

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

Bug: chromium:818642
Bug: chromium:850417
Change-Id: If2fd21331b7062532c04004a51e705f7e9d0a151
Reviewed-on: https://chromium-review.googlesource.com/1090494
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53573}
2018-06-07 09:21:27 +00:00
Dominik Inführ
3db0672cc4 Use EphemeronHashTable as backing store for JSWeakCollection
JSWeakCollection should use EphemeronHashTable as backing store instead of
ObjectHashTable such that the GC can handle these structures differently in
the future.

Bug: chromium:844008
Change-Id: Icc6df60c975a942877e2507ef45e0d235e5f72be
Reviewed-on: https://chromium-review.googlesource.com/1089063
Commit-Queue: Dominik Inführ <dinfuehr@google.com>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53572}
2018-06-07 09:04:37 +00:00
Jaroslav Sevcik
6ee715264c [turbofan] Introduce JS heap broker.
As a first step towards moving accesses to the broker, this moves
heap accesses from BitsetType::Lub to the broker.

Bug: v8:7790
Change-Id: Ie240b84b979717caae42cb8aa06ee8d9877a446d
Reviewed-on: https://chromium-review.googlesource.com/1088695
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53571}
2018-06-07 07:45:16 +00:00
v8-ci-autoroll-builder
907a3c68cb Update V8 DEPS.
Rolling v8/build: a429f60..2e17643

Rolling v8/buildtools: 893eb86..6f4dae2

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/517100c..93a962f

Rolling v8/third_party/depot_tools: cf4aced..e89dcf7

Rolling v8/third_party/fuchsia-sdk: afac8ec..adae55a

Rolling v8/tools/clang: c893c7e..7e986fd

Rolling v8/tools/luci-go: ff0709d..4cc6820

Rolling v8/tools/swarming_client: 3543e21..281c390

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

Change-Id: Iaffee27a98872b52bc238038c352e8c7c03728a9
Reviewed-on: https://chromium-review.googlesource.com/1090329
Commit-Queue: <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Reviewed-by: <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#53570}
2018-06-07 07:15:13 +00:00
Dan Elphick
c4cfeada59 [explicit isolates] Eliminate most GetIsolates in snapshot/
Use a passed in Isolate/Heap directly rather than using GetIsolate() on
HeapObjects which may not in future be tied to an isolate.

Bug: v8:7786
Change-Id: I89d8706544aa135049434cf20c4e1308474c678b
Reviewed-on: https://chromium-review.googlesource.com/1089334
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53569}
2018-06-07 07:00:43 +00:00
Jaroslav Sevcik
395a55b3a9 [turbofan] Cleanup in types.
Remove unused methods, duplicate logic.

Bug: v8:7790
Change-Id: Ic8e47158084df5239e3f4b4bf1df7d266c7d2585
Reviewed-on: https://chromium-review.googlesource.com/1090490
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53568}
2018-06-07 06:44:33 +00:00
Hannes Payer
5e31f9ffdf [heap] Cleanup Heap SetUp/TearDown a bit.
Change-Id: Ieec4dccdf8a5241f439bde9fffc75f4f300930e1
Reviewed-on: https://chromium-review.googlesource.com/1089333
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53567}
2018-06-07 06:37:54 +00:00
Eric Holk
b984b70c3a [wasm] Fall back on bounds checks when guarded memory unavailable
This CL adds the simplest version of a trap handler fallback. At
instantiation time, we check whether the module was compiled to use
trap handlers and the memory is guarded. If the memory is not guarded
but the module is supposed to use trap handlers, we recompile the
module with bounds checks so that we can use an unguarded memory.

The compiled module is replaced with a bounds checking version, meaning
future instances from this module will also use bounds checks.

Some likely desirable features that are current missing but can be
added future CLs include:
* Disabling trap handler mode entirely.
* Recompiling all old instances so that trap handler and bounds checked
  code does not coexist in the same process.

Bug: v8:7143

Change-Id: I161fc0d544133b07dc4a93cc6af813369aaf3efe
Reviewed-on: https://chromium-review.googlesource.com/1018182
Commit-Queue: Eric Holk <eholk@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53566}
2018-06-07 01:29:53 +00:00
Dan Elphick
93d757a0f2 [explicit isolates] Eliminate most GetIsolates from heap/
Removes most explicit calls to GetIsolate/GetHeap from heap/ and implicit
calls via the single argument Handle constructor and handle function by
passing it in through calling functions.

(One GetHeap remains in FreeList in heap/spaces.cc for now).

Bug: v8:7786
Change-Id: I14fd099d26f94b9afbcfad41aa873c8f843297dd
Reviewed-on: https://chromium-review.googlesource.com/1087002
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53565}
2018-06-06 19:01:33 +00:00
Dan Elphick
352f8009c6 [explicit isolates] Eliminate Handle<T>(T*) from api.cc
Explicitly pass Isolate* to the Handle constructor even if it means
calling GetIsolate. (Shortly, I want to remove that constructor
completely since its an invisible source of implicit GetIsolates).

Bug: v8:7786
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I3454e8c92e12bf5c5eb1d4e2018dff7c42949d26
Reviewed-on: https://chromium-review.googlesource.com/1089058
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53564}
2018-06-06 17:14:22 +00:00
Leszek Swirski
5dd02cc5fb [GetIsolate] Remove GetIsolate from SET_FIELD_WRAPPED
Bug: v8:7786

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I16961e0943f19e8120a340d8bcd8eeb51f78b79e
Reviewed-on: https://chromium-review.googlesource.com/1089010
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53563}
2018-06-06 16:26:52 +00:00
Daniel Clifford
06f2a5c2e6 [torque] Implement parameter overloading in generics
This allows redifinitions of generics with the same name but differing parameter
type lists, e.g.

  macro coerce<Dest: type>(from: HeapObject): Dest;
  coerce<int32>(from: HeapObject): int32 {...}
  macro coerce<Dest: type>(from: Smi): Dest;
  coerce<int32>(from: Smi): int32 {...}

In order to allow multiple overloads of generic macros with the same name,
a more nuanced lookup of calls has been implemented using the
ParameterDifference utility class. There is still work to be done to unify
when ParameterDifference is used for lookup (e.g. removing it from operator
lookup when operators become simple aliases for macro names), but that work
will be done in a separate CL.

As part of this CL, the custom handling of "cast<>" operator in the .g4
grammar has been removed and replaced by a handful of equivalent overloads of
a generic "cast" macro.

Bug: v8:7793
Change-Id: Ibb2cdd3d58632b7f7f7ba683499f9688ae07f4f8
Reviewed-on: https://chromium-review.googlesource.com/1087873
Commit-Queue: Daniel Clifford <danno@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53562}
2018-06-06 16:12:22 +00:00
Dominik Inführ
81666f7f5b Move template instantiations in objects.cc to the end of the file
Change-Id: I15b43383d7f9d44f98be866bf77274635242e4ff
Reviewed-on: https://chromium-review.googlesource.com/1088709
Commit-Queue: Dominik Inführ <dinfuehr@google.com>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53561}
2018-06-06 15:50:02 +00:00
Clemens Hammacher
d18b9d66bb [turbofan] Fix signature of output operator
This lead to link errors in an unrelated CL. The function was declared
with "const PrintableInstructionBlock&", but defined with
"PrintableInstructionBlock&".

R=mstarzinger@chromium.org

Change-Id: I08a9837dc44dc9d8f508c914da92549179a6790e
Reviewed-on: https://chromium-review.googlesource.com/1088910
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53560}
2018-06-06 15:29:59 +00:00
Clemens Hammacher
c175bc69f6 Make %DebugPrint work correctly on Android
On Android, %DebugPrint should output to the Android log instead of
stdout.

R=mstarzinger@chromium.org

Bug: v8:7820
Change-Id: Ia2ab14f1e4ae15914a1e0e721457f83b288683ff
Reviewed-on: https://chromium-review.googlesource.com/1088691
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53559}
2018-06-06 14:50:39 +00:00
Sergiy Byelozyorov
c92027c570 Add autoroller task account into bot whitelist for author check
This will prevent failures like this one:
https://ci.chromium.org/p/v8/builds/b8945509831610302560

R=machenbach@chromium.org

No-Try: true
Bug: chromium:831171
Change-Id: I3f5c5ce6ea2148c22e4ef0b18495e10e37fd3fed
Reviewed-on: https://chromium-review.googlesource.com/1074367
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53558}
2018-06-06 14:40:09 +00:00
Michael Starzinger
0f54b83242 [wasm] Turn out-of-line traps into stub calls.
This avoids embedding {RelocInfo::CODE_TARGET} addresses into WasmCode
by calling a WebAssembly runtime stub instead. The stubs themselves are
not yet independent of the Isolate, but will be made so soon.

Note that this also introduces a proper {compiler::TrapId} to avoid
accidental parameter type confusion with {TrapIf} and {TrapUnless}
operators.

R=clemensh@chromium.org
BUG=v8:7424

Change-Id: I32ef5a1253f336fc739d2192247826e9458456df
Reviewed-on: https://chromium-review.googlesource.com/1086937
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53557}
2018-06-06 14:18:19 +00:00
Andreas Haas
86a2720763 [test] Make assertThrowsEquals use assertSame
The typical use of assertThrowsEquals is to check that a specific
object is thrown. However, assertEquals only does a proper equality
check for primitive types, not for complex types. Using assertSame
does a reference equality check on objects, which is more what you
would expect from assertThrowsEquals. For exception kind testing,
assertThrowsEquals actually did not work correctly, assertThrows is
better for that case.

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

Change-Id: I24fb22e75fa33ebe90eb4bae40825119a054bba5
Reviewed-on: https://chromium-review.googlesource.com/1087952
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53556}
2018-06-06 14:17:12 +00:00
Bill Budge
3252af39f2 Revert "[async] Expose async hooks to d8"
This reverts commit 3c4d0316e4.

Reason for revert: Breaks MSAN on ARM64

https://ci.chromium.org/buildbot/client.v8/V8%20Linux%20-%20arm64%20-%20sim%20-%20MSAN/21425

'enabled' field not initialized in constructor?

Original change's description:
> [async] Expose async hooks to d8
> 
> This implementation follows the Node.js API as a guideline.
> 
> Change-Id: I09274ea25ccdbb9794a7440d6c14f26b9febb4f4
> Reviewed-on: https://chromium-review.googlesource.com/1065818
> Commit-Queue: Maya Lekova <mslekova@chromium.org>
> Reviewed-by: Ali Ijaz Sheikh <ofrobots@google.com>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53551}

TBR=ofrobots@google.com,gsathya@chromium.org,bmeurer@chromium.org,mslekova@chromium.org

Change-Id: I8b2bedb51cba18c77578d4e223474015d819e428
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/1088811
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53555}
2018-06-06 13:51:12 +00:00
Stephan Herhut
80bcd96b3f Use DCHECK instead of CHECK in CodeReference
Using DCHECK seems to be the common V8 style.

Change-Id: I6dab91e5225a222cbfe07ebeeec4ed1b274fe5bd
Reviewed-on: https://chromium-review.googlesource.com/1088698
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53554}
2018-06-06 13:23:12 +00:00
Théotime Grohens
22fab0bad8 [dataview] Implement Torque/CSA getters for DataView
This CL fully implements the DataView getters for the Uint8, Int8,
Uint16, Int16, Uint32 and Int32 types in Torque, and removes
the runtime implementation that is not needed anymore.

There should be a light but visible performance increase compared to
the former runtime implementation.

Change-Id: I7d85097fd5953b9629f3ac6bed93b068889712b2
Reviewed-on: https://chromium-review.googlesource.com/1078349
Commit-Queue: Théotime Grohens <theotime@google.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53553}
2018-06-06 13:08:27 +00:00
Ivica Bogosavljevic
670c96d3b5 Measure timer resolution
Add code to measure timer resolution on POSIX systems

Change-Id: I980f7e416725effe1872f2c5e75805d753e3b0ae
Reviewed-on: https://chromium-review.googlesource.com/1086994
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53552}
2018-06-06 13:07:22 +00:00
Maya Lekova
3c4d0316e4 [async] Expose async hooks to d8
This implementation follows the Node.js API as a guideline.

Change-Id: I09274ea25ccdbb9794a7440d6c14f26b9febb4f4
Reviewed-on: https://chromium-review.googlesource.com/1065818
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53551}
2018-06-06 13:06:12 +00:00