Commit Graph

33844 Commits

Author SHA1 Message Date
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
nikolaos
40ba1db51f [parser] Refactor of Parse*Statement*, part 4
This patch moves the following parsing methods to ParserBase:

- ParseExpressionOrLabelledStatement
- ParseIfStatement
- ParseContinueStatement
- ParseBreakStatement
- ParseReturnStatement
- ParseWithStatement

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

Review-Url: https://codereview.chromium.org/2323763002
Cr-Commit-Position: refs/heads/master@{#39325}
2016-09-10 17:05:38 +00:00
lpy
b4c9706e02 Add delegating initialize method for RuntimeCallTimerScope.
BUG=v8:5089

Review-Url: https://codereview.chromium.org/2329053002
Cr-Commit-Position: refs/heads/master@{#39324}
2016-09-10 04:58:03 +00:00
alph
c9516ded3c Add myself to src/profiler/OWNERS
NOTRY=true

Review-Url: https://codereview.chromium.org/2325993002
Cr-Commit-Position: refs/heads/master@{#39323}
2016-09-10 03:20:05 +00:00
kozyatinskiy
71781f31a2 [inspector] handle context destroyed after console.log
BUG=chromium:642496
R=dgozman@chromium.org

Review-Url: https://codereview.chromium.org/2323173004
Cr-Commit-Position: refs/heads/master@{#39322}
2016-09-10 01:49:01 +00:00
bjaideep
8d8cae5fe7 s390: Fixed error in calculating the power of 2 in Int64Mul
R=joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com

BUG
LOG=N

Review-Url: https://codereview.chromium.org/2321973006
Cr-Commit-Position: refs/heads/master@{#39321}
2016-09-09 22:36:58 +00:00
littledan
82bf7d758e Remove multiple usages of a VariableProxy from async/await code
R=adamk
BUG=v8:5167

Review-Url: https://codereview.chromium.org/2326963003
Cr-Commit-Position: refs/heads/master@{#39320}
2016-09-09 21:50:16 +00:00
kelvinjin
ec9bfc853b [Tracing] Minor bug fixes related to trace serialization
Escape sequences may now be written to a trace file (previously,
any string with a valid escapable character would fail a check).

Also, string properties are now surrounded with quotes.

BUG=v8:4561

Review-Url: https://codereview.chromium.org/2309943005
Cr-Commit-Position: refs/heads/master@{#39319}
2016-09-09 20:44:25 +00:00
eholk
0027218e1a [wasm] Trap handling: ProtectedLoad instruction
This CL introduces a ProtectedLoad instruction with is needed for out
of bounds trap handling. ProtectedLoad behaves like a regular load,
but it takes a context and source position parameter as well. These
are used by an out of line code fragment to generate code to throw a
JS exception for an out of bounds memory reference in Wasm.

These changes a cleaned up subset of
https://codereview.chromium.org/2148743004/

The rest of this feature will follow in future CLs. This includes a
table mapping memory instructions to landing pads as well as the
actual signal handler.

BUG= https://bugs.chromium.org/p/v8/issues/detail?id=5277

Review-Url: https://codereview.chromium.org/2301833004
Cr-Commit-Position: refs/heads/master@{#39318}
2016-09-09 17:41:11 +00:00
adamk
ca7eaa30a1 [cleanup] Remove dead code for handling pre-desugaring spread implementation
The array spread operator is now handled by desugaring in the parser.

Review-Url: https://codereview.chromium.org/2324013002
Cr-Commit-Position: refs/heads/master@{#39317}
2016-09-09 17:32:33 +00:00
adamk
39c9158f8e [cleanup] Remove unused PreParser factory method
R=nikolaos@chromium.org

Review-Url: https://codereview.chromium.org/2316373006
Cr-Commit-Position: refs/heads/master@{#39316}
2016-09-09 17:11:55 +00:00
Alexander.Gilday2
f439fcab69 [stubs] Port ToName stub to TurboFan.
Migrate the platform ToName stub to TurboFan.

BUG=v8:5049

Review-Url: https://codereview.chromium.org/2302923002
Cr-Commit-Position: refs/heads/master@{#39315}
2016-09-09 16:23:48 +00:00
alph
bb0b8b2da3 [inspector] Drop V8_VERSION checks.
BUG=chromium:635948

Review-Url: https://codereview.chromium.org/2323273002
Cr-Commit-Position: refs/heads/master@{#39314}
2016-09-09 15:52:35 +00:00
alph
5465c25cea Add two CpuProfileNode API functions to allow thread safe access to the node.
GetFunctionNameStr and GetScriptResourceNameStr can be called from a thread
other than isolate VM thread unlike their conterparts GetFunctionName
and GetScriptResourceName.

BUG=406277

Review-Url: https://codereview.chromium.org/2328673003
Cr-Commit-Position: refs/heads/master@{#39313}
2016-09-09 15:51:02 +00:00
v8-autoroll
fcac706add Update V8 DEPS.
Rolling v8/build to 69b6a57635907f95b6302a657d250832e3f91a1f

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

Rolling v8/third_party/jinja2 to b61a2c009a579593a259c1b300e0ad02bf48fd78

Rolling v8/tools/clang to 7d0756c437d8c3dd68f912f6cc47907b0120fc05

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

Review-Url: https://codereview.chromium.org/2319123006
Cr-Commit-Position: refs/heads/master@{#39312}
2016-09-09 15:05:16 +00:00
machenbach
9a3b720395 [gn] Switch off gyp in runhooks by default
This will be synced with an announcement on v8-dev. This
doesn't affect directly calling gyp in our old Makefiles.

BUG=chromium:474921
NOTRY=true

Committed: https://crrev.com/94f813e8dcd4ed5a67cede8af0f949009beaa501
Review-Url: https://codereview.chromium.org/2327033002
Cr-Original-Commit-Position: refs/heads/master@{#39308}
Cr-Commit-Position: refs/heads/master@{#39311}
2016-09-09 14:23:14 +00:00
franzih
16f34a416e [api] Add documentation for IndexedPropertyCallbacks.
BUG=v8:5260

Review-Url: https://codereview.chromium.org/2322673004
Cr-Commit-Position: refs/heads/master@{#39310}
2016-09-09 14:11:34 +00:00
machenbach
2931e42d46 Revert of [gn] Switch off gyp in runhooks by default (patchset #2 id:20001 of https://codereview.chromium.org/2327033002/ )
Reason for revert:
Broke stuff - need to fix the argument

Original issue's description:
> [gn] Switch off gyp in runhooks by default
>
> This will be synced with an announcement on v8-dev. This
> doesn't affect directly calling gyp in our old Makefiles.
>
> BUG=chromium:474921
> NOTRY=true
>
> Committed: https://crrev.com/94f813e8dcd4ed5a67cede8af0f949009beaa501
> Cr-Commit-Position: refs/heads/master@{#39308}

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

Review-Url: https://codereview.chromium.org/2324173002
Cr-Commit-Position: refs/heads/master@{#39309}
2016-09-09 14:09:59 +00:00
machenbach
94f813e8dc [gn] Switch off gyp in runhooks by default
This will be synced with an announcement on v8-dev. This
doesn't affect directly calling gyp in our old Makefiles.

BUG=chromium:474921
NOTRY=true

Review-Url: https://codereview.chromium.org/2327033002
Cr-Commit-Position: refs/heads/master@{#39308}
2016-09-09 13:33:26 +00:00
ishell
9cf3333806 [stubs] Factor CSA::GrowElementsCapacity() out of existing code.
... and rename CheckAndGrowElementsCapacity() to TryGrowElementsCapacity().

Review-Url: https://codereview.chromium.org/2324863002
Cr-Commit-Position: refs/heads/master@{#39307}
2016-09-09 12:21:53 +00:00
mstarzinger
0681deb914 [interpreter] Fix destroyed new.target register use.
This fixes a corner-case where the bytecode was using the <new.target>
register directly without going through the local variable. The value
might be clobbered because the deoptimizer doesn't properly restore the
value. The label will causes bytecode pipeline to be flushed and hence
ensure {BytecodeRegisterOptimizer} doesn't reuse <new.target> anymore.

R=rmcilroy@chromium.org
TEST=mjsunit/regress/regress-crbug-645103
BUG=chromium:645103

Review-Url: https://codereview.chromium.org/2325133002
Cr-Commit-Position: refs/heads/master@{#39306}
2016-09-09 12:20:20 +00:00
ulan
6c2a217ef7 Revert of [heap] Fix a formatting bug in --trace-incremental-marking. (patchset #2 id:20001 of https://codereview.chromium.org/2324623004/ )
Reason for revert:
Revert to check if this is causing perf regressions in crbug.com/645411

Original issue's description:
> [heap] Fix a formatting bug in --trace-incremental-marking.
>
> BUG=
>
> Committed: https://crrev.com/212624b7570cd1c1cfad7cf958203b05af961637
> Cr-Commit-Position: refs/heads/master@{#39278}

TBR=mlippautz@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/2323293002
Cr-Commit-Position: refs/heads/master@{#39305}
2016-09-09 11:35:52 +00:00
marja
e34dfe04ea Include only stuff you need, part 9: variables.h
TBR=bmeurer@chromium.org
BUG=v8:5294

Review-Url: https://codereview.chromium.org/2324783002
Cr-Commit-Position: refs/heads/master@{#39304}
2016-09-09 10:55:50 +00:00
machenbach
4266d33e76 [gn] Switch noi18n bots to gn
BUG=chromium:474921
NOTRY=true
TBR=jochen@chromium.org

Review-Url: https://codereview.chromium.org/2314423005
Cr-Commit-Position: refs/heads/master@{#39303}
2016-09-09 09:16:00 +00:00