Commit Graph

54189 Commits

Author SHA1 Message Date
Michael Starzinger
a08a150cc8 Reland "[wasm] Fix two jump table offset parameters."
This is a reland of 74951850a0

Original change's description:
> [wasm] Fix two jump table offset parameters.
> 
> R=jgruber@chromium.org
> 
> Change-Id: I5b40819b1a746f16b7b18aac1bba65d83a7e3483
> Reviewed-on: https://chromium-review.googlesource.com/c/1470127
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59560}

Change-Id: I70b814f81bfd0c13e09a2641871da2d4ec5a308d
Reviewed-on: https://chromium-review.googlesource.com/c/1470111
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59597}
2019-02-14 12:29:55 +00:00
Michael Achenbach
d874e78ebe [test] Raise swarming priority on release branche builders
The builders were originally allowed higher cycle time, as fast responses
weren't necessary. They should, however, never fail due to expiring tasks.

This has happened more often lately, hence they should run with normal
CI priority. The impact is very small as they run very infrequently.

NOTRY=true

Bug: chromium:930255
Change-Id: Id9d4eb70322862cf98b9ae4e313e5c0b002b5bd1
Reviewed-on: https://chromium-review.googlesource.com/c/1466303
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59596}
2019-02-14 12:23:55 +00:00
Dan Elphick
5cc245ae75 [compile] Add support for lazy generation of source position tables
If enable_omit_source_positions is true (defaults to false), source
position tables are not generated when compiling bytecode. They will
then be regenerated when exceptions are thrown.

This adds a new function Compiler::CollectSourcePositions which given a
SharedFunctionInfo with bytecode but no source position table re-parses
and regenerates the bytecode but this time with source positions
collection enabled. Note this will reparse all inner functions that
have previously been compiled since the preparse data is no longer
available.

With the flag enabled there still 18 test failures mostly related to
debugging.

v8: 8510
Change-Id: I46dff9818d8a89c901ba8ae8df94dcaca83aa658
Reviewed-on: https://chromium-review.googlesource.com/c/1385165
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59595}
2019-02-14 11:26:35 +00:00
Yang Guo
6cb174b4b3 [serializer] Remove code object handling from code serializer
R=leszeks@chromium.org

Change-Id: Ib66b36884be7dd1283eb0375cfaf94a5b503f162
Reviewed-on: https://chromium-review.googlesource.com/c/1470110
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59594}
2019-02-14 11:17:14 +00:00
Georg Neis
6ed3f799ce [turbofan] Use GetSlotOperand instead of converting GetIndexOperand
Change-Id: I616841c626fc95a6015014e308cbd653e95ede19
Reviewed-on: https://chromium-review.googlesource.com/c/1472671
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59593}
2019-02-14 11:04:04 +00:00
Georg Neis
5cc1ddafbe [turbofan] Refactor ComputeElementAccessInfos
... such that the feedback maps can evenentually be processed in the
serialization phase.

Bug: v8:7790
Change-Id: Ic033e88646a1b161710b1ca2028ef10f49d23cfd
Reviewed-on: https://chromium-review.googlesource.com/c/1472293
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59592}
2019-02-14 11:01:44 +00:00
Santiago Aboy Solanes
dae0f73f29 [ptr-compr][arm64] TurboFan support for compressing stores
Similar to x64's CL (https://chromium-review.googlesource.com/c/v8/v8/+/1459638)

Bug: v8:7703
Change-Id: I4b4e06ccdb9f428559dfb6b74e8ac149f955745c
Reviewed-on: https://chromium-review.googlesource.com/c/1467181
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59591}
2019-02-14 10:42:44 +00:00
Mythri
596c292af6 [ic] Update KeyedStoreIC to handle no feedback vector case
The megamorphic case in the KeyedStoreIC doesn't use/update any feedback.
We could use this path to fast path some of the keyed stores instead of
misssing to the runtime when the feedback vector is not available. This
cl, moves the check for feedback vector from the bytecode handler to the
KeyedStoreIC and calls the KeyedStoreIC_Megamorphic builtin when there is
no valid feedback vector. This will help improve the performance of no
feedback/jitless case.

Bug: v8:8293
Change-Id: I71c128b355d47ac20e50fc836f4bc2cf0aab1154
Reviewed-on: https://chromium-review.googlesource.com/c/1460946
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59590}
2019-02-14 10:38:24 +00:00
Mathias Bynens
3b4cadedee Remove always-true --harmony-symbol-description runtime flag
It shipped in Chrome 70.

Bug: v8:7807, v8:8562
Change-Id: I5c5a9fc23656018ee6e9115af7a0c779230e681b
Reviewed-on: https://chromium-review.googlesource.com/c/1450787
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59589}
2019-02-14 10:36:05 +00:00
Dan Elphick
828b518a88 [parsing] Fix AllowsLazyCompilation
Class member initializer functions do not support lazy compilation, so
change FunctionLiteral::AllowsLazyCompilation to return false for them.

Change-Id: I38434f3a7e8c88af3f407cf19308fc3862ec4403
Reviewed-on: https://chromium-review.googlesource.com/c/1470103
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59588}
2019-02-14 09:59:27 +00:00
Frank Tang
7ffdf82173 [Intl] Fix Null-dereference in CreateICUDateFormatFromCache
Bug: chromium:930304
Change-Id: I7793f83b3f3e9aeaa3ecf114c6064773257e90e8
Reviewed-on: https://chromium-review.googlesource.com/c/1461167
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59587}
2019-02-14 09:53:56 +00:00
Tobias Tebbi
754987938b Revert "[build] disable C++ optimization for mksnapshot code."
This reverts commit cee2f772c7.

Reason for revert: Breaks sanitizer builds: https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux64%20UBSan/4682

Original change's description:
> [build] disable C++ optimization for mksnapshot code.
> 
> By disabling C++ optimizations for code that's only run in mksnapshot,
> that is, CSA and Torque-generated code, we can save compile time.
> I observed up to 2x improvements of compile time for some files,
> while the mksnapshot time did not increase significantly.
> 
> Bug: v8:7629
> Change-Id: I96be2966611b2471b68023e0dd9e351d94f0013c
> Reviewed-on: https://chromium-review.googlesource.com/c/1460941
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59585}

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

Change-Id: I50da40da167f49a14e3a8994377c4f9dafdfe2ab
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7629
Reviewed-on: https://chromium-review.googlesource.com/c/1472630
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59586}
2019-02-14 09:50:48 +00:00
Tobias Tebbi
cee2f772c7 [build] disable C++ optimization for mksnapshot code.
By disabling C++ optimizations for code that's only run in mksnapshot,
that is, CSA and Torque-generated code, we can save compile time.
I observed up to 2x improvements of compile time for some files,
while the mksnapshot time did not increase significantly.

Bug: v8:7629
Change-Id: I96be2966611b2471b68023e0dd9e351d94f0013c
Reviewed-on: https://chromium-review.googlesource.com/c/1460941
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59585}
2019-02-14 09:29:56 +00:00
tzik
ed9b10c30e Remove unused has_prototype_slot parameter on FunctionMapIndex
has_prototype_slot on Context::FunctionMapIndex() is unused in its
implementation, and all callers passes just true.
Whether the function has prototype or not is determined by FunctionKind
instead.

Change-Id: I598515b25267dd3470cccbf3236b5e64c6959d00
Reviewed-on: https://chromium-review.googlesource.com/c/1469542
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59584}
2019-02-14 07:01:26 +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
Francis McCabe
0988e0d647 [wasm] ReturnCall Implementation (decoder).
Focuses on decoder implementation and unittests of decoding return call instructions

Bug: v8:7431
Change-Id: Ib1351bb26f8bac0a766d633486492fcd8ead627b
Reviewed-on: https://chromium-review.googlesource.com/c/1455476
Commit-Queue: Francis McCabe <fgm@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59582}
2019-02-14 00:02:03 +00:00
Frank Tang
6ee9ec5ca1 [Intl] Remove --harmony-intl-list-format flag from test
This is part 1 of 2 of clean up. C++ change in Part 2 next.

Bug: v8:8705
Change-Id: Ibf4425c141391581b963f4775286b65b652452e2
Reviewed-on: https://chromium-review.googlesource.com/c/1461172
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59581}
2019-02-13 23:22:43 +00:00
Mythri
200ad46147 [ic] Update StoreIC to handle no feedback vector case
The uninitialized case in the StoreIC doesn't use any feedback.
We could use this path to fast path some of the named stores instead of
missing to the runtime when the feedback vector is not available.

Bug: v8:8293
Change-Id: Ib3c4f843b24a377708f8db18fae10983e5633484
Reviewed-on: https://chromium-review.googlesource.com/c/1463781
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59580}
2019-02-13 22:12:29 +00:00
Takuto Ikuta
acd2a7f1b0 small fix for BUILD.gn
Header generating action needs to be in public_deps if generated header is included from header file in the targets depending on the action target.

See below reference for more details.
https://gn.googlesource.com/gn/+/master/docs/reference.md#var_public_deps

Bug: chromium:931596
Change-Id: I198d9e09b8585b213ec4b375f10aecc6268f3bdd
Reviewed-on: https://chromium-review.googlesource.com/c/1469545
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59579}
2019-02-13 21:59:29 +00:00
Georg Neis
d6b1f5bc70 [turbofan] Eliminate redundant TryUpdate call in access-info.cc
I had forgotten to remove this in
https://chromium-review.googlesource.com/c/v8/v8/+/1458243

Change-Id: Id0da5f87f782e854b204f400173aa2bbecb4c43c
Reviewed-on: https://chromium-review.googlesource.com/c/1470133
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59578}
2019-02-13 18:09:08 +00:00
Maciej Goszczycki
685a20cac0 [cleanup] Move comment closer to code it describes
Bug: v8:8562
Change-Id: I7f65b4cd92bb08434afe3a18512223adaf47feec
Reviewed-on: https://chromium-review.googlesource.com/c/1470112
Commit-Queue: Maciej Goszczycki <goszczycki@google.com>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59577}
2019-02-13 17:41:38 +00:00
Anna Henningsen
4325ebb29d [api] Remove warning about ValueSerializer
This API has existed for two and a half years now, with no
API changes over the last year, and is widely used in production,
code so it makes sense to consider it stable.

Change-Id: I10e38c37fb8c13e22124ef0985f4b0bd8d4615fd
Reviewed-on: https://chromium-review.googlesource.com/c/1461999
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59576}
2019-02-13 17:40:18 +00:00
Michael Starzinger
a4b19dcc91 [wasm] No longer copy runtime stubs into each module.
This switches from copying entire runtime stubs into each module to only
having small jump table slots in each module that act as a trampoline to
the actual embedded builtin representing the runtime stub. This reduces
the memory footprint of modules.

R=clemensh@chromium.org

Change-Id: I3de528f7ebcc104f114ec32914d2b86e810d10d6
Reviewed-on: https://chromium-review.googlesource.com/c/1460474
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59575}
2019-02-13 16:55:15 +00:00
Junliang Yan
176bee052e PPC/s390: fix compilation error on -Wextra-semi
Bug: chromium:926235
Change-Id: I7af37f574c03439da34afc86cc8e6f49c3781579
Reviewed-on: https://chromium-review.googlesource.com/c/1470810
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Reviewed-by: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#59574}
2019-02-13 16:43:25 +00:00
Ulan Degenbaev
77c94fae3a [test] Make deopt-array-push test robust against page size changes
Bug: chromium:852420
Change-Id: Ic34b996460b9ad2124f4bdb18afdcc83f2453e6a
Reviewed-on: https://chromium-review.googlesource.com/c/1470109
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59573}
2019-02-13 16:30:25 +00:00
Yang Guo
b5b8c8a68f [gn] introduce v8_expose_symbols for symbol visibility
TBR=sergiyb@chromium.org

Bug: v8:8840
Change-Id: I04c2e6a1703764416cbb9987de262fe4d2b86b14
Reviewed-on: https://chromium-review.googlesource.com/c/1470105
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59572}
2019-02-13 16:28:53 +00:00
Jakob Gruber
10f0d8c143 Reland "[nojit] Don't expose wasm in jitless mode"
This is a reland of c79a63e634

Original change's description:
> [nojit] Don't expose wasm in jitless mode
>
> Wasm currently still creates executable memory even in
> interpreter-only mode, and is thus unsupported in jitless mode. This
> hides wasm completely, which will help e.g. fuzzers that attempt to
> run wasm code (and currently crash on the CHECK in AddOwnedCode).
>
> Bug: v8:7777,chromium:931068
> Change-Id: Iee692cb947d482ba16fb0f4da32490d42d5daef8
> Reviewed-on: https://chromium-review.googlesource.com/c/1470124
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59561}

Tbr: mstarzinger@chromium.org
Bug: v8:7777, chromium:931068
Change-Id: I535c3f598c90cd5c4072a73544cc33c5bf5460c1
Reviewed-on: https://chromium-review.googlesource.com/c/1470132
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59571}
2019-02-13 16:24:04 +00:00
Jakob Gruber
8a173c6ff4 Revert "[nojit] Don't expose wasm in jitless mode"
This reverts commit c79a63e634.

Reason for revert: Needs addtl test skips: https://chromium-review.googlesource.com/c/1470124

Original change's description:
> [nojit] Don't expose wasm in jitless mode
> 
> Wasm currently still creates executable memory even in
> interpreter-only mode, and is thus unsupported in jitless mode. This
> hides wasm completely, which will help e.g. fuzzers that attempt to
> run wasm code (and currently crash on the CHECK in AddOwnedCode).
> 
> Bug: v8:7777,chromium:931068
> Change-Id: Iee692cb947d482ba16fb0f4da32490d42d5daef8
> Reviewed-on: https://chromium-review.googlesource.com/c/1470124
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59561}

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

Change-Id: Ic242db3efe73ef362e0f0c3efde90682db6de4a8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7777, chromium:931068
Reviewed-on: https://chromium-review.googlesource.com/c/1470131
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59570}
2019-02-13 15:39:12 +00:00
Toon Verwaest
9439a1d2bb [ast] Always visit all AST nodes, even dead nodes
We'll let the bytecode compiler and optimizing compilers deal with dead code,
rather than the ast visitors. The problem is that the visitors previously
disagreed upon what was dead. That's bad if necessary visitors omit parts of
the code that the bytecode generator will actually visit.

I did consider removing the AST nodes immediately in the parser, but that
adds overhead and actually broke code coverage. Since dead code shouldn't be
shipped to the browser anyway (and we can still omit it later in the bytecode
generator), I opted for keeping the nodes instead.

Change-Id: Ib02fa9031b17556d2e1d46af6648356486f8433d
Reviewed-on: https://chromium-review.googlesource.com/c/1470108
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59569}
2019-02-13 15:24:28 +00:00
Maya Lekova
2cf6232948 Revert "[wasm] Fix two jump table offset parameters."
This reverts commit 74951850a0.

Reason for revert: Speculative revert, possibly causing an Arm failure - https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20arm%20-%20sim%20-%20lite/2399

Original change's description:
> [wasm] Fix two jump table offset parameters.
> 
> R=​jgruber@chromium.org
> 
> Change-Id: I5b40819b1a746f16b7b18aac1bba65d83a7e3483
> Reviewed-on: https://chromium-review.googlesource.com/c/1470127
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59560}

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

Change-Id: I94735b93371289f1f7d9190160b21b2eabb88b14
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/1470130
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59568}
2019-02-13 15:04:29 +00:00
Clemens Hammacher
8bfefb2f03 [wasm][test] Clean up function body decoder unittest
This cleans up a few things after https://crrev.com/c/1458956.

R=titzer@chromium.org

Bug: v8:8562
Change-Id: I7904c195ee385f0aa8815447f440d8119601af3e
Reviewed-on: https://chromium-review.googlesource.com/c/1460467
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59567}
2019-02-13 14:55:38 +00:00
Georg Neis
cbee0b9cf1 [ic] Remove FeedbackNexus::StateFromFeedback() in favor of ic_state()
They did the same thing.

Change-Id: I6b63762352dae2dce58fb3a6182af52cd0aadef6
Reviewed-on: https://chromium-review.googlesource.com/c/1470126
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59566}
2019-02-13 14:52:48 +00:00
Sigurd Schneider
b9ae3b7f1b Refactor how header defines are handled in V8 build files
TBR=yangguo@chromium.org

Change-Id: I28b549cc569e654482cc77f0de269eb33ea12569
Bug: v8:8788
Reviewed-on: https://chromium-review.googlesource.com/c/1463782
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59565}
2019-02-13 14:49:23 +00:00
Michael Starzinger
34b67481db [wasm] Remove dead {ThreadImpl::Block} structure.
R=clemensh@chromium.org

Change-Id: I73393686c1529a470b4c10297e88626555b9253e
Reviewed-on: https://chromium-review.googlesource.com/c/1470128
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59564}
2019-02-13 14:48:18 +00:00
Mythri
503fb21987 [ic] Fallback to runtime from builtins to check if we throw on error
When an error occurs when storing the properties we either need to
throw or ignore the error depending on the language mode. We used
to infer the language mode from the type feedback vector. This cl
instead falls back to runtime to check and throw an error when
needed.

Bug: v8:8580
Change-Id: Iebeb3ca86d753157329dc1b5cfd1c07af2ff3dcd
Reviewed-on: https://chromium-review.googlesource.com/c/1458220
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59563}
2019-02-13 14:43:18 +00:00
Junliang Yan
421cf6136c PPC/s390: [builtins] Improve CallApiCallback calling convention.
Port c142e0a2b1

Original Commit Message:

    Refactor the CallApiCallback builtin to

    - pass the context as with other stubs, and
    - pass holder and call data in registers.

    This avoids having to place holder and call data onto the stack, and
    thus makes it possible to easily call the CallApiCallback builtin from
    other builtins while just forwarding the (stack) arguments. The idea
    is to use this in the future to optimize the general case of calling
    into any API method via a FunctionTemplateInfo and doing appropriate
    security and/or interface checks upfront as necessary (eventually making
    the HandleApiCall C++ builtin obsolete at some point).

R=bmeurer@chromium.org, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: Ic6c246bb28a6affa6fe015c1207c773b375a2b30
Reviewed-on: https://chromium-review.googlesource.com/c/1470443
Reviewed-by: Milad Farazmand <miladfar@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#59562}
2019-02-13 14:31:58 +00:00
Jakob Gruber
c79a63e634 [nojit] Don't expose wasm in jitless mode
Wasm currently still creates executable memory even in
interpreter-only mode, and is thus unsupported in jitless mode. This
hides wasm completely, which will help e.g. fuzzers that attempt to
run wasm code (and currently crash on the CHECK in AddOwnedCode).

Bug: v8:7777,chromium:931068
Change-Id: Iee692cb947d482ba16fb0f4da32490d42d5daef8
Reviewed-on: https://chromium-review.googlesource.com/c/1470124
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59561}
2019-02-13 14:26:54 +00:00
Michael Starzinger
74951850a0 [wasm] Fix two jump table offset parameters.
R=jgruber@chromium.org

Change-Id: I5b40819b1a746f16b7b18aac1bba65d83a7e3483
Reviewed-on: https://chromium-review.googlesource.com/c/1470127
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59560}
2019-02-13 14:25:48 +00:00
Georg Neis
74941eb583 [turbofan] Move a condition for inlining into SFI's IsInlineable
Since that condition doesn't depend on anything other than the SFI,
the IsInlineable method is the right place for checking it. This also
has the benefit that the condition will get checked earlier so that we
might avoid unnecessary work.

Bug: v8:7790
Change-Id: Ie92d4b72c6c524c5e8412701b88e88c9d73fa5bd
Reviewed-on: https://chromium-review.googlesource.com/c/1470061
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59559}
2019-02-13 14:15:28 +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
Clemens Hammacher
0ce2f3d43b [wasm][test] Remove macros
This removes most macros from the function body decoder unittest. It
makes the {Validate} method (and the new {ExpectValidates} and
{ExpectFailure}) templates, to receive the code in different formats.

Drive-by: Rename "verify" to "validate".

R=titzer@chromium.org

Bug: v8:8562
Change-Id: I89e6125b52cf40a9539317bf16189208cd0592ab
Reviewed-on: https://chromium-review.googlesource.com/c/1458956
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59557}
2019-02-13 14:10:18 +00:00
Junliang Yan
97d130f54a PPC: fix aix function descriptor issue on builtins
bug: v8:8828
Change-Id: I271f8cd4282f52fbcc573f6ccbe67b1111f62c7f
Reviewed-on: https://chromium-review.googlesource.com/c/1448711
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59556}
2019-02-13 13:57:10 +00:00
Georg Neis
b73d941441 [turbofan] Refactor ReduceKeyedAccess for readability
...by moving a special case into a separate method.

Change-Id: I880768ed6fbb7d29b94588435c9da65b01f07fde
Reviewed-on: https://chromium-review.googlesource.com/c/1462960
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59555}
2019-02-13 13:46:39 +00:00
Georg Neis
793f025bc5 [turbofan] Clarify purpose of bytecode_array in InlinedFunctionHolder
Change-Id: I7716dab4d6d0ff582acdffb988a05429bccab2ad
Reviewed-on: https://chromium-review.googlesource.com/c/1462006
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59554}
2019-02-13 13:42:59 +00:00
Toon Verwaest
2d9a9ed2dc [runtime] Change FIELD_ADDR to .ptr() instead of ->ptr()
We should just always get an Object in rather than both Object and Object*
where the former is dealt with through operator->.

Change-Id: I2d2542f37a357d4c410cc5f07c8e3563e66660b7
Reviewed-on: https://chromium-review.googlesource.com/c/1470104
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59553}
2019-02-13 13:23:59 +00:00
Georg Neis
87c985f50a [turbofan] Fix optimization of global loads and stores
They didn't take the new premonomorphic state into account. My bad.

Bug: chromium:931424
Change-Id: I74ad1f0f8ce0eb764d63c2a3527e597962baca6d
Reviewed-on: https://chromium-review.googlesource.com/c/1470125
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59552}
2019-02-13 12:26:59 +00:00
Benedikt Meurer
c142e0a2b1 [builtins] Improve CallApiCallback calling convention.
Refactor the CallApiCallback builtin to

- pass the context as with other stubs, and
- pass holder and call data in registers.

This avoids having to place holder and call data onto the stack, and
thus makes it possible to easily call the CallApiCallback builtin from
other builtins while just forwarding the (stack) arguments. The idea
is to use this in the future to optimize the general case of calling
into any API method via a FunctionTemplateInfo and doing appropriate
security and/or interface checks upfront as necessary (eventually making
the HandleApiCall C++ builtin obsolete at some point).

Bug: v8:8820, chromium:913553
Change-Id: I10c0065016df4d0c24bac3d46945ea597b65ed02
Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
Reviewed-on: https://chromium-review.googlesource.com/c/1469821
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59551}
2019-02-13 12:15:29 +00:00
Georg Neis
1534781f3e [turbofan] Refactor ComputePropertyAccessInfo for readability
...mainly by moving two big chunks into separate methods.

Change-Id: I048a8d27c28bc171559190a915616efbebdfe6cc
Reviewed-on: https://chromium-review.googlesource.com/c/1462957
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59550}
2019-02-13 11:28:50 +00:00
Georg Neis
6f66dcefda [build] Avoid 'using namespace' in gen-postmortem-metadata.py
This fixes jumbo builds with enabled v8_postmortem_support.

Bug: v8:8838
Change-Id: Idf2efc3b94104ca1921b6de121df1c0aa7f3452c
Reviewed-on: https://chromium-review.googlesource.com/c/1470102
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59549}
2019-02-13 11:08:00 +00:00
Pierre Langlois
da2300f66e [heap] Relax accesses to a page's live byte count.
Each page has a `live_byte_count_` field in its header and it is always accessed
with atomic operations. However, apart from one corner case, this field is only
accessed by the main thread so let's remove the atomicity by default.

To summarise, this changes the MarkingState accessors in the following way:

- IncrementalMarkingState:

Accesses of live_byte_count_ are now non-atomic. Concurrent marking uses local
maps of live bytes per page so we have exclusive access to the field when using
this.

- MajorAtomicMarkingState:

This accessor does not guarantee exclusive access to live_byte_count_ so we need
to keep the access atomic. This is used by the scavenger when migrating an
object that was marked black, since marking an object black will implicitly
increment the live_byte_count_.

Additionally, the live_bytes() and SetLiveBytes() accessor methods were not used
so remove them.

- MajorNonAtomicMarkingState:

Accesses of live_byte_count_ are not actually non-atomic.

- MinorNonAtomicMarkingState:

The `young_generation_live_byte_count_` field is atomic so we can set the memory
order manual to relax accesses.

Change-Id: I4c6457843783157ca878540e34ad50878afee20c
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
Reviewed-on: https://chromium-review.googlesource.com/c/1456095
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#59548}
2019-02-13 10:33:09 +00:00