Commit Graph

34505 Commits

Author SHA1 Message Date
neis
1744727d82 [interpreter] Add some bytecode tests for modules.
R=rmcilroy@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2393453003
Cr-Commit-Position: refs/heads/master@{#39963}
2016-10-04 18:42:36 +00:00
adamk
3c39bac440 Don't skip hole checks inside patterns in parameter lists
Previously, b6e9f625c1 fixed self-assignment
in parameters to throw. But it failed to deal with the case of
destructuring with defaults. This patch extends that previous approach
to always treat the end of a parameter as its initializer position,
whether it has an initializer or not.

This is the minimal change to make it easy to merge; a follow-up
will rename the field of Parameter from "initializer_end_position"
to "end_position".

BUG=v8:5454

Review-Url: https://codereview.chromium.org/2390943002
Cr-Commit-Position: refs/heads/master@{#39962}
2016-10-04 17:04:19 +00:00
neis
99cfa5f620 [interpreter] Remove redundant flag from bytecode cctest suite.
This removes the execute_ flag, which was always the negation of top_level_.

R=rmcilroy@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2390163003
Cr-Commit-Position: refs/heads/master@{#39961}
2016-10-04 16:30:15 +00:00
machenbach
efcb1ff447 Revert of Turn libbase into a component (patchset #10 id:180001 of https://codereview.chromium.org/2381273002/ )
Reason for revert:
Main suspect for roll block:
https://codereview.chromium.org/2387403002/

Original issue's description:
> Turn libbase into a component
>
> This is a precondition for turning libplatform into a component
>
> BUG=v8:5412
> R=jgruber@chromium.org,machenbach@chromium.org
> CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_compile_dbg_ng;master.tryserver.chromium.android:android_clang_dbg_recipe
>
> Committed: https://crrev.com/614e615775f732d71b5ee94ed29737d8de687104
> Cr-Commit-Position: refs/heads/master@{#39950}

TBR=jgruber@chromium.org,jochen@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:5412

Review-Url: https://codereview.chromium.org/2393603002
Cr-Commit-Position: refs/heads/master@{#39960}
2016-10-04 16:08:54 +00:00
franzih
5b1bcaea85 [IC] Delete unused variable.
BUG=

Review-Url: https://codereview.chromium.org/2389193002
Cr-Commit-Position: refs/heads/master@{#39959}
2016-10-04 15:37:15 +00:00
cbruni
c80619129d [tools] Initialize global pages var in callstats.html
R=machenbach@chromium.org
NOTRY=true
BUG=chromium:611010

Review-Url: https://codereview.chromium.org/2391843003
Cr-Commit-Position: refs/heads/master@{#39958}
2016-10-04 14:45:05 +00:00
franzih
576296ac7a [IC] Delete param in ShouldRecomputeHandler.
BUG=

Review-Url: https://codereview.chromium.org/2390923003
Cr-Commit-Position: refs/heads/master@{#39957}
2016-10-04 14:34:19 +00:00
franzih
54fb438e88 [IC] Delete unused AddessIsOptimizedCode function.
BUG=

Review-Url: https://codereview.chromium.org/2387173003
Cr-Commit-Position: refs/heads/master@{#39956}
2016-10-04 14:28:34 +00:00
jbroman
5fa2734d39 ValueSerializer: Expose reading/writing doubles to embedder.
BUG=chromium:148757

Review-Url: https://codereview.chromium.org/2386233002
Cr-Commit-Position: refs/heads/master@{#39955}
2016-10-04 13:44:41 +00:00
bjaideep
e5cba5df20 PPC: [heap] Switch to 500k pages
To keep it consistent with other platforms.

R=mlippautz@chromium.org, ulan@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2384553003
Cr-Commit-Position: refs/heads/master@{#39954}
2016-10-04 13:32:36 +00:00
ahaas
55da769baf [wasm] Adjust crash message of the correctness fuzzer to avoid clustering.
The correctness fuzzer executes the input array in two different
execution engines and compares the results. If the results don't match,
the correctness fuzzer crashes.

Since the crash signature is always the same if the results don't match,
cluster fuzz would group all inputs which lead to non-matching results.

To avoid the grouping a base64 hash has to be appended to the crash
signature. This CL changes the text which is appended to the crash
signature to a base64 hash.

Note that I do not create a base64 hash directly because the base64
class is not available in V8. Instead I create a string which looks
like a base64 hash.

R=mmoroz@chromium.org, aarya@chromium.org, titzer@chromium.org

Review-Url: https://codereview.chromium.org/2390233002
Cr-Commit-Position: refs/heads/master@{#39953}
2016-10-04 12:18:14 +00:00
jgruber
22881b41d9 [regexp] Port RegExpConstructResultStub to TurboFan
The old hydrogen stub (and runtime fallback) are still needed while they are
used in regexp.js.  These will go away once affected code has been ported.

Drive-by-fix: Fixed typo in GetFixedA{a,}rrayAllocationSize.

BUG=v8:5339

Review-Url: https://codereview.chromium.org/2384473002
Cr-Commit-Position: refs/heads/master@{#39952}
2016-10-04 12:06:51 +00:00
jgruber
7d26871d2d [stubs] Port String.prototype.substr to TurboFan
BUG=v8:5415

Review-Url: https://codereview.chromium.org/2373493002
Cr-Commit-Position: refs/heads/master@{#39951}
2016-10-04 12:00:28 +00:00
jochen
614e615775 Turn libbase into a component
This is a precondition for turning libplatform into a component

BUG=v8:5412
R=jgruber@chromium.org,machenbach@chromium.org
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_compile_dbg_ng;master.tryserver.chromium.android:android_clang_dbg_recipe

Review-Url: https://codereview.chromium.org/2381273002
Cr-Commit-Position: refs/heads/master@{#39950}
2016-10-04 11:47:24 +00:00
leszeks
4ad3579119 [ignition] Fix building lookup graph when search depth is 0
In some (rare) cases, the context depth passed to a dynamic variable lookup can
be zero. In these cases, the fast path for the lookup (i.e. load from context or
global) can always be taken, as there is no need to search the current context.

However, with no slow path checks, the bytecode graph builder had a null
environment for the slow path, causing segfaults when this graph was built.

This patch adds a null check for the slow path environment, and skips building
the slow path if the environment is null.

BUG=chromium:652186

Review-Url: https://codereview.chromium.org/2385123002
Cr-Commit-Position: refs/heads/master@{#39949}
2016-10-04 11:08:11 +00:00
verwaest
a6ceec2483 Rewind zonelists in scopes when resetting rather than clearing
Clear also frees the memory, which isn't useful in the case of a zonelist. If we later want to use the list (e.g., because of aborting), that will cause additional allocations.

BUG=

Review-Url: https://codereview.chromium.org/2391953002
Cr-Commit-Position: refs/heads/master@{#39948}
2016-10-04 09:42:18 +00:00
marja
22ff09e06a PreParsing inner functions: Fix declaration-only variables.
If an inner function only declares a variable but doesn't use it, Parser
and PreParser produced different unresolved variables, and that confused
the pessimistic context allocation.

BUG=chromium:650969

Review-Url: https://codereview.chromium.org/2388183003
Cr-Commit-Position: refs/heads/master@{#39947}
2016-10-04 09:38:46 +00:00
heimbuef
ae18e6cd8e Fixed zapping of contents
BUG=

Review-Url: https://codereview.chromium.org/2377943003
Cr-Commit-Position: refs/heads/master@{#39946}
2016-10-04 08:47:31 +00:00
jarin
a87f0cfa7c [grokdump] Web iface: fix stack summary, add buffering.
Review-Url: https://codereview.chromium.org/2389553002
Cr-Commit-Position: refs/heads/master@{#39945}
2016-10-04 08:37:16 +00:00
v8-autoroll
cdf0850abb Update V8 DEPS.
Rolling v8/build: 35c436b..ba2b708

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

Review-Url: https://codereview.chromium.org/2389093002
Cr-Commit-Position: refs/heads/master@{#39944}
2016-10-04 03:28:58 +00:00
bbudge
00ac990cc3 [Turbofan] Refactor GapResolver tests in preparation for FP aliasing.
- Changes tests to canonicalize FP slot/register moves, to simplify
testing any implementations that may fragment FP register moves.
- Adds code to generate correct ParallelMoves (e.g. no slot sources
of different reps overlapping.)
- Refactors test functions, so we can add manually generated tests
to current fuzzed tests.
- Adds SIMD operands, since these can be tested here now.

LOG=N
BUG=v8:4124

Review-Url: https://codereview.chromium.org/2365983002
Cr-Commit-Position: refs/heads/master@{#39943}
2016-10-03 23:46:07 +00:00
kozyatinskiy
24beac30ee [inspector] Make InspectorTest.sendCommand* private
Introduce Protocol.Domain.method(args) and Protocol.Domain.onEventName() instead.
Renamed InspectorTest.evaluateInPage -> InspectorTest.addScript.
Improved InspectorTest.logMessage.

BUG=chromium:635948
R=dgozman@chromium.org,alph@chromium.org

Review-Url: https://codereview.chromium.org/2390733002
Cr-Commit-Position: refs/heads/master@{#39942}
2016-10-03 23:33:07 +00:00
bbudge
b5c9e31c97 [Turbofan] Streamline InstructionOperand predicate methods.
- Orders machine representations so it's easier to check for floating
point.
- Orders operand types so it's easier to check for LocationOperands.
- Adds IsLocation, IsFPLocation predicates.

LOG=N
BUG=v8:4124

Review-Url: https://codereview.chromium.org/2382013003
Cr-Commit-Position: refs/heads/master@{#39941}
2016-10-03 21:39:45 +00:00
kozyatinskiy
60ab52e78e [inspector] test Runtime.getProperties for set and map [[Entries]]
Added a test that Runtime.getProperties doesn't truncate Set and Map properties in [[Entries]] in internalProperties.

BUG=chromium:650729
R=dgozman@chromium.org

Review-Url: https://codereview.chromium.org/2376863002
Cr-Commit-Position: refs/heads/master@{#39940}
2016-10-03 21:22:11 +00:00
kozyatinskiy
d99308ef55 [inspector] fix use-after-free in ConsoleHelper::reportCall
InspectedContext can be destroyed inside of V8ConsoleMessage::createForConsoleAPI call.

BUG=chromium:646175
R=dgozman@chromium.org,alph@chromium.org

Review-Url: https://codereview.chromium.org/2388463002
Cr-Commit-Position: refs/heads/master@{#39939}
2016-10-03 21:16:03 +00:00
kozyatinskiy
759581ea93 [inspector] test for fixed empty stack processing in console.count
BUG=chromium:644629
R=dgozman@chromium.org

Review-Url: https://codereview.chromium.org/2370033003
Cr-Commit-Position: refs/heads/master@{#39938}
2016-10-03 21:10:53 +00:00
bradnelson
cfed56c2c5 [wasm] [asm.js] Track direct function indices and fixup.
Recent changes to the wasm format prevent you from knowing
the function index of a direct call until you know how many
imports you have (the index spaces have been merged).

Asm.js validation can't know this until all callsites have been
visited if you want to avoid materializing the entire AST / parsing twice.
Instead, keep a list of fixups to perform for all direct callsites,
then update these with the imports count added when emitting the module.

BUG=v8:4203
R=aseemgarg@chromium.org,titzer@chromium.org

Review-Url: https://codereview.chromium.org/2384623003
Cr-Commit-Position: refs/heads/master@{#39937}
2016-10-03 21:04:46 +00:00
mtrofin
55478da28e [wasm] cleanup wasm-module.cc
- Coalesced all anonymous namespaces into one, and moved it to the
top of the file, to match elsewhere in the v8 codebase.
- Deleted dead code.
- Moved functions that turned out to be local to wasm-module.cc to
the anonymous namespace.

BUG=

Review-Url: https://codereview.chromium.org/2384183002
Cr-Commit-Position: refs/heads/master@{#39936}
2016-10-03 21:03:40 +00:00
verwaest
9feab2d208 Mark param as used when we force context allocation due to implement access through arguments
Currently the parameter is first parsed as a reference, and then translated into a parameter. The reference stays around though, and gets resolved to the parameter. That automatically creates a use. Now that I drop all unresolved references when we abort preparsing, that also drops the unresolved reference.

Instead, mark the variable as used when its marked as forced context allocation. That's what happens in almost all other cases.

This raises the question: does it really make sense to parse parameters this ways? It seems pretty generic, but neither fast nor memory-efficient ... Did I misunderstand something?

Just land if you think the CL looks good as is.

BUG=chromium:651613

Review-Url: https://codereview.chromium.org/2386623002
Cr-Commit-Position: refs/heads/master@{#39935}
2016-10-03 17:21:20 +00:00
klaasb
660d11a217 [turbofan] Mark for non-concurrent recompilation on OSR
Re-enable marking functions for optimized compilation on the next call
when using OSR. We would previously do this for all functions. However,
it only benefits functions marked for concurrent recompilation. These
would potentially run unoptimized again and be OSRed again.
In addition any function that already was optimized concurrently had
it's optimized code removed and would have been recompiled. Functions to
be baselined would skip that and possibly deopt.

BUG=chromium:651042

Review-Url: https://codereview.chromium.org/2391533002
Cr-Commit-Position: refs/heads/master@{#39934}
2016-10-03 16:45:11 +00:00
kozyatinskiy
c9391d15ca [inspector] added a test for crash in wrapping async evaluate result
BUG=chromium:651211
R=dgozman@chromium.org

Review-Url: https://codereview.chromium.org/2381693002
Cr-Commit-Position: refs/heads/master@{#39933}
2016-10-03 15:51:30 +00:00
leszeks
306f83119b [base] Optimise hashmaps with simple key equality
Hashmaps with a simple key equality method (comparing pointers) don't
need to waste cycles (and branches) comparing hash values, as the key
comparison is cheap.

This patch modifies the hashmap's MatchFun to take the hashes as well as
the keys, thus allowing the MatchFun to ignore the hashes. This allows
slightly cleaner generated code, especially when the MatchFun is
inlined.

BUG=

Review-Url: https://codereview.chromium.org/2381303002
Cr-Commit-Position: refs/heads/master@{#39932}
2016-10-03 15:07:36 +00:00
kozyatinskiy
270db7903a [inspector] added inspector test runner [part 5]
- added most part of inspector tests that depends only on JavaScript domains.

BUG=chromium:635948
R=dgozman@chromium.org,alph@chromium.org

Committed: https://crrev.com/9ddbdab195923fc87fae3587ae06c5c1c5ca6d79
Review-Url: https://codereview.chromium.org/2369753004
Cr-Original-Commit-Position: refs/heads/master@{#39897}
Cr-Commit-Position: refs/heads/master@{#39931}
2016-10-02 21:23:03 +00:00
kozyatinskiy
d1191e1b8a [inspector] added inspector test runner [part 4]
- added inspector test suite definition in testcfg.py
- added JS infrastructure for tests in protocol-test.js

BUG=chromium:635948
R=dgozman@chromium.org,alph@chromium.org

Committed: https://crrev.com/4a5f5d0991656a6aa45b0021a0f5ba6a7ceabe15
Review-Url: https://codereview.chromium.org/2370743003
Cr-Original-Commit-Position: refs/heads/master@{#39895}
Cr-Commit-Position: refs/heads/master@{#39930}
2016-10-02 19:41:28 +00:00
kozyatinskiy
f0649c8f08 [inspector] added inspector test runner [part 3]
- added test runner, that takes file names and V8 flags as arguments and run scripts from passed files with passed flags in frontend context

BUG=chromium:635948
R=dgozman@chromium.org,alph@chromium.org

Committed: https://crrev.com/f3f9f4448dfa533d768878245a9bdbb57b4d941b
Review-Url: https://codereview.chromium.org/2372793002
Cr-Original-Commit-Position: refs/heads/master@{#39891}
Cr-Commit-Position: refs/heads/master@{#39929}
2016-10-02 18:10:39 +00:00
kozyatinskiy
751814a128 [inspector] added inspector test runner [part 2]
- added the channel implementation,
- added inspector implementation,
- added v8::Extension for communication between backend and frontend.

BUG=chromium:635948
R=dgozman@chromium.org,alph@chromium.org

Committed: https://crrev.com/cceaa1225c6a96a28d2c7410d1db520423fb8c31
Review-Url: https://codereview.chromium.org/2368393003
Cr-Original-Commit-Position: refs/heads/master@{#39888}
Cr-Commit-Position: refs/heads/master@{#39928}
2016-10-02 16:45:46 +00:00
v8-autoroll
fad5dd827d Update V8 DEPS.
Rolling v8/base/trace_event/common: 08b7b94..e0fa02a

Rolling v8/tools/clang: f991b26..1f92f99

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

Review-Url: https://codereview.chromium.org/2390503002
Cr-Commit-Position: refs/heads/master@{#39927}
2016-10-02 03:28:39 +00:00
v8-autoroll
75b0bcceea Update V8 DEPS.
Rolling v8/build: 2768397..35c436b

Rolling v8/tools/gyp: 702ac58..e7079f0

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

Review-Url: https://codereview.chromium.org/2384923002
Cr-Commit-Position: refs/heads/master@{#39926}
2016-10-01 03:29:55 +00:00
mtrofin
6ea3575c3c [wasm] further simplification of WasmCompiledModule
Calculate memory size from the available heap. This avoids
the bugs due to some numbers being stored as objects (by-ref)
and thus needing special handling when cloning.

This leaves all the rest of the numbers as read-only.

Further simplified by representing globals size as a Smi.

BUG=

Committed: https://crrev.com/7ced1bdc9df2315ccc07dd17c12736aebf40cb57
Review-Url: https://codereview.chromium.org/2381393002
Cr-Original-Commit-Position: refs/heads/master@{#39923}
Cr-Commit-Position: refs/heads/master@{#39925}
2016-10-01 00:45:49 +00:00
mtrofin
77b7be0c11 Revert of [wasm] further simplification of WasmCompiledModule (patchset #1 id:1 of https://codereview.chromium.org/2381393002/ )
Reason for revert:
Failures on multiple bots (e.g. https://build.chromium.org/p/client.v8/builders/V8%20Mac%20GC%20Stress/builds/8887)

Original issue's description:
> [wasm] further simplification of WasmCompiledModule
>
> Calculate memory size from the available heap. This avoids
> the bugs due to some numbers being stored as objects (by-ref)
> and thus needing special handling when cloning.
>
> This leaves all the rest of the numbers as read-only.
>
> Further simplified by representing globals size as a Smi.
>
> BUG=
>
> Committed: https://crrev.com/7ced1bdc9df2315ccc07dd17c12736aebf40cb57
> Cr-Commit-Position: refs/heads/master@{#39923}

TBR=bradnelson@google.com,bradnelson@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review-Url: https://codereview.chromium.org/2385943002
Cr-Commit-Position: refs/heads/master@{#39924}
2016-10-01 00:05:41 +00:00
mtrofin
7ced1bdc9d [wasm] further simplification of WasmCompiledModule
Calculate memory size from the available heap. This avoids
the bugs due to some numbers being stored as objects (by-ref)
and thus needing special handling when cloning.

This leaves all the rest of the numbers as read-only.

Further simplified by representing globals size as a Smi.

BUG=

Review-Url: https://codereview.chromium.org/2381393002
Cr-Commit-Position: refs/heads/master@{#39923}
2016-09-30 23:02:02 +00:00
akos.palfi
cb1084a800 MIPS: Fix Sltu macro instruction.
Fixes the case when the 'imm' is in range [8000,ffff], as the specification
says the 'imm' is sign-extended before the comparsion, so the effective range
is [max_unsigned-7fff,max_unsigned].

TEST=mjsunit/generated-transition-stub@3b8ad45e
BUG=

Review-Url: https://codereview.chromium.org/2386673002
Cr-Commit-Position: refs/heads/master@{#39922}
2016-09-30 18:29:24 +00:00
mstarzinger
2ab7a917c9 [wasm] Properly handlify WasmCompiledModule::Clone.
This is to avoid a dereference of the unhandlified {this} reference
after handlified allocation functions have been called. Combining
handlified and unhandlified style is inherently unsafe.

R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2380463006
Cr-Commit-Position: refs/heads/master@{#39921}
2016-09-30 16:31:38 +00:00
leszeks
050bf39d85 Instead of having a hashmap with a function pointer defining its
matching function, creates a hashmap the specialises the case of keys
that simply check pointer equality.

I measure an average ~1% improvement on Octane code-load.

Review-Url: https://codereview.chromium.org/2369963002
Cr-Commit-Position: refs/heads/master@{#39920}
2016-09-30 16:17:06 +00:00
jpp
7ed565b6a5 [WASM] Implements catch for the wasm low level exception mechanism.
This is essentially CL/2275293002, with the difference that the effect
dependencies are now updated correctly.

BUG=

Review-Url: https://codereview.chromium.org/2378773013
Cr-Commit-Position: refs/heads/master@{#39919}
2016-09-30 16:09:32 +00:00
kozyatinskiy
80d400641f [inspector] added inspector test runner [part 1]
- added a inspector folder,
- added related GN and gyp files,
- added task handling infrastructure for test runner.

BUG=chromium:635948
R=dgozman@chromium.org,alph@chromium.org

Committed: https://crrev.com/dc1c71c0dc8a5c4ade4aa291f2ddcd02e90c64b2
Review-Url: https://codereview.chromium.org/2361623006
Cr-Original-Commit-Position: refs/heads/master@{#39866}
Cr-Commit-Position: refs/heads/master@{#39918}
2016-09-30 15:52:46 +00:00
mlippautz
a5dfdb755d [heap] Remove unnecessary marking specializations
R=hpayer@chromium.org
BUG=chromium:651828

Review-Url: https://codereview.chromium.org/2377203003
Cr-Commit-Position: refs/heads/master@{#39917}
2016-09-30 13:57:44 +00:00
v8-autoroll
db8dcd1a22 Update V8 DEPS.
Rolling v8/build: d3f34f8..2768397

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

Review-Url: https://codereview.chromium.org/2379343002
Cr-Commit-Position: refs/heads/master@{#39916}
2016-09-30 12:35:53 +00:00
machenbach
679409e800 [build] Use same symbol level as chromium for android
This makes our configuration similar to Chromium's for
android performance testing.

This blocks deps'ing in:
https://codereview.chromium.org/2377013002

BUG=chromium:648948
NOTRY=true

Review-Url: https://codereview.chromium.org/2383743002
Cr-Commit-Position: refs/heads/master@{#39915}
2016-09-30 11:59:12 +00:00
cbruni
e82ad05c6b [stubs] Add LoadMapElementsKind helper
Review-Url: https://codereview.chromium.org/2380563005
Cr-Commit-Position: refs/heads/master@{#39914}
2016-09-30 11:44:18 +00:00