Commit Graph

9808 Commits

Author SHA1 Message Date
James M Snell
8d4572a22b [builtins] Add %IsTraceCategoryEnabled and %Trace builtins
Adds the builtin Trace and IsTraceCategoryEnabled functions
exposed via extra bindings. These are intended to use by
embedders to allow basic trace event support from JavaScript.

```js
isTraceCategoryEnabled('v8.some-category')

trace('e'.charCodeAt(0), 'v8.some-category',
      'Foo', 0, { abc: 'xyz'})
```

Bug: v8:7851
Change-Id: I7bfb9bb059efdf87d92a56a0aae326650730c250
Reviewed-on: https://chromium-review.googlesource.com/1103294
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Fadi Meawad <fmeawad@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54121}
2018-07-02 05:16:16 +00:00
Aseem Garg
d3fe5ac7c3 [wasm] add simd horiz and reduce to interpreter
This CL adds simd select, addHoriz, shuffle, anyTrue and all true to the
interpreter. It also gets rid of SIMD_COMPILED_AND_LOWERED_TEST and
SIMD_COMPILED_TEST macros.

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

Change-Id: I44abbcaddc3223a95c79ccc65ae9c6bf1a911c5d
Reviewed-on: https://chromium-review.googlesource.com/1119258
Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54116}
2018-06-29 20:13:50 +00:00
Rodrigo Bruno
1424416975 Revert "[heap] Added External Strings to external memory accounting."
This reverts commit 5863c0b652.

Reason for revert: Breaks GPU bots (https://ci.chromium.org/p/v8/builders/luci.v8.ci/Mac%20V8%20FYI%20Release%20(Intel)/1648)

Original change's description:
> [heap] Added External Strings to external memory accounting.
> 
> Bug: chromium:845409
> Change-Id: I3fe2b294f6e038d77787cf0870d244ba7cc20550
> Reviewed-on: https://chromium-review.googlesource.com/1118164
> Commit-Queue: Rodrigo Bruno <rfbpb@google.com>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54110}

TBR=ulan@chromium.org,hpayer@chromium.org,mlippautz@chromium.org,rfbpb@google.com

Change-Id: I77787df6aef2efec95c79714d1baf43feeb8a27e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:845409
Reviewed-on: https://chromium-review.googlesource.com/1120265
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Rodrigo Bruno <rfbpb@google.com>
Cr-Commit-Position: refs/heads/master@{#54114}
2018-06-29 13:13:26 +00:00
Hannes Payer
4c9919e5f0 Reland "[heap] Clear from space after garbage collection."
Bug: chromium:829771
Change-Id: I0e3f81b14d971d077afba2f4065e229b99948808
Reviewed-on: https://chromium-review.googlesource.com/1119687
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54112}
2018-06-29 12:39:25 +00:00
Rodrigo Bruno
5863c0b652 [heap] Added External Strings to external memory accounting.
Bug: chromium:845409
Change-Id: I3fe2b294f6e038d77787cf0870d244ba7cc20550
Reviewed-on: https://chromium-review.googlesource.com/1118164
Commit-Queue: Rodrigo Bruno <rfbpb@google.com>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54110}
2018-06-29 10:54:55 +00:00
Rodrigo Bruno
4442ed615d Reland "Reland "[heap] Added per-page array buffer accouting (external memory).""
This is a reland of 9072bef085

Original change's description:
> Reland "[heap] Added per-page array buffer accouting (external memory)."
> 
> This is a reland of d4792e8f6b
> 
> Original change's description:
> > [heap] Added per-page array buffer accouting (external memory).
> > 
> > Bug: chromium:845409
> > Change-Id: Ibc568cdc501edf5d84d9c6379aff58be069369af
> > Reviewed-on: https://chromium-review.googlesource.com/1114602
> > Commit-Queue: Rodrigo Bruno <rfbpb@google.com>
> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#54028}
> 
> Bug: chromium:845409
> Change-Id: I6b11d7f66313bcbcc31be9217c1b780cf3eaee99
> Reviewed-on: https://chromium-review.googlesource.com/1116638
> Commit-Queue: Rodrigo Bruno <rfbpb@google.com>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54066}

Bug: chromium:845409
Change-Id: Icff4e2a2b974942f73f5e6bb0bfd6ee8655e8ce7
Reviewed-on: https://chromium-review.googlesource.com/1119985
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Rodrigo Bruno <rfbpb@google.com>
Cr-Commit-Position: refs/heads/master@{#54108}
2018-06-29 10:07:10 +00:00
Clemens Hammacher
a71f40ded6 [wasm][cleanup] Rename fields and methods for function names
Just a refactoring to make clear that we are talking about function
names. Note that there are also names for locals inside functions,
which we currently don't use.

Drive-by: Remove style-guide violation by {WasmModule::names_} field.

R=mstarzinger@chromium.org

Bug: v8:7754
Change-Id: I9c47ea01893f128e1716be01032adfaf006ae28a
Reviewed-on: https://chromium-review.googlesource.com/1118271
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54105}
2018-06-29 09:41:15 +00:00
Sreten Kovacevic
cbd5e30dbe [mips] Port: [explicit isolates] Pass Isolate to Object::Print
Commit edec05ea73

Usage of Print function was not consistent with it's signature,
which caused failures in compilation.

Original commit message:

`All Object::Print functions now take an Isolate* parameter. Various
XX::XXPrint functions now take an Isolate if it's needed rather than
calling GetIsolate(). Such method use DECL_PRINTER_WITH_ISOLATE rather
than DECL_PRINTER.

The _v8_internal_Print_ function (intended for use in gdb) now uses
Isolate::Current() to get hold of an Isolate.

Reduces the GetIsolate and GetHeap count by 9 and 5 respectively.

Also removes unneeded gdb/lldb macros (along with their support
functions), jfv, jfm, jda and jta, since job does the same thing.`

Cr-Original-Commit-Position: refs/heads/master@{#54029}
Change-Id: I5d4eb974340159ae91a50c1c2272ab195fc514ea
Reviewed-on: https://chromium-review.googlesource.com/1116965
Reviewed-by: Dan Elphick <delphick@chromium.org>
Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#54103}
2018-06-29 08:12:35 +00:00
Michael Hablich
07422dbde5 Revert "Reland "[heap] Added per-page array buffer accouting (external memory).""
This reverts commit 9072bef085.

Reason for revert: Speculative revert because of https://chromium-review.googlesource.com/c/chromium/src/+/1118280

Original change's description:
> Reland "[heap] Added per-page array buffer accouting (external memory)."
> 
> This is a reland of d4792e8f6b
> 
> Original change's description:
> > [heap] Added per-page array buffer accouting (external memory).
> > 
> > Bug: chromium:845409
> > Change-Id: Ibc568cdc501edf5d84d9c6379aff58be069369af
> > Reviewed-on: https://chromium-review.googlesource.com/1114602
> > Commit-Queue: Rodrigo Bruno <rfbpb@google.com>
> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#54028}
> 
> Bug: chromium:845409
> Change-Id: I6b11d7f66313bcbcc31be9217c1b780cf3eaee99
> Reviewed-on: https://chromium-review.googlesource.com/1116638
> Commit-Queue: Rodrigo Bruno <rfbpb@google.com>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54066}

TBR=ulan@chromium.org,hpayer@chromium.org,mlippautz@chromium.org,rfbpb@google.com

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

Bug: chromium:845409
Change-Id: I818e24d236d93a4645d1532b666056f89156eb86
Reviewed-on: https://chromium-review.googlesource.com/1119825
Reviewed-by: Michael Hablich <hablich@chromium.org>
Commit-Queue: Michael Hablich <hablich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54100}
2018-06-29 07:59:45 +00:00
Clemens Hammacher
94ffae69a9 [wasm] Reenable RunWasmTurbofan_Int32DivS_trap_effect test
The flake is hopefully fixed with https://crrev.com/c/1118171.

R=titzer@chromium.org

Bug: v8:7879
Change-Id: I67ac9a447cbf8a99dfc612e84b3e381cc86fa643
Reviewed-on: https://chromium-review.googlesource.com/1118381
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54094}
2018-06-28 17:02:06 +00:00
Clemens Hammacher
ad19b86d1f [wasm] Store wire bytes in OwnedVector
Another pair of {std::unique_ptr} and {size_t} that can be stored as
one {OwnedVector}, which allows to pass it as one thing.

R=mstarzinger@chromium.org

Bug: v8:7754
Change-Id: Ideac0dbd390ba8147b6620daa86f0d3da6c3b609
Reviewed-on: https://chromium-review.googlesource.com/1118236
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54091}
2018-06-28 15:15:36 +00:00
Clemens Hammacher
ad57eec545 [wasm] Store WasmModule directly in the NativeModule
Instead of storing both the {NativeModule} and the {WasmModule} in a
{Managed} object, just store the {WasmModule} in the {NativeModule}
directly. This fixes crashes that happen if the {Managed<WasmModule>}
dies before the {Managed<NativeModule>}.

R=mstarzinger@chromium.org

Bug: chromium:854794, v8:7879, v8:7889
Change-Id: I6b11729943fe7a03d225138782655ee5dafd26a6
Reviewed-on: https://chromium-review.googlesource.com/1118171
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54090}
2018-06-28 14:10:36 +00:00
Clemens Hammacher
885f99cde7 Revert "Reland "[heap] Clear from space after garbage collection."
This reverts commit cd5d72fd8f.

Reason for revert: breaks TSAN: https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux64%20TSAN/21284

Original change's description:
> Reland "[heap] Clear from space after garbage collection.
> 
> Bug: chromium:829771
> Change-Id: I829b4d40bdbe1474eb7f087059be3e58b154768c
> Reviewed-on: https://chromium-review.googlesource.com/1106657
> Commit-Queue: Hannes Payer <hpayer@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54082}

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

Change-Id: I6b719266bd088f8835d2c769d471c8872256fb40
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:829771
Reviewed-on: https://chromium-review.googlesource.com/1118298
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54086}
2018-06-28 13:21:27 +00:00
Clemens Hammacher
37ca8c3d2d [wasm] Remove friendship between NativeModule and (de)serializer
This CL removes the friendship between {NativeModule} and
{NativeModuleSerializer}/{NativeModuleDeserializer}.
Instead, it adds a new public method ({AddDeserializedCode}) which is
being called from the deserializer.

Drive-by: Unify the argument order to {AddCode}, {AddOwnedCode} and
{WasmCode}.

R=mstarzinger@chromium.org

Bug: chromium:856938
Change-Id: I88943c90c45650e21ae6bc17395a17f86319c046
Reviewed-on: https://chromium-review.googlesource.com/1117075
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54084}
2018-06-28 13:02:34 +00:00
Hannes Payer
cd5d72fd8f Reland "[heap] Clear from space after garbage collection.
Bug: chromium:829771
Change-Id: I829b4d40bdbe1474eb7f087059be3e58b154768c
Reviewed-on: https://chromium-review.googlesource.com/1106657
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54082}
2018-06-28 12:37:24 +00:00
Michael Achenbach
e5416386e6 Revert "[heap] Adds a young generation large object space"
This reverts commit fdf69d53b6.

Reason for revert: Speculative revert for broken GPU bots:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/Linux%20V8%20FYI%20Release%20%28NVIDIA%29/1638
https://ci.chromium.org/p/v8/builders/luci.v8.ci/Mac%20V8%20FYI%20Release%20%28Intel%29/1624

Original change's description:
> [heap] Adds a young generation large object space
> 
> This CL adds the young generation lage object spaces and a flag
> --young-generation-large-objects that by default allocates all
> large objects in this space. This is a preparation CL. The space
> is not fully functional.
> 
> Bug: chromium:852420
> Change-Id: Ib66d26fa52cda89bf04787084826aeb84b6ec1ac
> Reviewed-on: https://chromium-review.googlesource.com/1099164
> Commit-Queue: Hannes Payer <hpayer@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54056}

TBR=ulan@chromium.org,yangguo@chromium.org,hpayer@chromium.org

Change-Id: I175514f806a19c7837022795210625ca40e3c318
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:852420
Reviewed-on: https://chromium-review.googlesource.com/1118038
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54072}
2018-06-28 06:18:35 +00:00
Mostyn Bramley-Moore
92cb6f9da7 [jumbo] remove some using statements in cctest
This is required for jumbo builds to work before the stable jumbo chunk
algorithm[*] can reland.

[*] https://chromium-review.googlesource.com/c/chromium/src/+/1102218

Bug: chromium:856964, chromium:782863
Change-Id: Ibbe0994980eb554acd4e1557e733d07526a90608
Reviewed-on: https://chromium-review.googlesource.com/1117059
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Mostyn Bramley-Moore <mostynb@vewd.com>
Cr-Commit-Position: refs/heads/master@{#54070}
2018-06-27 19:47:48 +00:00
Sathya Gunasekaran
e72f7f5308 [hashtable] Port SmallOrderedHashTableAllocate to CSA
Bug: v8:6443, v8:7569
Change-Id: Ia7e1ed9ab7e85ac366349688278ba59507d38b7e
Reviewed-on: https://chromium-review.googlesource.com/1098474
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54068}
2018-06-27 19:31:07 +00:00
Rodrigo Bruno
9072bef085 Reland "[heap] Added per-page array buffer accouting (external memory)."
This is a reland of d4792e8f6b

Original change's description:
> [heap] Added per-page array buffer accouting (external memory).
> 
> Bug: chromium:845409
> Change-Id: Ibc568cdc501edf5d84d9c6379aff58be069369af
> Reviewed-on: https://chromium-review.googlesource.com/1114602
> Commit-Queue: Rodrigo Bruno <rfbpb@google.com>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54028}

Bug: chromium:845409
Change-Id: I6b11d7f66313bcbcc31be9217c1b780cf3eaee99
Reviewed-on: https://chromium-review.googlesource.com/1116638
Commit-Queue: Rodrigo Bruno <rfbpb@google.com>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54066}
2018-06-27 18:12:07 +00:00
Michael Starzinger
0eaba8f00f [iwyu] Fix some cctest IWYU violations.
This fixes include violations where normal "foo.h" headers included
inline "bar-inl.h" headers. It also removes two (almost) dead methods.

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

Change-Id: I11c6ce71650db22f3c1d7cf5ca50529c94b94839
Reviewed-on: https://chromium-review.googlesource.com/1117076
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54060}
2018-06-27 15:25:57 +00:00
Michael Starzinger
6d20218ed1 [wasm] Remove {WasmCompiledModule} object type.
R=clemensh@chromium.org

Change-Id: I01b0b4948973ebbe0386ae8ae08e722ad16bcab8
Reviewed-on: https://chromium-review.googlesource.com/1114616
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54058}
2018-06-27 14:02:51 +00:00
Hannes Payer
fdf69d53b6 [heap] Adds a young generation large object space
This CL adds the young generation lage object spaces and a flag
--young-generation-large-objects that by default allocates all
large objects in this space. This is a preparation CL. The space
is not fully functional.

Bug: chromium:852420
Change-Id: Ib66d26fa52cda89bf04787084826aeb84b6ec1ac
Reviewed-on: https://chromium-review.googlesource.com/1099164
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54056}
2018-06-27 13:37:41 +00:00
Clemens Hammacher
ce2d01bca3 [wasm] Store protected instructions in an OwnedVector
We currently store the protected instructions per code object in a
{std::unique_ptr<std::vector<ProtectedInstructionData>>}. This wastes
memory, because it requires two heap allocations, plus the vector might
over-allocate (and it currently does, because it is filled dynamically
during compilation).
This CL changes that to store the protected instructions in an
{OwnedVector}. This requires one copy after generating the list of
{ProtectedInstructionData} in an {std::vector} during compilation, but
saves memory afterwards.

R=mstarzinger@chromium.org

Bug: chromium:856938
Change-Id: Ie290a17dc32f27fbbfe0c000a52297181c954550
Reviewed-on: https://chromium-review.googlesource.com/1116701
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54052}
2018-06-27 12:22:10 +00:00
Clemens Hammacher
ab350c16a9 Add stream helper to output any iterable collection
{PrintCollection} can print any collection which is iterable via a
standard for-each loop in C++. The output format of {4, 7, 11} is:
[4, 7, 11]

This helper avoids a few repetitions of manually outputting such
collections.

R=titzer@chromium.org

Bug: v8:7754
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Iaa91e5465968a029815b3aa2b35948f711956cdb
Reviewed-on: https://chromium-review.googlesource.com/1112005
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54048}
2018-06-27 10:48:05 +00:00
Bill Budge
7ca8fdb858 Revert "[heap] Added per-page array buffer accouting (external memory)."
This reverts commit d4792e8f6b.

Reason for revert: Breaks V8 Linux - gc stress

https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20gc%20stress/17056

Original change's description:
> [heap] Added per-page array buffer accouting (external memory).
> 
> Bug: chromium:845409
> Change-Id: Ibc568cdc501edf5d84d9c6379aff58be069369af
> Reviewed-on: https://chromium-review.googlesource.com/1114602
> Commit-Queue: Rodrigo Bruno <rfbpb@google.com>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54028}

TBR=ulan@chromium.org,hpayer@chromium.org,mlippautz@chromium.org,rfbpb@google.com

Change-Id: I8664522a3155d73bac72c9949995d477d2885b8e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:845409
Reviewed-on: https://chromium-review.googlesource.com/1115481
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54043}
2018-06-26 19:07:28 +00:00
Bill Budge
44a82d6b6c Reland "[heap] Added per-page array buffer accouting (external memory)."
This reverts commit e14086f09d.

Reason for revert: Breaks the build. There is another dependent change that must be reverted first.

Original change's description:
> Revert "[heap] Added per-page array buffer accouting (external memory)."
> 
> This reverts commit d4792e8f6b.
> 
> Reason for revert: Breaks V8 Linux - gc stress
> 
> https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20gc%20stress/17056
> 
> Original change's description:
> > [heap] Added per-page array buffer accouting (external memory).
> > 
> > Bug: chromium:845409
> > Change-Id: Ibc568cdc501edf5d84d9c6379aff58be069369af
> > Reviewed-on: https://chromium-review.googlesource.com/1114602
> > Commit-Queue: Rodrigo Bruno <rfbpb@google.com>
> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#54028}
> 
> TBR=ulan@chromium.org,hpayer@chromium.org,mlippautz@chromium.org,rfbpb@google.com
> 
> Change-Id: I9a354e72df1ab6782bd1c7c4d6b10194bcfaba2b
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:845409
> Reviewed-on: https://chromium-review.googlesource.com/1115478
> Reviewed-by: Bill Budge <bbudge@chromium.org>
> Commit-Queue: Bill Budge <bbudge@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54040}

TBR=bbudge@chromium.org,ulan@chromium.org,hpayer@chromium.org,mlippautz@chromium.org,rfbpb@google.com

Change-Id: Iec078656ff3a79a9cee4de046215c55f908c62c7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:845409
Reviewed-on: https://chromium-review.googlesource.com/1115479
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54041}
2018-06-26 18:59:13 +00:00
Bill Budge
e14086f09d Revert "[heap] Added per-page array buffer accouting (external memory)."
This reverts commit d4792e8f6b.

Reason for revert: Breaks V8 Linux - gc stress

https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20gc%20stress/17056

Original change's description:
> [heap] Added per-page array buffer accouting (external memory).
> 
> Bug: chromium:845409
> Change-Id: Ibc568cdc501edf5d84d9c6379aff58be069369af
> Reviewed-on: https://chromium-review.googlesource.com/1114602
> Commit-Queue: Rodrigo Bruno <rfbpb@google.com>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54028}

TBR=ulan@chromium.org,hpayer@chromium.org,mlippautz@chromium.org,rfbpb@google.com

Change-Id: I9a354e72df1ab6782bd1c7c4d6b10194bcfaba2b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:845409
Reviewed-on: https://chromium-review.googlesource.com/1115478
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54040}
2018-06-26 18:45:58 +00:00
Caitlin Potter
e50f6432cf [parser] propagate async arrow formal parameter error in arrow parameters
Instead of just discarding the expression classifier after parsing an after
parsing an arrow function, accumulate the async arrow formal parameters errors

BUG=v8:7817
R=gsathya@chromium.org, littledan@chromium.org, marja@chromium.org

Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I0a84a25d7d42f89200b6fbf05eab3d39ab51fb10
Reviewed-on: https://chromium-review.googlesource.com/1113622
Reviewed-by: Daniel Ehrenberg <littledan@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Cr-Commit-Position: refs/heads/master@{#54034}
2018-06-26 14:34:45 +00:00
Creddy
71c077e896 Create allocation sites only for array subliterals
Change-Id: I2f10deac1fed96920938d820327f19e7867c409d
Bug: v8:7787, chromium:818642
Reviewed-on: https://chromium-review.googlesource.com/1114608
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Chandan Reddy <chandanreddy@google.com>
Cr-Commit-Position: refs/heads/master@{#54031}
2018-06-26 12:37:19 +00:00
Dan Elphick
edec05ea73 [explicit isolates] Pass Isolate to Object::Print
All Object::Print functions now take an Isolate* parameter. Various
XX::XXPrint functions now take an Isolate if it's needed rather than
calling GetIsolate(). Such method use DECL_PRINTER_WITH_ISOLATE rather
than DECL_PRINTER.

The _v8_internal_Print_ function (intended for use in gdb) now uses
Isolate::Current() to get hold of an Isolate.

Reduces the GetIsolate and GetHeap count by 9 and 5 respectively.

Also removes unneeded gdb/lldb macros (along with their support
functions), jfv, jfm, jda and jta, since job does the same thing.

Bug: v8:7786
Change-Id: Ib93ebca6ca47c4db9c85cc6d9ff8004da5942dec
Reviewed-on: https://chromium-review.googlesource.com/1112001
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54029}
2018-06-26 12:32:04 +00:00
Rodrigo Bruno
d4792e8f6b [heap] Added per-page array buffer accouting (external memory).
Bug: chromium:845409
Change-Id: Ibc568cdc501edf5d84d9c6379aff58be069369af
Reviewed-on: https://chromium-review.googlesource.com/1114602
Commit-Queue: Rodrigo Bruno <rfbpb@google.com>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54028}
2018-06-26 12:24:23 +00:00
Georg Neis
f1c79e0224 Reland "Reland "Introduce MutableHeapNumber class.""
This is a reland of f0bcbc90c1.
A few casts were still wrong.

Original change's description:
> Reland "Introduce MutableHeapNumber class."
>
> This is a reland of 40ac6b187a, which
> was incorrect due to a bad merge.
>
> Original change's description:
> > Introduce MutableHeapNumber class.
> >
> > V8 knows heap numbers and mutable heap numbers. They have
> > difference instance types, but in C++ code we've used the
> > same class for both (HeapNumber). Confusingly, however,
> > IsHeapNumber would return false for mutable heap numbers,
> > while HeapNumber::cast would succeed.
> >
> > This CL adds a separate class MutableHeapNumber and
> > eliminates the confusing behavior.
> >
[...]
> TBR=bmeurer@chromium.org
> TBR=ulan@chromium.org
>
> Change-Id: I3af1014c949821dfac0754a3e48c65ce1bad1ad1
> Reviewed-on: https://chromium-review.googlesource.com/1114539
> Reviewed-by: Georg Neis <neis@chromium.org>
> Commit-Queue: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54022}

Change-Id: I19a33da4b6abcd445b528a84d4f56ba1964d337b
Reviewed-on: https://chromium-review.googlesource.com/1114100
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54027}
2018-06-26 11:58:32 +00:00
Michael Starzinger
8ca3d065bf [wasm] Remove obsolete code specialization support.
R=clemensh@chromium.org

Change-Id: Id8a0849d3456be1062a065a23f51bac250de4f7d
Reviewed-on: https://chromium-review.googlesource.com/1107936
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54026}
2018-06-26 11:25:52 +00:00
Leszek Swirski
6038f637a4 [GetIsolate] Remove 1-arg Handle constructor
Remove the one-argument Handle constructor and "handle" factory method,
replacing them with Isolates where available and GetIsolate() methods
otherwise.

TBR=verwaest@chromium.org

Bug: v8:7786
Change-Id: I8ee92ef727c05382c984a3e4c290198d0b312619
Reviewed-on: https://chromium-review.googlesource.com/1113542
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54025}
2018-06-26 11:02:30 +00:00
Georg Neis
722dfb70cf Revert "Reland "Introduce MutableHeapNumber class.""
This reverts commit f0bcbc90c1.

Reason for revert: Still failing bots.

Original change's description:
> Reland "Introduce MutableHeapNumber class."
> 
> This is a reland of 40ac6b187a, which
> was incorrect due to a bad merge.
> 
> Original change's description:
> > Introduce MutableHeapNumber class.
> >
> > V8 knows heap numbers and mutable heap numbers. They have
> > difference instance types, but in C++ code we've used the
> > same class for both (HeapNumber). Confusingly, however,
> > IsHeapNumber would return false for mutable heap numbers,
> > while HeapNumber::cast would succeed.
> >
> > This CL adds a separate class MutableHeapNumber and
> > eliminates the confusing behavior.
> >
> > TBR=bmeurer@chromium.org
> >
> > Change-Id: Id894d177c7fe8cc3f451be80c273b50daee91378
> > Reviewed-on: https://chromium-review.googlesource.com/1113544
> > Commit-Queue: Georg Neis <neis@chromium.org>
> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> > Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#54012}
> 
> TBR=bmeurer@chromium.org
> TBR=ulanchromium.org
> 
> Change-Id: I3af1014c949821dfac0754a3e48c65ce1bad1ad1
> Reviewed-on: https://chromium-review.googlesource.com/1114539
> Reviewed-by: Georg Neis <neis@chromium.org>
> Commit-Queue: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54022}

TBR=ulan@chromium.org,jarin@chromium.org,neis@chromium.org,bmeurer@chromium.org

Change-Id: I99c226e95dfb0b913903cc83193f6e51de8c1b47
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/1114099
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54024}
2018-06-26 10:40:11 +00:00
Georg Neis
f0bcbc90c1 Reland "Introduce MutableHeapNumber class."
This is a reland of 40ac6b187a, which
was incorrect due to a bad merge.

Original change's description:
> Introduce MutableHeapNumber class.
>
> V8 knows heap numbers and mutable heap numbers. They have
> difference instance types, but in C++ code we've used the
> same class for both (HeapNumber). Confusingly, however,
> IsHeapNumber would return false for mutable heap numbers,
> while HeapNumber::cast would succeed.
>
> This CL adds a separate class MutableHeapNumber and
> eliminates the confusing behavior.
>
> TBR=bmeurer@chromium.org
>
> Change-Id: Id894d177c7fe8cc3f451be80c273b50daee91378
> Reviewed-on: https://chromium-review.googlesource.com/1113544
> Commit-Queue: Georg Neis <neis@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54012}

TBR=bmeurer@chromium.org
TBR=ulanchromium.org

Change-Id: I3af1014c949821dfac0754a3e48c65ce1bad1ad1
Reviewed-on: https://chromium-review.googlesource.com/1114539
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54022}
2018-06-26 09:46:10 +00:00
Leszek Swirski
733b15744f [GetIsolate] Remove 1-arg handles around ScriptIterator
Change the ScriptIterator to:

    a) construct its script list handle using the given isolate, and
    b) take the Script (which it doesn't store) by pointer instead of
       by Handle, to avoid callers needing to allocate a handle.

Bug: v8:7786
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I72c1ee13f1b72fe962f4b1bccba69ae4e97088a7
Reviewed-on: https://chromium-review.googlesource.com/1113316
Reviewed-by: Dan Elphick <delphick@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54018}
2018-06-26 08:52:30 +00:00
Yang Guo
983456f5b8 Revert "Introduce MutableHeapNumber class."
This reverts commit 40ac6b187a.

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

Original change's description:
> Introduce MutableHeapNumber class.
> 
> V8 knows heap numbers and mutable heap numbers. They have
> difference instance types, but in C++ code we've used the
> same class for both (HeapNumber). Confusingly, however,
> IsHeapNumber would return false for mutable heap numbers,
> while HeapNumber::cast would succeed.
> 
> This CL adds a separate class MutableHeapNumber and
> eliminates the confusing behavior.
> 
> TBR=bmeurer@chromium.org
> 
> Change-Id: Id894d177c7fe8cc3f451be80c273b50daee91378
> Reviewed-on: https://chromium-review.googlesource.com/1113544
> Commit-Queue: Georg Neis <neis@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54012}

TBR=ulan@chromium.org,jarin@chromium.org,neis@chromium.org,bmeurer@chromium.org

Change-Id: I358a822f20b9110def968e69463a753a2a32c68c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/1114538
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54013}
2018-06-26 06:45:31 +00:00
Georg Neis
40ac6b187a Introduce MutableHeapNumber class.
V8 knows heap numbers and mutable heap numbers. They have
difference instance types, but in C++ code we've used the
same class for both (HeapNumber). Confusingly, however,
IsHeapNumber would return false for mutable heap numbers,
while HeapNumber::cast would succeed.

This CL adds a separate class MutableHeapNumber and
eliminates the confusing behavior.

TBR=bmeurer@chromium.org

Change-Id: Id894d177c7fe8cc3f451be80c273b50daee91378
Reviewed-on: https://chromium-review.googlesource.com/1113544
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54012}
2018-06-26 06:25:50 +00:00
Rodrigo Bruno
da831e966d [heap] Added NewToOld page promotion test using JSArrayBuffers.
Bug: chromium:845409
Change-Id: I7a4e19529193f7e8369b7db02c7bcf01ae302ee3
Reviewed-on: https://chromium-review.googlesource.com/1113439
Commit-Queue: Rodrigo Bruno <rfbpb@google.com>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54002}
2018-06-25 13:26:09 +00:00
Leszek Swirski
882080c499 [GetIsolate] Remove GetIsolate use in Map
Roughly:
    GetIsolate(): -31
    handle(HeapObject): -6

TBR=verwaest@chromium.org

Bug: v8:7786
Change-Id: I3857f8c45f1f93c727d575d5f9244d9811949a7f
Reviewed-on: https://chromium-review.googlesource.com/1111838
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53997}
2018-06-25 11:38:37 +00:00
Camillo Bruni
e7f5c5ccc0 Reland "[parser][log] Log script id during background compilation"
This reverts commit a800e05007.

Original change's description:
> Revert "[parser][log] Log script id during background compilation"
>
> This reverts commit aafd5c52ab.
>
> Reason for revert: Tentative revert for
>
> https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Win64/24825
> https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Win64%20-%20msvc/3242
>
> Original change's description:
> > [parser][log] Log script id during background compilation
> >
> > - Add separate script-create, script-reserve-id and script-details log events
> > - Add log events for CompilationCache hits and puts
> > - Simplify function event logging by only pass along the script id
> > - Explicitly create Scripts in parse-processor.js on script events only
> > - Create a temporary script id in the ParseInfo for use during background
> >   parsing and compilation
> > - Clean up ParseInfo initialization to centralize creation and use of
> >   script ids
> > - Allow creating Scripts with predefined script ids
> >
> > Bug: chromium:757467, chromium:850038
> > Change-Id: I02dfd1d5725795b9fe0ea94ef57b287b934a1efe
> > Reviewed-on: https://chromium-review.googlesource.com/1097131
> > Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> > Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> > Commit-Queue: Camillo Bruni <cbruni@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#53978}
>
> TBR=ulan@chromium.org,cbruni@chromium.org,gsathya@chromium.org,leszeks@chromium.org
>
> Change-Id: I629f72f51d5e086e2b54658c1fdd18cec268aab2
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:757467, chromium:850038
> Reviewed-on: https://chromium-review.googlesource.com/1112538
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53984}

TBR=ulan@chromium.org,yangguo@chromium.org,cbruni@chromium.org,gsathya@chromium.org,leszeks@chromium.org

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

Bug: chromium:757467, chromium:850038
Change-Id: I3088c86362c06ee50464f1f14e25350b1b8048ad
Reviewed-on: https://chromium-review.googlesource.com/1112539
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53994}
2018-06-25 10:46:34 +00:00
jing.bao
65bcf6c287 [ia32][wasm] Add unpacking integer conversions
I32x4U/SConvertI16x8Low/High, I16x8U/SConvertI8x16Low/High

Add pmovsxbw/wd, pmovzxbw/wd and AVX version
Add Palignr, Pmovsxbw/wd, Pmovzxbw/wd macro.
Reconstruct ptest/vptest, Ptest using macro

Change-Id: I4a26b3bb6d5791f72e3192c914758287701e78a0
Reviewed-on: https://chromium-review.googlesource.com/1111691
Commit-Queue: Jing Bao <jing.bao@intel.com>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Aseem Garg <aseemgarg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53990}
2018-06-25 04:25:24 +00:00
Leszek Swirski
83ac43275e [GetIsolate] More low-hanging fruit
Access Isolate* and Heap* wherever already available.

Roughly:
GetIsolate(): -20
GetHeap(): -22
Handle<>(HeapObject): -315
handle(HeapObject): -21

Bug: v8:7786
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I2da36ed1909d849812a1cb6bf94cb735eedca45b
Reviewed-on: https://chromium-review.googlesource.com/1111707
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53987}
2018-06-23 09:53:20 +00:00
Yang Guo
a800e05007 Revert "[parser][log] Log script id during background compilation"
This reverts commit aafd5c52ab.

Reason for revert: Tentative revert for

https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Win64/24825
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Win64%20-%20msvc/3242

Original change's description:
> [parser][log] Log script id during background compilation
> 
> - Add separate script-create, script-reserve-id and script-details log events
> - Add log events for CompilationCache hits and puts
> - Simplify function event logging by only pass along the script id
> - Explicitly create Scripts in parse-processor.js on script events only
> - Create a temporary script id in the ParseInfo for use during background
>   parsing and compilation
> - Clean up ParseInfo initialization to centralize creation and use of
>   script ids
> - Allow creating Scripts with predefined script ids
> 
> Bug: chromium:757467, chromium:850038
> Change-Id: I02dfd1d5725795b9fe0ea94ef57b287b934a1efe
> Reviewed-on: https://chromium-review.googlesource.com/1097131
> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Commit-Queue: Camillo Bruni <cbruni@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53978}

TBR=ulan@chromium.org,cbruni@chromium.org,gsathya@chromium.org,leszeks@chromium.org

Change-Id: I629f72f51d5e086e2b54658c1fdd18cec268aab2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:757467, chromium:850038
Reviewed-on: https://chromium-review.googlesource.com/1112538
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53984}
2018-06-22 19:46:30 +00:00
Alexey Kozyatinskiy
c46aa5bc93 [debug] removed live_edit flag and reimplemented LiveEdit::RestartFrame
It looks like we do not need live_edit flag.

R=dgozman@chromium.org,yangguo@chromium.org

Bug: v8:7862
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I2b635f7d24138894b7a0f94fc90293d50e40f22c
Reviewed-on: https://chromium-review.googlesource.com/1108386
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53980}
2018-06-22 17:29:59 +00:00
Camillo Bruni
aafd5c52ab [parser][log] Log script id during background compilation
- Add separate script-create, script-reserve-id and script-details log events
- Add log events for CompilationCache hits and puts
- Simplify function event logging by only pass along the script id
- Explicitly create Scripts in parse-processor.js on script events only
- Create a temporary script id in the ParseInfo for use during background
  parsing and compilation
- Clean up ParseInfo initialization to centralize creation and use of
  script ids
- Allow creating Scripts with predefined script ids

Bug: chromium:757467, chromium:850038
Change-Id: I02dfd1d5725795b9fe0ea94ef57b287b934a1efe
Reviewed-on: https://chromium-review.googlesource.com/1097131
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53978}
2018-06-22 16:05:30 +00:00
Clemens Hammacher
9635e1a303 [wasm] Move wire bytes to the NativeModule
The wire bytes are currently stored as {SeqOneByteString} on the JS
heap. In order to make the {NativeModule} isolate independent, and to
ensure fast access to the wire bytes, they should move to the native
heap.

R=titzer@chromium.org

Bug: chromium:854794, v8:7868, v8:7424
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I36811ec87f780c5b1f6863cd6de89a165aa0b7d5
Reviewed-on: https://chromium-review.googlesource.com/1108208
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53977}
2018-06-22 15:45:59 +00:00
Michael Starzinger
d7ea603012 [wasm] Avoid creating temporary source position table.
This changes the WebAssembly pipeline to no longer expect source
position tables for {WasmCode} to be allocated on the GC'ed heap.

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

Change-Id: Ib2c6e3d0840e47b83809f60519c0d1b94af186af
Reviewed-on: https://chromium-review.googlesource.com/1109686
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53961}
2018-06-22 11:33:25 +00:00
Clemens Hammacher
85ed06e928 [Liftoff] Remove code prologue to check for optimized code
This prologue is not needed any more now that we have the jump table.
If optimized code exists, we will not even enter the Liftoff code any
more, but instead jump to the optimized code right away.
This also allows to remove the {WASM_CODE_TABLE_ENTRY} relocation info
kind.

R=mstarzinger@chromium.org

Bug: v8:7758
Change-Id: I0449693d7434088fb264104fe59365d7ca2b74c6
Reviewed-on: https://chromium-review.googlesource.com/1110222
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53954}
2018-06-22 09:37:04 +00:00
Yang Guo
3e70aa32c1 Skip flakily crashing RunWasmTurbofan_Int32DivS_trap_effect test
TBR=clemensh@chromium.org

Bug: v8:7879
Change-Id: Ib8c394fc7696d1eaf831cbfd31e5aada26aa3a9b
Reviewed-on: https://chromium-review.googlesource.com/1111698
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53951}
2018-06-22 06:02:59 +00:00
Bill Budge
51ded9a743 [wasm simd] Handle more shuffles
- Handles zip, unzip, and transpose shuffles/swizzles.
- Adds punpck* instructions to assembler.

Bug: v8:6020
Change-Id: If124b7a7462ffd0470347b54ce4a93c01667e384
Reviewed-on: https://chromium-review.googlesource.com/1084069
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53947}
2018-06-21 17:17:37 +00:00
Dan Elphick
7da6adcb6b [explicit isolates] Remove GetHeap from CallHandlerInfo
Pass Isolate directly into CallHandlerInfo methods so that calls to
GetHeap can be removed.

Bug: v8:7786
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: If28fbbd65530b01b69786c3e743754cff3b1ba3a
Reviewed-on: https://chromium-review.googlesource.com/1107926
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53945}
2018-06-21 16:41:18 +00:00
Leszek Swirski
b686ca2171 [GetIsolate] Remove (most) GetIsolate from src/objects-debug.cc
Bug: v8:7786
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Ic00953a5375f60b61a093234c03ce0df41dbe228
Reviewed-on: https://chromium-review.googlesource.com/1110125
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53944}
2018-06-21 16:34:27 +00:00
Alexey Kozyatinskiy
69d166fcef [debug] migrate all liveedit tests to use LiveEdit::PatchScript
After this CL all liveedit tests call the same LiveEdit::PatchScript
method. This method will be updated later.
As well some new liveedit cctests added, unfortunately part of them
do not work with current implementation.

R=dgozman@chromium.org,yangguo@chromium.org

Bug: v8:7862
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I3521af12b0f95b39d13aaafb1d1cf60f3f642a97
Reviewed-on: https://chromium-review.googlesource.com/1108382
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53936}
2018-06-21 15:34:16 +00:00
Peter Marshall
11926e6ecc [gc] Attach page to LocalArrayBufferTracker rather than space
Each local ABT is logically for one page. We passed the space in to the
constructor, but this is wrong because the space a page is in can
change, e.g. for compaction pages.

Instead, pass the page to the local ABT constructor and always get the
space from this. To do this we need to push the AllocateLocalTracker()
helper and friends down to Page, rather than its superclass MemoryChunk.

Unfortunately, we need to keep ReleaseLocalTracker() on MemoryChunk even
though only Pages can have local trackers, because we can't do virtual
dispatch on MemoryChunk::ReleaseAllocatedMemory() which would allow us
to clean up the tracker memory nicely for pages only.

We also have to make sure we update external bytes accounting properly
when swapping spaces, as in SemiSpace::Swap().

Change-Id: Iff02e41dd12a6b04a57fcc32f9e2b4f049fcbc24
Reviewed-on: https://chromium-review.googlesource.com/1107635
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53930}
2018-06-21 13:19:28 +00:00
Clemens Hammacher
e90af2c702 [api] Properly define BufferReference instead of CallerOwnedBuffer
The name {CallerOwnedBuffer} does not make sense in all situations,
especially if such an object is returned instead of being passed as
argument.
I am working on moving the wasm wire bytes off the JS heap, and hence
will return unowned references via the API. To prepare this change, I
deprecate the existing {CallerOwnedBuffer} and introduce a new
{BufferReference} struct with proper field names.

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

Bug: v8:7868
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Ic8953951447038a831b15a336a52a199bfbeafd5
Reviewed-on: https://chromium-review.googlesource.com/1108207
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53929}
2018-06-21 13:17:18 +00:00
Ben L. Titzer
ea2f33c6c3 [asm] Remove Assembler(isolate...) constructor
This completes the transition to Assembler::Options, which reduces
the assemblers's dependency on isolates, and there is now only one
way to create an Assembler, which is to use the options.
Note that some operations on assemblers still need an isolate, such
as GetCode(), and in these cases, the isolate is an additional
argument to the method.

R=jgruber@chromium.org
CC=mstarzinger@chromium.org

Change-Id: I413209d816c63a7c3640f1c226764693dcad1e7f
Reviewed-on: https://chromium-review.googlesource.com/1106169
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53925}
2018-06-21 12:50:54 +00:00
Leszek Swirski
b8cf9627b9 [GetIsolate] Remove GetIsolate from String in src/objects.cc
Bug: v8:7786
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I98ac4de406630c14280927240e9471049af3e790
Reviewed-on: https://chromium-review.googlesource.com/1108118
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53920}
2018-06-21 11:59:58 +00:00
Clemens Hammacher
9587d2ca31 Reland "[wasm] Move serialization tests to own file"
This is a reland of c2f1090db8, fixing jumbo builds.

Original change's description:
> [wasm] Move serialization tests to own file
>
> Move out all serialization related tests to
> {test-wasm-serialization.cc}, to reduce the size of
> {test-run-wasm-module.cc}.
>
> R=titzer@chromium.org
>
> Bug: v8:7754
> Change-Id: I0b2133baf69e2557df27d1733cc267d1d4cf7452
> Reviewed-on: https://chromium-review.googlesource.com/1107980
> Reviewed-by: Ben Titzer <titzer@chromium.org>
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53909}

TBR=titzer@chromium.org

Bug: v8:7754
Change-Id: Ic0bb02b1b782676c6100daa2d588adce8b54c388
Reviewed-on: https://chromium-review.googlesource.com/1109838
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53919}
2018-06-21 11:45:08 +00:00
Yang Guo
dd7bf6f780 Revert "[wasm] Move serialization tests to own file"
This reverts commit c2f1090db8.

Reason for revert: breaks jumbo build: https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux64%20Jumbo%20-%20limited/1309

Original change's description:
> [wasm] Move serialization tests to own file
> 
> Move out all serialization related tests to
> {test-wasm-serialization.cc}, to reduce the size of
> {test-run-wasm-module.cc}.
> 
> R=​titzer@chromium.org
> 
> Bug: v8:7754
> Change-Id: I0b2133baf69e2557df27d1733cc267d1d4cf7452
> Reviewed-on: https://chromium-review.googlesource.com/1107980
> Reviewed-by: Ben Titzer <titzer@chromium.org>
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53909}

TBR=titzer@chromium.org,clemensh@chromium.org

Change-Id: I2c6ce0c128b34cc28c1f87e02bb584f2a79428e2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7754
Reviewed-on: https://chromium-review.googlesource.com/1109837
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53914}
2018-06-21 10:55:09 +00:00
Creddy
44518ef3fe Unit test to document the pretenuring behavior of nested literals
Change-Id: I02710e807fa2cd36849b4ab9d76cde2e99f02911
Reviewed-on: https://chromium-review.googlesource.com/1107983
Commit-Queue: Chandan Reddy <chandanreddy@google.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53910}
2018-06-21 10:14:38 +00:00
Clemens Hammacher
c2f1090db8 [wasm] Move serialization tests to own file
Move out all serialization related tests to
{test-wasm-serialization.cc}, to reduce the size of
{test-run-wasm-module.cc}.

R=titzer@chromium.org

Bug: v8:7754
Change-Id: I0b2133baf69e2557df27d1733cc267d1d4cf7452
Reviewed-on: https://chromium-review.googlesource.com/1107980
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53909}
2018-06-21 10:02:18 +00:00
Ivica Bogosavljevic
95ccc97f35 MIPS: Rewrite byteswap implementation
Byteswap operations are used a lot in WASM on big endian
architecture. This CL removed unused 1-byte swapping,
rewrite tests so they have better coverage and cleans up
some other minor things.

TEST=cctest/test-run-wasm/RunWasmTurbofan_I32DivSOnDifferentRegisters

Change-Id: I60466bbd5fe3f64e8e55684265dc43e92fcabc2c
Reviewed-on: https://chromium-review.googlesource.com/1106379
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Sreten Kovacevic <sreten.kovacevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#53908}
2018-06-21 09:56:38 +00:00
Aseem Garg
618bc445fe [wasm] add simd convert and pack to interpreter
R=gdeepti@chromium.org
BUG=v8:6020

Change-Id: Ibdeb926ef3e2884b9a3f0831e9482ebe2da227ac
Reviewed-on: https://chromium-review.googlesource.com/1105464
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53898}
2018-06-20 21:26:16 +00:00
Alexey Kozyatinskiy
0a06a1bc0a [liveedit] migrate compare strings tests to native
Extracted from https://chromium-review.googlesource.com/c/v8/v8/+/1105493/

R=yangguo@chromium.org

Bug: v8:7862
Change-Id: I804a444a43047e3303b5f1b0140522b4f609f3ba
Reviewed-on: https://chromium-review.googlesource.com/1107393
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53891}
2018-06-20 14:54:06 +00:00
Camillo Bruni
a76ce4f899 [log] Improve log parsing
- Add parseString and parseVarArgs helper constants
- Fix number formatting in parser-processor.js
- Rename time to duration in parse-processor
- Fix eval handling in parse-processor

Bug: chromium:757467, chromium:850038

Change-Id: Ibce57b46d22e03ddaa5baa22f45d8df4c93af2cd
Reviewed-on: https://chromium-review.googlesource.com/1102435
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53887}
2018-06-20 13:40:22 +00:00
jgruber
f86365dc73 [builtins] Properly handle cctest heap creation in embedded builds
Some cctests force fresh creation of heap constants, even though the
cctest binary itself is an embedded snapshot build (i.e.: a snapshot
blob exists, and a binary-embedded blob exists). This breaks a few
assumptions, for example that off-heap builtins have a single,
canonical off-heap code range.

Unfortunately this isn't that easy to fix. I see a few alternatives:

1. In builtins setup, if an embedded blob exists, regenerate the
builtins for their metadata (things like the safepoint table offset),
and then replace them by off-heap trampolines.

2. As above, but deserialize the trampolines from the snapshot blob.

3. As above, but pack required metadata into the embedded blob and
create trampolines from there.

4. Act as if the embedded blob does not exist.

Alternative 1 does not work because the generated code can be slightly
different at at runtime vs. mksnapshot-time. Alternative 2 is out
because we do not have access to the snapshot blob in TestIsolate
setup. Alternative 3 is probably the preferred option but would be a
more involved change.

This CL takes path 4. It's not an optimal solution, but it can be
replace by alternative 3 later.

TBR=ulan@chromium.org

Bug: v8:7718, v8:7751
Change-Id: I36c024cb0179615011c886ed3978bc95f0d197ac
Reviewed-on: https://chromium-review.googlesource.com/1098924
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53886}
2018-06-20 13:38:52 +00:00
Leszek Swirski
155c34d185 [GetIsolate] Remove GetIsolate from src/objects/*
Bug: v8:7786
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: If9904fe8feb9b4e157d42d6e84f1aa263abcc8b7
Reviewed-on: https://chromium-review.googlesource.com/1106160
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53882}
2018-06-20 12:46:22 +00:00
Yang Guo
22116dd6c8 [snapshot] fix resetting function code.
Unconditionally setting the JSFunction code to that of the SFI
may skip initializing the feedback vector.

R=leszeks@chromium.org

Bug: v8:7857
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I65d4bf32493be4cade2eaf3d665d44f93e80f809
Reviewed-on: https://chromium-review.googlesource.com/1107618
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53881}
2018-06-20 12:43:52 +00:00
Creddy
8ca1c3900b Reland "[runtime][gc] Drop AllocationSite::weak_next field for sub-literals"
This is a reland of 380dba0a5c

Original change's description:
> [runtime][gc] Drop AllocationSite::weak_next field for sub-literals
> 
> Use AllocationSite without Weaknext field for all the allocations in nested
> literal except for Root. The nested field is sufficient to link all the
> allocations in a nested literal. Only the Root is added to heap weak_alloc_list
> for GC to traverse
> 
> Change-Id: I946e63292c6d168197cd2a087f697c73cc431272
> Reviewed-on: https://chromium-review.googlesource.com/1101323
> Commit-Queue: Chandan Reddy <chandanreddy@google.com>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53813}

Change-Id: Ic451fb3600b87f8f69748b1659ff89a80c9322fa
Reviewed-on: https://chromium-review.googlesource.com/1106257
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Chandan Reddy <chandanreddy@google.com>
Cr-Commit-Position: refs/heads/master@{#53872}
2018-06-20 11:00:59 +00:00
Leszek Swirski
a5bd77326c [serializer] Fix top-level assumption
Fix assumption that only top level code won't have outer scope infos.

Bug: v8:7690
Change-Id: Ia6eec7b406632ad301e7db557597204c7ca66730
Reviewed-on: https://chromium-review.googlesource.com/1107622
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53869}
2018-06-20 10:10:19 +00:00
Clemens Hammacher
f318f9835f [wasm] Move the NativeModule to the WasmModuleObject
The reference to the {NativeModule} (stored in a {Managed}) should live
on the {WasmModuleObject}, not on the individual {WasmCompiledModule}
objects.

R=titzer@chromium.org

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I21dfa088c9643d36d9fd5052a145e7e2af5e47f9
Reviewed-on: https://chromium-review.googlesource.com/1106380
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53860}
2018-06-20 08:13:59 +00:00
Clemens Hammacher
7e4e5d0fd6 [wasm][test] Fix WasmModule::num_declared_functions
Our tests currently don't set {WasmModule::num_declared_functions}
correctly. This CL fixes that.
This enables the use of {WasmModule::num_declared_functions} instead of
{NativeModule::num_functions_ - NativeModule::num_imported_functions_}.

Drive-by: Fix {std::vector} reservation to reserve enough space for all
functions during decoding.

R=titzer@chromium.org

Change-Id: I6d7783aed1c0de3275fc72787dec17c38ff8c73b
Reviewed-on: https://chromium-review.googlesource.com/1106166
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53857}
2018-06-20 07:22:29 +00:00
Brian Stell
bc43c8e8fc [intl] Port getAvailableLocales to C++
R=gsathya@chromium.org
Bug: v8:5751

Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: If842ab4850fc8d75bebb5331188ee237c5f1e9d7
Reviewed-on: https://chromium-review.googlesource.com/1097419
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Nebojša Ćirić <cira@chromium.org>
Commit-Queue: Brian Stell <bstell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53850}
2018-06-19 19:52:38 +00:00
Toon Verwaest
7f2fc562dd Drop parameter names from ScopeInfo
Change-Id: I5fd42cd70aaba15cfef32eea54232f8292aaa874
Reviewed-on: https://chromium-review.googlesource.com/1105775
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53841}
2018-06-19 13:26:09 +00:00
Clemens Hammacher
e69b8f8969 [wasm] Create WasmCompiledModule together with WasmModuleObject
We need to create one {WasmCompiledModule} before creating the
{WasmModuleObject}. This CL refactors the code such that the
{WasmModuleObject} itself creates the {WasmCompiledModule}. This moves
us closer to removing the {WasmCompiledModule}.

R=titzer@chromium.org

Change-Id: I9f85e47f643c39840036f4f1f92df736732c8f74
Reviewed-on: https://chromium-review.googlesource.com/1105762
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53833}
2018-06-19 10:48:28 +00:00
Clemens Hammacher
5f56641b41 Reland "[wasm] Introduce jump table"
This is a reland of 733b7c8258.
The arm64 bug was fixed in https://crrev.com/c/1105051.

Original change's description:
> [wasm] Introduce jump table
>
> This introduces the concept of a jump table for WebAssembly, which is
> used for every direct and indirect call to any WebAssembly function.
> For lazy compilation, it will initially contain code to call the
> WasmCompileLazy builtin, where it passes the function index to be
> called.
> For non-lazy-compilation, it will contain a jump to the actual code.
> The jump table allows to easily redirect functions for lazy
> compilation, tier-up, debugging and (in the future) code aging. After
> this CL, we will not need to patch existing code any more for any of
> these operations.
>
> R=mstarzinger@chromium.org, titzer@chromium.org
>
> Bug: v8:7758
> Change-Id: I45f9983c2b06ae81bf5ce9847f4542fb48844a4f
> Reviewed-on: https://chromium-review.googlesource.com/1097075
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Ben Titzer <titzer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53805}

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

Bug: v8:7758
Change-Id: I68555230c6db97e70f0b8fef784188f55ee04794
Reviewed-on: https://chromium-review.googlesource.com/1105158
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53829}
2018-06-19 10:29:48 +00:00
Dan Elphick
1b0d4a151a [explicit isolates] Remove GetIsolates from Map
This removes several GetIsolate calls from Map:: methods and instead
passes the Isolate in. This is a very noisy change but mostly it is just
adding Isolate to method declarations and forwarding it on.

Bug: v8:7786
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I159505e50a9462d01066f14da0fcc29762bd5531
Reviewed-on: https://chromium-review.googlesource.com/1075267
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53826}
2018-06-19 09:59:58 +00:00
Sigurd Schneider
0db5e7b80d [TurboFan] Return MaybeHandle from TurboFan compiler
TurboFan returned null handles if compilation did not succeed. This CL
changes that to a MaybeHandle to make it explicit that client code needs
to handle the error.

Bug: v8:7856
Change-Id: I6087e6263faa1150b9788213dd22c398b4a2fc2d
Reviewed-on: https://chromium-review.googlesource.com/1104688
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53824}
2018-06-19 09:33:18 +00:00
Michael Achenbach
7f28ed7f88 [test] Skip flaky test
TBR=yangguo@chromium.org
NOTRY=true

Bug: v8:7859
Change-Id: Ie3d21f21b12bc2d36eb1b0ea798e2d6030342492
Reviewed-on: https://chromium-review.googlesource.com/1105760
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53818}
2018-06-19 08:43:02 +00:00
Sigurd Schneider
335d162556 [cctest] Bump max old space size for isolate creation
Bump limit for isolate creation in cctest; the test started crashing recently
on nosnap.debug builds, hence we bump the limit.

Bug: v8:7856
Change-Id: I7c2396c7f112a2ed7fc189f0fa72658e0ed75050
Reviewed-on: https://chromium-review.googlesource.com/1104691
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53816}
2018-06-19 08:01:07 +00:00
Clemens Hammacher
0181cf0b31 Revert "[runtime][gc] Drop AllocationSite::weak_next field for sub-literals"
This reverts commit 380dba0a5c.

Reason for revert: Fails gc-stress: https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Mac64%20GC%20Stress/1471

Original change's description:
> [runtime][gc] Drop AllocationSite::weak_next field for sub-literals
> 
> Use AllocationSite without Weaknext field for all the allocations in nested
> literal except for Root. The nested field is sufficient to link all the
> allocations in a nested literal. Only the Root is added to heap weak_alloc_list
> for GC to traverse
> 
> Change-Id: I946e63292c6d168197cd2a087f697c73cc431272
> Reviewed-on: https://chromium-review.googlesource.com/1101323
> Commit-Queue: Chandan Reddy <chandanreddy@google.com>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53813}

TBR=ulan@chromium.org,cbruni@chromium.org,chandanreddy@google.com

Change-Id: Icc87027f14f917da3033db256c2535e08e2a4a34
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/1105159
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53815}
2018-06-19 07:54:09 +00:00
Creddy
380dba0a5c [runtime][gc] Drop AllocationSite::weak_next field for sub-literals
Use AllocationSite without Weaknext field for all the allocations in nested
literal except for Root. The nested field is sufficient to link all the
allocations in a nested literal. Only the Root is added to heap weak_alloc_list
for GC to traverse

Change-Id: I946e63292c6d168197cd2a087f697c73cc431272
Reviewed-on: https://chromium-review.googlesource.com/1101323
Commit-Queue: Chandan Reddy <chandanreddy@google.com>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53813}
2018-06-19 07:14:17 +00:00
Alexey Kozyatinskiy
0b690227f8 Reland "[inspector] fixed location of top level function return"
This is a reland of 4363a69335

Original change's description:
> [inspector] fixed location of top level function return
>
> We should pass false as has_braces argument to create FunctionLiteral
> for top level function.
>
> R=dgozman@chromium.org,bmeurer@chromium.org
> TBR=bmeurer@chromium.org
>
> Bug: none
> Change-Id: I397f31b562d32c71f3a12bfc9ceeed16c367aa80
> Reviewed-on: https://chromium-review.googlesource.com/1098018
> Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
> Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53769}
TBR=dgozman@chromium.org

Bug: v8:7858
Change-Id: Ie636bc101f9d29d9d40bd10b96e62da6505c2734
Reviewed-on: https://chromium-review.googlesource.com/1104497
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53808}
2018-06-18 21:37:49 +00:00
Clemens Hammacher
33f6c3e10e Revert "[wasm] Introduce jump table"
This reverts commit 733b7c8258.

Reason for revert: breaks arm64 gc-stress: https://ci.chromium.org/buildbot/client.v8.ports/V8%20Linux%20-%20arm64%20-%20sim%20-%20gc%20stress/11659

Original change's description:
> [wasm] Introduce jump table
> 
> This introduces the concept of a jump table for WebAssembly, which is
> used for every direct and indirect call to any WebAssembly function.
> For lazy compilation, it will initially contain code to call the
> WasmCompileLazy builtin, where it passes the function index to be
> called.
> For non-lazy-compilation, it will contain a jump to the actual code.
> The jump table allows to easily redirect functions for lazy
> compilation, tier-up, debugging and (in the future) code aging. After
> this CL, we will not need to patch existing code any more for any of
> these operations.
> 
> R=​mstarzinger@chromium.org, titzer@chromium.org
> 
> Bug: v8:7758
> Change-Id: I45f9983c2b06ae81bf5ce9847f4542fb48844a4f
> Reviewed-on: https://chromium-review.googlesource.com/1097075
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Ben Titzer <titzer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53805}

TBR=mstarzinger@chromium.org,titzer@chromium.org,clemensh@chromium.org,sreten.kovacevic@mips.com

Change-Id: Iea358db2cf13656a65cf69a6d82cbbc10d3e7e1c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7758
Reviewed-on: https://chromium-review.googlesource.com/1105157
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53807}
2018-06-18 20:38:50 +00:00
Clemens Hammacher
733b7c8258 [wasm] Introduce jump table
This introduces the concept of a jump table for WebAssembly, which is
used for every direct and indirect call to any WebAssembly function.
For lazy compilation, it will initially contain code to call the
WasmCompileLazy builtin, where it passes the function index to be
called.
For non-lazy-compilation, it will contain a jump to the actual code.
The jump table allows to easily redirect functions for lazy
compilation, tier-up, debugging and (in the future) code aging. After
this CL, we will not need to patch existing code any more for any of
these operations.

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

Bug: v8:7758
Change-Id: I45f9983c2b06ae81bf5ce9847f4542fb48844a4f
Reviewed-on: https://chromium-review.googlesource.com/1097075
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53805}
2018-06-18 16:38:09 +00:00
Clemens Hammacher
3cb376dc83 Make CallInterfaceDescriptor isolate-independent
Currently each isolate stores its own array of
{CallInterfaceDescriptorData}. This array has size 173, and each entry
has 40 bytes. That's already 7kB per isolate.
Additionally, each {CallInterfaceDescriptorData} allocates two
heap-allocated arrays, which probably add up to more than the static
size of the {CallInterfaceDescriptorData}. Note that all the
{CallInterfaceDescriptorData} instances are initialized eagerly on
isolate creation.

Since {CallInterfaceDescriptor} is totally isolate independent itself,
this CL refactors the current design to avoid a copy of them per
isolate, and instead shares them process-wide. Still, we need to free
the allocated heap arrays when the last isolate dies to avoid leaks.
This can probably be refactored later by statically initializing more
and avoiding the heap allocations all together.

This refactoring will also allow us to use {CallInterfaceDescriptor}s
from wasm background compilation threads, which are not bound to any
isolate.

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

Bug: v8:6600
Change-Id: If8625b89951eec8fa8986b49a5c166e874a72494
Reviewed-on: https://chromium-review.googlesource.com/1100879
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53803}
2018-06-18 15:55:53 +00:00
Clemens Hammacher
6be6ec0091 [wasm] Store WasmModule in shared_ptr during async compilation
We currently store the {WasmModule} (generated during decoding) in a
unique_ptr and pass ownership to the {WasmModuleObject} after
compilation.
I plan to move the {Managed<NativeModule>} from {WasmCompiledModule} to
{WasmModuleObject}, which will force us to create the
{WasmModuleObject} *before* compilation, so that the {CompilationState}
is available during compilation.

This CL prepares that refactoring by storing the {WasmModule} in a
{shared_ptr} in the {AsyncCompileJob}. Note that it will eventually be
stored in a {shared_ptr} in the {Managed} anyway.

R=titzer@chromium.org

Change-Id: Iac5e3c1067af2801e938f77a455a68807801526a
Reviewed-on: https://chromium-review.googlesource.com/1104117
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53801}
2018-06-18 15:10:03 +00:00
Sigurd Schneider
a64c62393a [infra] Disable failing test
The test test-api/InitializeDefaultIsolateOnSecondaryThread1 has been
failing since at least 6.8, but our infra only recently realized that.

NOTRY=true
NOPRESUBMIT=true
NOTREECHECKS=true

Bug: v8:7856
Change-Id: I8cbfd4ea554bb32c50c01d437efa5b18f60c2fde
Reviewed-on: https://chromium-review.googlesource.com/1104458
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53795}
2018-06-18 14:34:24 +00:00
Clemens Hammacher
fffa33179d [wasm] Register and release protected instructions only once
We currently have a system where the protected instructions are
unregistered when the last instance dies, and registered again on the
next instantiation. This is triggered by {WasmCompiledModule::Reset}.
Since the reference to the {NativeModule} will move to the
{WasmModuleObject}, and this object stays alive even if the last
instance dies, this will become hard to maintain.
It will also make it harder to share wasm code across isolates.
This CL refactors this to register trap handler data once when the code
is added to the {NativeModule}, and releases it if the code dies.

R=mstarzinger@chromium.org
CC=​eholk@chromium.org

Bug: v8:5277
Change-Id: I3f1b336095230b255f3849c271b37b62f2b96cd6
Reviewed-on: https://chromium-review.googlesource.com/1103567
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53791}
2018-06-18 12:25:32 +00:00
Toon Verwaest
0a846a0e84 Don't expose GetFunction on the scope iterator. Simply take it into account for GetFunctionDebugName
This is a step towards avoiding materializing function_ altogether if we deoptimize. Typically we only need the SharedFunctionInfo.

Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Idee78f02d1afe3d2cb70e93a6d96a5a33907f892
Reviewed-on: https://chromium-review.googlesource.com/1100474
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53789}
2018-06-18 12:03:59 +00:00
Toon Verwaest
a5b5f8e970 Reland "[debugger] Rewrite the ScopeIterator/DebugEvaluate to use Scope rather than ScopeInfo for inner scopes."
Change-Id: I0ad97057600d0a0f1dd4c71d5f8245dafb908154
Reviewed-on: https://chromium-review.googlesource.com/1103576
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53781}
2018-06-18 09:25:29 +00:00
Pierre Langlois
e0204550b6 [cctest] Disable --enable-slow-asserts for FuzzAssemble* tests.
The FuzzAssemble* tests rely on two CSA functions which are relatively big. And
with the --enable-slow-asserts flag they get so big that the register
allocator's memory consumption becomes a problem. Let's just override this flag.

Bug: v8:7819, v8:6848, v8:7842
Change-Id: I95db59b9c788aa665d04339892b2e0b5d92d9a89
Reviewed-on: https://chromium-review.googlesource.com/1093315
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#53779}
2018-06-18 09:00:29 +00:00
Matheus Marchini
acc336c125 [log] fix boolean logic on LogCodeObject
R=yangguo@google.com

Change-Id: Icb4825344991e5b2d15050e037064c60eeb9617e
Reviewed-on: https://chromium-review.googlesource.com/1097578
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53777}
2018-06-18 08:12:38 +00:00
Clemens Hammacher
7a8e24b48f Revert "[inspector] fixed location of top level function return"
This reverts commit 4363a69335.

Reason for revert: Seems to break layout tests: https://ci.chromium.org/buildbot/client.v8.fyi/V8-Blink%20Linux%2064/24146

Original change's description:
> [inspector] fixed location of top level function return
> 
> We should pass false as has_braces argument to create FunctionLiteral
> for top level function.
> 
> R=​dgozman@chromium.org,bmeurer@chromium.org
> TBR=bmeurer@chromium.org
> 
> Bug: none
> Change-Id: I397f31b562d32c71f3a12bfc9ceeed16c367aa80
> Reviewed-on: https://chromium-review.googlesource.com/1098018
> Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
> Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53769}

TBR=dgozman@chromium.org,yangguo@chromium.org,kozyatinskiy@chromium.org

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

Bug: none
Change-Id: I4495f6723daed63b7a38b0d3c3637724f6c2d484
Reviewed-on: https://chromium-review.googlesource.com/1104017
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53775}
2018-06-18 07:59:39 +00:00
Junliang Yan
497b6746be [wasm] skip big-endian failing tests across all big-endian platforms
Bug: v8:6020
Change-Id: If121d2813e81e11773c42c36893b63ff98fc0247
Reviewed-on: https://chromium-review.googlesource.com/1101840
Reviewed-by: Aseem Garg <aseemgarg@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#53772}
2018-06-15 17:58:22 +00:00
Vasili Skurydzin
f0da6bc459 s390: Optimize branches by brxh/brxhg
Change-Id: Icb92a52112f5e709c3cdbc6f1a5555674633cb89
Reviewed-on: https://chromium-review.googlesource.com/1093554
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#53771}
2018-06-15 17:56:23 +00:00
Alexey Kozyatinskiy
4363a69335 [inspector] fixed location of top level function return
We should pass false as has_braces argument to create FunctionLiteral
for top level function.

R=dgozman@chromium.org,bmeurer@chromium.org
TBR=bmeurer@chromium.org

Bug: none
Change-Id: I397f31b562d32c71f3a12bfc9ceeed16c367aa80
Reviewed-on: https://chromium-review.googlesource.com/1098018
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53769}
2018-06-15 15:11:27 +00:00
Clemens Hammacher
b9401e42d1 [wasm] Create managed together with the module object
We currently create a managed object holding a shared reference to the
WasmModule, and pass this to the factory method for the
WasmModuleObject. Instead, we can just create it inside that factory
method, removing code duplication.

R=herhut@chromium.org

Change-Id: I3cea858ba445971dc8dbeb693061ef5684bc02da
Reviewed-on: https://chromium-review.googlesource.com/1102336
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Stephan Herhut <herhut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53763}
2018-06-15 12:45:26 +00:00
Georg Neis
9480117e41 [turbofan] Use the heap broker in JSContextSpecialization.
No longer access the heap directly, as policed by Disallow*
scopes in JSContextSpecialization::Reduce.

Bug: v8:7790
Change-Id: I40f1c500b04b96152421fd5de631747ba386bca1
Reviewed-on: https://chromium-review.googlesource.com/1101322
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53759}
2018-06-15 12:00:26 +00:00
Yang Guo
23b8d2fd40 Revert "[debugger] Rewrite the ScopeIterator/DebugEvaluate to use Scope rather than ScopeInfo for inner scopes."
This reverts commit 9e27d4735f.

Reason for revert: Layout Test failures: https://ci.chromium.org/buildbot/client.v8.fyi/V8-Blink%20Linux%2064/24123

Original change's description:
> [debugger] Rewrite the ScopeIterator/DebugEvaluate to use Scope rather than ScopeInfo for inner scopes.
> 
> This CL also bottlenecks all current scope handling in the ScopeIterator, and cleans up frame handling in debug-frames and the deoptimizer.
> 
> Change-Id: I061922a356ce17794262f8d77d5d7c824558fc50
> Reviewed-on: https://chromium-review.googlesource.com/1095094
> Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53741}

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

Change-Id: I892856056258e3c68b36409b8b2d69e7686fc385
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/1102377
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53756}
2018-06-15 11:07:46 +00:00
Toon Verwaest
4936efb0c6 Reland "[debugger] Rewrite the ScopeIterator/DebugEvaluate to use Scope rather than ScopeInfo for inner scopes."
This is a reland of 9e27d4735f

Original change's description:
> [debugger] Rewrite the ScopeIterator/DebugEvaluate to use Scope rather than ScopeInfo for inner scopes.
> 
> This CL also bottlenecks all current scope handling in the ScopeIterator, and cleans up frame handling in debug-frames and the deoptimizer.
> 
> Change-Id: I061922a356ce17794262f8d77d5d7c824558fc50
> Reviewed-on: https://chromium-review.googlesource.com/1095094
> Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53741}

Change-Id: I05262fef66d852876b9bb2869339053629c9b51d
Reviewed-on: https://chromium-review.googlesource.com/1102297
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53751}
2018-06-15 09:51:45 +00:00
Clemens Hammacher
9f7abe66dc Revert "[debugger] Rewrite the ScopeIterator/DebugEvaluate to use Scope rather than ScopeInfo for inner scopes."
This reverts commit 9e27d4735f.

Reason for revert: Fails MSan (use of uninitialized value): https://ci.chromium.org/buildbot/client.v8/V8%20Linux%20-%20arm64%20-%20sim%20-%20MSAN/21562

Original change's description:
> [debugger] Rewrite the ScopeIterator/DebugEvaluate to use Scope rather than ScopeInfo for inner scopes.
> 
> This CL also bottlenecks all current scope handling in the ScopeIterator, and cleans up frame handling in debug-frames and the deoptimizer.
> 
> Change-Id: I061922a356ce17794262f8d77d5d7c824558fc50
> Reviewed-on: https://chromium-review.googlesource.com/1095094
> Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53741}

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

Change-Id: Ief87c1e79fa2ec40f52fd747ec4ebbacf0da798b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/1101377
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53743}
2018-06-14 17:34:09 +00:00
Toon Verwaest
9e27d4735f [debugger] Rewrite the ScopeIterator/DebugEvaluate to use Scope rather than ScopeInfo for inner scopes.
This CL also bottlenecks all current scope handling in the ScopeIterator, and cleans up frame handling in debug-frames and the deoptimizer.

Change-Id: I061922a356ce17794262f8d77d5d7c824558fc50
Reviewed-on: https://chromium-review.googlesource.com/1095094
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53741}
2018-06-14 16:28:53 +00:00
Clemens Hammacher
8e2e125791 Reland "Introduce StdoutStream which prints to Android log or stdout"
This is a reland of 0909dbe3d6.
Added missing V8_EXPORT_PRIVATE to AndroidLogStream.

TBR=mstarzinger@chromium.org

Original change's description:
> Introduce StdoutStream which prints to Android log or stdout
>
> The often used construct {OFStream(stdout)} does not work on Android.
> This CL introduces an {StdoutStream} which behaves exactly like
> {OFStream(stdout)} on non-android platforms, and redirects to the
> Android log on appropriate systems and configurations.
>
> R=mstarzinger@chromium.org
>
> Bug: v8:7820
> Change-Id: Ia682fdf6d064e37c605c19b032f5a10b96ac825b
> Reviewed-on: https://chromium-review.googlesource.com/1088911
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53692}

Bug: v8:7820
Change-Id: I8164bad78a401dbe4246c9ffcacd050fe511ed58
Reviewed-on: https://chromium-review.googlesource.com/1100636
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53733}
2018-06-14 13:29:01 +00:00
Leszek Swirski
d5b02187cb [GetIsolate] Remove GetIsolate from src/ast/*
Bug: v8:7786
Change-Id: Id6a2e38e99fdaeaa619c7ec3e18865c3f64a2a47
Reviewed-on: https://chromium-review.googlesource.com/1095112
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53731}
2018-06-14 11:14:20 +00:00
Michael Achenbach
d2e1620cd4 Revert "Introduce StdoutStream which prints to Android log or stdout"
This reverts commit 0909dbe3d6.

Reason for revert: Blocks roll:
https://chromium-review.googlesource.com/c/chromium/src/+/1099143

Original change's description:
> Introduce StdoutStream which prints to Android log or stdout
> 
> The often used construct {OFStream(stdout)} does not work on Android.
> This CL introduces an {StdoutStream} which behaves exactly like
> {OFStream(stdout)} on non-android platforms, and redirects to the
> Android log on appropriate systems and configurations.
> 
> R=​mstarzinger@chromium.org
> 
> Bug: v8:7820
> Change-Id: Ia682fdf6d064e37c605c19b032f5a10b96ac825b
> Reviewed-on: https://chromium-review.googlesource.com/1088911
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53692}

TBR=mstarzinger@chromium.org,jarin@chromium.org,jgruber@chromium.org,clemensh@chromium.org,bmeurer@chromium.org

Change-Id: Iadadd9a0df10dca0fad647138a83db50148e864d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7820
Reviewed-on: https://chromium-review.googlesource.com/1100635
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53725}
2018-06-14 06:23:17 +00:00
Aseem Garg
0091973e82 Reland "[wasm] Add simd mem and shift ops to interpreter"
This is a reland of 2338a2fd63

Original change's description:
> [wasm] Add simd mem and shift ops to interpreter
>
> R=clemensh@chromium.org
> BUG=v8:6020
>
> Change-Id: I5d95e4c23240ae4e174d896d31e1b9b1d89d9418
> Reviewed-on: https://chromium-review.googlesource.com/1096493
> Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53717}

Bug: v8:6020
Change-Id: I38a73f5e389617a05a12e0a9477544c4e3aa2883
Reviewed-on: https://chromium-review.googlesource.com/1099895
Reviewed-by: Ben Smith <binji@chromium.org>
Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53722}
2018-06-13 22:03:46 +00:00
Sathya Gunasekaran
76cc2ad07e Revert "[wasm] Add simd mem and shift ops to interpreter"
This reverts commit 2338a2fd63.

Reason for revert: broke mips

see https://ci.chromium.org/buildbot/client.v8.ports/V8%20Mips%20-%20builder/17573

Original change's description:
> [wasm] Add simd mem and shift ops to interpreter
> 
> R=​clemensh@chromium.org
> BUG=v8:6020
> 
> Change-Id: I5d95e4c23240ae4e174d896d31e1b9b1d89d9418
> Reviewed-on: https://chromium-review.googlesource.com/1096493
> Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53717}

TBR=aseemgarg@chromium.org,clemensh@chromium.org

Change-Id: I8e5b2e9a9c1c09d035335ba6681bbe3e1ce5abfb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6020
Reviewed-on: https://chromium-review.googlesource.com/1099776
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53718}
2018-06-13 21:10:18 +00:00
Aseem Garg
2338a2fd63 [wasm] Add simd mem and shift ops to interpreter
R=clemensh@chromium.org
BUG=v8:6020

Change-Id: I5d95e4c23240ae4e174d896d31e1b9b1d89d9418
Reviewed-on: https://chromium-review.googlesource.com/1096493
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53717}
2018-06-13 19:42:03 +00:00
Camillo Bruni
9718d079e9 [CSA] Fix Array.prototype.reduceRight CAS_ASSERT
- Add typed IsHeapNumberPositive, IsNumberNonNegativeSafeInteger, IsInteger,
  IsSafeInteger and IsHeapNumberUint32 helpers on CodeStubAssembler
- Type NumberIsInteger and NumberIsSafeInteger builtin

Bug: chromium:847204, v8:6949
Change-Id: I27d3ab79bd17312c223209ed0b221c174024126e
Reviewed-on: https://chromium-review.googlesource.com/1087961
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53707}
2018-06-13 15:38:01 +00:00
Dominik Inführ
2aa166a633 [heap] Clear ephemeron worklist when tearing down
Bug: chromium:852308, chromium:844008
Change-Id: I99551c1f75d5916edfb780998963140b8282a570
Reviewed-on: https://chromium-review.googlesource.com/1099065
Commit-Queue: Dominik Inführ <dinfuehr@google.com>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53706}
2018-06-13 15:28:21 +00:00
Clemens Hammacher
b9b4b8798f [wasm] Merge {WasmSharedModuleData} with {WasmModuleObject}
The {WasmSharedModuleData} struct was introduced to hold data common to
all wasm instances belonging to the same module. The idea was to keep
"internal state" separate from the JS-facing {WasmModuleObject}. Since
this objective has no real value, and we already store some internal
data on the {WasmModuleObject}, this CL merges these two objects.

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

Bug: v8:7754
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I04f6d07bf5d812bc4717af26f0f64231345861f9
Reviewed-on: https://chromium-review.googlesource.com/1097491
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53698}
2018-06-13 13:10:19 +00:00
Clemens Hammacher
0909dbe3d6 Introduce StdoutStream which prints to Android log or stdout
The often used construct {OFStream(stdout)} does not work on Android.
This CL introduces an {StdoutStream} which behaves exactly like
{OFStream(stdout)} on non-android platforms, and redirects to the
Android log on appropriate systems and configurations.

R=mstarzinger@chromium.org

Bug: v8:7820
Change-Id: Ia682fdf6d064e37c605c19b032f5a10b96ac825b
Reviewed-on: https://chromium-review.googlesource.com/1088911
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53692}
2018-06-13 09:57:29 +00:00
Ben L. Titzer
d775c9561f [wasm] Remove the isolate_ field from WasmCodeManager
The isolate is mainly used for accounting purposes. As such, it
doesn't need a field in the WasmCodeManager, and cannot have one
if it is to be made isolate independent. Instead, pass the isolate
explicitly in the appropriate cases.

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

Change-Id: I539c2b33692e57605a280530bd704ef25269ad0f
Reviewed-on: https://chromium-review.googlesource.com/1073412
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53676}
2018-06-12 16:46:06 +00:00
Anna Henningsen
4da05e97ad [SAB] Fix flake in Atomics.wait
As specified in https://tc39.github.io/ecma262/#sec-atomics-wait, the
critical section must occur before the load and comparison.

This slightly changes the `AtomicsWaitCallback` API, but in a
direction that arguably makes it more consistent.

As a drive-by fix, reset `node->waiting_` in case there
was an exception from the first callback.

Refs: https://chromium-review.googlesource.com/c/v8/v8/+/1095814
Bug: v8:7836
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I577cdf76cedfe39bc61f783203b543c7c68fc238
Reviewed-on: https://chromium-review.googlesource.com/1096236
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Ben Smith <binji@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53673}
2018-06-12 15:46:37 +00:00
Sigurd Schneider
a062708467 [turbofan] Change handling of empty basic blocks
This CL inserts NOP instructions a little bit earlier into empty
blocks; this ensures that instructions keep their initial position.

Bug: v8:7327
Change-Id: Idee5269f4fd7fc15c44bda83a2be74e8cff62df8
Reviewed-on: https://chromium-review.googlesource.com/1097078
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53672}
2018-06-12 15:10:26 +00:00
jgruber
686c7769ef Skip further serializer tests for crbug/v8/7718
These tests are also affected by duplicate builtin copies (on- and
off-heap).

TBR=yangguo@chromium.org

Bug: v8:6666, v8:7718
Change-Id: I8adfe8b8b63fb5f539cdff5e709e9358a47dfc7e
Reviewed-on: https://chromium-review.googlesource.com/1097088
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53668}
2018-06-12 13:30:37 +00:00
Daniel Clifford
bbbfd81cfc [torque] Turn implicit converts/unsafe_casts into generics
In the process:
  - Add strict ordering of Types so that name mangling is consistent
    and build time. Previously, the UnionType stored the union's
    types in a std::set<const Type*>, which did not have a consistent
    ordering of the types in the set.
  - Add a int31 type to enable consistency and correctness of
    handling of 'constexpr int31' values on the C++ side.
  - By removing the "implicit" keyword for operators, there is now
    one less difference between operators and calls, another
    incremental step in unifying operators and calls.
  - Enable external (i.e. C++-defined) generic specializations
  - Add CSA support for checking double ElementsKinds, including
    tests.
  - Clean up some constexpr/non-constexpr handling of ElementsKinds.

Bug: v8:7793
Change-Id: I27699aba70b98ebf5466e5b62b045d7b1dad62c8
Reviewed-on: https://chromium-review.googlesource.com/1091155
Commit-Queue: Daniel Clifford <danno@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53664}
2018-06-12 11:54:57 +00:00
jing.bao
d4f7d87bdf [wasm] Improve unpacking operations in simd lowering
Add explicit lowered type.
Distinguish operations for low/high.
Shl + Shr is equal to Mask.
Enable WASM_SIMD_COMPILED_AND_LOWERED_TEST for unpacking.

Change-Id: I0492318deb7c0ea0f4b30975ab107eedd446314a
Reviewed-on: https://chromium-review.googlesource.com/1079989
Reviewed-by: Aseem Garg <aseemgarg@chromium.org>
Commit-Queue: Jing Bao <jing.bao@intel.com>
Cr-Commit-Position: refs/heads/master@{#53654}
2018-06-12 03:33:12 +00:00
Sathya Gunasekaran
294dbf49bc [intl] Add GetOption
This patch ports over the spec defined operation `GetOption` from
JavaScript to C++:
https://tc39.github.io/ecma402/#sec-getoption

The JS implementation will be deleted once all it's
users are migrated.

Refactors LocaleConstructor to use this method which fixes some test262
tests. The test262 test status file is updated to reflect this.

Bug: v8:5751, v8:7684
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Ief5eae9b69dcea50062825163ca7658ed20bd0cf
Reviewed-on: https://chromium-review.googlesource.com/1094201
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53652}
2018-06-11 22:19:22 +00:00
Bill Budge
bcb4fbd4ad [wasm simd] Handle more shuffles
- Shuffle canonicalization improved to reverse operands to match
  more architectural shuffles.
- Handles shuffles where the order of operands is reversed.
- Adds tests for non-canonical shuffles, and for swizzles.
- Improves TryMatchConcat method.
- Substantially rewrites shuffles on ia32 to better handle swizzles
  and fix bugs on reversed shuffles where source registers are
  overwritten.
- Adds Palignr macro-assembler instructions for ia32.

Bug: v8:6020
Change-Id: I8e43a1e7650057c66690af1504b67509a1437d75
Reviewed-on: https://chromium-review.googlesource.com/1070934
Commit-Queue: Bill Budge <bbudge@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Martyn Capewell <martyn.capewell@arm.com>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53648}
2018-06-11 18:40:24 +00:00
Hannes Payer
43886bc305 [heap] Cleanup heap creation a bit.
Change-Id: I7f2d0ba0e544267a9f97838e2904d8dfeecd9a99
Reviewed-on: https://chromium-review.googlesource.com/1095615
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53647}
2018-06-11 18:21:36 +00:00
Leszek Swirski
d6c49a7251 [GetIsolate] Remove GetIsolate in simple cases
Whenever an Isolate is available on a variable, field, or method
parameter, use that instead of GetIsolate(). Also convert simple
cases of the one-argument handle constructor to either use an
available Isolate, or use GetIsolate() if their first parameter
is a variable.

Bug: v8:7786
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I52805905a9ca8729615ead78859f43d5e8f605f1
Reviewed-on: https://chromium-review.googlesource.com/1092853
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53629}
2018-06-11 11:02:59 +00:00
Matheus Marchini
b20faffb07 [log] fix ExistingCodeLogger behavior on edge case
ExistingCodeLogger was behaving incorrectly when the CodeEventHandler
API was used in combination with --interpreted-frames-native-stack.
Instead of collecting copied trampolines as InterpretedFunction:functionName,
they were being collected as Builtin:IntepreterEntryTrampolines.
This patch adds special handling for copied trampolines when
using ExistingCodeLogger.

R=yangguo@google.com

Change-Id: I3ee4be03800122d28d53b51b20c60dcf6263e4c1
Reviewed-on: https://chromium-review.googlesource.com/1087813
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53624}
2018-06-11 08:32:13 +00:00
jgruber
41b2d783e5 [builtins] Disallow internal references in embedded builtins
Internal references create absolute pointers within the code and must
therefore be disallowed for embedded builtins to remain
position-independent.

Drive-by: remove related cctest. This test used to be relevant before
embedding was fully implemented, but by now it is useless and rather
misleading since it gives a false sense of safety.

Bug: v8:6666
Change-Id: I57a62274b57c3ef1303d5114c68e2a9b1f92bda4
Reviewed-on: https://chromium-review.googlesource.com/1092732
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53623}
2018-06-11 07:41:58 +00:00
Sathya Gunasekaran
da02f095d3 [hash-table] Introduce OrderedHashTableHandler
OrderedHashTableHandler (to be renamed to OrderedHashTable) is the
interface that abstracts away the two different ordered hash tables.

All operations on the two ordered hash tables must be performed
through this new interface so that we can seamlessly migrate from one
table to another behind the scenes.

Bug: v8:6443, v8:7569
Change-Id: Ifc0a38974605b63e0a2a36b4aafb8dc68a081f4a
Reviewed-on: https://chromium-review.googlesource.com/1059865
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53622}
2018-06-11 00:22:12 +00:00
Igor Sheludko
a17041d022 [test] Make IsValidPositiveSmi test independent of Smi representation.
Change-Id: I308c05feace7b1bb69d12a35243340724a96a49b
Reviewed-on: https://chromium-review.googlesource.com/1090491
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53605}
2018-06-08 09:15:23 +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
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
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
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
Anna Henningsen
555c811c0d [api] Switch from SetBuildEmbedderGraphCallback to AddBuildEmbedderGraphCallback
`SetBuildEmbedderGraphCallback`, unlike `SetWrapperClassInfoProvider`,
assumes a monolithic embedder that can provide all necessary information.
That is not the case for e.g. Node.js, which can e.g. provide multiple Node.js
instances per V8 Isolate, as well as native addons that may allocate resources
on their own.

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Ib53dfde82416dd69934b08623e27d674a483ac2d
Reviewed-on: https://chromium-review.googlesource.com/1082441
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53545}
2018-06-06 09:46:57 +00:00
Clemens Hammacher
423b8a2011 [ia32] Add disassembler support for 'pause'
R=mstarzinger@chromium.org

Bug: chromium:849656
Change-Id: I34effca4770f732216b93b5e4e8c28383f2f9963
Reviewed-on: https://chromium-review.googlesource.com/1087271
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53534}
2018-06-05 19:12:14 +00:00
Alexey Kozyatinskiy
0b3e8e184c [inspector] postpone API interrupts during creation of injected script
DevTools may process another protocol message during API interrupt this
API may lead to createInjectedScript reentrance and will fail.
Let's postpone interrupts.

Bug: chromium:846099
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ia06e034a6287087e4674559d8911d2f4a0b1b459
Reviewed-on: https://chromium-review.googlesource.com/1086372
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53531}
2018-06-05 18:04:44 +00:00
Alexey Kozyatinskiy
8205786a4b [inspector] decouple debugger delegate and async stacks delegate
Currently we enable instrumentation if debugger is active. With this
approach we can not:
- capture async stack when debugger is disabled,
- avoid async instrumentation overhead when debugger is enabled and
  async stacks are disabled.

R=dgozman@chromium.org,yangguo@chromium.org

Bug: none
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I19400c4c4e12b6c9b5a980fb6bd3293bac6e6a64
Reviewed-on: https://chromium-review.googlesource.com/1081494
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53530}
2018-06-05 17:39:22 +00:00
Mathias Bynens
0a237ffe5b Remove always-true --harmony-optional-catch-binding runtime flag
It was shipped in Chrome 66.

Bug: v8:6889
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I6333ee20ab913b281674b911d525d2851f4694c9
Reviewed-on: https://chromium-review.googlesource.com/1086928
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53527}
2018-06-05 16:24:20 +00:00
Tobias Tebbi
a938ab5685 [torque] add hex literals
Bug: v8:7793
Change-Id: I69e27cb1e8477ca0d64ad7a96ab256cae96339f4
Reviewed-on: https://chromium-review.googlesource.com/1086801
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53521}
2018-06-05 11:48:53 +00:00
Igor Sheludko
d123f30b6d [ptr-compr] Support 31-bit Smis in lower half-word on 64-bit architectures.
This CL introduces a new gn argument: v8_enable_pointer_compression which is
false by default. All the changes done in this CL are made under this flag.

Upper half-word of a Smi word must be properly sign-extended according to the
sign of the lower-half containing the actual Smi value.

Bug: v8:7703
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I2b52ab49cd18c7c613130705de445fef44c30ac5
Reviewed-on: https://chromium-review.googlesource.com/1061175
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53519}
2018-06-05 11:37:35 +00:00
Dan Elphick
4ce2adc326 [explicit isolates] Eliminate GetIsolate from transitions.cc
Removes all explicit calls to GetIsolate() in transitions.cc by passing
it through calling functions and implicit calls via the single argument
Handle constructor and handle function.

Unfortunately in the interests of making these changes vaguely
manageable, I've also pushed some new GetIsolates down into
objects-debug.cc, objects-printer.cc and objects.cc.

Bug: v8:7786
Change-Id: I1f98530dec6c004e17dc3336f3cef09fbb446bae
Reviewed-on: https://chromium-review.googlesource.com/1085451
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53518}
2018-06-05 11:00:43 +00:00
Anna Henningsen
5eaa03b2d3 [api] Add AtomicsWaitCallback for diagnostics
Add an inspection callback for embedders that allows tracking
of `Atomics.wait()` calls in order to enable diagnostic tooling
around it, as well as providing a way to break out of an
`Atomics.wait()` call without having to fully terminate execution.

The motivation here is that this allows embedders to perform
somewhat customizable deadlock detection.

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Ib6346747aa3cbffb07cf6abd12645e2d98584f0f
Reviewed-on: https://chromium-review.googlesource.com/1080788
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Ben Smith <binji@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53517}
2018-06-05 10:11:13 +00:00
Mythri
9461aa5619 [Interpreter] Enable sharing of load / store named property feedback
This cl enables sharing of feedback slots for load / sotre named property.
This is a follow up cl of
https://chromium-review.googlesource.com/c/v8/v8/+/966302 that introduces
this feature.

Bug: v8:7530
Change-Id: I0c056b7a3608117db2fc99ebcd6836dfeed471d8
Reviewed-on: https://chromium-review.googlesource.com/1065737
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53515}
2018-06-05 09:21:59 +00:00
Dan Elphick
6cddfd50db [parsing] Remove most GetIsolate calls
Removes most[1] explicit calls to GetIsolate() in parsing/ by passing
it through calling function functions and implicit calls via the single
argument Handle constructor and handle function.

[1] One remains in preparsed-scope-data.cc:
data_->GetIsolate()->PushStackTraceAndDie()

Bug: v8:7786
Change-Id: I4c445995a73c19bdf4649b65487b7443d56ddd2a
Reviewed-on: https://chromium-review.googlesource.com/1085057
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53513}
2018-06-05 08:54:58 +00:00
jgruber
8e8638c319 Reland "[csa] Ensure the requested allocation size fits in a Smi"
This is a reland of 515cc07d28

Original change's description:
> [csa] Ensure the requested allocation size fits in a Smi
>
> In CSA::AllocateRaw, ensure that the given allocation size fits into a
> Smi.
>
> Bug: chromium:848672
> Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
> Change-Id: I4e74791296163188b1ca77cae8226a9833fba8ef
> Reviewed-on: https://chromium-review.googlesource.com/1084930
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53495}

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

Bug: chromium:848672
Change-Id: I135868390784a0ee95ff42224dd00f66f3bf2d80
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/1086828
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53512}
2018-06-05 08:50:38 +00:00
Simon Zünd
aff8034547 Reland "[array] Implement Array.p.sort in Torque"
This is a reland of df1676e616

Original change's description:
> [array] Implement Array.p.sort in Torque
>
> This CL implements a generic baseline version and 3 fastpaths, for
> various elements kinds, of Array.p.sort in Torque. Details can be found
> in the Design Doc: https://goo.gl/Ge321G.
>
> Performance impact on micro benchmarks depends on the element kind
> and whether the user provides a comparison function.
> For HoleySmi/HoleyElement we have a speedup between 1.5-1.8 across
> the board. For Dictionary we are slower in all micro benchmarks (0.7).
> For PackedSmi it depends on the call site and whether or not a
> comparison function is used.
>
> Detailed numbers: https://goo.gl/mTyPSb
>
> Bug: v8:7382
> Change-Id: I50acabd2032af0bc01d36b0de0f555d66be56a7e
> Reviewed-on: https://chromium-review.googlesource.com/1061523
> Commit-Queue: Simon Zünd <szuend@google.com>
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53481}

Bug: v8:7382,v8:7806,chromium:849293
Change-Id: I176cb660d92eb174bd91685cb0a39f50c4cbaa69
Reviewed-on: https://chromium-review.googlesource.com/1086827
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@{#53511}
2018-06-05 08:33:18 +00:00
Mathias Bynens
ea4a6c7f35 Remove always-true --harmony-regexp-named-captures runtime flag
It was shipped in Chrome 64.

Bug: v8:5437
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I6d9ac762b2eafdf4e64fd1dd10dbce553a8455f9
Reviewed-on: https://chromium-review.googlesource.com/1086790
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53510}
2018-06-05 08:27:08 +00:00
Ulan Degenbaev
aaa700bda4 Revert "[heap] Remove independent handles"
This reverts 667555c6b8.

This is a short-term fix for NodeJS regression caused by Scavenger
not collecting weak handles that are marked as independent.

Bug: chromium:847863, chromium:780749
Change-Id: Ia1c02e042d0e593c6f5badb82c4ef20b923d3806
Reviewed-on: https://chromium-review.googlesource.com/1082442
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53502}
2018-06-04 19:13:20 +00:00
Deepti Gandluri
66f3e8f64d [wasm] Enable sign extension opcodes by default
Change-Id: Id6f87f55541eba44a22be2721f9182095ca69359
Reviewed-on: https://chromium-review.googlesource.com/1085508
Reviewed-by: Ben Smith <binji@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53501}
2018-06-04 18:36:44 +00:00
Tom Anderson
c2455500f4 Remove manual references to exe_and_shlib_deps
After [1], a manual dependency on exe_and_shlib_deps is no longer necessary
since it's automatically added.  This CL removes all remaining manual references
to exe_and_shlib_deps.

[1] d7ed1f0a9c

BUG=chromium:845700
R=machenbach

Change-Id: I17da573b7b6509a690caf8be6ae6afc180105f07
Reviewed-on: https://chromium-review.googlesource.com/1082913
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53500}
2018-06-04 18:35:43 +00:00
Deepti Gandluri
137ff44038 Revert "[csa] Ensure the requested allocation size fits in a Smi"
This reverts commit 515cc07d28.

Reason for revert: Tree closed on mkgrokdump failures
https://logs.chromium.org/v/?s=chromium%2Fbb%2Fclient.v8%2FV8_Mac64%2F22277%2F%2B%2Frecipes%2Fsteps%2FCheck%2F0%2Flogs%2Fmkgrokdump%2F0
https://logs.chromium.org/v/?s=chromium%2Fbb%2Fclient.v8%2FV8_Linux64%2F24882%2F%2B%2Frecipes%2Fsteps%2FCheck_-_noavx%2F0%2Flogs%2Fmkgrokdump%2F0
https://logs.chromium.org/v/?s=chromium%2Fbb%2Fclient.v8%2FV8_Win64%2F24413%2F%2B%2Frecipes%2Fsteps%2FCheck%2F0%2Flogs%2Fmkgrokdump%2F0

Original change's description:
> [csa] Ensure the requested allocation size fits in a Smi
> 
> In CSA::AllocateRaw, ensure that the given allocation size fits into a
> Smi.
> 
> Bug: chromium:848672
> Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
> Change-Id: I4e74791296163188b1ca77cae8226a9833fba8ef
> Reviewed-on: https://chromium-review.googlesource.com/1084930
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53495}

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

Change-Id: I4d1019c03b393c1a59e5eca558d9cd26ce63e17a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:848672
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/1085647
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53496}
2018-06-04 18:30:50 +00:00
jgruber
515cc07d28 [csa] Ensure the requested allocation size fits in a Smi
In CSA::AllocateRaw, ensure that the given allocation size fits into a
Smi.

Bug: chromium:848672
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I4e74791296163188b1ca77cae8226a9833fba8ef
Reviewed-on: https://chromium-review.googlesource.com/1084930
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53495}
2018-06-04 16:26:57 +00:00
Jakob Gruber
3348ed0b5e Revert "[array] Implement Array.p.sort in Torque"
This reverts commit df1676e616.

Reason for revert: https://crbug.com/v8/7382#c26

Original change's description:
> [array] Implement Array.p.sort in Torque
> 
> This CL implements a generic baseline version and 3 fastpaths, for
> various elements kinds, of Array.p.sort in Torque. Details can be found
> in the Design Doc: https://goo.gl/Ge321G.
> 
> Performance impact on micro benchmarks depends on the element kind
> and whether the user provides a comparison function.
> For HoleySmi/HoleyElement we have a speedup between 1.5-1.8 across
> the board. For Dictionary we are slower in all micro benchmarks (0.7).
> For PackedSmi it depends on the call site and whether or not a
> comparison function is used.
> 
> Detailed numbers: https://goo.gl/mTyPSb
> 
> Bug: v8:7382
> Change-Id: I50acabd2032af0bc01d36b0de0f555d66be56a7e
> Reviewed-on: https://chromium-review.googlesource.com/1061523
> Commit-Queue: Simon Zünd <szuend@google.com>
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53481}

TBR=cbruni@chromium.org,jgruber@chromium.org,szuend@google.com

Change-Id: I4c1b32a434d49caba67c80bccb068390607f90a2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7382
Reviewed-on: https://chromium-review.googlesource.com/1085407
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53494}
2018-06-04 15:26:18 +00:00
Michael Starzinger
b1583b6cd3 [wasm] Load {CEntryStub} from the instance object.
This avoids embedding the {CEntryStub} into generated {WasmCode} and
instead loads it from the instance object. It is another step towards
making the generated code independent of the Isolate.

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

Change-Id: Ic6ab7602a77fc11e6ec4a03e1bdba647d54df5e3
Reviewed-on: https://chromium-review.googlesource.com/1084841
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53491}
2018-06-04 14:42:47 +00:00
Clemens Hammacher
18d816e96e [wasm] Clean up fields and methods in NativeModule
1) The code table never grows, so store it in a heap-allocated byte
   array instead of an std::vector.
2) Rename {functions_count} to {num_functions} for consistency with
   {num_imported_functions} and occurences in other data structures.

R=mstarzinger@chromium.org

Bug: v8:7754
Change-Id: Id9d66545ed7aa675d663dad5936a9ef6d44ace7d
Reviewed-on: https://chromium-review.googlesource.com/1066014
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53488}
2018-06-04 12:39:27 +00:00
Michael Starzinger
c96ac82c50 [wasm] Make stack check independent of the Isolate.
This makes stack checks in WasmCode independent of the underlying
Isolate by loading the limit address from the WasmInstanceObject instead
of embedding it into the instruction stream. It hence removes the last
use of the Isolate field from WasmGraphBuilder.

Additionally this introduces the notion of a "runtime stub" which
represents stub code global to the NativeModule that can be directly
called from each WasmCode in the same module. These stubs can act as
trampolines via which Isolate-independent WasmCode can enter other V8
builtins or runtime functions that remain Isolate-dependent. They will
eventually replace the current "trampoline" in a NativeModule.

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

Change-Id: Ie1f5582ee656b1ab7716ea06316d6e21a0268e74
Reviewed-on: https://chromium-review.googlesource.com/1078732
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53487}
2018-06-04 11:24:17 +00:00
Sreten Kovacevic
51ac26cf79 [instruction-scheduler][mips] Implement instruction-scheduler on mips
Also, remove cctest/test-instruction-scheduler/DeoptInMiddleOfBasicBlock
from skip-list.

Change-Id: I392cab0c96b7adc5e9c94eacb60c97e09f0ec16a
Reviewed-on: https://chromium-review.googlesource.com/1084591
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#53485}
2018-06-04 10:12:37 +00:00
Marja Hölttä
02ba28b669 [reland] [in-place weak refs] Replace WeakCells in DescriptorArray.
BUG=v8:7308
TBR=ishell@chromium.org, tebbi@chromium.org

Change-Id: I0f7de13967d3e109b40d7158ee29775754c3d108
Reviewed-on: https://chromium-review.googlesource.com/1082475
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53483}
2018-06-04 08:59:17 +00:00
Marja Hölttä
80aaa87981 [in-place weak refs] Make the WeakArrayList API more generic.
(Pre-work for adding special-purpose data structures as subclasses.)

BUG=v8:7308

Change-Id: I82a5a96e18c3321e9d5b783642516ff869b45f27
Reviewed-on: https://chromium-review.googlesource.com/1084474
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53482}
2018-06-04 08:45:57 +00:00
Simon Zünd
df1676e616 [array] Implement Array.p.sort in Torque
This CL implements a generic baseline version and 3 fastpaths, for
various elements kinds, of Array.p.sort in Torque. Details can be found
in the Design Doc: https://goo.gl/Ge321G.

Performance impact on micro benchmarks depends on the element kind
and whether the user provides a comparison function.
For HoleySmi/HoleyElement we have a speedup between 1.5-1.8 across
the board. For Dictionary we are slower in all micro benchmarks (0.7).
For PackedSmi it depends on the call site and whether or not a
comparison function is used.

Detailed numbers: https://goo.gl/mTyPSb

Bug: v8:7382
Change-Id: I50acabd2032af0bc01d36b0de0f555d66be56a7e
Reviewed-on: https://chromium-review.googlesource.com/1061523
Commit-Queue: Simon Zünd <szuend@google.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53481}
2018-06-04 08:40:27 +00:00
Alexey Kozyatinskiy
e404670696 [debug] removed most debugger js
Removed most of mirrors.js and debug.js.
Further steps:
- migrate liveedit.js to native,
- remove debugger context.

R=yangguo@chromium.org
TBR=leszeks@chromium.org

Bug: v8:5530
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I291ef20ef3c63a424d32e3e0c9d0962a6ca382d1
Reviewed-on: https://chromium-review.googlesource.com/1081176
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53480}
2018-06-03 06:02:59 +00:00
Deepti Gandluri
785bd43b7e [wasm] Enable sign extension operations in the interpreter
Change-Id: I204a021ffc8b120ffe232e3f5db924e54c6d980e
Reviewed-on: https://chromium-review.googlesource.com/1083337
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53478}
2018-06-01 22:12:45 +00:00
Aseem Garg
dc6819ec56 [wasm] Add simd replaceLane ops to wasm interpreter
Also enables tests for globals and mixed type use

R=gdeepti@chromium.org,bbudge@chromium.org,clemensh@chromium.org,titzer@chromium.org
BUG=v8:6020

Change-Id: I828f1628a1c27d9f07ba3a830600f81c5a404b2d
Reviewed-on: https://chromium-review.googlesource.com/1080340
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53477}
2018-06-01 21:50:35 +00:00
Marja Hölttä
d115b74502 Revert "[in-place weak refs] Replace WeakCells in DescriptorArray."
This reverts commit 0f23ceddfb.

Reason for revert: buildbot failures

Original change's description:
> [in-place weak refs] Replace WeakCells in DescriptorArray.
> 
> BUG=v8:7308
> 
> Change-Id: Ib0ad52916d6f5b65e7612981b467b491d832f505
> Reviewed-on: https://chromium-review.googlesource.com/1075053
> Commit-Queue: Marja Hölttä <marja@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53473}

TBR=ulan@chromium.org,marja@chromium.org,tebbi@chromium.org,ishell@chromium.org

Change-Id: I713ab10650f933a8218a61521868d6cd16cb821e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7308
Reviewed-on: https://chromium-review.googlesource.com/1082218
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53474}
2018-06-01 12:16:01 +00:00
Marja Hölttä
0f23ceddfb [in-place weak refs] Replace WeakCells in DescriptorArray.
BUG=v8:7308

Change-Id: Ib0ad52916d6f5b65e7612981b467b491d832f505
Reviewed-on: https://chromium-review.googlesource.com/1075053
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53473}
2018-06-01 11:02:59 +00:00
Bill Budge
1ae84e18d7 [wasm] Handle special case 32x4 and 16x8 shuffles on ia32
- Adds v/pshufhw, v/palignr instructions to assembler and
  macro-assembler.
- Uses better instruction sequences for 32x4 shuffles using half-
  shuffles and blends.
- Uses better instruction sequences for 16x8 shuffles.
- Uses better instruction sequences for concatenating 8x16 shuffles.

Change-Id: I3e6dca2937a2b167c754c47331c3a2f8ab9786db
Reviewed-on: https://chromium-review.googlesource.com/1066986
Commit-Queue: Bill Budge <bbudge@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53460}
2018-05-31 17:29:27 +00:00
Alexey Kozyatinskiy
d920bf37d6 [inspector] removed last usage of debugger context on inspector side
This is another step to remove a huge amount of legacy code from v8.

R=dgozman@chromium.org

Bug: v8:5530
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I634bda41c53a49dc4912291eb52f02847f56f4f3
Reviewed-on: https://chromium-review.googlesource.com/1080398
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53459}
2018-05-31 16:50:07 +00:00
Alexey Kozyatinskiy
c002394687 [inspector] speedup async instrumentation
We use name of the function at the moment of first appearance of given
function in stack trace. Any further name changes would be ignored.
It gives us around 20% speedup.

Perf analysis: https://bit.ly/2wp99vt

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

Bug: v8:7078
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I9f21f0bd9cd923e5abaeffb9209df0be2f49afff
Reviewed-on: https://chromium-review.googlesource.com/1050984
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53446}
2018-05-30 16:17:51 +00:00
Alexey Kozyatinskiy
b6c9086ca1 [inspector] reworked async stack instrumentation for async functions
New intstrumentation consists of:
- kAsyncFunctionSuspended when async function is suspended on await
  (called on each await),
- kAsyncFunctionFinished when async function is finished.

Old instrumentation was based on reusing async function promise.
Using this promise produces couple side effects:
- for any promise instrumentation we first need to check if it is
  special case for async function promise or not - it requires
  expensive reading from promise object.
- we capture stack for async functions even if it does not contain
  awaits.
- we do not properly cancel async task created for async function.

New intsrumntation resolved all these problems as well as provide
clear mapping between async task and generator which we can use later
to fetch scope information for async functions on pause.

R=dgozman@chromium.org,yangguo@chromium.org

Bug: v8:7078
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ifdcec947d91e6e3d4d5f9029bc080a19b8e23d41
Reviewed-on: https://chromium-review.googlesource.com/1043096
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53445}
2018-05-30 16:01:59 +00:00
Alexey Kozyatinskiy
6d87d95785 [inspector] use interrupt for pause only as last resort
With this CL we use interrupt for pause in two cases:
- when we process Debugger.pause on interruption,
- when we would like to break as soon as possible after OOM.
In all other cases, e.g. for async step into we use break
on function call by calling StepIn debugger action.

In mentioned cases we should not actually use interrupt as well:
- Debugger.pause in this case scheduled using interrupt and we
  may just break right now without requesting another interrupt,
  unfortunately blink side is not ready,
- we should use more reliable way to break right after near OOM
  callback, otherwise we can get this callback, increase limit,
  request break on next interrupt, before interrupt get another
  huge memory allocation and crash.

There are couple advantages:
- we get much better break locations for async stepping
  (see inspector tests expectations),
- we can remove DEBUG_BREAK interruption
  (it should speedup blackboxing with async tasks, see
  removed todo in debug.cc for details)
- it is required preparation step for async step out,
  (see https://chromium-review.googlesource.com/c/v8/v8/+/1054618)

Bug: v8:7753
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Iabd7627dbffa9a0eab1736064caf589d02591926
Reviewed-on: https://chromium-review.googlesource.com/1054155
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53439}
2018-05-30 13:54:37 +00:00
Ben L. Titzer
200dcb0557 Add size estimate to Managed<T>
Extends the functionality of Managed<T> to track an estimated size
for the external memory associated with an instance of Managed<T>
in order to allow for proper accounting in the garbage collector.

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

Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I8c49c6245eaf267c9264ebb93b43d5dfbf4671fd
Reviewed-on: https://chromium-review.googlesource.com/1076332
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53433}
2018-05-30 10:26:21 +00:00
jgruber
70b5fd3b6e [api] Add option to consume code cache on module compilation
This extends the ScriptCompiler::CompileModule function with a
CompileOptions argument. Accepted values are kNoCompileOptions (in
which case, behavior remains unmodified) and kConsumeCodeCache. If the
latter is passed, we try to fetch the given module from the code
cache.

Since it is possible to compile the same source code as both a script
and a module (and different code is generated for the two cases), a
new is_module bit is added to the SerializedCodeData header to
disambiguate between the two cases.

Bug: v8:7685
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I34b3642505577ed9ed0caedbee5876308c5a53ea
Reviewed-on: https://chromium-review.googlesource.com/1073327
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53432}
2018-05-30 07:32:48 +00:00
Simon Zünd
9ef4df2f30 [torque] Add unsafe cast to Torque.
This CL is a proposal to add "checked" casts (CAST in CSA) to the Torque language.
The CL adds the "unsafe_cast<>" operator that emits a "CAST".

Example:

let n: Number = ...;
...
if (TaggedIsSmi(n)) {
  let m: Smi = unsafe_cast<Smi>(n);
  ...
}

The cast wont incur a runtime overhead now.

R=tebbi@chromium.org

Change-Id: I9fca90d1d11e61617ba0270e5022fd66200e2195
Reviewed-on: https://chromium-review.googlesource.com/1070151
Commit-Queue: Simon Zünd <szuend@google.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53416}
2018-05-29 14:59:58 +00:00
Anna Henningsen
0fd549f885 [api] Allow escaping MaybeLocal handles on EscapableHandleScope
This adds a convenience overload for `EscapableHandleScope::Escape()`
which moves `MaybeLocal<T>`s into the outer scope, like a regular
`Local<T>`.

This basically moves the syntactic clutter of having to write
`maybe_local.FromMaybe(Local<Foo>())` instead of just `maybe_local`
to a central location.

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I1d87d75c6564b10e8ec34957bdd3eac46ffea917
Reviewed-on: https://chromium-review.googlesource.com/1056529
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53415}
2018-05-29 14:51:18 +00:00
Sebastien Marchand
df2419039c Fix a Jumbo breakage
see crbug.com/841460 , we recently hit some build issues when using
Goma + jumbo builds because of a conflict on the definition of CONST,
v8 defines it in globals.h and including windows.h also defines it. It
should be possible to fix this by adding a bunch of #undef CONST but it
seems a little bit hacky and might not always work (this could only fix
the problem temporary if the jumbo merge limit changes and cause some
include files to get included in a different order).

Renaming the v8 definition of CONST to kConst, this follows the
style guide guidelines: "there is no reason to change old code to use
constant-style names, unless the old names are actually causing a
compile-time problem"
(https://google.github.io/styleguide/cppguide.html#Enumerator_Names)

I also had to turn the PropertyConstness enum into an enum class to
avoid some conflicts (both PropertyConstness and VariableMode define
kConst).


Bug: chromium:841460
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I2b70b9095374e88a5ae364cc557b39f20a3ab60f
Reviewed-on: https://chromium-review.googlesource.com/1064197
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sébastien Marchand <sebmarchand@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53413}
2018-05-29 14:36:48 +00:00
Marja Hölttä
57cc9eaeb1 [in-place weak refs] Remove WeakFixedArray::Shrink.
WeakFixedArray::Shrink is fragile when not used properly (might invalidate GC
bookeeping (location of weak slots)).

BUG=v8:7308

Change-Id: Id84329e2a78907f5f0bfafae32fc2a71b77edbe7
Reviewed-on: https://chromium-review.googlesource.com/1076236
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53410}
2018-05-29 13:44:57 +00:00
jgruber
3e57261399 [builtins] Move remaining Array constructor stubs to builtins
Calls from embedded builtins to stubs are expensive due to the
indirection through the builtins constants table. This moves
all remaining Array constructor stubs to builtins.

Bug: v8:6666
Change-Id: I5989a7480697a506a1bae1929ddd2e3f1d655048
Reviewed-on: https://chromium-review.googlesource.com/1074759
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53399}
2018-05-29 09:48:21 +00:00
Michael Lippautz
307ebc35fa Revert "[infra] Add gc_stats variant to Linux64 debug bot"
This reverts commit e839484ebe.

Reason for revert: https://ci.chromium.org/buildbot/client.v8/V8%20Linux64%20-%20debug/22300

Original change's description:
> [infra] Add gc_stats variant to Linux64 debug bot
> 
> No-try: true
> Bug: v8:7760
> Change-Id: I2a4e91b58de4387a4bfa5b79681db25880af8954
> Reviewed-on: https://chromium-review.googlesource.com/1068643
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53394}

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

Change-Id: I7342341fb63742de4e51c0df65e8323f2a6dbd7a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7760
Reviewed-on: https://chromium-review.googlesource.com/1075927
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53395}
2018-05-29 06:13:07 +00:00
Michael Lippautz
e839484ebe [infra] Add gc_stats variant to Linux64 debug bot
No-try: true
Bug: v8:7760
Change-Id: I2a4e91b58de4387a4bfa5b79681db25880af8954
Reviewed-on: https://chromium-review.googlesource.com/1068643
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53394}
2018-05-29 05:46:26 +00:00
Igor Sheludko
7a45af140e [ptr-compr] Unify SmiTag/SmiUntag operations in hand-written assembly code.
The result of SmiUntag is a sign-extended word-size value.

Bug: v8:7703
Change-Id: I85dc87b541cab78286e47e2147c16c6a0939f509
Reviewed-on: https://chromium-review.googlesource.com/1073232
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53389}
2018-05-28 14:27:27 +00:00
Yang Guo
d08dca5434 Do not install extensions when creating snapshot.
Bug: v8:7760

Change-Id: Id7bfa18f3ac0b7d62e99d0d530ea0cb9427e198e
Reviewed-on: https://chromium-review.googlesource.com/1074693
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53384}
2018-05-28 10:53:07 +00:00
Yang Guo
aa6ce3ee61 [log][api] introduce public CodeEventListener API
Introduce a new public API called CodeEventListener to allow embedders
to better support external profilers and other diagnostic tools without
relying on unsupported methods like --perf-basic-prof.

Bug: v8:7694
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I063cc965394d59401358757634c9ea84c11517e9
Co-authored-by: Daniel Beckert <daniel@sthima.com.br>
Reviewed-on: https://chromium-review.googlesource.com/1028770
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53382}
2018-05-28 09:27:24 +00:00
Michael Starzinger
7633479c1c [wasm] Remove obsolete {RelocInfo::WASM_GLOBAL_HANDLE}.
R=titzer@chromium.org

Change-Id: I238835a63403e3688f271fc04f4a80c4b3c767c0
Reviewed-on: https://chromium-review.googlesource.com/1074656
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53381}
2018-05-28 09:07:44 +00:00
Jaroslav Sevcik
cb44d296a4 [turbofan] Remove unused Type::Of.
Bug: v8:7790
Change-Id: I9ca667109b17c5787aca8499dc379238cd43e5cb
Reviewed-on: https://chromium-review.googlesource.com/1073418
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53380}
2018-05-28 08:11:38 +00:00
Aseem Garg
f22991ab40 [wasm] Add simd compare ops to wasm interpreter
R=gdeepti@chromium.org,bbudge@chromium.org,clemensh@chromium.org,titzer@chromium.org
BUG=v8:6020

Change-Id: I9d307a70d44504dc0e84e3e09d48bcc9b9542462
Reviewed-on: https://chromium-review.googlesource.com/1071095
Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53375}
2018-05-25 22:29:34 +00:00
Ben L. Titzer
ae6e9cc7f4 [wasm] Inline helpers of WasmModule::origin
R=mstarzinger@chromium.org

Change-Id: I0976bfa57b9ec48fae2b912e78bacfee4f8eeafb
Reviewed-on: https://chromium-review.googlesource.com/1072654
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53368}
2018-05-25 16:47:52 +00:00
Dan Elphick
1b9ca71d1b [compiler] Avoid HeapObject::GetHeap in BitSetType::Lub
Modifies several Type:: methods to take an Isolate to pass through to
BitSetType::Lub as well as their call sites.

Bug: v8:7786
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I9ac769c4c658995421fd28b9b1d77d6f84627116
Reviewed-on: https://chromium-review.googlesource.com/1071515
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53362}
2018-05-25 15:30:53 +00:00
Dan Elphick
ff9263f80c [objects] Make Object::BooleanValue take an Isolate
Removes use of HeapObject::GetIsolate() from Object::BooleanValue in
preparation for removing the method.

Requires adding Isolate parameter to CommonOperatorReducer constructor.

Bug: v8:7786
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: If735e71df3288bf1eb11576605c2d95a19472181
Reviewed-on: https://chromium-review.googlesource.com/1071653
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53361}
2018-05-25 14:37:22 +00:00
Michael Starzinger
fabb514087 [wasm] Avoid embedding {null} values in WasmCode.
This loads references to {null} values from the instance object instead
of embedding them into the generated code. It is one step towards making
the {WasmCode} objects independent of the Isolate.

Note that this also fixes an issue with the serializer/deserializer that
failed to properly serialize {null} values and accidentally collapsed
them to {undefined} values instead.

R=ahaas@chromium.org
TEST=mjsunit/regress/wasm/regress-7785
BUG=v8:7424,v8:7785

Change-Id: Ie436c2d96890e7c8c89ffe2bd4189a759254775b
Reviewed-on: https://chromium-review.googlesource.com/1070981
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53352}
2018-05-25 08:33:06 +00:00
Andreas Haas
8a95da2415 [wasm] Reimplement WebAssembly.instantiate without desugaring
At the moment, WebAssembly.instantiate(bytes) is implemented by
desugaring it to WebAssembly.compile(bytes).then(WebAssembly.instantiate).
The problem is that the {then} in this snippet is observable. With this
CL I introduce a CompilationResultResolver which allows to do the
desugaring internally and thereby make the {then} unobservable.
Unfortunately the result of WebAssembly.instantiate(bytes) is different
than the result of WebAssembly.instantiate(module). Therefore I also
introduced an InstantiationResultResolver for symmetry with
WebAssembly.compile.

R=mstarzinger@chromium.org
Bug: chromium:837417

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I2d98e03d65f2ada19041d5a9e2df5da91b24ccca
Reviewed-on: https://chromium-review.googlesource.com/1059783
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53347}
2018-05-24 22:15:52 +00:00
Aseem Garg
bedcef5cd0 [wasm] Add simd unops to wasm interpreter
R=gdeepti@chromium.org,bbudge@chromium.org,clemensh@chromium.org,titzer@chromium.org
BUG=v8:6020

Change-Id: Ibc4e45df65ad8fc649e42b2166545cbc5fcb4296
Reviewed-on: https://chromium-review.googlesource.com/1070933
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53346}
2018-05-24 19:01:32 +00:00
Hannes Payer
fb436a5e15 Adding an API to enable and disable the memory savings mode.
Bug: chromium:846360
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I5376d4f6f9c8df768d60c63e0a767bf41b51b8b3
Reviewed-on: https://chromium-review.googlesource.com/1071531
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53345}
2018-05-24 18:25:32 +00:00
Sreten Kovacevic
4e6bcd2962 [simd] Implement conversion simd lowering
Implement lowering for simd operations I32x4ConvertI16x8 and
I16x8ConvertI8x16. Also, remove skip tests from status files that
were overriden when tests were renamed.

TEST=cctest/test-run-wasm-simd/RunWasm_I16x8ConvertI8x16_turbofan

Change-Id: If428f5039a32995c8ee64294c936419173a87aa7
Reviewed-on: https://chromium-review.googlesource.com/1069007
Reviewed-by: Aseem Garg <aseemgarg@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53343}
2018-05-24 15:32:52 +00:00
Sigurd Schneider
5da538d9e9 [turbolizer] Fix bug in graph visualizer
Bug: chromium:846000
Change-Id: If74749f11c7e1e112090a18f79ebed1819535d24
Reviewed-on: https://chromium-review.googlesource.com/1071671
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53338}
2018-05-24 14:21:53 +00:00
Marja Hölttä
71e4c57319 [objects.h splitting] Move TYPE_CHECKERs back to objects-inl.h.
Moving them away was a mistake. Fixing this enables getting rid of a bunch of
includes.

BUG=v8:5402

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I5482eab4281c7450350f058fe0a04a6f375ea082
Reviewed-on: https://chromium-review.googlesource.com/1070188
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53328}
2018-05-24 11:44:07 +00:00
Jaroslav Sevcik
ea7499f5da [generators] Store parameters in the generator object.
Currently, we context allocate all parameters for generators.

With this CL, we keep arguments on stack (unless they escape to inner
closure) and copy them between the stack and the generator's register
file on suspend/resume. This will save context allocation in most cases.

Note: There is an asymmetry between suspend and resume.
- Suspend copies arguments and registers to the generator.
- Resume copies only the registers from the generator, the arguments
  are copied by the ResumeGenerator trampoline.

Bug: v8:5164
Change-Id: I6333898c60abf461b1ab1b5c6d3dc7188fa95649
Reviewed-on: https://chromium-review.googlesource.com/1063712
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53327}
2018-05-24 11:41:37 +00:00
Aseem Garg
7b3089c0de [wasm] Add simd binops to wasm interpreter
R=gdeepti@chromium.org,bbudge@chromium.org,clemensh@chromium.org,titzer@chromium.org
BUG=v8:6020

Change-Id: I671d74b49206a3612764c7b9cb63591e7e81e857
Reviewed-on: https://chromium-review.googlesource.com/1069933
Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53316}
2018-05-23 22:56:36 +00:00
Marja Hölttä
5f4de3e0c4 [in-place weak refs] Replace WeakCells in StubCache.
Since the StubCache it's cleared at the end of the GC, it doesn't
matter if it contains weak or strong pointers.

BUG=v8:7308

Change-Id: Ib141e3d411523c67ccb8f8979845a88488d6e4ee
Reviewed-on: https://chromium-review.googlesource.com/1064053
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53311}
2018-05-23 14:53:26 +00:00
Peter Marshall
ecae80cdb3 [cpu-profiler] Add a new profiling mode with a more detailed call tree.
The current profiling mode (called kLeafNodeLineNumbers in this CL)
produces a tree, with each node representing a stack frame that is seen
in one or more samples taken during profiling. These nodes refer to a
particular function in a stack trace, but not to a particular line or
callsite within that function.

This CL adds a new more (called kCallerLineNumbers) which produces a
different profile tree, where each stack trace seen during profiling,
including the line number, has a unique path in the tree.

The profile tree was previously keyed on CodeEntry*. Now it is keyed on
the pair of CodeEntry* and line_number, meaning it has distinct nodes
for those combinations which exist, and each distinct stack trace that
was sampled is represented in the tree.

For optimized code where we have inline frames, there are no line
numbers for the inline frames in the stack trace, causing duplicate
branches in the tree with kNoLineNumberInfo as the reported line number.
This will be addressed in follow-ups.

Bug: v8:7018
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I512e221508f5b50ec028306d212263b514a9fb24
Reviewed-on: https://chromium-review.googlesource.com/1013493
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53298}
2018-05-23 09:23:40 +00:00