Commit Graph

149 Commits

Author SHA1 Message Date
Andrey Lushnikov
42f60d8d78 [DevTools] Roll inspector-protocol to v8
New revision: fe0467fd105a9ea90fbb091dc2a7b4cdbf539803

Change-Id: I0c53935b719194f16ade131f703d656749ace3d3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1623586
Reviewed-by: Alexei Filippov <alph@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Auto-Submit: Andrey Lushnikov <lushnikov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61720}
2019-05-22 06:15:38 +00:00
Johannes Henkel
889b4ded6e [DevTools] Roll inspector_protocol.
New Revision: 8ec18cf0885bef0b5c2a922c5dc3813cbf63e962

Change-Id: I65e271066599ed1aa1f9f8281be5b76e424d548d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1618159
Reviewed-by: Alexei Filippov <alph@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61627}
2019-05-18 02:08:27 +00:00
Johannes Henkel
99feae230e [DevTools] Roll inspector protocol for V8
New revision: 0aafd2876f7485db7b07c513c0457b7cbbbe3304

0aafd2876f

Change-Id: I6e9babc8401a5af3085cce81b963f288d0392c07
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1613478
Reviewed-by: Alexei Filippov <alph@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61620}
2019-05-17 16:38:07 +00:00
Tobias Tebbi
a19c3ffb8f Reland: [csa] verify skipped write-barriers in MemoryOptimizer
With very few exceptions, this verifies all skipped write-barriers in
CSA and Torque, showing that the MemoryOptimizer together with some
type information on the stored value are enough to avoid unsafe skipped
write-barriers.

Changes to CSA:
SKIP_WRITE_BARRIER and Store*NoWriteBarrier are verified by the
MemoryOptimizer by default.
Type information about the stored values (TNode<Smi>) is exploited to
safely skip write barriers for stored Smi values.
In some cases, the code is re-structured to make it easier to consume
for the MemoryOptimizer (manual branch and load elimination).

Changes to the MemoryOptimizer:
Improve the MemoryOptimizer to remove write barriers:
- When the store happens to a CSA-generated InnerAllocate, by ignoring
  Bitcasts and additions.
- When the stored value is the HeapConstant of an immortal immovable root.
- When the stored value is a SmiConstant (recognized by BitcastToTaggedSigned).
- Fast C-calls are treated as non-allocating.
- Runtime calls can be white-listed as non-allocating.

Remaining missing cases:
- C++-style iterator loops with inner pointers.
- Inner allocates that are reloaded from a field where they were just stored
  (for example an elements backing store). Load elimination would fix that.
- Safe stored value types that cannot be expressed in CSA (e.g., Smi|Hole).
  We could handle that in Torque.
- Double-aligned allocations, which are not lowered in the MemoryOptimizer
  but in CSA.

Drive-by change: Avoid Smi suffix for StoreFixedArrayElement since this
can be handled by overload resolution (in Torque and C++).

Reland Change: Support pointer compression operands.

R=jarin@chromium.org
TBR=mvstanton@chromium.org

Bug: v8:7793
Change-Id: I84e1831eb6bf9be14f36db3f8b485ee4fab6b22e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1612904
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61522}
2019-05-15 11:46:30 +00:00
Johannes Henkel
5a56664273 [DevTools] Roll inspector_protocol
New revision: 50a14c3884caf012f3a5fc666d5eb8033d8a184a

Change-Id: I7b4b99e8ec537373d3ec5b1390461824e58285b2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1603217
Reviewed-by: Alexei Filippov <alph@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61394}
2019-05-09 21:37:04 +00:00
Johannes Henkel
5ae5016590 [DevTools] Add unittest for upstream encoding library.
This brings in
third_party/inspector_protocol/encoding/encoding_test.cc
from the upstream project and makes it work for v8's
unittest suite.

encoding_test_helper.h is a V8 specific implementation,
which delegates to src/inspector/v8-string-conversions{.h,.cc},
for the utf8 / utf16 conversion routines.

I'm also fixing / updating roll.py, for future rolls.

Change-Id: I08e4784838ff81ef3ac328f783512b42c91b6bcd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1597215
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61393}
2019-05-09 20:12:08 +00:00
Johannes Henkel
4528ddafce [DevTools] Roll inspector_protocol for v8.
New revision: 2039736177ee11d96a096cdab9c58cc1d78faa43

This modifies roll.py to update namespaces and header guards.
Also I'm removing --reverse, to avoid making this more complicated.

third_party/encoding/encoding{.h,cc} are already up to date,
since I manually propaged them earlier. So this is why this change
is only updating the template.

Change-Id: I5ddb075c9d6dad28b5665348023860683e964841
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1596392
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61253}
2019-05-06 20:25:48 +00:00
Johannes Henkel
9d7c1947f5 [DevTools] Add V8InspectorSession::state(), which returns binary (CBOR).
Keep the existing method for compatibility, by converting
to json from CBOR using the inspector_protocol_encoding library,
via a v8 specific interface library that directs routines for
converting between strings and doubles to v8's implementations.

This change also brings in the encoding.h / encoding.cc files from the
upstream inspector_protocol project. The only modification here
are the header guards, and the namespace. I will fix roll.py to
make it so that we pick up future changes.

third_party/inspector_protocol/BUILD.gn is specific to v8, by necessity.
third_party/inspector_protocol/.clang-format is a copy of the upstream
file. If we don't put this, we'll find ourselves auto-formatting the roll,
which is annoying.

This is a reland of
https://chromium-review.googlesource.com/c/v8/v8/+/1590627 with the
only modification in the DEPS file; this time I'm including
third_party/inspector_protocol/encoding/encoding{.h,cc} in addition to
the relative include there. Not sure why this is needed but I'm hoping
it gets me past the presubmit which may resolve the include path
relative to the V8 base (the ../../third_party is needed for when V8 is
embedded into Chromium).

Change-Id: Ic76b2b5faa7e1cbdceb15aff3f369e9a303e3e85
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1593646
Reviewed-by: Alexei Filippov <alph@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61214}
2019-05-03 16:54:51 +00:00
Johannes Henkel
c27c369a9e Revert "[DevTools] Add V8InspectorSession::state(), which returns binary (CBOR)."
This reverts commit b7134d3af6.

Reason for revert: breaks presubmit

Original change's description:
> [DevTools] Add V8InspectorSession::state(), which returns binary (CBOR).
> 
> Keep the existing method for compatibility, by converting
> to json from CBOR using the inspector_protocol_encoding library,
> via a v8 specific interface library that directs routines for
> converting between strings and doubles to v8's implementations.
> 
> This change also brings in the encoding.h / encoding.cc files from the
> upstream inspector_protocol project. The only modification here
> are the header guards, and the namespace. I will fix roll.py to
> make it so that we pick up future changes.
> 
> third_party/inspector_protocol/BUILD.gn is specific to v8, by necessity.
> third_party/inspector_protocol/.clang-format is a copy of the upstream
> file. If we don't put this, we'll find ourselves auto-formatting the roll,
> which is annoying.
> 
> Change-Id: I20fa8759164e7a39f8a7c30e0d2a3f8a7e4be227
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1590627
> Reviewed-by: Alexei Filippov <alph@chromium.org>
> Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
> Commit-Queue: Johannes Henkel <johannes@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#61187}

TBR=dgozman@chromium.org,alph@chromium.org,caseq@chromium.org,johannes@chromium.org

Change-Id: I67f297ef8454499036c94bf88e0d23657a579140
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1592130
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61189}
2019-05-02 20:15:49 +00:00
Johannes Henkel
b7134d3af6 [DevTools] Add V8InspectorSession::state(), which returns binary (CBOR).
Keep the existing method for compatibility, by converting
to json from CBOR using the inspector_protocol_encoding library,
via a v8 specific interface library that directs routines for
converting between strings and doubles to v8's implementations.

This change also brings in the encoding.h / encoding.cc files from the
upstream inspector_protocol project. The only modification here
are the header guards, and the namespace. I will fix roll.py to
make it so that we pick up future changes.

third_party/inspector_protocol/BUILD.gn is specific to v8, by necessity.
third_party/inspector_protocol/.clang-format is a copy of the upstream
file. If we don't put this, we'll find ourselves auto-formatting the roll,
which is annoying.

Change-Id: I20fa8759164e7a39f8a7c30e0d2a3f8a7e4be227
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1590627
Reviewed-by: Alexei Filippov <alph@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61187}
2019-05-02 19:06:48 +00:00
Johannes Henkel
9b78d20ba5 [DevTools] Roll inspector_protocol
New Rev: 8c3f1afc2dc5b8588bc2dc5f12a93255383d7236

Change-Id: I88fcc74b969d114cc6c491c9d1aa5872245f8f5c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1590624
Reviewed-by: Alexei Filippov <alph@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61138}
2019-04-30 23:13:48 +00:00
Ross McIlroy
dd6c953601 Revert "[csa] verify skipped write-barriers in MemoryOptimizer"
This reverts commit da7322c05f.

Reason for revert: Breaking the pointer compression bots, e.g.:
https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20-%20pointer%20compression/3047

Original change's description:
> [csa] verify skipped write-barriers in MemoryOptimizer
> 
> With very few exceptions, this verifies all skipped write-barriers in
> CSA and Torque, showing that the MemoryOptimizer together with some
> type information on the stored value are enough to avoid unsafe skipped
> write-barriers.
> 
> Changes to CSA:
> SKIP_WRITE_BARRIER and Store*NoWriteBarrier are verified by the
> MemoryOptimizer by default.
> Type information about the stored values (TNode<Smi>) is exploited to
> safely skip write barriers for stored Smi values.
> In some cases, the code is re-structured to make it easier to consume
> for the MemoryOptimizer (manual branch and load elimination).
> 
> Changes to the MemoryOptimizer:
> Improve the MemoryOptimizer to remove write barriers:
> - When the store happens to a CSA-generated InnerAllocate, by ignoring
>   Bitcasts and additions.
> - When the stored value is the HeapConstant of an immortal immovable root.
> - When the stored value is a SmiConstant (recognized by BitcastToTaggedSigned).
> - Fast C-calls are treated as non-allocating.
> - Runtime calls can be white-listed as non-allocating.
> 
> Remaining missing cases:
> - C++-style iterator loops with inner pointers.
> - Inner allocates that are reloaded from a field where they were just stored
>   (for example an elements backing store). Load elimination would fix that.
> - Safe stored value types that cannot be expressed in CSA (e.g., Smi|Hole).
>   We could handle that in Torque.
> - Double-aligned allocations, which are not lowered in the MemoryOptimizer
>   but in CSA.
> 
> Drive-by change: Avoid Smi suffix for StoreFixedArrayElement since this
> can be handled by overload resolution (in Torque and C++).
> 
> R=​jarin@chromium.org
> TBR=mvstanton@chromium.org
> 
> Change-Id: I0af9b710673f350e0fe81c2e59f37da93c024b7c
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1571414
> Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#61016}

TBR=mvstanton@chromium.org,jarin@chromium.org,tebbi@chromium.org

Change-Id: I36877cd6d08761726ef8dce8a3e3f2ce3eebe6cf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1585732
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61038}
2019-04-26 10:03:33 +00:00
Tobias Tebbi
da7322c05f [csa] verify skipped write-barriers in MemoryOptimizer
With very few exceptions, this verifies all skipped write-barriers in
CSA and Torque, showing that the MemoryOptimizer together with some
type information on the stored value are enough to avoid unsafe skipped
write-barriers.

Changes to CSA:
SKIP_WRITE_BARRIER and Store*NoWriteBarrier are verified by the
MemoryOptimizer by default.
Type information about the stored values (TNode<Smi>) is exploited to
safely skip write barriers for stored Smi values.
In some cases, the code is re-structured to make it easier to consume
for the MemoryOptimizer (manual branch and load elimination).

Changes to the MemoryOptimizer:
Improve the MemoryOptimizer to remove write barriers:
- When the store happens to a CSA-generated InnerAllocate, by ignoring
  Bitcasts and additions.
- When the stored value is the HeapConstant of an immortal immovable root.
- When the stored value is a SmiConstant (recognized by BitcastToTaggedSigned).
- Fast C-calls are treated as non-allocating.
- Runtime calls can be white-listed as non-allocating.

Remaining missing cases:
- C++-style iterator loops with inner pointers.
- Inner allocates that are reloaded from a field where they were just stored
  (for example an elements backing store). Load elimination would fix that.
- Safe stored value types that cannot be expressed in CSA (e.g., Smi|Hole).
  We could handle that in Torque.
- Double-aligned allocations, which are not lowered in the MemoryOptimizer
  but in CSA.

Drive-by change: Avoid Smi suffix for StoreFixedArrayElement since this
can be handled by overload resolution (in Torque and C++).

R=jarin@chromium.org
TBR=mvstanton@chromium.org

Change-Id: I0af9b710673f350e0fe81c2e59f37da93c024b7c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1571414
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61016}
2019-04-25 14:59:16 +00:00
Jakob Kummerow
912b3912b4 [wasm-c-api] Add upstream examples as tests
Plus a script to compile/link/run them.

Change-Id: Iac8ffcda3a73902261c07a7b4e5d967a19414c75
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1564058
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60911}
2019-04-17 18:04:16 +00:00
Jakob Kummerow
f80bfeaf07 [wasm] Draft version of C/C++ Wasm API
Imported from https://github.com/WebAssembly/wasm-c-api/ and
updated to work inside V8.
Tests will be added in an upcoming CL.

This is experimental; it is not yet recommended to rely on it.

Change-Id: I05914f4b63298bf7c848c4d4c8811f0f6eb882e3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1516478
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60910}
2019-04-17 16:00:26 +00:00
Johannes Henkel
5af26d8a2e [DevTools] Roll inspector_protocol for v8.
To Revision 16b370abe6f4b59efea00377473b5dddb438defb.

Also make roll.py executable (chmod u+x roll.py).

Change-Id: Ib3b3767f7fc9c3eef044779c142f62f3d6923242
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1568651
Reviewed-by: Alexei Filippov <alph@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60883}
2019-04-16 19:49:11 +00:00
peterwmwong
97591e39bf [builtins] Properly mark transitioning external macros.
Change-Id: Ic31b33ef4c290aee31be2d66295978908f568775
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1563410
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Cr-Commit-Position: refs/heads/master@{#60775}
2019-04-11 13:03:04 +00:00
Vadim Gorbachev
7cf4add6ca Python3 compatibility: use open() instead of file()
For details see: https://python-future.org/compatible_idioms.html#file


Bug: chromium:948824
Change-Id: Ib06568963073621bd8edf2c8edb89bf8253d3bcb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1549169
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Sergiy Belozorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60660}
2019-04-05 16:22:20 +00:00
Tobias Tebbi
e87e3b1fa9 [torque] named arguments for constructors
This changes the syntax for constructing structs and classes to explicitly
mention the fieldnames, similar to JavaScript object literals.
The fields still have to be listed in the same order as in the struct/class
declaration.
As in Javascript, {foo: foo} can be abbreviated as {foo}.

Example:

macro NewJSArray(implicit context: Context)(
    map: Map, elements: FixedArrayBase): JSArray {
  return new JSArray{
    map,
    properties_or_hash: kEmptyFixedArray,
    elements,
    length: elements.length
  };
}

Drive-by cleanup: Make struct and class constructors follow the same pattern
                  in the parser and the AST.

Bug: v8:9018 v8:7793
Change-Id: I22ff7f68270e4f406aa80731a709d41ea52f52bb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1551999
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Daniel Clifford <danno@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60622}
2019-04-04 06:26:51 +00:00
Mike Stanton
539017b0b6 [Builtins] Make it harder to store signalling NaNs in Torque/CSA
The bottlenecks to prevent storing signalling NaNs in backing stores
were not perfect. This change makes it harder by ensuring that all
the Torque-side "[]=" operator overloads for FixedDoubleArray stores
have signalling NaNs silenced.

Bug: chromium:944435
Change-Id: I295d9b34f4c896db30989bb9db1a2b452daa03ae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1538517
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60459}
2019-03-26 10:22:50 +00:00
Johannes Henkel
1cb390b875 [DevTools] Roll inspector_protocol to a7423d8ca937e658ab3b85e3b02676bced145ba6.
Change-Id: I270de4fa2970c9e33600453aaecc1c786701dcc3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1521326
Reviewed-by: Alexei Filippov <alph@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60225}
2019-03-13 18:19:28 +00:00
Simon Zünd
2e150bdf08 [cleanup] Remove dead code from Array#sort
R=jgruber@chromium.org

Bug: v8:8834
Change-Id: I36b3fc2e29111054caf395b6875f238bf43ab3de
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1518177
Auto-Submit: Simon Zünd <szuend@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60194}
2019-03-12 16:17:06 +00:00
Simon Zünd
bb882c32b9 [cleanup] Run torque formatter on array-sort.tq
R=tmrts@chromium.org

Change-Id: I652a142c815c7268700de3b743f09495748ec399
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1514634
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60155}
2019-03-11 12:42:20 +00:00
Simon Zünd
e416f4da69 [array] Change fast- to slow-path transition for Array#sort
With the recent changes to Array#sort, the main algorithm does not
need to bail out anymore. Only the initial copying into the workarray,
as well as the final copying back into the original backing store
might cause a switch from fast-path to the slow-path.

This CL changes the slow-path so sorting itself is not restarted and
the slow-path will continue copying where the fast-path left off.

R=jgruber@chromium.org

Bug: v8:7382
Change-Id: I4ab61daa62bb816f4f6e16e60bde1f948ad1e7db
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1507717
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60151}
2019-03-11 11:35:12 +00:00
Simon Zünd
2dac9b80b3 [cleanup] Remove unnecessary labels from Array#sort
With the recent changes to Array#sort, some bailout labels and
accessor checks became superfluous. This CL removes them along
with some other minor cleanup work.

R=jgruber@chromium.org

Bug: v8:8834
Change-Id: I7429482ceaccbe743e2b8190d83bfa2c34875b11
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1507678
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60150}
2019-03-11 11:28:25 +00:00
Vadim Gorbachev (bmsdave)
a82b4c4071 Python 3 compatibility errors in third-party libraries
These changes fix Python 3 compatibility errors in third-party libraries
I'm not sure if these problems can be fixed this way.
But! (1) In deps/inspector_protocol no file roll.py
it looks like the repository v8 it shouldn't be, either.
(2) I have not found a separate repository for binutils.


Bug: chromium:935197
Change-Id: Ied2bb83e0539aa392f8fc7c3aeef662612f37d06
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1484302
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Sergiy Belozorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60085}
2019-03-07 11:29:33 +00:00
Johannes Henkel
6141741064 [DevTools] Roll of inspector protocol ...
... to b13e24ccee66d7e0590ce1266db9c906e3648561

to support UTF16 strings with binary protocol (v8).

Original review here:
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1493312

Change-Id: I401c5d52d233805dc681bb23b40df99f2ea14992
Reviewed-on: https://chromium-review.googlesource.com/c/1493291
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59956}
2019-03-01 02:10:29 +00:00
Daniel Clifford
0a6ae5b485 [torque] Simplify class and struct construction
Constructors have been removed. Initialization syntax with {}
for structs and classes is now limited to the initialization
expressions for the fields, so "constructors" deviating from
that explicit and complete list of field initialization
values must be declared as separate macros.

Bug: v8:7793
Change-Id: Ibc26e685c0c8a182732df90b1631eae9371309cb
Reviewed-on: https://chromium-review.googlesource.com/c/1489080
Commit-Queue: Daniel Clifford <danno@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59917}
2019-02-27 17:36:37 +00:00
Mike Stanton
5c05165d42 [Torque] Make Throw*Error() take context implicitly
Change-Id: I5f0d915351c24b9a2916b8ab1d4bafb4d7eb21c7
Reviewed-on: https://chromium-review.googlesource.com/c/1491217
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59889}
2019-02-27 10:11:18 +00:00
Simon Zünd
e7d414a2b6 [array] Eagerly copy elements into a FixedArray for sorting
This CL changes Array#sort to work roughly like:
    1) Call [[Get]] on the receiver in [0, length) and store to FA
    2) Use the existing TimSort to sort that FA
    3) Call [[Set]] on the receiver in [0, length) using the result

This has the advantage that we no longer need different fast-paths
for the sorting algorithm itself, only for step 1 and 3. This results
in a code size reduction of ~2650 bytes.

This CL does not include optimizations that elides step 1 or 3.

Change-Id: I7f2e35067a6ec356add8b0c50b160d76813c536d
Reviewed-on: https://chromium-review.googlesource.com/c/1458237
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59653}
2019-02-18 11:02:17 +00:00
Daniel Clifford
76e722c126 [torque] Implement simple automatic index operators
In the process, cleanup the StoreFixedArray* operators
and change most FixedArray element accesses so that
they explicitly use the '.objects' and '.floats'
fields.

Bug: v8:7793
Change-Id: I3e45a9b7536ec76e1413b7e508d79a56b37604ff
Reviewed-on: https://chromium-review.googlesource.com/c/1460948
Commit-Queue: Daniel Clifford <danno@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59649}
2019-02-18 10:04:34 +00:00
Andrey Kosyakov
6703647b93 DevTools protocol roll
... to revision c40253f87c475880d1bdad4a90cf21c38dadf4ac

Also, preseve binary protocol when restoring session.

Bug: chromium:929862
Change-Id: Icb1cb04b42ca7238b46e2978337b36e32398665f
Reviewed-on: https://chromium-review.googlesource.com/c/1474556
Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
Commit-Queue: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59614}
2019-02-14 23:41:43 +00:00
Johannes Henkel
ee0e4c33bb Add script for rolling the inspector protocol to V8.
This is a tweaked version of the script that I just added to Chromium:

https://cs.chromium.org/chromium/src/third_party/inspector_protocol/roll.py

Change-Id: I21566f2472c20ecfd713996974c0833b7988a122
Reviewed-on: https://chromium-review.googlesource.com/c/1469376
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59609}
2019-02-14 18:44:08 +00:00
Johannes Henkel
d3cf03c6e9 [DevTools] Roll inspector_protocol (v8) ...
... to ec358ccfd63a2a657c147329c7793d217e278a58.

This adds support for CBOR <-> Value.

v8 changes:
- Add StringUTF8Adapter (from Pavel's change)
- Add Binary::fromSpan (needed for the cbor->BinaryValue conversion).

Change-Id: I09746dc361df0b150b23697a20b287613558c003
Reviewed-on: https://chromium-review.googlesource.com/c/1470955
Commit-Queue: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59583}
2019-02-14 04:42:24 +00:00
Nico Weber
bff96cef06 v8: Fix -Wextra-semi warnings, enable warning.
For macros expanding to function definitions, I removed the spurious ; after
macro invocations. For macros expandign to function declarations, I made the ;
required and consistently inserted it.

No behavior change.

Bug: chromium:926235
Change-Id: Ib8085d85d913d74307e3481f7fee4b7dc78c7549
Reviewed-on: https://chromium-review.googlesource.com/c/1467545
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59558}
2019-02-13 14:11:28 +00:00
Pavel Feldman
8bf60985da Roll third_party/inspector_protocol to a0abcb6bfbd8d13071bb0d2ac4ee1066703eb60a.
Drive-by utf8 serialization exposed on StringUtil for inspector protocol.

Bug: chromium:929862
Change-Id: I930cd43fef9038471908280f15e65a4edec5c6d1
Reviewed-on: https://chromium-review.googlesource.com/c/1468702
Commit-Queue: Pavel Feldman <pfeldman@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59542}
2019-02-13 00:12:13 +00:00
Pavel Feldman
5dffb59630 DevTools: roll third_party/inspector_protocol, wire binary operation.
Bug: chromium:929862
Change-Id: I8c23be1d22f70d1143d570050514c36ecfb30fc7
Reviewed-on: https://chromium-review.googlesource.com/c/1466003
Reviewed-by: Alexei Filippov <alph@chromium.org>
Commit-Queue: Pavel Feldman <pfeldman@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59541}
2019-02-12 19:55:12 +00:00
Johannes Henkel
f1c92ac171 [DevTools] Roll inspector_protocol to 02ca2bc2bb337cb2d4143157383b554f9b75dc99.
This brings in the CBOR_h / CBOR_cc template.

Change-Id: I3d3971a5ba4c98a8b36982449e4d9a2606010f22
Reviewed-on: https://chromium-review.googlesource.com/c/1459738
Reviewed-by: Alexei Filippov <alph@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59479}
2019-02-09 01:54:28 +00:00
Tobias Tebbi
7584dbf587 [array][torque] use new internal classes for sortState
Change-Id: Ibcac85442e755ceabd79cd87ebba7098b95a9182
Reviewed-on: https://chromium-review.googlesource.com/c/1454720
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59406}
2019-02-06 14:03:21 +00:00
Simon Zünd
dc4c8bdb05 [cleanup] Use implicit context and sortState for most Call* macros
This CL changes most Call* macros (and some others) in Array#sort to
pass the context and sortState implicitly. This improves
readability, especially for loads and stores.

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

Bug: v8:8567
Change-Id: I6528d080bb01ab676de3ba6a7bf8223b98b6db7f
Reviewed-on: https://chromium-review.googlesource.com/c/1450114
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59320}
2019-02-04 09:30:58 +00:00
Simon Zünd
0b2fa277fb [cleanup] Remove usage of 'ReloadElements' from Array#sort
This CL is mostly a mechanical change. Loading either the receiver,
the backing store or the temp array from the sort state is pushed down
into each respective Load/Store builtin. This eliminates the need
for reloading the elements pointer after each compare function call.

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

Bug: v8:8562
Change-Id: I453e98635f9d891da58cf7b2a86c5c58f4a4069c
Reviewed-on: https://chromium-review.googlesource.com/c/1449613
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59291}
2019-02-01 13:36:47 +00:00
Michael Spang
9bf9717192 Revert "[build] Port "Add patched eu-strip in third_party""
This is no longer necessary after
https://chromium-review.googlesource.com/c/chromium/src/+/1427781

This reverts commit 571076ecb1.

Change-Id: Id754864022171fd3da8f7274b5d3b526603337ce
Reviewed-on: https://chromium-review.googlesource.com/c/1446136
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59254}
2019-01-31 16:44:20 +00:00
Jakob Kummerow
8310864010 Roll inspector_protocol to 8515c2a1c5c016646b61221586cd4e5839f425ee
This roll includes:
8515c2a1c UBSan fix
9977c471b (does not touch files imported into V8)
9cba74155 (does not touch files imported into V8)

Bug: v8:3770
Change-Id: If5ae5e7c6a7a81a246c8376545c4437cacaf1dc3
Reviewed-on: https://chromium-review.googlesource.com/c/1436230
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59103}
2019-01-25 22:41:26 +00:00
Tobias Tebbi
76394d6b34 [torque] add general down-cast intrinsic
Bug: v8:7793
Change-Id: If79b3d760406e44530da5656459ece6db3eff7ab
Reviewed-on: https://chromium-review.googlesource.com/c/1435935
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59098}
2019-01-25 14:16:33 +00:00
Simon Zünd
9514f0d62a [array] Add check for --force-slow-path to Array#sort
This CL changes Array#sort to use the generic path for fast elements
kinds if --force-slow-path is present. Note that the IsFastJSArray macro
includes this check but not the Cast itself.

R=jgruber@chromium.org

Bug: v8:8215
Change-Id: I1135ab9db15effd86020f49f4ae23ba1e1da07f8
Reviewed-on: https://chromium-review.googlesource.com/c/1435940
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59097}
2019-01-25 13:20:50 +00:00
Sergiy Belozorov
71cb4777e7 Update V8 DEPS.
Rolling v8/build: 402bc6d..4b7e3ce

Rolling v8/third_party/googletest/src: 879ac09..9518a57

This also ports:
https://crrev.com/c/1410527

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

Bug: chromium:922379
Change-Id: I3982ace35bb762e7f5c85ba9468739aedd3bcd78
Reviewed-on: https://chromium-review.googlesource.com/c/1424659
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Sergiy Belozorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58994}
2019-01-22 14:49:04 +00:00
Michael Achenbach
7b01fe76d1 Update V8 DEPS.
Rolling v8/build: 7a1aacd..de8bef4

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/78448d9..a9729f3

Rolling v8/third_party/depot_tools: e229a0e..d1dba64

Rolling v8/third_party/googletest/src: 933e5df..879ac09

Rolling v8/tools/clang: a9c5056..9f413ce

This also ports:
https://crrev.com/c/1415130

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

Bug: chromium:922889
Change-Id: Ibf674eeefb82f9feb210107d6081c489cfba48db
Reviewed-on: https://chromium-review.googlesource.com/c/1416608
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#58868}
2019-01-17 08:14:47 +00:00
Johannes Henkel
7b0038ef40 [DevTools] Roll inspector_protocol to fdbdb154336fc1f15a0a6775349dd90243b8d3fc.
This should be a non-event, I'm just rolling it to line it up
with https://chromium.googlesource.com/deps/inspector_protocol/
again.

Change-Id: I84b0af31963bceb66084a579519412d47c3bbd40
Reviewed-on: https://chromium-review.googlesource.com/c/1413409
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58861}
2019-01-16 17:38:16 +00:00
Michael Achenbach
84ff79a3b9 Update V8 DEPS.
Rolling v8/build: 02ccb16..7a1aacd

Rolling v8/buildtools: 9d61cbb..40194ab

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/96320b5..78448d9

Rolling v8/third_party/depot_tools: 8432ec2..e229a0e

Rolling v8/third_party/googletest/src: 879ac09..933e5df

This also ports https://crrev.com/c/1410527 for the gtest roll.

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

Bug: chromium:922379
Change-Id: I65347892b6d2df3b6b30d8688367b39f4e76e25a
Reviewed-on: https://chromium-review.googlesource.com/c/1413874
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#58841}
2019-01-16 09:12:26 +00:00
Michael Achenbach
50b72266ff Revert "Reland "[build] Pull binutils via DEPS""
This reverts commit 09c49ee064.

Reason for revert: Still breaks the node.js bot.

Original change's description:
> Reland "[build] Pull binutils via DEPS"
> 
> This is a reland of 98bbb636b1
> 
> Original change's description:
> > [build] Pull binutils via DEPS
> >
> > This pulls binutils from a subtreed repository of Chromium:
> > https://chromium.googlesource.com/chromium/src/third_party/binutils/
> >
> > Bug: chromium:718157
> > Change-Id: I532c7e84d83f716728e4f9f715cfdb82ea5d5f98
> > Reviewed-on: https://chromium-review.googlesource.com/c/1370043
> > Reviewed-by: Yang Guo <yangguo@chromium.org>
> > Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
> > Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#58180}
> 
> Bug: chromium:718157, v8:8584
> Change-Id: I1c9773bc5fa0a629e35db5151e535e63839f2801
> Reviewed-on: https://chromium-review.googlesource.com/c/1375655
> Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58213}

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

Change-Id: I1935f4aef0d6eb4f58e25197d14ccf2c2c645b15
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:718157, v8:8584
Reviewed-on: https://chromium-review.googlesource.com/c/1375659
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58214}
2018-12-13 12:05:58 +00:00