Commit Graph

50433 Commits

Author SHA1 Message Date
Marja Hölttä
4eefb3960c [in-place weak refs] Cleanup: remove BodyDescriptorWeak typedefs
BodyDescriptorWeak is not needed for all classes. For the classes it's needed
it's referred to explicitly (Foo::BodyDescriptorWeak::IterateBody()).

BUG=v8:7308

Change-Id: If8591929cd588575e88f3d6f116ec2cac4941e8f
Reviewed-on: https://chromium-review.googlesource.com/1226649
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55941}
2018-09-17 09:10:35 +00:00
Michael Starzinger
a4105a437d [wasm] Implement handling of exported/imported exceptions.
This implements the proper semantics for matching exported/imported
exceptions by using the notion of an "exception tag" that is global to
the system. It can be used to match exceptions in one module against
exceptions declared and/or thrown in another module (or instance).

R=clemensh@chromium.org
TEST=mjsunit/wasm/exceptions-shared
BUG=v8:8091

Change-Id: I37586d7be5d5e6169b3418dfbc415b26dd4750dd
Reviewed-on: https://chromium-review.googlesource.com/1226976
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55940}
2018-09-17 09:02:28 +00:00
Georg Neis
ec55c1ff3d [turbofan] Serialize more Map fields.
... as well as ScopeInfo::ContextLength.

Bug: v8:7790
Change-Id: I3ca8b6f252d96b21d0990f8fc08e076eeeea4176
Reviewed-on: https://chromium-review.googlesource.com/1226973
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@{#55939}
2018-09-17 09:00:19 +00:00
Florian Sattler
0c789aa57f [cleanup] Mark compiler methods in subclasses with override.
Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: I5164899da0994a855182ed203572c5984ab87449
Reviewed-on: https://chromium-review.googlesource.com/1227070
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55938}
2018-09-17 08:51:47 +00:00
Benedikt Meurer
0c296cb229 [turbofan] Initial support to compute NumberAdd/NumberSubtract in Word64.
This change introduces the necessary conversion operators to convert
from Word64 to other representations (Tagged, Word32, Float64, etc.),
and plugs in the Word64 representation for NumberAdd/NumberSubtract,
such that TurboFan will go to Int64Add/Sub on 64-bit architectures
when the inputs and the output of the operation is in safe integer
range. This includes the necessary changes to the Deoptimizer to be
able to rematerialize Int64 values as Smi/HeapNumber when going back
to Ignition later.

This change might affect performance, although measurements indicate
that there should be no noticable performance impact.

The goal is to have TurboFan support Word64 representation to a degree
that changing the TypedArray length to an uint64_t (for 64-bit archs)
becomes viable and doesn't have any negative performance implications.
Independent of that we might get performance improvements in other areas
such as for crypto code later.

Bug: v8:4153, v8:7881, v8:8171, v8:8178
Design-Document: bit.ly/turbofan-word64
Change-Id: I29d56e2a31c1bae61d04a89d29ea73f21fd49c59
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel
Reviewed-on: https://chromium-review.googlesource.com/1225709
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55937}
2018-09-17 08:32:04 +00:00
Clemens Hammacher
7784603687 [wasm] Run GC if page allocation fails, then retry
This adds another instance of the "if allocation fails, run GC then
retry" pattern, this time for making the actual memory reservation for
wasm memory.

R=mlippautz@chromium.org

Bug: chromium:883639, v8:7872, v8:8158
Change-Id: I40ed020ed2bbc253c4bbcbe51e3e9f5a0278d7a1
Reviewed-on: https://chromium-review.googlesource.com/1227117
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55936}
2018-09-17 08:30:58 +00:00
Benedikt Meurer
b8e554d53c [turbofan] Properly constant-fold Float64 comparisons.
While investigating crbug.com/878742 I found that somehow the
MachineOperatorReducer lacks the ability to constant-fold
comparisons of Float64 constants, which obviously leads to
pretty weird code.

Bug: v8:8015
Change-Id: I7e18ce10e9d5c87f131fb083ccd3e1e336189dae
Reviewed-on: https://chromium-review.googlesource.com/1226132
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55935}
2018-09-17 08:29:54 +00:00
Marja Hölttä
c696376e0b Reland [in-place weak refs] Fix MaybeObject function names
E.g., "ToWeakHeapObject" was misleading, since it didn't convert to a weak heap
object, instead returned a weakly pointed heap object. Change the function names
(in this case, to "GetHeapObjectIfWeak") to reflect this.

Also make casts explicit, if a MaybeObject is an Object, we can call cast<Object>().

Previous version: https://chromium-review.googlesource.com/1219025

BUG=v8:7308
TBR=ishell@chromium.org, ulan@chromium.org, ahaas@chromium.org, yangguo@chromium.org, tebbi@chromium.org

Change-Id: I503d4a2a3a68f85e9e02e1c2f9fc1c4187c8e9a1
Reviewed-on: https://chromium-review.googlesource.com/1226800
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55934}
2018-09-17 08:27:59 +00:00
Benedikt Meurer
32287faaf6 [turbofan] NumberSilenceNaN is redundant unless the input can be NaN.
We can remove redundant NumberSilenceNaN operations if the input is
known to be an OrderedNumber, which means that it's any number (incl.
-0) but not NaN.

This seems to specifically occur in applications that perform number
crunching on arrays with integer values outside the Smi range, as
these arrays will have double elements kind, but for most of the stores
to these arrays TurboFan will be able to tell that it's not going to
be a NaN.

Bug: v8:8015
Change-Id: I451ac0bf0cec26be18b991f6c3756fb41f1fbd97
Reviewed-on: https://chromium-review.googlesource.com/1225897
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55933}
2018-09-17 08:22:09 +00:00
Michael Hablich
cd306d91c5 Revert "Implement ResolveLocale in C++."
This reverts commit 1a225459be.

Reason for revert: Makes GC stress unhappy: https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20gc%20stress/18325 and blocks the roll

Original change's description:
> Implement ResolveLocale in C++.
> 
> Bug: v8:8065, v8:5751
> Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
> Change-Id: Id9dc16455d63b7c436126c21758d64fae0ec8de9
> Reviewed-on: https://chromium-review.googlesource.com/1211402
> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#55925}

TBR=bstell@chromium.org,gsathya@chromium.org

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

Bug: v8:8065, v8:5751
Change-Id: I4d71adb31ffd5ab0d2ae42c0255d0a05edbaad29
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/1226646
Reviewed-by: Michael Hablich <hablich@chromium.org>
Commit-Queue: Michael Hablich <hablich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55932}
2018-09-17 08:05:54 +00:00
Florian Sattler
c8fd2870dd [cleanup] Mark interpreter methods in subclasses with override.
Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: Ibc3dedb0bce78ddce4004ee386757ce504bb073a
Reviewed-on: https://chromium-review.googlesource.com/1226792
Commit-Queue: Florian Sattler <sattlerf@google.com>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55931}
2018-09-17 07:48:56 +00:00
Florian Sattler
df5263b0c0 [cleanup] Mark test/ methods in subclasses with override.
Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: I6bd8e0c8c1965f22a3429fda12bc70ae454c39c2
Reviewed-on: https://chromium-review.googlesource.com/1226978
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55930}
2018-09-17 07:40:00 +00:00
Florian Sattler
8e7e845952 [cleanup] Mark extensions methods in subclasses with override.
Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: I62ef9a644bd8ba68c44e8e224e54e8c20c3442c7
Reviewed-on: https://chromium-review.googlesource.com/1225795
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55929}
2018-09-17 07:37:58 +00:00
Igor Sheludko
37d87f610f [ptr-compr] Introduce BoundedPageAllocator and use it instead of CodeRange.
This is a reland of 16816e53be

Bug: v8:8096
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I257fc391931a0a4bf01f2e8136183aaed044231c
Reviewed-on: https://chromium-review.googlesource.com/1226915
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55928}
2018-09-15 22:25:40 +00:00
v8-ci-autoroll-builder
b175a30dba Update V8 DEPS.
Rolling v8/build: e021b7c..dc14f7b

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/3e07166..c9dc040

Rolling v8/third_party/depot_tools: b5e8781..2174136

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

Change-Id: Ic3b93484af284a4297862e12ded35e87229e9113
Reviewed-on: https://chromium-review.googlesource.com/1227505
Reviewed-by: V8 Autoroller <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: V8 Autoroller <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#55927}
2018-09-15 03:47:29 +00:00
Igor Sheludko
e53b929e27 [cleanup] Support V8-agnostic mode in MacroAssembler
This allows to avoid passing around Isolate instance for no actual reason when
generating "codegen" functions.

Bug: v8:8015
Change-Id: Ic3a9bd5a8ecb5b559479e44c5e1309a78a1546e7
Reviewed-on: https://chromium-review.googlesource.com/1226133
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55926}
2018-09-15 03:09:44 +00:00
Brian Stell
1a225459be Implement ResolveLocale in C++.
Bug: v8:8065, v8:5751
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Id9dc16455d63b7c436126c21758d64fae0ec8de9
Reviewed-on: https://chromium-review.googlesource.com/1211402
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55925}
2018-09-15 00:36:38 +00:00
tzik
24a232e242 Reland "Implement v8::internal::MicrotaskQueue::EnqueueMicrotask"
This is a reland of 836773c0e3

Original change's description:
> Implement v8::internal::MicrotaskQueue::EnqueueMicrotask
> 
> This adds `queue` and `pending_microtask_count` as members of
> v8::internal::MicrotaskQueue, and implements its EnqueueMicrotask.
> The implementation itself is similar to Isolate::EnqueueMicrotask.
> 
> Bug: v8:8124
> Change-Id: Idb5c50b2add96b72cbe9e36aeec7cb568072f0cb
> Reviewed-on: https://chromium-review.googlesource.com/1205430
> Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#55884}

Bug: v8:8124
Change-Id: Ibd32aec28c8fd9eab88904e62ba97a715295765d
Reviewed-on: https://chromium-review.googlesource.com/1226577
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55924}
2018-09-14 17:42:56 +00:00
Ben Smith
0de680bd21 [d8] Fix DCHECK when transferring ArrayBuffer twice
Bug: chromium:883492
Change-Id: I69e76eb51c635d092918a3cb9a8fa94a86f58f2a
Reviewed-on: https://chromium-review.googlesource.com/1226410
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Ben Smith <binji@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55923}
2018-09-14 17:33:19 +00:00
PhistucK
53de7345bd [Intl] Rename dayperiod to dayPeriod
Previously, DateTimeFormat.prototype.formatToParts returned an object
with the property key 'dayperiod' which is incorrect as per the spec.
This patch updates the property key to say 'dayPeriod', making this spec
compliant.

R=cira@chromium.org

Bug: chromium:865351
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I37f50797387bc69d5e29d7c2911bc5cc0fad37ac
Reviewed-on: https://chromium-review.googlesource.com/1145304
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: PhistucK <phistuck@gmail.com>
Cr-Commit-Position: refs/heads/master@{#55922}
2018-09-14 17:04:03 +00:00
Florian Sattler
0390eef826 [cleanup] Refactor interpreter to use default members.
Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: I6cd63aa164af2e3b4a846933899a9a1baa54b1ef
Reviewed-on: https://chromium-review.googlesource.com/1224032
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55921}
2018-09-14 16:50:34 +00:00
Florian Sattler
6a8c74cbf1 [cleanup] Mark libplatform methods in subclasses with override.
Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: I85fc4ba0e4188d60d15e389e4682541c65324b55
Reviewed-on: https://chromium-review.googlesource.com/1227071
Commit-Queue: Florian Sattler <sattlerf@google.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55920}
2018-09-14 16:43:37 +00:00
Florian Sattler
654a7cb375 [cleanup] Replace 0 and NULL with nullptr for compiler files.
Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: I20fd23b5370d15dddc913f6bdb05e649d71c2059
Reviewed-on: https://chromium-review.googlesource.com/1224373
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55919}
2018-09-14 16:20:29 +00:00
Marja Hölttä
3a79fe2363 Revert "[in-place weak refs] Fix MaybeObject function names"
This reverts commit ad72d19516.

Reason for revert: Build failures on *san

Original change's description:
> [in-place weak refs] Fix MaybeObject function names
> 
> E.g., "ToWeakHeapObject" was misleading, since it didn't convert to a weak heap
> object, instead returned a weakly pointed heap object. Change the function names
> (in this case, to "GetHeapObjectIfWeak") to reflect this.
> 
> Also make casts explicit, if a MaybeObject is an Object, we can call cast<Object>().
> 
> BUG=v8:7308
> 
> Change-Id: I4ef078572b4f4415afe7e2e706d3bd684e16e47d
> Reviewed-on: https://chromium-review.googlesource.com/1219025
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Commit-Queue: Marja Hölttä <marja@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#55906}

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

Change-Id: I054b578518e3f6fd7dbcddf0b56cc018726c1e7a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7308
Reviewed-on: https://chromium-review.googlesource.com/1226874
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55918}
2018-09-14 15:30:05 +00:00
Florian Sattler
3c9549a337 [cleanup] Refactor compiler-dispatcher profiler to use default members.
Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: I41b3d7c41ee9f8ff12f70feddcf38f2c9efc5049
Reviewed-on: https://chromium-review.googlesource.com/1224056
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55917}
2018-09-14 15:27:37 +00:00
Benedikt Meurer
ac52db3ba9 [turbofan] Int64 constants in translations are only allowed for Smis.
When the backend sees an Int64Constant in a translation, this currently
indicates the value is a Smi value.

Bug: v8:8015
Change-Id: I1527a6374b395d3a33ae0339df4b563084ea678e
Reviewed-on: https://chromium-review.googlesource.com/1226593
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55916}
2018-09-14 15:26:06 +00:00
Florian Sattler
b13825d1cc [cleanup] Refactor parser to use default members.
Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: I56b730814539df7fdc2e1e5fb06c8b2b104b5fc8
Reviewed-on: https://chromium-review.googlesource.com/1223830
Commit-Queue: Florian Sattler <sattlerf@google.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55915}
2018-09-14 14:47:47 +00:00
Florian Sattler
7f27bf262c [cleanup] Replace 0 and NULL with nullptr for src/ files.
Fixing clang-tidy warning.

Bug: v8:8015
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I5404f0b94c7badce2c59d8eac2c32810f4fa2c3c
Reviewed-on: https://chromium-review.googlesource.com/1224317
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55914}
2018-09-14 14:46:10 +00:00
Florian Sattler
017b0df77e [cleanup] Refactor base to use default members.
Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: Ifb940f40d4145a6074702a3d870242aeca625d96
Reviewed-on: https://chromium-review.googlesource.com/1224092
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55913}
2018-09-14 14:42:47 +00:00
Florian Sattler
1edbf16697 [cleanup] Refactor general tests to use default members.
Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: I4236a2cf85a414f9d7d1fbdaaaaf1c72a84f02e3
Reviewed-on: https://chromium-review.googlesource.com/1224093
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55912}
2018-09-14 14:40:47 +00:00
Ivica Bogosavljevic
1c8a883d59 MIPS64: Port [turbofan] Initial Word64 support in representation selection.
Port 6346cdb649

Change-Id: I397ff152f363a3f0345105fbdf5d939bc3245fb4
Reviewed-on: https://chromium-review.googlesource.com/1225707
Reviewed-by: Sreten Kovacevic <skovacevic@wavecomp.com>
Commit-Queue: Sreten Kovacevic <skovacevic@wavecomp.com>
Cr-Commit-Position: refs/heads/master@{#55911}
2018-09-14 14:36:47 +00:00
Yang Guo
ac1660c660 [debug] fix scaling prefix patching for debug evaluate
R=jgruber@chromium.org

Bug: chromium:882664
Change-Id: I12248de9a01839433daa40e8273a18a15a9867bb
Reviewed-on: https://chromium-review.googlesource.com/1221547
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55910}
2018-09-14 14:33:07 +00:00
Marja Hölttä
6f6b8a6ef9 [in-place weak refs] Remove special casing for JSFunction::BodyDescriptorWeak
It's the same as JSFunction::BodyDescriptor, so the special cases can be
removed.

This is a pre-step for refactoring BodyDescriptorWeak away.

BUG=v8:7308

Change-Id: Id65ce79f044960168d290fbbfdbc2a7aa854230e
Reviewed-on: https://chromium-review.googlesource.com/1226592
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55909}
2018-09-14 14:18:36 +00:00
Ulan Degenbaev
79cd9ce7c8 [heap] Eagerly free external memory on critical memory pressure.
Currently dead ArrayBuffers with external memory are discovered and
freed in sweeper. If sweeping is slow, it can take long time until
the external memory is freed. This is why wasm currently forces
at least two back-to-back GCs on allocaiton failure.

This patch ensures eager finalization of ArrayBuffers on critical
memory pressure notification.

Bug: v8:7621
Change-Id: I96c75922577388cafab049f5cbce01d636a7b400
Reviewed-on: https://chromium-review.googlesource.com/1224328
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55908}
2018-09-14 14:15:40 +00:00
Florian Sattler
a81bd4c05c [cleanup] Refactor code to use boolean literals instead of 0/1.
Fixing clang-tidy warning.

Bug: v8:8015
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Ib48ead467519354715e3bc0e3f718cbdda28f989
Reviewed-on: https://chromium-review.googlesource.com/1225704
Commit-Queue: Florian Sattler <sattlerf@google.com>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55907}
2018-09-14 14:00:40 +00:00
Marja Hölttä
ad72d19516 [in-place weak refs] Fix MaybeObject function names
E.g., "ToWeakHeapObject" was misleading, since it didn't convert to a weak heap
object, instead returned a weakly pointed heap object. Change the function names
(in this case, to "GetHeapObjectIfWeak") to reflect this.

Also make casts explicit, if a MaybeObject is an Object, we can call cast<Object>().

BUG=v8:7308

Change-Id: I4ef078572b4f4415afe7e2e706d3bd684e16e47d
Reviewed-on: https://chromium-review.googlesource.com/1219025
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55906}
2018-09-14 13:58:06 +00:00
Florian Sattler
c835ff79ef [cleanup] Replace 0 and NULL with nullptr for external includes.
Fixing clang-tidy warning.

Bug: v8:8015
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I4f9eb0fedbe1d35a571f3d5b111705a820edfb5b
Reviewed-on: https://chromium-review.googlesource.com/1224377
Commit-Queue: Florian Sattler <sattlerf@google.com>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55905}
2018-09-14 13:28:56 +00:00
Stephan Herhut
592eb38f1f [turbolizer] Fix formatting in readme file
The current formatting makes the build command seem to be one line,
whereas it should be two.

Change-Id: I9abe7cf3351aae1f1df51bf1e3ca46a0ed2c012b
Reviewed-on: https://chromium-review.googlesource.com/1225708
Reviewed-by: Daniel Clifford <danno@chromium.org>
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55904}
2018-09-14 13:24:49 +00:00
Florian Sattler
b2dac95379 [cleanup] Replace 0 and NULL with nullptr for test files.
Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: I2a7a8c8447d2835205f7a506f04efe4d1801b934
Reviewed-on: https://chromium-review.googlesource.com/1224316
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55903}
2018-09-14 12:56:00 +00:00
Florian Sattler
0a53977d30 [cleanup] Refactor objects to use default members.
Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: Ie0591d8f32ebd4b9681ef9eeec092e30b73bd0b8
Reviewed-on: https://chromium-review.googlesource.com/1224172
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55902}
2018-09-14 12:02:34 +00:00
Florian Sattler
09ab629de5 [cleanup] Replace 0 and NULL with nullptr for objects files.
Fixing clang-tidy warning.

Bug: v8:8015
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Ie05d919cfd5cc4447c00603c8a46e975ad85cce3
Reviewed-on: https://chromium-review.googlesource.com/1224378
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55901}
2018-09-14 11:23:21 +00:00
Clemens Hammacher
2d6e0be103 Reenable wasm regress-827806 test
This test was disabled because of flakes. This should be fixed now.

R=ahaas@chromium.org

Bug: v8:7872
Change-Id: I288f3776ca7f946caf20a66f1cdf5d37bd6ba245
Reviewed-on: https://chromium-review.googlesource.com/1224376
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55900}
2018-09-14 11:19:24 +00:00
Michael Achenbach
bfc0927fec [test] Rename debugger test
The test debug-live-edit-recursion flakily fails predictable testing and should
match the status file rule debug-liveedit-* that skips the other ~10 liveedit
tests.

Bug: v8:8147
Change-Id: I9d88b44d97daa09914e0fa46fb204e85c1e7344c
Reviewed-on: https://chromium-review.googlesource.com/1224430
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55899}
2018-09-14 11:17:04 +00:00
Clemens Hammacher
9da4803185 [Liftoff] Implement sign extensions
This implements the five sign extension opcodes for ia32 and x64 (and
bails out on other architectures).

R=titzer@chromium.org

Bug: v8:6600
Change-Id: Ibb8bae0e229e276b346f2d054b51864a0995a096
Reviewed-on: https://chromium-review.googlesource.com/1174533
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55898}
2018-09-14 11:14:53 +00:00
Jakob Gruber
74320a1b92 Revert "[builtins] Add FastCallFunction builtin that elides some checks"
This reverts commit 99e13e587e.

Reason for revert: Reverting in favor of a general mechanism for this in Torque.

Original change's description:
> [builtins] Add FastCallFunction builtin that elides some checks
> 
> This CL adds a new "Call" stub that can be used by builtins that will
> call the same JS call-back function often (e.g. compare function in
> Array.p.sort). The checks have to be done upfront once, but can then
> be omitted.
> 
> R=​jgruber@chromium.org
> 
> Bug: v8:7861
> Change-Id: Id6e4ca27c3d488a7b1f708cbcb4cbe6cc382513e
> Reviewed-on: https://chromium-review.googlesource.com/1208574
> Commit-Queue: Simon Zünd <szuend@google.com>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#55769}

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

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

Bug: v8:7861
Change-Id: I47260993ef2a16bd5348bb0b46da4d34d33ea10b
Reviewed-on: https://chromium-review.googlesource.com/1226871
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55897}
2018-09-14 11:09:08 +00:00
Florian Sattler
c747737b59 [cleanup] Refactor maybe-handle to use default members.
Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: I8546c58afbac278a764067173570b433dff6674d
Reviewed-on: https://chromium-review.googlesource.com/1224413
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55896}
2018-09-14 10:53:38 +00:00
Clemens Hammacher
0a059c3c72 [wasm][interpreter] Store code entry as raw pointer
We are currently wrapping the pointer to the instruction start in a
Foreign. The argument buffer, which is also a raw pointer, is passed
directly though.
This CL changes this to also pass the code entry as a raw pointer.

R=mstarzinger@chromium.org

Change-Id: Id7344efa589a5297339ec01c3cfa7688bcc706b3
Reviewed-on: https://chromium-review.googlesource.com/1226970
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55895}
2018-09-14 10:52:33 +00:00
Florian Sattler
3b9d9e03d5 [tools] Fixed header-filter for clang-tidy diff.
NOTRY=true

Change-Id: I28637031771ab994c3f4b7fe642eddfce9c69b16
Reviewed-on: https://chromium-review.googlesource.com/1225976
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55894}
2018-09-14 10:36:11 +00:00
Creddy
a67342a68a Reland "Enable OneShot optimizations by default"
This reland of the commit e938b7a3e5.


Original change's description:
> Enable OneShot optimizations by default
>
> BUG=v8:8072
>
> Change-Id: I2068d66644628fe1de7a6be30b8d43ecfae04e93
> Reviewed-on: https://chromium-review.googlesource.com/1220047
> Commit-Queue: Chandan Reddy <chandanreddy@google.com>
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#55875}

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

Change-Id: I2152d4f3886913ef7ffabf8611c3448299560d2b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8072
Reviewed-on: https://chromium-review.googlesource.com/1224933
Commit-Queue: Chandan Reddy <chandanreddy@google.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55893}
2018-09-14 10:34:42 +00:00
Georg Neis
349ed4cf7e [cleanup] Mechanically generate Map::Is*Map testers.
Tbr: hpayer@chromium.org
Change-Id: I3f10ee70a9f9990e0259095826ac40371a96bac5
Reviewed-on: https://chromium-review.googlesource.com/1225756
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55892}
2018-09-14 10:26:48 +00:00