Commit Graph

50595 Commits

Author SHA1 Message Date
Clemens Hammacher
15d6d7b4ee [wasm] Increase code space limit to 1024 MB
Liftoff increases code size, and people start deploying bigger modules.
Increase the wasm code space limit from 512 MB to 1024 MB to account
for this.

R=titzer@chromium.org

Bug: chromium:883639, chromium:872684
Change-Id: I3a2ca29d456635f7f3aa1daef5fa2b0249dc1645
Reviewed-on: https://chromium-review.googlesource.com/1226971
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56003}
2018-09-18 16:34:55 +00:00
Hannes Payer
3723a177c1 Introduce LogObjectRelocation on Isolate.
Change-Id: I93726a98978b8b18a16a253f55fc698704d27be4
Reviewed-on: https://chromium-review.googlesource.com/1228376
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56002}
2018-09-18 16:22:05 +00:00
Clemens Hammacher
c8fe898dd8 [wasm] Track code reservations in the WasmMemoryTracker
The WasmMemoryTracker keeps track of reserved memory in order to avoid
running out of virtual address space. So far, we were only tracking
reservations for wasm memory, and not for code. This CL changes that to
also include code reservations.

Drive-by: Some cleanup around the allocation of the WasmCodeManager.

R=titzer@chromium.org

Bug: chromium:883639
Change-Id: I0c2586a742022ae00752132e048346d54e2a1a7c
Reviewed-on: https://chromium-review.googlesource.com/1230134
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56001}
2018-09-18 16:07:45 +00:00
Jakob Gruber
f25c1218d2 [ia32,root] Port JSEntryTrampolines
This CL is the first in a series of work that will remove ebx (the new
kRootRegister) use from all ia32 ASM builtins and stubs.

Bug: v8:6666
Change-Id: If417f1194a27ddae9e38d50e0a651dfc129e8b05
Reviewed-on: https://chromium-review.googlesource.com/1230095
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56000}
2018-09-18 14:27:03 +00:00
Jakob Gruber
1ab3888fd2 [ia32] Remove invalid indirect call/jump code
Indirect calls need a scratch register to load the target address. On
ia32 there's no easily-available scratch register.

This removes invalid code and documents a potential solution. But
ideally, this will remain unreachable since all inter-builtin calls
will be pc-relative.

Bug: v8:6666
Change-Id: I19e0ac699ee4757e3d5ec130b3e34a67cd1f851c
Reviewed-on: https://chromium-review.googlesource.com/1230096
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55999}
2018-09-18 14:25:58 +00:00
Michael Starzinger
adc6325b02 [wasm] Fix race when requesting more code memory.
This fixes a race on the {WasmCodeManager::lookup_map} data structure
when requesting more code memory on architectures for which we have the
corresponding {kCanAllocateMoreMemory} flag set. Note that there is no
TSAN coverage for these architectures.

R=clemensh@chromium.org
BUG=chromium:875189

Change-Id: I11a082359b4cb6cc69c3168a956c5152f1dcc833
Reviewed-on: https://chromium-review.googlesource.com/1230136
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55998}
2018-09-18 14:24:28 +00:00
Georg Neis
2f01682bea [turbofan] Inline ObjectData::Serialize().
This function was only used in one place and its name was confusing
because it was fundamentally different from the other Serialize
functions.

Bug: v8:7790
Change-Id: I2af384e41ecc2d97e644e6797a4200e00e840b23
Reviewed-on: https://chromium-review.googlesource.com/1230099
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@{#55997}
2018-09-18 13:50:02 +00:00
Leszek Swirski
be271454c4 Revert "[regexp] implement regexp property sequence proposal"
This reverts commit f4c14fd971.

Reason for revert: Breaks noi18n build

Original change's description:
> [regexp] implement regexp property sequence proposal
> 
> Also-By: mathias@chromium.org
> Bug: v8:7467
> Change-Id: I9fd6e61f4da1097c2375f671b4801e9730f792c4
> Reviewed-on: https://chromium-review.googlesource.com/1227974
> Commit-Queue: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Mathias Bynens <mathias@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#55991}

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

Change-Id: I10c67ad3ade35af920d32a7eea8ae0297677fa07
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7467
Reviewed-on: https://chromium-review.googlesource.com/1230137
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55996}
2018-09-18 13:48:58 +00:00
Sergiy Byelozyorov
f291131964 [tools] Remove perf-to-html script from the V8 repo
It is moved to a recipe module as a resource in https://crrev.com/i/678188.

R=machenbach@chromium.org

Bug: chromium:880732
Change-Id: If64b349d92d5da8452b32474d9d0c22d18155bc8
Reviewed-on: https://chromium-review.googlesource.com/1222126
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55995}
2018-09-18 13:46:37 +00:00
Georg Neis
253c2469f2 [turbofan] Get rid of HeapObjectType-related heap reads.
This removes the last unconditional read accesses to the heap, but
required a significant refactoring.

- Remove HeapObjectRef::type().
- Change HeapObjectData::Is* testers to look at the instance type
  in HeapObjectData::map().

- Remove ObjectRef::oddball_type()
- Add MapRef::oddball_type()
- Add MapRef::is_undetectable().
- Add MapRef::is_callable().

- Remove JSHeapBroker::HeapObjectTypeFromMap()
- Remove Type::For(JSHeapBroker*, Handle<Map>)
- Add BitsetType::Lub(MapRef).
- Add Type::For(MapRef).
- Add Type::For(HeapObjectType).

- Add HeapObjectRef::GetHeapObjectType(). THIS IS TEMPORARY.

As the last item suggests, I couldn't actually remove the
HeapObjectType class yet. See the explanation in the code.

Bug: v8:7790
Change-Id: I508e4bd5337277b0050f2204392fc36f41032fe9
Reviewed-on: https://chromium-review.googlesource.com/1228033
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55994}
2018-09-18 13:41:54 +00:00
Michael Achenbach
7f5d299649 [test] Skip test suspected for timeout on Android
TBR=leszeks@chromium.org
NOTRY=true

Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ic993310653d7e9351383253f8a1a65193d925b89
Reviewed-on: https://chromium-review.googlesource.com/1230101
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55993}
2018-09-18 13:21:51 +00:00
Jakob Gruber
a9716807e9 [ia32] Add scopes and verification to assist in root register ports
In the near future all ia32 ASM builtins must be audited & possibly refactored
to ensure they do not address ebx (= kRootRegister).

This CL adds mechanisms to verify ebx usage. SupportsRootRegisterScope marks
regions that are root-register-ready (i.e. does not use ebx).
AllowExplicitEbxAccessScope marks regions that are explicitly allowed to use
ebx, e.g. because they spill and restore its value at all boundaries and do not
contain any root-relative accesses.

Consistency is verified by calling the new AssertIsAddressable function at
strategic spots in the Assembler.

All of this code is temporary and should be removed once ia32 fully supports
the kRootRegister.

Bug: v8:6666
Change-Id: I7c5514794db0da889bdae9e3c23bc0d54780879d
Reviewed-on: https://chromium-review.googlesource.com/1226805
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@{#55992}
2018-09-18 12:27:54 +00:00
Yang Guo
f4c14fd971 [regexp] implement regexp property sequence proposal
Also-By: mathias@chromium.org
Bug: v8:7467
Change-Id: I9fd6e61f4da1097c2375f671b4801e9730f792c4
Reviewed-on: https://chromium-review.googlesource.com/1227974
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55991}
2018-09-18 12:20:54 +00:00
Florian Sattler
064703fb3a [cleanup] Fix compiler classes, removing unnecessary copies.
Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: I33858c6f6bb577f39f697a1d3094990a57044fca
Reviewed-on: https://chromium-review.googlesource.com/1228065
Commit-Queue: Florian Sattler <sattlerf@google.com>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55990}
2018-09-18 10:44:07 +00:00
Florian Sattler
064c3833db [cleanup] Refactor torque compiler to use default members.
Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: I9f76c7d530b22a030c9969dfee821e0896c358fb
Reviewed-on: https://chromium-review.googlesource.com/1224171
Commit-Queue: Florian Sattler <sattlerf@google.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55989}
2018-09-18 10:23:41 +00:00
Ross McIlroy
5e16d3ba02 Fix Arm64 assembler on Android.
BUG=v8:8157

Change-Id: I66bac3897eaad640b5723cdd0ec900e40cce1214
Reviewed-on: https://chromium-review.googlesource.com/1226917
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Rodolph Perfetta <rodolph.perfetta@arm.com>
Cr-Commit-Position: refs/heads/master@{#55988}
2018-09-18 09:43:05 +00:00
Jaroslav Sevcik
b6bdd7415c [turbofan] Fix dead value insertion in simplified lowering.
If type checks in simplified lowering produced dead value (i.e., of
type Type::None()), we have only propagated deadness along value
edges. With this CL, we also insert an Unreachable node after every
effectful node that produces dead value.

This is more consistent with dead code elimination, which also inserts
unreachable nodes after effectful nodes with value output None.

Bug: chromium:884052
Change-Id: Idcb168461f05f1811b2c9c16ab8ff179b259fbd3
Reviewed-on: https://chromium-review.googlesource.com/1228125
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55987}
2018-09-18 09:30:26 +00:00
Florian Sattler
6bcbb8f3fc [cleanup] Refactor debug to use default members.
Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: I1fdd9210d92725701f413ff410e3a39d96bccf66
Reviewed-on: https://chromium-review.googlesource.com/1224111
Commit-Queue: Florian Sattler <sattlerf@google.com>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55986}
2018-09-18 09:22:19 +00:00
Simon Zünd
d898fa3ec1 [torque] Add linter rule for 'label' naming convention
R=tebbi@chromium.org

Bug: v8:7793
Change-Id: I6690ae59743054e8171bffbf722eb486f468ac48
Reviewed-on: https://chromium-review.googlesource.com/1228062
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Simon Zünd <szuend@google.com>
Cr-Commit-Position: refs/heads/master@{#55985}
2018-09-18 09:20:23 +00:00
Florian Sattler
9c702f4d3d [cleanup] Refactor inspector to use default members.
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: I78bdf30b54a75fd96de0ca3d9243e1b55e9988ef
Reviewed-on: https://chromium-review.googlesource.com/1224090
Commit-Queue: Florian Sattler <sattlerf@google.com>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55984}
2018-09-18 09:13:59 +00:00
Benedikt Meurer
1210d0c1df [turbofan] Add missing Word8/16 -> Word64 representation changes.
Word8 and Word16 representation is treated like Word32 for the sake of
TurboFan's representation selection, but this was missing from the
Word64 conversions.

Bug: chromium:884933, v8:4153, v8:7881, v8:8171, v8:8178
Change-Id: If7b69cdd02b12546d87bba0643e9ee9cb35cb299
Reviewed-on: https://chromium-review.googlesource.com/1229953
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55983}
2018-09-18 08:51:27 +00:00
Georg Neis
4254fbf34e [turbofan] Serialize Object::BooleanValue.
Bug: v8:7790
Change-Id: Ic48c7d869d98b64195f699c47b1a250ae6ad2440
Reviewed-on: https://chromium-review.googlesource.com/1227127
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55982}
2018-09-18 08:19:20 +00:00
Georg Neis
043dfe76f8 [turbofan] Serialize IsUnboxedDoubleField.
I'm also changing the function signature to take the descriptor_index
instead of the FieldIndex, because this lets me reuse the vector of
property descriptors as storage.

Bug: v8:7790
Change-Id: Ie9dadcba2204b6825e5791f9c630fc8b1079a930
Reviewed-on: https://chromium-review.googlesource.com/1227873
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@{#55981}
2018-09-18 08:19:20 +00:00
Florian Sattler
f85f9e6505 [cleanup] Mark inspector methods in subclasses with override.
Fixing clang-tidy warning.

Bug: v8:8015
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I82a169545724fca7757b2fce6b64b56d1b6264ba
Reviewed-on: https://chromium-review.googlesource.com/1225794
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55980}
2018-09-18 08:09:17 +00:00
Florian Sattler
ee757d09c9 [cleanup] Refactor regexp profiler to use default members.
Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: If912b9d43f577ca3e9f3b8b27acf957c49e269dc
Reviewed-on: https://chromium-review.googlesource.com/1224113
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55979}
2018-09-18 08:06:33 +00:00
Florian Sattler
4703805b60 [cleanup] Mark regexp methods in subclasses with override.
Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: I46b96899f0a5973f2fbf8af94eb43d14955a3f45
Reviewed-on: https://chromium-review.googlesource.com/1227072
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55978}
2018-09-18 08:05:27 +00:00
Florian Sattler
3f6d90b148 [cleanup] Fix inspector classes, removing unnecessary copies.
Fixing clang-tidy warning.

Bug: v8:8015
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I641c72959470471747221f94da545a053dfcc0b0
Reviewed-on: https://chromium-review.googlesource.com/1228064
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55977}
2018-09-18 07:52:47 +00:00
Florian Sattler
0dd2a17121 [cleanup] Mark general src/ methods in subclasses with override.
Fixing clang-tidy warning.

Bug: v8:8015
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I2204967cff3e50d967a9c6f4685f0df5a6ba84af
Reviewed-on: https://chromium-review.googlesource.com/1226793
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55976}
2018-09-18 07:17:52 +00:00
v8-ci-autoroll-builder
4ba3ed00a3 Update V8 DEPS.
Rolling v8/build: dc14f7b..c4b8ad9

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/c9dc040..460fd88

Rolling v8/third_party/depot_tools: 2174136..ea4301e

Rolling v8/tools/clang: 9bd40b2..b170cc8

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

Change-Id: Ia2de587c342206cebb46cc65e72f378e2e1303c6
Reviewed-on: https://chromium-review.googlesource.com/1229616
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@{#55975}
2018-09-18 04:16:09 +00:00
Sathya Gunasekaran
1908872dcd [class] Make class field initializers breakable in the debugger
Add tests.

Bug: v8:5367
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I2a4215a87ba1dae98c4b25547494165f534b4a66
Reviewed-on: https://chromium-review.googlesource.com/1218046
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55974}
2018-09-17 22:25:44 +00:00
Junliang Yan
5743beebba PPC: fix calling abort by using ip
R=joransiu@ca.ibm.com

Change-Id: I975eb3eb0e896b4409e923638f5644dd404e8689
Reviewed-on: https://chromium-review.googlesource.com/1228640
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#55973}
2018-09-17 21:38:00 +00:00
Bill Budge
0874330755 [ApiNatives] Eliminate old enum and TODO
- Removes ApiNativeType enum, using InstanceType instead.
- Replaces switch with JSObject::GetInstanceSize call.

Bug: v8:8015
Change-Id: I1c952792a068ec4f46a03ec47dce578d632e7cc3
Reviewed-on: https://chromium-review.googlesource.com/1199905
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55972}
2018-09-17 19:17:38 +00:00
Junliang Yan
32aef42ad9 PPC/s390: [turbofan] Initial support to compute NumberAdd/NumberSubtract in Word64.
Port 0c296cb229

Original Commit Message:

    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.

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

Change-Id: I2119f156c4ddf942ea09ff8ed52e1c6cb32477f2
Reviewed-on: https://chromium-review.googlesource.com/1228634
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#55971}
2018-09-17 18:56:47 +00:00
Junliang Yan
89304433bb PPC/s390: [turbofan] Initial Word64 support in representation selection.
Port 6346cdb649

Original Commit Message:

    This adds support to TurboFan's representation selection for the Word64
    representation, and makes use of that to handle indices for memory access
    and allocation instructions (i.e. LoadElement, StoreElement, Allocate,
    etc.). These instructions had previously used Word32 as representation
    for the indices / sizes, and then internally converted it to the correct
    representation (aka Word64 on 64-bit architectures) later on, but that
    was kind of brittle, and sometimes led to weird generated code.

    The change thus only adds support to convert integer values in the safe
    integer range from all kinds of representations to Word64 (on 64-bit
    architectures). We don't yet handle the opposite direction and none of
    the representation selection heuristics for the numeric operations were
    changed so far. This will be done in follow-up CLs.

    This CL itself is supposed to be neutral wrt. functionality, and only
    serves as a starting point, and a cleanup for the (weird) implicit
    Word64 index/size handling.

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

Change-Id: Ic7ea30639dea3c5f8a59e7100a15d5ed50073c20
Reviewed-on: https://chromium-review.googlesource.com/1228416
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#55970}
2018-09-17 18:12:31 +00:00
Creddy
62b4e8e6db Disable one shot optimization for debug-evaluate-no-side-effect-builtins-2
Temporarily disable one-shot optimization for
debug-evaluate-no-side-effect-builtins-2 to fix the gc stress test.
This issue will be fixed in the future CL
(https://chromium-review.googlesource.com/c/v8/v8/+/1196725)
that adds new bytecodes for loads and stores and one-shot optimizations
will be enabled again.

Change-Id: I6475557778da4553b5b6cbba1fda14c52d3dd91b
Reviewed-on: https://chromium-review.googlesource.com/1228063
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Chandan Reddy <chandanreddy@google.com>
Cr-Commit-Position: refs/heads/master@{#55969}
2018-09-17 18:05:31 +00:00
Benedikt Meurer
ceacdcd06a [x64] Word32 comparisons automatically truncate Word64 inputs.
On Intel platforms, the kX64Cmp32 and kX64Test32 operations in
TurboFan's backend automatically truncate their inputs to Word32
(aka they don't look at the upper bits), so the instruction selection
can silently ignore TruncateInt64ToInt32 on the inputs.

Bug: v8:8178
Change-Id: Ia50a38cac927e5b2155f092a8885da255a3dddca
Reviewed-on: https://chromium-review.googlesource.com/1227935
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55968}
2018-09-17 16:29:54 +00:00
Alexei Filippov
1fc9327ffd [heap profiler] Refactor: Replace HeapEntriesMap with std::unordered_map.
Change-Id: I3d16a1e03a28a4ebd69b891cdb610e66230c9c3e
Reviewed-on: https://chromium-review.googlesource.com/1227421
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55967}
2018-09-17 16:24:48 +00:00
Alexei Filippov
21356d7f21 [heap profiler] Refactor: Replace HeapObjectsSet with std containers
Change-Id: Ib13782a8f5eea793b9a74d6f72c625a050069dc2
Reviewed-on: https://chromium-review.googlesource.com/1227681
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55966}
2018-09-17 16:20:38 +00:00
Florian Sattler
6df4c37779 [cleanup] Mark heap/ methods in subclasses with override.
Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: Ibdb4b81e1ba764d73bac6592eeef5783097076fc
Reviewed-on: https://chromium-review.googlesource.com/1225896
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55965}
2018-09-17 15:32:31 +00:00
Adam Klein
83db8c3698 [iwyu] Don't include microtask-queue-inl.h from objects-inl.h
Instead include it in the files that need to use it.

Change-Id: I2321f423ddcc1c0e779332c2e7d1a372bfb4ebbb
Reviewed-on: https://chromium-review.googlesource.com/1227305
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55964}
2018-09-17 15:29:51 +00:00
Clemens Hammacher
31be4b4504 [wasm] Reenable tests on n5x device
R=ahaas@chromium.org

Bug: v8:8158
Change-Id: Ifb00cd7b106f1ac5614acfb5ff7c2e8c0a9b0170
Reviewed-on: https://chromium-review.googlesource.com/1228055
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55963}
2018-09-17 15:08:07 +00:00
Michael Starzinger
95cd71c25a [wasm] Avoid stack-walks in some runtime functions.
This avoids unnecessary stack-walks to determine the current context in
WebAssembly runtime functions, in cases where the calling stub already
determined the calling instance and can just set the context register
itself before calling into the runtime.

R=clemensh@chromium.org

Change-Id: Iba02d479a7dad8907195bf94efb9d559be20a6d1
Reviewed-on: https://chromium-review.googlesource.com/1228035
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55962}
2018-09-17 14:29:10 +00:00
Clemens Hammacher
279cbe86da [wasm] Remove unneeded js-to-wasm parameter
js-to-wasm wrappers check whether trap handlers are enabled
process-wide, but are independent of their actual usage in the current
instance. Thus remove this unneeded parameter.

R=mstarzinger@chromium.org

Bug: chromium:862123
Change-Id: I3793213864568b4e26eb3414239033491e4539f5
Reviewed-on: https://chromium-review.googlesource.com/1226974
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55961}
2018-09-17 14:01:30 +00:00
Ivica Bogosavljevic
5b3fc95684 MIPS64: Port [turbofan] Initial support to compute NumberAdd/NumberSubstract...
Port 0c296cb229

Change-Id: Ic90f248e05a668cfda6f6a86772dcabbc5275ec0
Reviewed-on: https://chromium-review.googlesource.com/1228034
Reviewed-by: Sreten Kovacevic <skovacevic@wavecomp.com>
Commit-Queue: Sreten Kovacevic <skovacevic@wavecomp.com>
Cr-Commit-Position: refs/heads/master@{#55960}
2018-09-17 13:55:49 +00:00
Michael Starzinger
0074125486 Reland "[wasm] Implement handling of exported/imported exceptions."
This is a reland of a4105a437d

Original change's description:
> [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}

Bug: v8:8091
Change-Id: Ib85f099b26a8323a8a00299b5aaeb05aaff3c3c6
Reviewed-on: https://chromium-review.googlesource.com/1227975
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55959}
2018-09-17 13:15:22 +00:00
Benedikt Meurer
beebb2360f [cleanup] Cleanup JSArrayBuffer and TurboFan's handling of neutering.
Cleanup the JSArrayBuffer bit fields to use the proper object macros
that are now otherwise used consistently across the code base. Also
change TurboFan to consistently bailout when it sees an array buffer
that was previously neutered, so that the generic path / builtins are
again the chokepoints for the spec violations (the fact that we don't
always raise exceptions when we see a neutered array buffer), except
for the ArrayBufferView accessor inlining in the JSCallReducer, where
we still turn the values into zero (because we don't have access to
a CALL_IC speculation guard in the common case).

This also removes the ArrayBufferWasNeutered simplified operator, and
does regular LoadField + Number bitwise operations instead, which is
good enough and allows us to get rid of a lot of unnecessary complexity.

Bug: v8:4153, v8:7881, v8:8015, v8:8171, v8:8178
Change-Id: I4ce79ece762c632e6318f2ab7bcc6b2f82383947
Reviewed-on: https://chromium-review.googlesource.com/1226887
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55958}
2018-09-17 13:08:03 +00:00
Igor Sheludko
69621ef0c1 [cleanup] Introduce base::AddressRegion helper class
Bug: v8:8015
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I2ce078b662e3dd93e0fac310b0d73c4cadbaccb3
Reviewed-on: https://chromium-review.googlesource.com/1226640
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55957}
2018-09-17 13:02:54 +00:00
Florian Sattler
2c97e1458f [cleanup] Refactor compiler to use default members.
Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: I7d885f0e2ba3cdf97de190166dc4cdd24dc0c11e
Reviewed-on: https://chromium-review.googlesource.com/1224091
Commit-Queue: Florian Sattler <sattlerf@google.com>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55956}
2018-09-17 12:12:21 +00:00
Clemens Hammacher
863e6ce90e [wasm] Fix flaky OOM on memory allocation
We still see occasions of "WebAssembly Instantiation: Out of memory:
wasm memory", e.g. on the N5X arm64 bot.

We already have a retry-loop around the {ReserveAddressSpace} call, so
this error can only happen if {AllocatePages} fails.
I cannot easily reproduce, so I will land this CL and hope that it
fixes the flake.

We might eventually replace all these gc-then-retry loops by a better
mechanism which knows about process-wide allocations. Currently,
{AllocatePages} is isolate-independent, and only calls
{Platform::OnCriticalMemoryPressure}, but this call does nothing on the
default platform. So trigger a GC on the current isolate instead.

R=mlippautz@chromium.org

Bug: chromium:883639, v8:7872, v8:8158
Change-Id: Ib4e4a4a5f6b598d5832c327b1fc83ccb3bada9bc
Reviewed-on: https://chromium-review.googlesource.com/1226886
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55955}
2018-09-17 11:59:50 +00:00
Michael Starzinger
fe0361211f [wasm] Brush up mjsunit/wasm/exceptions test.
R=clemensh@chromium.org
TEST=mjsunit/wasm/exceptions
BUG=v8:8091

Change-Id: I93227c29bb3591983f1901577afdf305637beb70
Reviewed-on: https://chromium-review.googlesource.com/1226803
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55954}
2018-09-17 11:57:10 +00:00