Commit Graph

52160 Commits

Author SHA1 Message Date
Clemens Hammacher
ed4b4cd482 Use static RegisterName function instead of RegisterConfiguration
Register names are static, so we do not need to access them via
RegisterConfiguration. This saves a lot of RegisterConfiguration
object creations.

R=mstarzinger@chromium.org

Bug: v8:8238
Change-Id: I295ad4d4b13fe948c70490687b7e3e9b48e70af9
Reviewed-on: https://chromium-review.googlesource.com/c/1342517
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57668}
2018-11-21 10:24:13 +00:00
Caitlin Potter
a5336471f2 [builtins] Implement Object.fromEntries
Adds the Object.fromEntries() method behind
--harmony-object-from-entries.


Includes an initial implementation of the new experimental builtin
Object.fromEntries implemented by Daniel Clifford, and
has been modified by Caitlin Potter to support a fast case to skip
the iterator protocol when it can be done unobservably in common cases.

There are some incidental changes: A number of CSA macros have been
updated to use TNodes, and some Context arguments have been
re-arranged to be implicit in Torque.


There are also a number of mjsunit tests written mirroring and
expanding on the test262 tests.

BUG=v8:8021

Change-Id: I1c12bee8a2f98c6297b77d5d723910a5e3b630cc
Co-authored-by: Daniel Clifford <danno@chromium.org>
Co-authored-by: Caitlin Potter <caitp@igalia.com>
Reviewed-on: https://chromium-review.googlesource.com/c/1337585
Commit-Queue: Daniel Clifford <danno@chromium.org>
Reviewed-by: Daniel Clifford <danno@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57667}
2018-11-21 10:05:42 +00:00
Jakob Gruber
b84766b388 [ia32,root] Remove root register verification
Verification has served its purpose now that kRootRegister is fully
supported on ia32.

Bug: v8:6666
Change-Id: I037617bf900f161c221228107c9f1352d4815d87
Reviewed-on: https://chromium-review.googlesource.com/c/1296130
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57666}
2018-11-21 09:54:55 +00:00
Toon Verwaest
8da2afaa77 Revert "[parser] Use memcmp for keyword checks"
This reverts commit 5616f91a7a.

Reason for revert: Tanks performance on codeload/ia32 by >1%

Original change's description:
> [parser] Use memcmp for keyword checks
> 
> Small readability increase for the keyword check magic, using memcmp
> instead of a chain of raw comparisons. Could allow better codegen for
> memcmp-aware compilers, though in practice seems to have little effect
> on generated code.
> 
> Change-Id: I91020fe67cebc9270c61c4c678e15217e436afff
> Reviewed-on: https://chromium-review.googlesource.com/c/1340291
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57595}

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

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

Change-Id: Ifd4070efb3e692eb70e5d8b3adb04d7d7e45ef0e
Reviewed-on: https://chromium-review.googlesource.com/c/1345994
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57665}
2018-11-21 09:38:45 +00:00
Benedikt Meurer
b5a443c267 Reland "[turbofan] Improve NumberMultiply typing rule."
This is a reland of 585b4eef6a without
any changes.

Original change's description:
> [turbofan] Improve NumberMultiply typing rule.
>
> The NumberMultiply typing rule gave up in the presence of NaN inputs,
> but we can still infer useful ranges here and just union the result
> of that with the NaN propagation (similar for MinusZero propagation).
> This way we can still makes sense of these ranges at the uses.
>
> Bug: v8:8015
> Change-Id: Ic4c5e8edc6c68776ff3baca9628ad7de0f8e2a92
> Reviewed-on: https://chromium-review.googlesource.com/c/1261143
> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#56539}

Tbr: bmeurer@chromium.org
Bug: v8:8015
Change-Id: I32e5c2f439a1186891ca3393ee53a2a766585839
Reviewed-on: https://chromium-review.googlesource.com/c/1345993
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57664}
2018-11-21 09:32:15 +00:00
Michael Achenbach
28af9d7e90 Update V8 DEPS.
Rolling v8/build: 1f137f3..a2bfd53

Rolling v8/buildtools: 13a00f1..da9b294

Rolling v8/test/wasm-js/data: 5aaea96..e822213

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/1e54003..d115075

Rolling v8/third_party/depot_tools: 7da982a..e47ac15

Rolling v8/tools/swarming_client: 7f463e6..b6e9e23

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

Change-Id: Icf622c3e49371ba965f08e15d0177697f04c55e5
Reviewed-on: https://chromium-review.googlesource.com/c/1344806
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@{#57663}
2018-11-21 09:16:25 +00:00
Yuki Shiino
f379bb117f Make Isolate::GetIncumbentContext() work fine with ASAN
When ASAN is enabled, the previous implementation of
Isolate::GetIncumbentContext didn't work well due to mixture of fake
and real stack frames.

This patch converts an address in the fake stack frame to an address
in the real stack frame so that we can compare two addresses.

Bug: chromium:888867, chromium:866610
Change-Id: Iccf570b8555f2fbdc737b12894a2784ffdb31602
Reviewed-on: https://chromium-review.googlesource.com/c/1343709
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57662}
2018-11-21 05:40:08 +00:00
Igor Sheludko
8708d46cc3 Revert "[cleanup] Move methods to V8_DEPRECATED"
This reverts commit a6e3cdd9b5.

Reason for revert: https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Android%20GN%20%28dbg%29/14259

Original change's description:
> [cleanup] Move methods to V8_DEPRECATED
> 
> Updates ObjectTemplate::NewInstance and FunctionTemplate::GetFunction
> from V8_DEPRECATED_SOON to V8_DEPRECATED, now that they're unused in
> chrome.
> 
> Bug: v8:7294, v8:7295, v8:8238
> Change-Id: Ic7cb2c410ff812f73cfd108551f2a1a20722df07
> Reviewed-on: https://chromium-review.googlesource.com/c/1344151
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Commit-Queue: Dan Elphick <delphick@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57657}

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

Change-Id: I98a49bd0467f068b0122314ce2d0564dd174c2c5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7294, v8:7295, v8:8238
Reviewed-on: https://chromium-review.googlesource.com/c/1344120
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57661}
2018-11-20 18:07:37 +00:00
Clemens Hammacher
eeb99d31ab [wasm][fuzzer] Remove unused return value
R=ahaas@chromium.org

Bug: v8:8238
Change-Id: I7a7de894aa7bf074cbe732f40e16b10060fa37dd
Reviewed-on: https://chromium-review.googlesource.com/c/1344149
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57660}
2018-11-20 17:15:35 +00:00
Igor Sheludko
81a654e7a0 [api][cleanup] Replace kApiPointerSize with kApiTaggedSize or kApiSystemPointerSize
This CL also disables fast access to the embedder fields when pointer compression is enabled.

Bug: v8:8477, v8:8238
Change-Id: I368bd87184590f8befdc882817497f75f0024569
Reviewed-on: https://chromium-review.googlesource.com/c/1344117
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57659}
2018-11-20 17:13:36 +00:00
Clemens Hammacher
41b34f2a55 [wasm][fuzzer] Fix detection of traps
Instead of returning 0xDEADBEEF, return a struct with proper
information. Otherwise a function returning 0xDEADBEEF would be
misidentified as trapping in the interpreter.

R=ahaas@chromium.org

Bug: chromium:906997
Change-Id: I92fc3a9972d76d2f8a5b313bf6be6eb027cfc1e9
Reviewed-on: https://chromium-review.googlesource.com/c/1344111
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57658}
2018-11-20 17:05:51 +00:00
Dan Elphick
a6e3cdd9b5 [cleanup] Move methods to V8_DEPRECATED
Updates ObjectTemplate::NewInstance and FunctionTemplate::GetFunction
from V8_DEPRECATED_SOON to V8_DEPRECATED, now that they're unused in
chrome.

Bug: v8:7294, v8:7295, v8:8238
Change-Id: Ic7cb2c410ff812f73cfd108551f2a1a20722df07
Reviewed-on: https://chromium-review.googlesource.com/c/1344151
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57657}
2018-11-20 17:04:47 +00:00
Tobias Tebbi
41ad531f4f [turbofan] in-block scheduling: schedule non-effect-chain nodes late
By giving higher priority to processing non-effect-chain nodes, this
changes the scheduling inside of basic blocks to place nodes before the
latest possible effect chain node.

Change-Id: I8b130904a1bb2360b995eb9de4f471a911a4e388
Reviewed-on: https://chromium-review.googlesource.com/c/1337743
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57656}
2018-11-20 16:38:08 +00:00
Daniel Clifford
280776f85c Incremental Torque type cleanup
Includes creating Oddball-specific types.

Change-Id: Ib5d80dfe95838b2deb0a2fcae67c349940970252
Reviewed-on: https://chromium-review.googlesource.com/c/1342930
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57655}
2018-11-20 16:26:27 +00:00
Toon Verwaest
4547a5b177 [d8] Load js source files by memory mapping them
Change-Id: I13dbdbedf3d7bdc3488e9a6c3d4a1b0becfedd74
Reviewed-on: https://chromium-review.googlesource.com/c/1344116
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57654}
2018-11-20 16:20:37 +00:00
Michael Starzinger
2e1b4e95af [assembler] Remove redundant assembler-arch-inl.h file.
R=clemensh@chromium.org

Change-Id: Ic56f6181a17520f54b9cab5dc3d106db56f1ede9
Reviewed-on: https://chromium-review.googlesource.com/c/1344115
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57653}
2018-11-20 16:12:43 +00:00
Georg Neis
93e63f78a6 [cleanup] Unify comments on context extension slot.
R=bmeurer@chromium.org

Change-Id: I215faf30fcd6c0a7c67a4969ec9255dd11b9be08
Reviewed-on: https://chromium-review.googlesource.com/c/1344112
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57652}
2018-11-20 16:03:58 +00:00
Michael Starzinger
fed7bb501e [test] Add cctest for i-cache coherency assumptions.
This test cases ensures that it is possible to maintain a coherent
instruction cache by using {Assembler::FlushICache} in any order with
respect to changing page permissions via {SetPermissions}.

R=ulan@chromium.org
TEST=cctest/test-icache
BUG=v8:6792

Change-Id: I1778bbbe94b40856d9732a9990a931b5a956a439
Reviewed-on: https://chromium-review.googlesource.com/c/1344113
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57651}
2018-11-20 15:59:26 +00:00
Sergiy Byelozyorov
281a320fa2 Revert "[tools] Re-land: Add retries when trying to discover the device"
This reverts commit f401cd4b2c.

Reason for revert: did not help

Original change's description:
> [tools] Re-land: Add retries when trying to discover the device
> 
> This is an experimental change that may help mitigate the issue.
> 
> TBR=machenbach@chromium.org
> 
> No-Try: true
> No-Tree-Checks: true
> Bug: chromium:893593
> Change-Id: Idf15a63006c2c7ba2c31482e5103b2a0b1d64510
> Reviewed-on: https://chromium-review.googlesource.com/c/1339401
> Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
> Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57558}

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

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

Bug: chromium:893593
Change-Id: I30c529a627d1e6fa52099939c5c209110e9d0eb9
Reviewed-on: https://chromium-review.googlesource.com/c/1342931
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57650}
2018-11-20 15:30:58 +00:00
Georg Neis
e64f7c0ae0 Reland "[turbofan] Use feedback when reducing global loads/stores."
This is a reland of 9c91b6877a after
fixing undefined behavior in numeric conversion that caused trouble
on arm32.

Original change's description:
> [turbofan] Use feedback when reducing global loads/stores.
>
> We already record the script context location or the property cell
> as feedback of the global load/store IC, so Turbofan doesn't need
> to do the lookups again.
>
> Change-Id: I6cbd2937de344729cd8e146b4ff85ddf3de6a56e
> Reviewed-on: https://chromium-review.googlesource.com/c/1335691
> Commit-Queue: Georg Neis <neis@chromium.org>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57555}

Change-Id: Ic2d09025de02f92199755ac860bb9e91fa08f4ec
Reviewed-on: https://chromium-review.googlesource.com/c/1340043
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57649}
2018-11-20 15:03:47 +00:00
Mythri
4237fc378c Preparation for feedback-free V8: Use feedback vector only when valid
This cl updates:
1. Adds a new feedback cell map to specify that no feedback is
collected
2. Checks if feedback vectors are valid before using then when
creating closures
3. Runtime profiler to only tier up functions with feedback
4. Interpreter entry trampoline to check for feedback vector before
using it.

Bug: v8:8394
Change-Id: I0248c8cd35d841c2744b22f4c672fa2e82033f6e
Reviewed-on: https://chromium-review.googlesource.com/c/1339866
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57648}
2018-11-20 14:43:22 +00:00
Toon Verwaest
0d2dcb0c4a [scanner] Add ScanFlag for keyword-start
Change-Id: I08af90a6bd863402309c1c65c829db6a955c67e3
Reviewed-on: https://chromium-review.googlesource.com/c/1342927
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57647}
2018-11-20 13:50:16 +00:00
Clemens Hammacher
de2681c1a8 Print readable register names
This adds a {PrintRegister} method which prints the given register in a
readable way (e.g. "eax", ... on ia32).
This is currently only used in Liftoff. The {RegisterConfiguration}
class has the same functionality, and I plan to make
{RegisterConfiguration} also use the new {RegisterName} functions in a
follow-up CL.

R=mstarzinger@chromium.org

Bug: v8:8238, v8:8423, v8:6600
Change-Id: If03901f1d8c5b043e0097e63920ab711bd7e2d17
Reviewed-on: https://chromium-review.googlesource.com/c/1340041
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57646}
2018-11-20 13:44:17 +00:00
Tobias Tebbi
00ffe4a613 [torque] enable multiple inheritance from Torque-generated assemblers
This enables more seamless interop between Torque and CSA:

Since CodeStubAssembler can now inherit from the Torque base namespace,
macros defined in the base namespace can be used in CodeStubAssembler
macros, even without qualification.
At the same time, macros in the base namespace can refer to
CodeStubAssembler macros. The only new limitation is that types defined
in code-stub-assembler.h cannot be referenced in the signature of macros
defined in the base namespace, since this would produce a cyclic header
dependency. A work-around for this woud be to put such types (like int31
in this CL) into a separate header included by both. I (mis-)used
code-assembler.h for that.
Another side-effec is that types and enums defined in CodeStubAssembler
have to be accessed in a qualified way from Torque.

Other assemblers can now inherit from their Torque equivalent, so
porting macros into the corresponding Torque namespace doesn't require
any change to the existing use-sites.

To avoid C++ ambiguities, the Torque-generated assemblers must not define
anything also defined in Code(Stub)Assembler. This includes the type
aliases for TNode, PLabel, ...
My workaround is to qualify everything in the generated C++.

As a drive-by fix, I had to change the formatter to avoid a situation
where it doesn't compute a fixed point: putting a keyword at the
beginning of a line removes the '\s' in front of it, so I replaced that
with '\b'.

Bug: v8:7793
Change-Id: If3b9e9ad967a181b380a10d5673615606abd1041
Reviewed-on: https://chromium-review.googlesource.com/c/1341955
Reviewed-by: Daniel Clifford <danno@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57645}
2018-11-20 13:33:36 +00:00
Michael Lippautz
105f7d92b0 Reland "heap: Move embedder epilogue after first round of weak callbacks"
This is a reland of b146824207.

Bug: chromium:843903, chromium:903586
Change-Id: Ida59ba4efd3abae6956b99aa104bbc66a3f01fdc
Reviewed-on: https://chromium-review.googlesource.com/c/1342924
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57644}
2018-11-20 13:23:32 +00:00
Michael Achenbach
9ccec94f43 [build][test] Remove configs for nosnap fuzzers
NOTRY=true

Bug: v8:8457
Change-Id: I9893f675232f47ae1529fd773adb524f60418c92
Reviewed-on: https://chromium-review.googlesource.com/c/1342928
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57643}
2018-11-20 13:09:39 +00:00
Yang Guo
bfcdff1f98 [snapshot] update comment wrt code cache layout
R=jgruber@chromium.org

Change-Id: I07d9c2f952f0ca3cf50f5faa4ad8db78be2a5b04
Reviewed-on: https://chromium-review.googlesource.com/c/1342926
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57642}
2018-11-20 12:45:22 +00:00
Pierre Langlois
32981bdbf9 [perf-prof] Remove option to generate unwinding info in the snapshot
Emitting unwinding info for builtins for perf to consume doesn't make sense with
embedded builtins so let's just remove the option.

The perf support is meant for code on the heap and the builtins are not there
anymore. If we want perf to be able to unwind through builtins we should emit
the unwinding DWARF information directly into the binary, using the dedicated
.eh_frame ELF section. This would also mean GDB would be able to unwind through
builtins as well which would be great.

Change-Id: I751cc5eb1e6f7c0eeae6b37a42986ae8ea47d6a0
Reviewed-on: https://chromium-review.googlesource.com/c/1340294
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#57641}
2018-11-20 12:38:31 +00:00
Clemens Hammacher
2bcbad5769 [wasm] Remove baseline_compilation_finished_ flag
Just compute it from the number of outstanding units.

R=ahaas@chromium.org

Bug: v8:7921
Change-Id: I30db10accc032bc50e1bbeab599325e1e971972b
Reviewed-on: https://chromium-review.googlesource.com/c/1341953
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57640}
2018-11-20 12:03:35 +00:00
Igor Sheludko
d469fec064 [ptr-compr] Introduce EmbedderDataArray
for storing embedder data in native context. We can't use FixedArray because
with enabled pointer compression it would not be possible to fit raw aligned
pointer into 32-bits of a tagged value so we will need to store both tagged
and raw data in this array and therefore custom visitor is required.

Bug: v8:7703
Change-Id: Iae23d9aa76c79a572d5f0f1f3c0f924e8e407dd0
Reviewed-on: https://chromium-review.googlesource.com/c/1340295
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57639}
2018-11-20 11:51:15 +00:00
Ulan Degenbaev
f39a3b9918 Make code_data_container and kind_specific_flags accessors atomic.
The concurrent marker needs to access the kind_specific_flags to decide
whether an embedded object reference is weak or not.

This patch turns the Code::code_data_container() into an acquire/release
atomic accessor and makes CodeDataContainer::kind_specific_flags a
relaxed atomic accessor.

Bug: v8:8459
Change-Id: I5251fed4e7b3315f8e229dfcfe2c23f611f4b333
Reviewed-on: https://chromium-review.googlesource.com/c/1337746
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57638}
2018-11-20 11:06:04 +00:00
Georg Neis
aded96db90 [turbofan] Remove --strict-heap-broker flag.
This has been on by default and the flag itself is no
longer useful.

R=jarin@chromium.org, mslekova@chromium.org

Bug: v8:7790
Change-Id: Icdf111b974a01953ea775ccb96d50217f3c8321b
Reviewed-on: https://chromium-review.googlesource.com/c/1342918
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57637}
2018-11-20 11:05:00 +00:00
Andreas Haas
9d5dd6dd19 [wasm] Adjust the traphandler implementation for MacOS
In the chrome-side implementation I currently use the default
trap handlers of V8, see https://crrev.com/c/1290955

Bug: chromium:906565

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I74c5a18c479ad1c69303d104ad4f040de436c4e7
Reviewed-on: https://chromium-review.googlesource.com/c/1282960
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57636}
2018-11-20 11:03:54 +00:00
Toon Verwaest
e036883b30 [runtime] Micro-optimize StringHasher
If we're hashing a single sequential string we don't need the state that the
string hasher itself tracks. This also drops first_char since we can simply
check that array_index is still 0.

Change-Id: Icb69709267426358f7c301eeb45936843ba261b0
Reviewed-on: https://chromium-review.googlesource.com/c/1340258
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57635}
2018-11-20 11:02:49 +00:00
Predrag Rudic
be2f94286f MIPS: Fix build of unitttests in debug mode
Our toolchain fails to link unittests without this change.

Change-Id: I48cc61f45fe5d533ed207f987371893caf54a919
Reviewed-on: https://chromium-review.googlesource.com/c/1340293
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Ivica Bogosavljevic <ibogosavljevic@wavecomp.com>
Cr-Commit-Position: refs/heads/master@{#57634}
2018-11-20 11:01:44 +00:00
Benedikt Meurer
154cb3f318 [turbofan] Properly turn Number.min(-0,+0) into -0.
Previously the simplified operation `Number.min(x,y)` would lower to
`Select(Float64LessThan(x, y), x, y)` which would yield `y` when both
`x` and `y` are zeros, specifically when `x` was -0 and `y` was +0.
For `NumberMin` we need to use `Float64LessThanOrEqual` since we
generally allow -0 on the left hand side (in SimplifiedLowering).

Bug: chromium:906870
Change-Id: I25ae8fb19608b77c90ed130e69d9d9fa93fcea9d
Reviewed-on: https://chromium-review.googlesource.com/c/1342920
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57633}
2018-11-20 11:00:41 +00:00
Yang Guo
2603bb051e Only expect new data properties in ValueDeserializer.
Bug: chromium:906313
Change-Id: Ie5d91e086d02433e2dec7728e29e4ae87cdd34c3
Reviewed-on: https://chromium-review.googlesource.com/c/1340290
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57632}
2018-11-20 10:59:36 +00:00
Camillo Bruni
8fdd095e5f Revert "heap: Move embedder epilogue after first round of weak callbacks"
This reverts commit b146824207.

Reason for revert: breaking blink, v8:8480

Original change's description:
> heap: Move embedder epilogue after first round of weak callbacks
> 
> Bug: chromium:843903, chromium:903586
> Change-Id: I0441ab2cc0fcc0b2cb411be0c92860c64d808324
> Reviewed-on: https://chromium-review.googlesource.com/c/1340254
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57604}

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

Change-Id: I4f72fb4f6060d814d09fa9d75ff41b5e236c8505
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:843903, chromium:903586
Reviewed-on: https://chromium-review.googlesource.com/c/1342922
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57631}
2018-11-20 09:23:31 +00:00
Sigurd Schneider
4d4949c516 [turbofan] Generate Float constants for certain checked conversions
This change ensures that we do not try to check the conversion of a floating
point constant, but insert the floating point constant instead.

Change-Id: I1c65e3a69acaea2ff805ba10317f64c0ac0ba098
Reviewed-on: https://chromium-review.googlesource.com/c/1340257
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57630}
2018-11-20 09:10:10 +00:00
Sigurd Schneider
7be3885128 [turbofan] Keep typer until after load elimination
This CL extends the lifetime of the typer in the pipeline until after
load elimination. This is a two-line CL to make it easy to revert if
we missed necessary brokerization.

If the CL sticks, we can remove some SetType calls in optimizations.

Change-Id: I4f27bfcada5221b2bae81297cd6b606881a7ccb8
Reviewed-on: https://chromium-review.googlesource.com/c/1341952
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57629}
2018-11-20 08:59:10 +00:00
Sigurd Schneider
872c3936cf [turbofan] Brokerize more maps for load elimination
This is pre-work to extend the typer phase until after load elinination.

Load elimination uses maps from CheckMaps/MapGuard/CompareMaps/LoadField
and this CL ensures they are brokerized.

Bug: v8:7790
Change-Id: Ic04f9c374bc736f03abf2bc7d257deb268d723c8
Reviewed-on: https://chromium-review.googlesource.com/c/1341950
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57628}
2018-11-20 08:55:51 +00:00
Michael Starzinger
53b0c62436 [test] Make assembler buffers non-executable by default.
R=ulan@chromium.org

Change-Id: Ib2eb33688517324884c4172560387242c71094fb
Reviewed-on: https://chromium-review.googlesource.com/c/1342518
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57627}
2018-11-20 08:49:29 +00:00
Jaroslav Sevcik
86894d98bf [turbofan] Fix RegExp.p.exec modification test.
Forgot to negate. Oops.

Bug: chromium:906893
Change-Id: I6e7a5a87e8c513795cc598314c9f0a34e9389e69
Reviewed-on: https://chromium-review.googlesource.com/c/1342919
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57626}
2018-11-20 06:36:53 +00:00
v8-ci-autoroll-builder
7f4a04e7f3 Update V8 DEPS.
Rolling v8/build: 2fb6537..1f137f3

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/b81a9c7..1e54003

Rolling v8/third_party/depot_tools: c6ffd7a..7da982a

Rolling v8/tools/clang: 1d879ce..aa6b9c8

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

Change-Id: I7e874e531e589b194184067e0e5b7fd7230c371d
Reviewed-on: https://chromium-review.googlesource.com/c/1342949
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#57625}
2018-11-20 03:26:47 +00:00
Aseem Garg
2b9bd491ce [wasm] Add I32AtomicWait implementation
Bug=v8:8075
R=adamk@chromium.org,binji@chromium.org

Change-Id: I2367e24888a268ce93b1730195cb4767896861cc
Reviewed-on: https://chromium-review.googlesource.com/c/1341126
Reviewed-by: Ben Smith <binji@chromium.org>
Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57624}
2018-11-20 02:01:44 +00:00
Aseem Garg
de8609aaf5 [wasm] Prototype I32AtomicWake implementation
Bug=v8:8075
R=adamk@chromium.org

Change-Id: Ib7b18448d59e1f54f664e24908fbd3a8b4607a9f
Reviewed-on: https://chromium-review.googlesource.com/c/1332153
Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
Reviewed-by: Ben Smith <binji@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57623}
2018-11-19 23:19:54 +00:00
Ben Smith
50798d6028 [wasm] Decode bulk memory instructions
These instructions aren't implemented yet in TF or in Liftoff, but they
are properly decoded.

The table instructions (i.e. `table.{init,drop,copy}`) are validated,
since the table and element sections occur before the code section. The
memory instructions (i.e. `memory.{init,drop,copy,fill}`) are not
validated because the data section occurs after the code section, so it
can't be verified in one pass (without throwing a validation error
later).

There is currently a discussion about whether to add a new section
(similar to `func`) that predefines the number of expected data
segments. If we add this, then we can validate in one pass. For now,
we'll leave it unimplemented.

Bug: v8:7747
Change-Id: I839edf51721105a47a1fa8dd5e5e1bd855e72447
Reviewed-on: https://chromium-review.googlesource.com/c/1339241
Commit-Queue: Ben Smith <binji@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57622}
2018-11-19 22:40:46 +00:00
Deepti Gandluri
c73c753efa Add missing semicolon for GrowMemory trace event
Change-Id: I16cc93b44bddbd8356a4098f3857db4f9808e13c
Reviewed-on: https://chromium-review.googlesource.com/c/1336777
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57621}
2018-11-19 19:55:19 +00:00
Junliang Yan
88e090d7da PPC/s390: [iwyu] Remove assembler.h -> register-configuration.h
Port 72823c8cfc

Original Commit Message:

    {RegisterConfiguration} is not used inside assembler.h.
    Instead, include it where needed.

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

Change-Id: Id79b6eda6f6ce9c105997ec65c9f72398af29954
Reviewed-on: https://chromium-review.googlesource.com/c/1342661
Reviewed-by: Muntasir Mallick <mmallick@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#57620}
2018-11-19 19:53:49 +00:00
Junliang Yan
7c0ec99782 PPC/s390: [iwyu] Remove interface-descriptors.h -> macro-assembler.h
Port 2cf36eb82d

Original Commit Message:

    Instead, include macro-assembler.h (and others) where needed.

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

Change-Id: I94320322584a39802aaaefd279ce8819ad8686d8
Reviewed-on: https://chromium-review.googlesource.com/c/1342978
Reviewed-by: Muntasir Mallick <mmallick@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#57619}
2018-11-19 19:49:36 +00:00