Commit Graph

33867 Commits

Author SHA1 Message Date
ivica.bogosavljevic
28bd118148 MIPS64: Add support for DINS to disassembler
BUG=

Review-Url: https://codereview.chromium.org/2331843004
Cr-Commit-Position: refs/heads/master@{#39375}
2016-09-13 09:21:02 +00:00
ulan
672d079ccb [heap] Decouple old generation allocation limit from external memory.
We check for external memory limit in Heap::ReportExternalMemoryPressure.

BUG=chromium:616434

Review-Url: https://codereview.chromium.org/2329993002
Cr-Commit-Position: refs/heads/master@{#39374}
2016-09-13 08:54:10 +00:00
mstarzinger
069fcf4cbb [turbofan] Decouple OSR entry from {OsrPoll} bytecode.
This makes sure OSR entry points can be added without having special
{OsrPoll} instructions in the bytecode stream. Eventually we might end
up merging back-branches and OSR polls together. Any loop header can be
used as an OSR entry point.

R=bmeurer@chromium.org
BUG=v8:4764

Review-Url: https://codereview.chromium.org/2329933003
Cr-Commit-Position: refs/heads/master@{#39373}
2016-09-13 08:42:04 +00:00
ishell
b9b350cb12 [stubs] Port KeyedLoadSloppyArgumentsStub and KeyedStoreSloppyArgumentsStub to TurboFan.
BUG=v8:5269

Review-Url: https://codereview.chromium.org/2327103002
Cr-Commit-Position: refs/heads/master@{#39372}
2016-09-13 08:24:59 +00:00
bmeurer
ae9a39b010 [turbofan] Make the inlining heuristic deterministic.
Don't sort inline candidates by comparing Node pointers, where the order
depends on the allocation order and the concrete Zone memory layout at
runtime. Instead sort based on NodeId, which is deterministic.

R=mvstanton@chromium.org
BUG=v8:5267

Review-Url: https://codereview.chromium.org/2336113002
Cr-Commit-Position: refs/heads/master@{#39371}
2016-09-13 08:19:37 +00:00
machenbach
086f566ed8 [gn] Switch mipsel and mips64el bots to gn
BUG=chromium:474921
NOTRY=true

Review-Url: https://codereview.chromium.org/2328233002
Cr-Commit-Position: refs/heads/master@{#39370}
2016-09-13 07:42:09 +00:00
machenbach
a482ab5c82 [gn] Add gn configs for mips to match old behavior
BUG=chromium:474921
NOTRY=true

Review-Url: https://codereview.chromium.org/2322163003
Cr-Commit-Position: refs/heads/master@{#39369}
2016-09-13 07:33:11 +00:00
bmeurer
e786ef2474 [turbofan] Do constant folding for Float64Pow.
Also unify the Pow implementation somewhat. There are still some
inconsistencies with the FPU version for x64/ia32, but that has
to be resolved separately.

R=ahaas@chromium.org, mvstanton@chromium.org
BUG=v8:5086

Review-Url: https://codereview.chromium.org/2333663002
Cr-Commit-Position: refs/heads/master@{#39368}
2016-09-13 07:10:40 +00:00
machenbach
9f42d6c2c0 [gn] Switch arm cross-compile bots to gn
BUG=chromium:474921
NOTRY=true

Review-Url: https://codereview.chromium.org/2328293002
Cr-Commit-Position: refs/heads/master@{#39367}
2016-09-13 06:37:36 +00:00
bmeurer
dfc4b47f66 [turbofan] Strength reduce CheckTaggedSigned/Pointer with checked inputs.
Add strength reduction rules to optimize

 CheckTaggedSigned(CheckTaggedSigned(x)) -> CheckTaggedSigned(x)

and

 CheckTaggedPointer(CheckTaggedPointer(x)) -> CheckTaggedPointer(x)

where we do some cleanup optimizations after loop peeling and redundancy
elimination, which can generate these constructs.

BUG=v8:5267

Review-Url: https://codereview.chromium.org/2336093002
Cr-Commit-Position: refs/heads/master@{#39366}
2016-09-13 06:32:08 +00:00
bmeurer
a63997599e [unittests] Reduce compilation overhead of opcodes-unittest.cc.
Reduce compilation time (with clang) for opcodes-unittest.cc from
1m38s to roughly 1s by not overusing the macro expansion magic.

TBR=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2331413002
Cr-Commit-Position: refs/heads/master@{#39365}
2016-09-13 05:16:18 +00:00
bmeurer
fe952ee169 [turbofan] Avoid shadowing of local variables.
Cleanup fix addressing the comment on crrev.com/2325943002.

TBR=jarin@chromium.org,brucedawson@chromium.org

Review-Url: https://codereview.chromium.org/2335083002
Cr-Commit-Position: refs/heads/master@{#39364}
2016-09-13 04:11:17 +00:00
kozyatinskiy
456cf5e1cd [inspector] replaced std::snprintf with base::OS::SNPrintf
BUG=chromium:635948
R=dgozman@chromium.org,alph@chromium.org

Review-Url: https://codereview.chromium.org/2336023002
Cr-Commit-Position: refs/heads/master@{#39363}
2016-09-13 02:39:11 +00:00
kozyatinskiy
eb9dc6328f [inspector] disallow usage of non public api methods in inspector
Going forward we may relax this, but it is a conscious decision to be made.

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

Review-Url: https://codereview.chromium.org/2337523003
Cr-Commit-Position: refs/heads/master@{#39362}
2016-09-13 00:01:44 +00:00
mtrofin
b4dc310aab [wasm] reuse the first compiled module.
This change avoids needing to keep around an unused compiled
module. Instead, the result of compiling the wasm bytes is
given to the first instance. The module object and that instance object
point to the same compiled module. Instances are, then, cloned from
the compiled module the module object points to. When an instance is
collected, we make sure that the module object still has a clone
available, and, if the last instance is GC-ed, we also reset the compiled
module so that it does not reference its heap, so that it (==heap) may
be collected.

This is achieved by linking the clones in a double-linked list and
registering a finalizer for each. When we create an instance, we tie it
in the front of the list, making the module object point to it (O(1)). When
the finalizer is called, we relink the list over the dying object (O(1)). The
costliest operation is finalizing the last instance, since we need to visit
all wasm functions and reset heap references.

BUG=v8:5316

Committed: https://crrev.com/01f5af515728aebe6c5246f4f7dd6c573e8748af
Review-Url: https://codereview.chromium.org/2305903002
Cr-Original-Commit-Position: refs/heads/master@{#39153}
Cr-Commit-Position: refs/heads/master@{#39361}
2016-09-12 23:13:19 +00:00
mtrofin
8e5ac62ddf [wasm] Compilation/Instantiation pipeline works off module object
Moved the compilation/instantiation pipeline to work off the
module object (JSObject), making the compiled module data (the
FixedArray) an implementation detail. This:
- simplifies the code by removing duplicate decode->compile->instantiate
sequences
- sets up the stage for "dressing up" the runtime model with
stronger typed APIs
- helps relanding this CL: https://codereview.chromium.org/2305903002/.
  It turns out that GCs during the cloning/instantiation events cause
trouble, and centering the source of truth on the module object helps
address this issue.

In the process, clarified cctest setup for wasm-capable isolates,
and changed signatures for consistency (using ModuleOrigin througout).

BUG=

Review-Url: https://codereview.chromium.org/2320723005
Cr-Commit-Position: refs/heads/master@{#39360}
2016-09-12 22:11:56 +00:00
cbruni
621f4af720 [elements] Handlify SloppyArguments IndexOfValueImpl
The raw pointer to the parameter_map might get stale in case of accessors present on
the arguments object.
Drive-by-fix: use nullptr instead of the_hole with isolate access.

BUG=chromium:645680

Review-Url: https://codereview.chromium.org/2332503002
Cr-Commit-Position: refs/heads/master@{#39359}
2016-09-12 17:32:09 +00:00
jarin
e031451cd7 [turbofan] Another fix for induction variable typing monotonicity.
BUG=chromium:645851

Review-Url: https://codereview.chromium.org/2332633002
Cr-Commit-Position: refs/heads/master@{#39358}
2016-09-12 17:05:11 +00:00
adamk
58325e616d [turbofan] Switch from a whitelist to a blacklist for NeedsFrameStateInput
The whitelist is populated with those inline intrinsics that are lowered
in JSIntrinsicInlining and were not previously blacklisted. Thus the only
additional FrameStates this CL adds are those where the caller tries to
call the INLINE version of an intrinsic but ends up calling the RUNTIME
version instead.

R=bmeurer@chromium.org
BUG=chromium:644631

Review-Url: https://codereview.chromium.org/2331543002
Cr-Commit-Position: refs/heads/master@{#39357}
2016-09-12 16:12:57 +00:00
bjaideep
bc752a0977 AIX: Disable backtrace API call
Backtrace() and backtrace_symbols() API are not supported on
AIX and there are no user-mode equivalent API for the same.
For now, disabling the call to those API.
Currently this is preventing V8 to build on AIX.
This debug functionality was added in
https://codereview.chromium.org/2248393002

R=rmcilroy@chromium.org

BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2324453002
Cr-Commit-Position: refs/heads/master@{#39356}
2016-09-12 15:32:16 +00:00
v8-autoroll
87c4a7c80f Update V8 DEPS.
Rolling v8/base/trace_event/common to 26eac53e73b09625e9b8f783b479e54fcae85f58

Rolling v8/build to 9d601d07a9adaa2719d114290e79084d429a7dab

Rolling v8/third_party/WebKit/Source/platform/inspector_protocol to f9c1216417fe8e8f99d861a4d9cf360ae1d8645e

Rolling v8/tools/clang to 4ac706a04b38c05a8012257dc657e069134902c7

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

Review-Url: https://codereview.chromium.org/2331963002
Cr-Commit-Position: refs/heads/master@{#39355}
2016-09-12 14:34:27 +00:00
ishell
2136adbd96 [stubs] Port StoreGlobalStub to TurboFan.
BUG=v8:5269

Review-Url: https://codereview.chromium.org/2322373002
Cr-Commit-Position: refs/heads/master@{#39354}
2016-09-12 14:29:17 +00:00
ulan
a26769629b Reland "[heap] Fix a formatting bug in --trace-incremental-marking. (patchset #2 id:20001 of https://codereview.chromium.org/2324623004/ )"
This reverts commit 6c2a217ef7.

The performance regression in crbug.com/645411 was not caused
by the original CL.

TBR=mlippautz@chromium.org

Review-Url: https://codereview.chromium.org/2329983002
Cr-Commit-Position: refs/heads/master@{#39353}
2016-09-12 13:04:26 +00:00
neis
21cb110547 [modules] Basic support of exports
This adds partial support of exports to the runtime system and
to the interpreter. It introduces a new HeapObject JSModule that
maps each of the module's export names to a Cell containing the
exported value.

Several aspects of this implementation are subject to change in
follow-up CLs.

BUG=v8:1569

Committed: https://crrev.com/241a0412eed919395a2e163b30b9b66071ce5c17
Review-Url: https://codereview.chromium.org/2302783002
Cr-Original-Commit-Position: refs/heads/master@{#39341}
Cr-Commit-Position: refs/heads/master@{#39352}
2016-09-12 12:55:37 +00:00
ahaas
1521fe9c3c [wasm] Call the wasm interpreter from the wasm-code-fuzzer.
With this CL the wasm-code-fuzzer first decodes and interprets the test
case generated by the fuzzer. It then compiles the test case, but only
executes the compiled instance if the interpretation of the test case
was successful. If the compiled instance is executed, then the result of
the execution is compared with the result of the interpretation.

Additionally this CL refactors the CompileAndRunWasmModule function in
wasm-module.cc to resuse code in the call to the interpreter.

R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2321443002
Cr-Commit-Position: refs/heads/master@{#39351}
2016-09-12 12:26:46 +00:00
ishell
93fc4fea7b [stubs] Port StoreFieldStub to TurboFan.
BUG=v8:5269

Review-Url: https://codereview.chromium.org/2325013003
Cr-Commit-Position: refs/heads/master@{#39350}
2016-09-12 12:19:14 +00:00
bmeurer
4cf5ee6b38 [turbofan] Properly emit vsqrtsd if AVX is enabled.
We shall not mix AVX and SSE instructions as that can cause performance
regressions in some areas, so make sure to emit vsqrtsd instead of
sqrtsd when AVX is enabled.

R=ahaas@chromium.org

Review-Url: https://codereview.chromium.org/2335603002
Cr-Commit-Position: refs/heads/master@{#39349}
2016-09-12 11:51:02 +00:00
ulan
6a1b49d79c [heap] Do more incremental marking work in tasks.
This patch changes incremental marking work scheduling from combination
of idle/delayed tasks to ordinary short-running tasks and moves
more marking work from V8.Execute to tasks by accounting how much
bytes were marked in tasks.

BUG=chromium:616434
LOG=NO

Review-Url: https://codereview.chromium.org/2321553002
Cr-Commit-Position: refs/heads/master@{#39348}
2016-09-12 11:46:30 +00:00
petermarshall
8ffbd333bb [builtins] Move StringLocaleCompare to a builtin.
CQ_INCLUDE_TRYBOTS=master.tryserver.v8:v8_linux_noi18n_rel_ng

BUG=v8:5364

Review-Url: https://codereview.chromium.org/2313393005
Cr-Commit-Position: refs/heads/master@{#39347}
2016-09-12 11:40:33 +00:00
rmcilroy
d15f45d4db [Parser] Avoid on-the-fly internalization for natives_syntax.
Rework Runtime::FunctionForName to take a c-string instead of a v8::String
so that the parser can parse native syntax runtime calls without doing
on-the-fly internalization.

Also adds a c-string variant of IntrinsicIndexForName for the same reasons.

BUG=v8:5215,chromium:634953

Review-Url: https://codereview.chromium.org/2324803002
Cr-Commit-Position: refs/heads/master@{#39346}
2016-09-12 11:35:58 +00:00
neis
429ff47e2b Revert of [modules] Basic support of exports (patchset #10 id:180001 of https://codereview.chromium.org/2302783002/ )
Reason for revert:
Failures related to deopt.

Original issue's description:
> [modules] Basic support of exports
>
> This adds partial support of exports to the runtime system and
> to the interpreter. It introduces a new HeapObject JSModule that
> maps each of the module's export names to a Cell containing the
> exported value.
>
> Several aspects of this implementation are subject to change in
> follow-up CLs.
>
> BUG=v8:1569
>
> Committed: https://crrev.com/241a0412eed919395a2e163b30b9b66071ce5c17
> Cr-Commit-Position: refs/heads/master@{#39341}

TBR=adamk@chromium.org,rmcilroy@chromium.org,ulan@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2328283002
Cr-Commit-Position: refs/heads/master@{#39345}
2016-09-12 11:34:24 +00:00
neis
153dde4f86 [interpreter] Use clearer names for context related functions.
R=rmcilroy@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2331913002
Cr-Commit-Position: refs/heads/master@{#39344}
2016-09-12 11:25:39 +00:00
Alexander.Gilday2
278b9f800b [builtins] Migrate ToNumber to TurboFan.
Migrate ToNumber platform builtin to TurboFan. Also move
NonNumberToNumber builtin implementation to helper function.

BUG=v8:5049

Review-Url: https://codereview.chromium.org/2327703003
Cr-Commit-Position: refs/heads/master@{#39343}
2016-09-12 11:01:10 +00:00
petermarshall
e7b7ba8edd [builtins] Move StringNormalize to a cpp builtin.
CQ_INCLUDE_TRYBOTS=master.tryserver.v8:v8_linux_noi18n_rel_ng

BUG=v8:5364

Committed: https://crrev.com/7f84a6a2e7000bebba49354b4648346ff606ca34
Review-Url: https://codereview.chromium.org/2315343002
Cr-Original-Commit-Position: refs/heads/master@{#39331}
Cr-Commit-Position: refs/heads/master@{#39342}
2016-09-12 10:54:27 +00:00
neis
241a0412ee [modules] Basic support of exports
This adds partial support of exports to the runtime system and
to the interpreter. It introduces a new HeapObject JSModule that
maps each of the module's export names to a Cell containing the
exported value.

Several aspects of this implementation are subject to change in
follow-up CLs.

BUG=v8:1569

Review-Url: https://codereview.chromium.org/2302783002
Cr-Commit-Position: refs/heads/master@{#39341}
2016-09-12 10:51:27 +00:00
mstarzinger
d2189c6362 [turbofan] Solidify OSR deconstruction code a bit.
It is invalid for OSR deconstruction to leave a graph with a node
representing the OSR normal entry (and no OSR loop entry). Subsequent
lowering phases will not handle {OsrNormalEntry} operators and hence
will lead to serious clogging further down the pipeline.

R=bmeurer@chromium.org
BUG=chromium:641893

Review-Url: https://codereview.chromium.org/2336543002
Cr-Commit-Position: refs/heads/master@{#39340}
2016-09-12 10:46:25 +00:00
ahaas
685d488288 [wasm] Do not support grow_memory for asmjs modules.
With this CL the AstDecoder produces an error if it encounters a
grow_memory instruction in an asmjs module. Additionally asmjs
instructions are not allowed anymore in wasm modules.

BUG=chromium:644674
R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2324733002
Cr-Commit-Position: refs/heads/master@{#39339}
2016-09-12 10:16:46 +00:00
bmeurer
f0a0c432a5 [turbofan] Ship eval.
No longer disable TurboFan for functions with eval, but only disable
Crankshaft in those cases.

R=mstarzinger@chromium.org
BUG=v8:5267

Review-Url: https://codereview.chromium.org/2334633002
Cr-Commit-Position: refs/heads/master@{#39338}
2016-09-12 09:41:29 +00:00
nikolaos
e850ed2a1e [parser] Refactor of Parse*Statement*, part 6
This patch moves the following parsing method to ParserBase:

- ParseSwitchStatement

It also removes ParseCaseClause and merges it with ParseSwitchStatement,
mainly to avoid the complexity of introducing one more abstract typedef
to be shared between parser implementations, but also because the merged
ParseSwitchStatement is now only 59 lines.

R=adamk@chromium.org, marja@chromium.org
BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2324843005
Cr-Commit-Position: refs/heads/master@{#39337}
2016-09-12 09:39:52 +00:00
bmeurer
1247b0b296 [type-feedback-vector] Fix comment about TypeFeedbackVector shape.
R=mvstanton@chromium.org

Review-Url: https://codereview.chromium.org/2335533002
Cr-Commit-Position: refs/heads/master@{#39336}
2016-09-12 09:03:30 +00:00
ishell
0dbc719bb5 [stubs] Fix performance regression on x64 caused by modified double hole check.
Compare the whole word on 64-bit architectures with the kHoleNanInt64 value
since comparing only upper part produces slightly worse code on x64.
Currently TurboFan is not able to fold (array + ((const1 + index*scale) + const))
into single addressing mode: (array + (const + index*scale)).

BUG=chromium:645414

Review-Url: https://codereview.chromium.org/2322283002
Cr-Commit-Position: refs/heads/master@{#39335}
2016-09-12 08:56:50 +00:00
mstarzinger
fe0fad73b5 [turbofan] Remove dead Bounds class from type system.
R=mvstanton@chromium.org

Review-Url: https://codereview.chromium.org/2326493002
Cr-Commit-Position: refs/heads/master@{#39334}
2016-09-12 08:52:27 +00:00
neis
26a6825017 Shorten some names in ScopeInfo.
Remove the "Entry"/"Entries" suffix as it doesn't add any information and
ModuleInfoEntry would clash with another name being introduced soon.

R=adamk@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2300373002
Cr-Commit-Position: refs/heads/master@{#39333}
2016-09-12 08:50:52 +00:00
petermarshall
ae71fbc31f Revert of [builtins] Move StringNormalize to a cpp builtin. (patchset #10 id:180001 of https://codereview.chromium.org/2315343002/ )
Reason for revert:
Tests fail when i18n is switched off, trybots do not run this configuration

Original issue's description:
> [builtins] Move StringNormalize to a cpp builtin.
>
> BUG=v8:5364
>
> Committed: https://crrev.com/7f84a6a2e7000bebba49354b4648346ff606ca34
> Cr-Commit-Position: refs/heads/master@{#39331}

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

Review-Url: https://codereview.chromium.org/2335553002
Cr-Commit-Position: refs/heads/master@{#39332}
2016-09-12 08:47:44 +00:00
petermarshall
7f84a6a2e7 [builtins] Move StringNormalize to a cpp builtin.
BUG=v8:5364

Review-Url: https://codereview.chromium.org/2315343002
Cr-Commit-Position: refs/heads/master@{#39331}
2016-09-12 08:31:58 +00:00
ahaas
6fff60187a Use GetCurrentStackPosition() to calculate the stack limit.
The use of the address of a local variable causes problems with asan,
see https://build.chromium.org/p/tryserver.v8/builders/v8_linux64_asan_rel_ng_triggered/builds/7803

R=jochen@chromium.org

Review-Url: https://codereview.chromium.org/2317253006
Cr-Commit-Position: refs/heads/master@{#39330}
2016-09-12 07:59:45 +00:00
gdeepti
2a4b5933b8 [wasm] GrowMemory should use array_buffer_allocator instead of realloc.
- Using realloc is still unsafe as the allocator, using array_buffer_allocator
  - Fixing tests to avoid overlapping stores, adding more tests

BUG=v8:5344

R=ahaas@chromium.org, mlippautz@chromium.org

Review-Url: https://codereview.chromium.org/2319983002
Cr-Commit-Position: refs/heads/master@{#39329}
2016-09-12 07:33:03 +00:00
bmeurer
a5ca412e5a [turbofan] Properly respect --max_inlining_levels with Ignition.
The logic to test whether we already reached --max_inlining_levels
when inlining into some optimized function only checked specifically
for FrameStateType::kJavaScriptFunction, and thereby didn't properly
account for FrameStateType::kInterpretedFunction, which is what we
see when we come in via the bytecode pipeline.

Review-Url: https://codereview.chromium.org/2329923002
Cr-Commit-Position: refs/heads/master@{#39328}
2016-09-12 07:28:41 +00:00
weiliang.lin
e151c66013 [x64] supplement SSE insturctions for SIMD.js
Both legacy and AVX versions

BUG=

Review-Url: https://codereview.chromium.org/2328843003
Cr-Commit-Position: refs/heads/master@{#39327}
2016-09-12 06:25:00 +00:00
nikolaos
bf85ca5315 [parser] Refactor of Parse*Statement*, part 5
This patch moves the following parsing methods to ParserBase:

- ParseDoExpression
- ParseDoWhileStatement
- ParseWhileStatement
- ParseThrowStatement

R=adamk@chromium.org, marja@chromium.org
BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2321103002
Cr-Commit-Position: refs/heads/master@{#39326}
2016-09-10 18:05:25 +00:00