Commit Graph

52504 Commits

Author SHA1 Message Date
Clemens Hammacher
0536ee43db Revert "[wasm][liftoff] Optimize one-armed ifs"
This reverts commit c2aaf0a6fa.

Reason for revert: Benchmarks fail, and ClusterFuzz is not happy (issue 911406, issue 911271)

Original change's description:
> [wasm][liftoff] Optimize one-armed ifs
> 
> Do not implement one-armed ifs by emulating an empty else branch. In
> Liftoff, we can generate better code and save compile time by handling
> this specially. If the merge point at the end of the if is not reached
> by the if-branch, we do not need to generate any merge code.
> 
> R=​titzer@chromium.org
> 
> Bug: v8:6600, v8:8423
> Change-Id: Ie8ea69dd7491f225605a8e1b986d275d869aa90b
> Reviewed-on: https://chromium-review.googlesource.com/c/1356508
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Ben Titzer <titzer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57968}

TBR=titzer@chromium.org,clemensh@chromium.org

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

Bug: v8:6600, v8:8423
Change-Id: I5cb3b069f40e34f34da4013e666f6ff293752567
Reviewed-on: https://chromium-review.googlesource.com/c/1360633
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58012}
2018-12-04 11:25:27 +00:00
Clemens Hammacher
541894826b [wasm] Remove dead method and field
R=ahaas@chromium.org

Change-Id: Id8b1dbaf363e7c0b8b0011f5ceb1e77badd622e6
Reviewed-on: https://chromium-review.googlesource.com/c/1360571
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58011}
2018-12-04 10:51:47 +00:00
Camillo Bruni
0d64b2c2ec [parser] Avoid reversing inner PreparseScopeData order
Drive-by-fixes:
- Rename RestoreData to RestoreDataForScope
- Move Scope's private variable declaration to after functions

Change-Id: I349b2fc05cd94d6d7a0745b28b4e66b898b5e147
Reviewed-on: https://chromium-review.googlesource.com/c/1358517
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58010}
2018-12-04 10:39:17 +00:00
Sigurd Schneider
026d47e9d7 [turbofan] Improve TypedOptimization more
This CL improves typed optimization more:
ChangePlainPrimitiveToNumber is only omitted if it is not required.

Change-Id: I5d81537a046c5a5a0c730fcd1e17bbdfda887687
Bug: v8:910562
Reviewed-on: https://chromium-review.googlesource.com/c/1357058
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58009}
2018-12-04 10:16:44 +00:00
Jaroslav Sevcik
a6669bdce7 [constant-tracking] Track constants by default.
It is possible this CL results in various regressions, the idea
is to get some data on where constant tracking helps and where
it regresses.

Bug: v8:8361
Change-Id: I2f291788a8bea03e6eaac9f51564c1da02734d1a
Reviewed-on: https://chromium-review.googlesource.com/c/1347474
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58008}
2018-12-04 10:02:30 +00:00
Michael Achenbach
f3398adf55 [test] Bump shards on slow bot
TBR=sergiyb@chromium.org
NOTRY=true

Change-Id: Ia49bf1d4a096e72c6584297ef5db0eaf85938178
Reviewed-on: https://chromium-review.googlesource.com/c/1360573
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58007}
2018-12-04 08:49:22 +00:00
v8-ci-autoroll-builder
ce76187afc Update V8 DEPS.
Rolling v8/build: 42a08f0..f686dfc

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/6f862e5..4feee58

Rolling v8/third_party/depot_tools: 61ea307..d87b096

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

Change-Id: I35746d4d32d6456ce7bf9320b64efbc2e3f3933a
Reviewed-on: https://chromium-review.googlesource.com/c/1360074
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58006}
2018-12-04 08:41:42 +00:00
Jakob Gruber
c6b0e12e4e [nojit] Refactor CallApiCallback calling convention
This is the first (and major) step towards converting CallApiCallback
and CallApiGetter stubs into builtins.

The CallApiCallbackStub was parameterized with the number of arguments
passed on the stack. This CL converts the compile-time parameter into
an explicit runtime parameter, and removes all uses of the stub
parameter.

Drive-by: The implementation is now mostly consistent across platforms.
Drive-by: Refactor the calling convention to free up two registers
(kCallData and kHolder are now passed on the stack).

Bug: v8:7777
Change-Id: I212dccc2930de89c264a13755918c9fae7842f1f
Reviewed-on: https://chromium-review.googlesource.com/c/1354887
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58005}
2018-12-04 08:38:03 +00:00
Marja Hölttä
f40638d148 [objects.h splitting] Move Dictionary and HashTable related leftovers out of objects-inl.h
For this to work, I had to move PropertyCell out of objects.h too, since
otherwise there would be an inl include cycle which makes the code not compile.

BUG=v8:5402,v8:8238

Change-Id: I3233f86b68c1e2fd32d135fcf0bbba8101af8cb2
Reviewed-on: https://chromium-review.googlesource.com/c/1356510
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58004}
2018-12-04 08:17:30 +00:00
Jakob Kummerow
371ba71f82 [ubsan] Port WeakArrayList to the new design
and also its pure-static subclass PrototypeUsers, whose porting
is a no-op.

Bug: v8:3770
Change-Id: I075806f784a0631058692149e71c45e455e90f73
Reviewed-on: https://chromium-review.googlesource.com/c/1355631
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58003}
2018-12-03 23:35:12 +00:00
Jakob Kummerow
2cae6038c5 [ubsan] Port UncompiledData and PreParsedScopeData
to the new design.

Bug: v8:3770
Change-Id: I8483d47ac77e756395656628a80257e6462de22c
Reviewed-on: https://chromium-review.googlesource.com/c/1355630
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58002}
2018-12-03 21:23:49 +00:00
Junliang Yan
2de45f214c [heap] adjust kMaxRegularHeapObjectSize on ppc64le
This is to address the first issue reported on v8:8453

Page::kPageSize is 524288
MemoryAllocator::GetCommitPageSize() returns 65536 on ppc

ObjectEndOffsetInCodePage() returns 458752
ObjectStartOffsetInCodePage() returns (65536 + 65536) => 131072

Therefore, memory = 327680, which is less than
kMaxRegularHeapObjectSize(507136), which causes the DCHECK to fail.

Bug: v8:8453
Change-Id: I6048192ded4234a6987371ec4d4b2a8553756c25
Reviewed-on: https://chromium-review.googlesource.com/c/1355422
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58001}
2018-12-03 20:46:30 +00:00
Nico Weber
48924ffa0f Make generate_bytecode_builtins_list build-dir-independent.
Bug: chromium:911183
Change-Id: I99552d09e68a6b99e35daf39e15ddf1ef5781baa
Reviewed-on: https://chromium-review.googlesource.com/c/1358701
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58000}
2018-12-03 19:04:22 +00:00
Vasili Skurydzin
366225ad18 s390x, aix, endianness: skip failing js-api test on Aix, s390(x)
architecture.

Bug: v8:8402
Change-Id: I13928b6946b8fa68ccd8d329c8a0856313a10571
Reviewed-on: https://chromium-review.googlesource.com/c/1357159
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#57999}
2018-12-03 18:53:05 +00:00
Joran Siu
0526646d30 s390: Convert CPU Features printf to PrintF
CPU features printout needs to use PrintF macro, in
order for the output to be in correct native encoding.

R=michael_dawson@ca.ibm.com, jyan@ca.ibm.com

Change-Id: If1762e452cdfe8c0ca954676acb20c1e60df8d2f
Reviewed-on: https://chromium-review.googlesource.com/c/1357160
Commit-Queue: Joran Siu <joransiu@ca.ibm.com>
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#57998}
2018-12-03 18:52:00 +00:00
Igor Sheludko
f74dd20208 Fix BigInt builtins and TurboFan support after BigInt header layout change
broken by: [cleanup] Fix kPointerSize usages in src/objects/bigint.*

Bug: v8:8477, v8:8238
Change-Id: If1961ae42e1969d4ee807ea052a9c4cf4f072d0f
Reviewed-on: https://chromium-review.googlesource.com/c/1357046
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57997}
2018-12-03 16:44:09 +00:00
George Wort
bf3cae9ecb [liftoff][arm] Handle trivial case for FloatMax.
Move lhs into dst when lhs == rhs.

Bug: v8:6600, chromium:910223
Change-Id: I5bcb01b57705c52f363a43b2036f0ade0fd451e7
Reviewed-on: https://chromium-review.googlesource.com/c/1357041
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57996}
2018-12-03 14:54:30 +00:00
Clemens Hammacher
558c950454 [Liftoff] Optimize code for returns
Since all other values are not used any more if we return, we don't
need to spill anything (as might happen during {PopToRegister}).
Instead, just load the top stack value into the return register(s).

R=titzer@chromium.org

Bug: v8:6600, v8:8423
Change-Id: Ibfd02d20191459c7b136ab9a48f0cf1a53b3385d
Reviewed-on: https://chromium-review.googlesource.com/c/1358391
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57995}
2018-12-03 14:47:00 +00:00
Toon Verwaest
0ed8017e8a [parser] Further cleanup identifier parsing
Rename ParseIdentifierOrStrictReservedWord to simply ParseIdentifier and
replace the old ParseIdentifier with ParseNonRestrictedIdentifier for the
disallow_restricted_identifier case. It reuses the new ParseIdentifier.

Clients that relied on the is_strict_reserved output parameter can simply check
the token themselves.

Change-Id: I49b096d7ffbfff391483e9c18c9504e5d353e97b
Reviewed-on: https://chromium-review.googlesource.com/c/1357057
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57994}
2018-12-03 12:44:59 +00:00
Toon Verwaest
33c6f1203e [parser] Cleanup property name parsing, introduce token flags
- Rename methods,
- Introduce flags for tokens to lookup IsKeyword and IsPropertyName
- Remove "contextual keyword" leftover code.
- Inline ParsePropertyName into ParsePropertyNameOrPrivatePropertyName
  since public is more likely than private.

Change-Id: Ib7633ef3c46889ecafc7a6c929029845bb8ef15c
Reviewed-on: https://chromium-review.googlesource.com/c/1357052
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57993}
2018-12-03 11:43:33 +00:00
Toon Verwaest
dac7aa0f8c [parser] Cleanup token ranges
Remove IdentifierOrEnum and AwaitOrYield and reduce Callable to exclude enum.

Change-Id: Id80c0c5e7a8d4869ab8d841f3b973ea7c0c844cc
Reviewed-on: https://chromium-review.googlesource.com/c/1357044
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57992}
2018-12-03 10:29:59 +00:00
Toon Verwaest
4679fdd221 [parser] Don't push string literals directly to the FunctionNameInferrer
If they are part of a keyed store they are pushed later using
impl()->PushPropertyName.

Change-Id: I9c104d15722dd59556c04fe3d4b0018c37d0f553
Reviewed-on: https://chromium-review.googlesource.com/c/1357055
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57991}
2018-12-03 10:24:09 +00:00
Stephan Herhut
2394b2683b [regalloc] Speed up state handling
The register allocator spends significant amounts of time on updating
the state of active and inactive live range sets. In many cases, no
update is needed. By precomputing when the next update is due during
state management, we can avoid unnecessary checks. This cuts the time
spent for managing queues in half.

Change-Id: I44074266bed2f09171872a829f115e61608b76c8
Reviewed-on: https://chromium-review.googlesource.com/c/1352308
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57990}
2018-12-03 10:08:26 +00:00
v8-ci-autoroll-builder
3e9cd32cde Update V8 DEPS.
Rolling v8/build: 8373abc..42a08f0

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

Change-Id: Ia1bc23643a569120a6fb22e912f1b06c8e15679b
Reviewed-on: https://chromium-review.googlesource.com/c/1356913
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#57989}
2018-12-03 03:34:01 +00:00
Frank Tang
62915f403e [Intl] Add order check test for Intl.*
Also split out some order check tests.

Bug: v8:5751
Change-Id: I1765d1809b456c43e21d9a379f720a0ea12e794e
Reviewed-on: https://chromium-review.googlesource.com/c/1352283
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57988}
2018-12-02 23:37:49 +00:00
v8-ci-autoroll-builder
98493b9414 Update V8 DEPS.
Rolling v8/build: fe88ff7..8373abc

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

Change-Id: Ib2f4e3846ba51a5ed9d07005ad9d3f8fb0604c74
Reviewed-on: https://chromium-review.googlesource.com/c/1356910
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#57987}
2018-12-02 03:30:23 +00:00
Mathias Bynens
e000fa3609 [cctest] Clarify OverrideReadOnlyPropertyOnPrototype setup
The `readonly: true` key-value pair is redundant since it gets
ignored anyhow. This patch removes it.

Also, `configurable: false` is implied when
using `Object.defineProperty` (just like `enumerable: false`
and `writable: false`). Therefore, specifying only `configurable`
but not `enumerable` and `writable` gave the impression that
configurability was somehow the deciding factor for this test.
Instead, the only important data property for this test is
`writable: false`. This patch lists all four data property
attributes explicitly, making it clear that only `writable` has
a “special” value.

Bug: v8:8175, v8:8238
Change-Id: Icfc6262f246712a64cdfcffff7b648f5681a711e
Reviewed-on: https://chromium-review.googlesource.com/c/1357048
Reviewed-by: Caitlin Potter <caitp@igalia.com>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57986}
2018-12-02 02:38:12 +00:00
v8-ci-autoroll-builder
13242e333e Update V8 DEPS.
Rolling v8/build: e066ef7..fe88ff7

Rolling v8/test/wasm-js/data: 2e948dd..76d26bb

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/63d69d7..6f862e5

Rolling v8/third_party/depot_tools: dd53081..61ea307

Rolling v8/tools/clang: 5422fce..558f684

Rolling v8/tools/swarming_client: 157bec8..0e3e1c4

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

Change-Id: I7cfd5de6833e5ad18501f07147c71e61ec392c11
Reviewed-on: https://chromium-review.googlesource.com/c/1356904
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#57985}
2018-12-01 03:53:29 +00:00
Jakob Kummerow
421807599d [ubsan] Fix complaint in NewArray when size == 0
While strictly speaking it is legal (though useless) to dynamically
create zero-length arrays with "new T[0]", UBSan does not like it,
so this CL avoids doing it. It fixes the error:

../../src/allocation.h:41:34: runtime error: constructor call on
address 0x... with insufficient space for an object of type 'unsigned char'

Bug: v8:3770
Change-Id: I5017767c59df0d8928f7493f92d2d04519083964
Reviewed-on: https://chromium-review.googlesource.com/c/1356902
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57984}
2018-12-01 02:43:17 +00:00
Jakob Kummerow
9d51166419 [bigint] Make kMaxLength platform-independent.
Taking kSystemPointerSize into account when determining the maximum
allowed BigInt size accidentally made the limit platform-specific.
This patch chooses a platform-independent constant (1<<30) instead.

Bug: chromium:909614
Change-Id: I4717969bc56e6dd5f1eed70b7e60e621989d0719
Reviewed-on: https://chromium-review.googlesource.com/c/1355625
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57983}
2018-11-30 23:43:29 +00:00
Ross McIlroy
e7ea654543 Reland "[Compiler] Introduce IsCompiledScope which prevents flushing of compiled code"
This is a reland of 10ea3f8a1d

Original change's description:
> [Compiler] Introduce IsCompiledScope which prevents flushing of compiled code
>
> Introduces a IsCompiledScope object which can be used to check whether a
> function is compiled, and ensure it remains compiled for the lifetime
> of the scope without being uncompiled by bytecode flushing. The Compile
> functions are modified to take a scope so that calling code can ensure
> the function remains compiled for the lifetime they require.
>
> Also, don't allocate a feedback vector for asm-wasm code as this
> is never used, and will be reallocated if the asm-wasm code fails to
> instantiate the module and we fallback to regular JavaScript.
>
> Also restructure Compiler::PostInstantiation() to allocate the feedback
> vector once, and do the optimized code check before optimizing for
> always opt.
>
> BUG=v8:8395
>
> Change-Id: I3f1a71143fcae3d1a0c01eefe91ebb4b8594221a
> Reviewed-on: https://chromium-review.googlesource.com/c/1352295
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57971}

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

Bug: v8:8395
Change-Id: I8dc00798a5680997990c879c3380fe4febd47297
Reviewed-on: https://chromium-review.googlesource.com/c/1357045
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57982}
2018-11-30 22:13:14 +00:00
Jakob Kummerow
f53d4d70a9 [ubsan] Port FeedbackVector and FeedbackMetadata
to the new design.

Bug: v8:3770
Change-Id: I63291cc8eccfa1da20e84c6d3e9f48f253409396
Reviewed-on: https://chromium-review.googlesource.com/c/1355627
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57981}
2018-11-30 20:00:20 +00:00
Ujjwal Sharma
9f6a854a7b [Intl] Remove dead code from runtime/runtime-intl.cc
Cleanup runtime/runtime-intl.cc by removing dead code, namely
Runtime_CanonicalizeLanguageTag and Runtime_GetDefaultICULocale.

Bug: v8:8439,v8:5751
Change-Id: Id8712b2f3b2ddffc0e289b904f17ae3b09faffae
Reviewed-on: https://chromium-review.googlesource.com/c/1329705
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57980}
2018-11-30 19:21:57 +00:00
Jakob Kummerow
dda79700be [ubsan] Port CodeDataContainer to the new design
Bug: v8:3770
Change-Id: I0ffdd0d9da8629977a0b82fbfdac2b4f903e39ad
Reviewed-on: https://chromium-review.googlesource.com/c/1355626
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57979}
2018-11-30 18:56:24 +00:00
Ross McIlroy
4a395137a1 [Test] Make collections-constructor-custom-iterator resilient to GCs.
The optimized code for TestSetWithCustomIterator holds a weak reference to the map
for the entries object. If this is collected by the GC then the optimized code deopts
which causes the test to fail. To prevent this, hold onto an entires object to keep
it's map alive.

Change-Id: I5796e74fc1d7c5061bf8c98f7a82fe582d6be76a
Reviewed-on: https://chromium-review.googlesource.com/c/1357043
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57978}
2018-11-30 18:07:14 +00:00
Toon Verwaest
298aefa600 [parser] Restructure identifier classifying
- Rely more heavily on Token::IsValidIdentifier.
- Deal with IsLet() when it's possibly a lexical declaration.
- Remove ENUM from the default IsAnyIdentifier range.
- Always pre-check whether IsAnyIdentifier before classifying identifiers.

Change-Id: I55eae6ff65dc306b466fa29d233c715e85bc3854
Reviewed-on: https://chromium-review.googlesource.com/c/1356514
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57977}
2018-11-30 16:41:39 +00:00
George Wort
8fd93c827d [liftoff][arm] Run mjsunit liftoff tests on arm
Add the arm architecture to the list of archs that support
Liftoff in mjsunit and so run the Liftoff tests for it.

Bug: v8:6600
Change-Id: I4896f0727f6ccc3343f5d517e100840f76dd901d
Reviewed-on: https://chromium-review.googlesource.com/c/1357040
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57976}
2018-11-30 16:40:35 +00:00
Hannes Payer
8ca0137a2c [heap] Ensure consistent large MemoryChunk checks.
Bug: chromium:852420
Change-Id: I47ea0994b7f1933095995c051fce76c288a25d6a
Reviewed-on: https://chromium-review.googlesource.com/c/1356515
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57975}
2018-11-30 16:39:30 +00:00
Ross McIlroy
07537cdb3c Revert "[Compiler] Introduce IsCompiledScope which prevents flushing of compiled code"
This reverts commit 10ea3f8a1d.

Reason for revert: Causing failure on gc_stress bot: 
https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket.appspot.com/8928421099411850688/+/steps/Bisect_10ea3f8a/0/steps/Retry/0/logs/collections-construct../0

Original change's description:
> [Compiler] Introduce IsCompiledScope which prevents flushing of compiled code
> 
> Introduces a IsCompiledScope object which can be used to check whether a
> function is compiled, and ensure it remains compiled for the lifetime
> of the scope without being uncompiled by bytecode flushing. The Compile
> functions are modified to take a scope so that calling code can ensure
> the function remains compiled for the lifetime they require.
> 
> Also, don't allocate a feedback vector for asm-wasm code as this
> is never used, and will be reallocated if the asm-wasm code fails to
> instantiate the module and we fallback to regular JavaScript.
> 
> Also restructure Compiler::PostInstantiation() to allocate the feedback
> vector once, and do the optimized code check before optimizing for
> always opt.
> 
> BUG=v8:8395
> 
> Change-Id: I3f1a71143fcae3d1a0c01eefe91ebb4b8594221a
> Reviewed-on: https://chromium-review.googlesource.com/c/1352295
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57971}

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

Change-Id: I1449a02a0aceb9757440757628e586df33972a40
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8395
Reviewed-on: https://chromium-review.googlesource.com/c/1357042
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57974}
2018-11-30 16:26:17 +00:00
Clemens Hammacher
d1b068141b [wasm] Add inline and noinline annotations for speed
This has significant impact on validation time (11% regression, see
linked bug). These annotations bring us back to the old performance
(according to local measurements it even makes us better than before).

R=mstarzinger@chromium.org

Bug: chromium:910432
Change-Id: I8e701f9577d53115b3db22be2a09487414c965df
Reviewed-on: https://chromium-review.googlesource.com/c/1356511
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57973}
2018-11-30 15:26:44 +00:00
Hannes Payer
9ec92be9c8 [heap] Fix cctest expectations for large object allocations.
Bug: chromium:852420
Change-Id: Ie1f656cafe78c517ff53676d8cb7200d0bf1d7cc
Reviewed-on: https://chromium-review.googlesource.com/c/1356518
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57972}
2018-11-30 14:47:54 +00:00
Ross McIlroy
10ea3f8a1d [Compiler] Introduce IsCompiledScope which prevents flushing of compiled code
Introduces a IsCompiledScope object which can be used to check whether a
function is compiled, and ensure it remains compiled for the lifetime
of the scope without being uncompiled by bytecode flushing. The Compile
functions are modified to take a scope so that calling code can ensure
the function remains compiled for the lifetime they require.

Also, don't allocate a feedback vector for asm-wasm code as this
is never used, and will be reallocated if the asm-wasm code fails to
instantiate the module and we fallback to regular JavaScript.

Also restructure Compiler::PostInstantiation() to allocate the feedback
vector once, and do the optimized code check before optimizing for
always opt.

BUG=v8:8395

Change-Id: I3f1a71143fcae3d1a0c01eefe91ebb4b8594221a
Reviewed-on: https://chromium-review.googlesource.com/c/1352295
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57971}
2018-11-30 14:38:23 +00:00
Camillo Bruni
58b36c72d0 [counters] Add more runtime call stats timers
- Message listener callbacks
- Bootstrapper and deserialization
- ObjectVerify
- Invoke and InvokeApiFunction

Drive-by-fix: sort RCS counters list.

Change-Id: I9acec3a3b94cb126c23575aae749c60b5257549d
Reviewed-on: https://chromium-review.googlesource.com/c/1356509
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57970}
2018-11-30 14:30:33 +00:00
Jakob Gruber
5b343483f1 Remove remaining infrastructure for FunctionEntryHook
Bug: v8:8503, v8:7777
Change-Id: Iadf515cf4735d1046c7c14f44c02d5d5f95df87a
Reviewed-on: https://chromium-review.googlesource.com/c/1356512
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57969}
2018-11-30 14:29:13 +00:00
Clemens Hammacher
c2aaf0a6fa [wasm][liftoff] Optimize one-armed ifs
Do not implement one-armed ifs by emulating an empty else branch. In
Liftoff, we can generate better code and save compile time by handling
this specially. If the merge point at the end of the if is not reached
by the if-branch, we do not need to generate any merge code.

R=titzer@chromium.org

Bug: v8:6600, v8:8423
Change-Id: Ie8ea69dd7491f225605a8e1b986d275d869aa90b
Reviewed-on: https://chromium-review.googlesource.com/c/1356508
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57968}
2018-11-30 14:05:03 +00:00
Tobias Tebbi
5aa43bdc62 [turbofan] add BranchHint to switch cases, maintain CSA deferred info through re-scheduling
Change-Id: I9c927567e43e269a9b8ed81edfc8786a879e9573
Reviewed-on: https://chromium-review.googlesource.com/c/1350120
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57967}
2018-11-30 13:44:03 +00:00
Sigurd Schneider
7a491d0320 Fix arm64 bug in 31bit Smis
Change-Id: Id73e9e4862d3b7751b6867183a43cfa7a0cdef52
Bug: v8:8344
Reviewed-on: https://chromium-review.googlesource.com/c/1355145
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57966}
2018-11-30 13:11:07 +00:00
Peter Marshall
8e4588915b [turbofan] Relax range for arguments object length
Bug: chromium:906043
Change-Id: I3a397447be186eff7e6b2ab25341718b6c0d205d
Reviewed-on: https://chromium-review.googlesource.com/c/1356507
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57965}
2018-11-30 13:04:43 +00:00
Maya Lekova
18b2840211 [test] Remove redundant API test with max-old-space-size limit
Remove the test-api/InitializeDefaultIsolateOnSecondaryThread_ResourceConstraints
test which was setting max-old-space-size limit without acutally using it. This
caused repetitive failures, resulting in the test being effectively disabled.

Bug: v8:8521

R=ulan@chromium.org, yangguo@chromium.org

Change-Id: Iad39cc95df86963d256816bf56d0bc5f62f7d5c9
Reviewed-on: https://chromium-review.googlesource.com/c/1356506
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57964}
2018-11-30 11:40:17 +00:00
Yang Guo
7e5cac2cf3 Make termination exception more consistent.
Termination exceptions tear down V8 to the bottom-most V8 call. If there is a
v8::TryCatch scope around that call, it returns true for HasTerminated() and
HasCaught(). However, Isolate::IsExecutionTerminating() returns false and we
can call into V8 from still inside the v8::TryCatch scope.

Changes that this patch introduces:
 - You need to leave the v8::TryCatch scope around the bottom-most call to
   reset the termination state, in order to resume.
 - Explicitly check for termination exception and reporting it through the
   DevTools protocol after Runtime.evaluate and Debugger.evaluateOnCallFrame.

Bug: v8:8455
Change-Id: I1f36f7a365985469813c2619bf16f18ee69aa4b8
Reviewed-on: https://chromium-review.googlesource.com/c/1337582
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57963}
2018-11-30 11:33:07 +00:00