Commit Graph

34158 Commits

Author SHA1 Message Date
mvstanton
648ac44056 [turbofan] Cleanup: Type only has a semantic dimension.
BUG=

Review-Url: https://codereview.chromium.org/2366433003
Cr-Commit-Position: refs/heads/master@{#39666}
2016-09-23 13:28:13 +00:00
machenbach
01cd881b87 [gn] Use clang plugins on win clang bot
BUG=chromium:644096
TBR=thakis@chromium.org
NOTRY=true

Review-Url: https://codereview.chromium.org/2369493002
Cr-Commit-Position: refs/heads/master@{#39665}
2016-09-23 13:26:18 +00:00
ivica.bogosavljevic
7d48278119 MIPS: Fix compilation failures due to warnings on mips32r1
BUG=

Review-Url: https://codereview.chromium.org/2359923003
Cr-Commit-Position: refs/heads/master@{#39664}
2016-09-23 13:23:52 +00:00
sashab
e6c1081fe6 Revert of Fix bitfield enums to not trigger upcoming Clang warning (patchset #3 id:40001 of https://codereview.chromium.org/2349153002/ )
Reason for revert:
Causes warning in GCC.

Original issue's description:
> Fix bitfield enums to not trigger upcoming Clang warning
>
> Fix bitfield enums to not trigger upcoming Clang warning regarding
> non-unsigned enum bitfields producing non-portable code.
>
> For more details, see the patch here: https://reviews.llvm.org/D24289
>
> BUG=648462
>
> Committed: https://crrev.com/a81e00d533454a7179f8f954505a8f033e941a8a
> Cr-Commit-Position: refs/heads/master@{#39649}

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

Review-Url: https://codereview.chromium.org/2361013003
Cr-Commit-Position: refs/heads/master@{#39663}
2016-09-23 13:22:41 +00:00
vogelheim
295bafd4bc [parser] Use Back2() where appropriate.
R=marja@chromium.org
BUG=v8:4947

Review-Url: https://codereview.chromium.org/2366573002
Cr-Commit-Position: refs/heads/master@{#39662}
2016-09-23 13:16:19 +00:00
machenbach
99160dc1c1 Revert of [turbofan] Don't take into account source size for inlining heuristics. (patchset #4 id:60001 of https://codereview.chromium.org/2361813002/ )
Reason for revert:
timeouts on windows:
https://build.chromium.org/p/client.v8/builders/V8%20Win64%20-%20debug/builds/12504

Original issue's description:
> [turbofan] Don't take into account source size for inlining heuristics.
>
> The source size is not a real indicator for whether or not to inline a
> certain function.
>
> R=ishell@chromium.org, jarin@chromium.org
> BUG=v8:3354,v8:5267
>
> Committed: 1b33028607

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

Review-Url: https://codereview.chromium.org/2362853003
Cr-Commit-Position: refs/heads/master@{#39661}
2016-09-23 12:43:45 +00:00
Michael Starzinger
08a441b309 [turbofan] Handle StringCharCodeAt in escape analysis.
This adds handling of {IrOpcode::kStringCharCodeAt} nodes to the escape
status analysis. Such uses are treated as escaping for now until we add
dedicated handling to the escape analysis reducer.

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

Review URL: https://codereview.chromium.org/2363063002 .

Cr-Commit-Position: refs/heads/master@{#39660}
2016-09-23 11:48:38 +00:00
Benedikt Meurer
1b33028607 [turbofan] Don't take into account source size for inlining heuristics.
The source size is not a real indicator for whether or not to inline a
certain function.

R=ishell@chromium.org, jarin@chromium.org
BUG=v8:3354,v8:5267

Review URL: https://codereview.chromium.org/2361813002 .

Cr-Commit-Position: refs/heads/master@{#39659}
2016-09-23 11:47:19 +00:00
Benedikt Meurer
d2626e30d9 [interpreter] Fix word32 vs word64 bug in CodeStubAssembler::UpdateFeedback.
R=epertoso@chromium.org

Review URL: https://codereview.chromium.org/2360233004 .

Cr-Commit-Position: refs/heads/master@{#39658}
2016-09-23 11:41:11 +00:00
bmeurer
c80ca79715 Revert of [turbofan] ChangeFloat64ToTagged shouldn't canonicalize. (patchset #3 id:40001 of https://codereview.chromium.org/2367593003/ )
Reason for revert:
Causes tree breakage:

https://build.chromium.org/p/client.v8/builders/V8%20Win64/builds/12916/steps/Check/logs/typedarray

Original issue's description:
> [turbofan] ChangeFloat64ToTagged shouldn't canonicalize.
>
> This matches current Crankshaft/fullcodegen behavior more closely and
> thus reduces the chances that we run into unnecessary polymorphism due
> to the field representation tracking in our object model.
>
> R=jarin@chromium.org
> BUG=v8:5267
>
> Committed: 6a939714e9

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

Review-Url: https://codereview.chromium.org/2358123007
Cr-Commit-Position: refs/heads/master@{#39657}
2016-09-23 11:24:15 +00:00
Michael Starzinger
4b2c6d03e4 [turbofan] Add proper type guards to escape analysis.
This makes sure the {EscapeAnalysisReducer} inserts proper {TypeGuard}
nodes if the replacement node is not a subtype of the original node.
This happens predominantly for code that has been made unreachable by
type checks.

R=jarin@chromium.org
TEST=mjsunit/regress/regress-crbug-640497
BUG=chromium:640497

Review URL: https://codereview.chromium.org/2363573003 .

Cr-Commit-Position: refs/heads/master@{#39656}
2016-09-23 11:02:13 +00:00
Benedikt Meurer
6a939714e9 [turbofan] ChangeFloat64ToTagged shouldn't canonicalize.
This matches current Crankshaft/fullcodegen behavior more closely and
thus reduces the chances that we run into unnecessary polymorphism due
to the field representation tracking in our object model.

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

Review URL: https://codereview.chromium.org/2367593003 .

Cr-Commit-Position: refs/heads/master@{#39655}
2016-09-23 10:37:27 +00:00
Benedikt Meurer
dfbb3db5ef [turbofan] Improve representation selection for Smi checking.
Rename the high-level operators CheckTaggedSigned to CheckSmi and
CheckTaggedPointer to CheckHeapObject, to better match the naming
convention (i.e. ObjectIsSmi and CheckSmi, ObjectIsString and
CheckString, etc.).

For lowering CheckSmi, always report TaggedSigned representation
and let the RepresentationChanger come up with a reasonable conversion
from whatever input representation to TaggedSigned. This way we no
longer insert the useless ChangeSomethingToTagged and then Smi check
the result sequences, i.e. mostly reduces the amount of useless code
being generated. But we also observe a few performance improvements
on some crypto benchmarks.

This would enable us to avoid the Smi canonicalization when going from
Float64 to Tagged completely and thus match the representation selection
of Crankshaft in many areas (which might reduce the amount of
polymorphism until we fix our object model).

A follow-up CL will do the same for CheckHeapObject.

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

Review URL: https://codereview.chromium.org/2362173003 .

Cr-Commit-Position: refs/heads/master@{#39654}
2016-09-23 10:32:35 +00:00
jgruber
49be319215 [stubs] Port SubStringStub to TurboFan
This ports the platform-specific SubStringStub to TurboFan.

It also contains a minor bug-fix for the case when the requested substring
length equals the subject string length, but the start index is not equal to 0.
The old stub implementation returned the subject string, while the new
implementation calls into runtime, which finally results in a thrown exception.

BUG=v8:5415

Review-Url: https://codereview.chromium.org/2355793003
Cr-Commit-Position: refs/heads/master@{#39653}
2016-09-23 06:50:31 +00:00
hablich
a717fb7c01 Revert of Pool implementation for zone segments (patchset #9 id:420001 of https://codereview.chromium.org/2335343007/ )
Reason for revert:
Blocks Roll https://codereview.chromium.org/2366733002/

Original issue's description:
> Pool implementation for zone segments
>
> BUG=v8:5409
>
> Committed: https://crrev.com/37c688a24578e787d3d8941093563ed049c3497e
> Cr-Commit-Position: refs/heads/master@{#39631}

TBR=jkummerow@chromium.org,jochen@chromium.org,verwaest@chromium.org,heimbuef@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:5409

Review-Url: https://codereview.chromium.org/2365843002
Cr-Commit-Position: refs/heads/master@{#39652}
2016-09-23 06:03:55 +00:00
hablich
b88a848faf Revert of Replaced different means of zone pooling/reusing by one zone segment pool (patchset #3 id:120001 of https://codereview.chromium.org/2348303002/ )
Reason for revert:
Blocks Roll https://codereview.chromium.org/2366733002/

Original issue's description:
> Replaced different means of zone pooling/reusing by one zone segment pool
>
> BUG=v8:5409
>
> Committed: https://crrev.com/a124feb0760896c8be61de08004a08c3bc9b4b3f
> Cr-Commit-Position: refs/heads/master@{#39633}

TBR=mstarzinger@chromium.org,verwaest@chromium.org,heimbuef@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:5409

Review-Url: https://codereview.chromium.org/2360403003
Cr-Commit-Position: refs/heads/master@{#39651}
2016-09-23 06:02:46 +00:00
v8-autoroll
55e55489b7 Update V8 DEPS.
Rolling v8/build to 87bb8bc8acec1eebdd3ef34057508739897a12cc

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

Review-Url: https://codereview.chromium.org/2362753004
Cr-Commit-Position: refs/heads/master@{#39650}
2016-09-23 03:28:10 +00:00
sashab
a81e00d533 Fix bitfield enums to not trigger upcoming Clang warning
Fix bitfield enums to not trigger upcoming Clang warning regarding
non-unsigned enum bitfields producing non-portable code.

For more details, see the patch here: https://reviews.llvm.org/D24289

BUG=648462

Review-Url: https://codereview.chromium.org/2349153002
Cr-Commit-Position: refs/heads/master@{#39649}
2016-09-23 02:08:54 +00:00
adamk
1ca44a0a28 [d8/modules] Factor out path and string handling logic
Also canonicalize all path separators to '/' for simplicity.

Review-Url: https://codereview.chromium.org/2363773003
Cr-Commit-Position: refs/heads/master@{#39648}
2016-09-23 00:35:15 +00:00
adamk
4453819c9a [modules] Allow Module::Instantiate to throw exceptions
Also prepare d8 for that eventuality, and fixup the runtime call stat
counter used for Module::Evaluate.

R=neis@chromium.org
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2366773002
Cr-Commit-Position: refs/heads/master@{#39647}
2016-09-22 23:06:20 +00:00
adamk
3bbd11c233 [modules] Do path resolution relative to each module file in d8
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2361593002
Cr-Commit-Position: refs/heads/master@{#39646}
2016-09-22 21:03:42 +00:00
cbruni
c0485c18a3 [tools] Improve callstats.html
callstats.html now directly tries to load a results.json file in the same
directory when hosted over http. Additionally, avoiding innerHTML speeds up
initial data creation.

BUG=chromium:611010
NOTRY=true

Review-Url: https://codereview.chromium.org/2361953002
Cr-Commit-Position: refs/heads/master@{#39645}
2016-09-22 20:58:36 +00:00
jyan
3b1691be5e Fix Endian issue in interpreter in EmitBytecode
R=rmcilroy@chromium.org, mythria@chromium.org, leszeks@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2362453003
Cr-Commit-Position: refs/heads/master@{#39644}
2016-09-22 20:45:15 +00:00
lpy
68ee0a4f90 Add regression test for crbug.com/648740.
BUG=648740

Review-Url: https://codereview.chromium.org/2362563002
Cr-Commit-Position: refs/heads/master@{#39643}
2016-09-22 20:44:05 +00:00
verwaest
df7ecd1c1a Declare the arguments object before creating the function var, to make sure it masks it
BUG=chromium:649067

Review-Url: https://codereview.chromium.org/2362463003
Cr-Commit-Position: refs/heads/master@{#39642}
2016-09-22 19:16:42 +00:00
mvstanton
d52451ec86 [turbofan] Remove the representation dimension from Type.
BUG=

Review-Url: https://codereview.chromium.org/2359153002
Cr-Commit-Position: refs/heads/master@{#39641}
2016-09-22 18:35:19 +00:00
v8-autoroll
94978c9a9c Update V8 DEPS.
Rolling v8/tools/clang to 204eee93d4ffbc01d6182e4c199960db763c7dbc

TBR=machenbach@chromium.org,vogelheim@chromium.org,hablich@chromium.org
BUG=chromium:645953

Review-Url: https://codereview.chromium.org/2357163005
Cr-Commit-Position: refs/heads/master@{#39640}
2016-09-22 17:36:49 +00:00
neis
ca6886c035 [modules] Basic support of import statements.
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2360063002
Cr-Commit-Position: refs/heads/master@{#39639}
2016-09-22 17:28:48 +00:00
ahaas
813be42791 [wasm] Make sure the interpreter only executes preprocessed code.
BUG=chromium:646753
R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2365633002
Cr-Commit-Position: refs/heads/master@{#39638}
2016-09-22 17:11:52 +00:00
rmcilroy
e5ac75c635 [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter.
This CL optimizes the code in BytecodeArrayBuilder and
BytecodeArrayWriter by making the following main changes:

 - Move operand scale calculation out of BytecodeArrayWriter to the
BytecodeNode constructor, where the decision on which operands are
scalable can generally be statically decided by the compiler.
 - Move the maximum register calculation out of BytecodeArrayWriter
and into BytecodeRegisterOptimizer (which is the only place outside
BytecodeGenerator which updates which registers are used). This
avoids the BytecodeArrayWriter needing to know the operand types
of a node as it writes it.
 - Modify EmitBytecodes to use individual push_backs rather than
building a buffer and calling insert, since this turns out to be faster.
 - Initialize BytecodeArrayWriter's bytecode vector by reserving 512
bytes,
 - Make common functions in Bytecodes constexpr so that they
can be statically calculated by the compiler.
 - Move common functions and constructors in Bytecodes and
BytecodeNode to the header so that they can be inlined.
 - Change large static switch statements in Bytecodes to const array
lookups, and move to the header to allow inlining.

I also took the opportunity to remove a number of unused helper
functions, and rework some others for consistency.

This reduces the percentage of time spent in making BytecodeArrays
 in  CodeLoad from ~15% to ~11% according to perf. The
CoadLoad score increase by around 2%.

BUG=v8:4280

Committed: https://crrev.com/b11a8b4d41bf09d6b3d6cf214fe3fb61faf01a64
Review-Url: https://codereview.chromium.org/2351763002
Cr-Original-Commit-Position: refs/heads/master@{#39599}
Cr-Commit-Position: refs/heads/master@{#39637}
2016-09-22 16:34:31 +00:00
chiniforooshan
d537582d6f Re-enable TestEventInContext
https://codereview.chromium.org/2253973003 is landed. The V8
macro can be changed accordingly now and the test can be enabled
again.

BUG=647986

Review-Url: https://codereview.chromium.org/2360083005
Cr-Commit-Position: refs/heads/master@{#39636}
2016-09-22 16:31:14 +00:00
ivica.bogosavljevic
784642ea59 [wasm]: Re-enable Wasm related unit tests on Big endian
The Wasm got big-endian support with d3f3f6c818. The
tests are now passing.

BUG=

Review-Url: https://codereview.chromium.org/2359143002
Cr-Commit-Position: refs/heads/master@{#39635}
2016-09-22 15:46:57 +00:00
mtrofin
57ae3dbf94 [turbofan] Pre-spill ranges that have a slot use.
BUG=

Review-Url: https://codereview.chromium.org/2355373002
Cr-Commit-Position: refs/heads/master@{#39634}
2016-09-22 15:42:55 +00:00
heimbuef
a124feb076 Replaced different means of zone pooling/reusing by one zone segment pool
BUG=v8:5409

Review-Url: https://codereview.chromium.org/2348303002
Cr-Commit-Position: refs/heads/master@{#39633}
2016-09-22 15:35:13 +00:00
machenbach
20caa8770a Revert of [heap] Reland Concurrently free empty typed slot set chunks. (patchset #2 id:20001 of https://codereview.chromium.org/2365603002/ )
Reason for revert:
Leaks and TSAN:
https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20ASAN/builds/15441
https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20TSAN/builds/11867

Original issue's description:
> [heap] Reland Concurrently free empty typed slot set chunks.
>
> BUG=chromium:648568
>
> Committed: https://crrev.com/ec3835751d678c0b4a3fda47d11ffa107cd27e23
> Cr-Commit-Position: refs/heads/master@{#39630}

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

Review-Url: https://codereview.chromium.org/2364603002
Cr-Commit-Position: refs/heads/master@{#39632}
2016-09-22 15:14:59 +00:00
heimbuef
37c688a245 Pool implementation for zone segments
BUG=v8:5409

Review-Url: https://codereview.chromium.org/2335343007
Cr-Commit-Position: refs/heads/master@{#39631}
2016-09-22 14:33:49 +00:00
hpayer
ec3835751d [heap] Reland Concurrently free empty typed slot set chunks.
BUG=chromium:648568

Review-Url: https://codereview.chromium.org/2365603002
Cr-Commit-Position: refs/heads/master@{#39630}
2016-09-22 14:32:40 +00:00
ahaas
447de9ae5b [wasm] Correctly handle the result of WasmModule::Instantiate in the wasm-module-runner
WasmModule::Instantiate can return an empty handle if it is not possible
to instantiate the module. With this change the wasm-module-runner does
not assume anymore that WasmModule::Instantiate produces a valid handle.

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

Review-Url: https://codereview.chromium.org/2365493003
Cr-Commit-Position: refs/heads/master@{#39629}
2016-09-22 14:23:46 +00:00
ahaas
396dbab65e [wasm] Break loops in the module-decoder upon error.
R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2362663002
Cr-Commit-Position: refs/heads/master@{#39628}
2016-09-22 13:54:40 +00:00
jochen
d008b9efcb Make sure to use the correct context for eval checks
We can't assume that there's no entered context during microtask
execution. We also can't assume that we'll never enter an context during
microtask execution either.

We can however assume that we don't execute microtasks recursively, so
remembering the length of the entered context stack is enough to decide
which context to use.

BUG=chromium:635769
R=verwaest@chromium.org

Review-Url: https://codereview.chromium.org/2350933007
Cr-Commit-Position: refs/heads/master@{#39627}
2016-09-22 13:38:50 +00:00
machenbach
6cd5d73c6c [build] Fix race in v8gen
BUG=chromium:648583
NOTRY=true

Review-Url: https://codereview.chromium.org/2365573002
Cr-Commit-Position: refs/heads/master@{#39626}
2016-09-22 13:31:41 +00:00
ahaas
78b048c077 [wasm] Add hash to the crash message of the correctness fuzzer.
The hash in the crash message is necessary to keep cluster fuzz from
grouping all result mismatches.

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

Review-Url: https://codereview.chromium.org/2363663002
Cr-Commit-Position: refs/heads/master@{#39625}
2016-09-22 12:55:29 +00:00
hpayer
de42ed2862 [heap] Only insert new slot set entries.
BUG=chromium:648973,chromium:648568

Review-Url: https://codereview.chromium.org/2360233002
Cr-Commit-Position: refs/heads/master@{#39624}
2016-09-22 12:45:35 +00:00
leszeks
b81cddc57f [base] Revert "Move hashmap allocator to a field"
This reverts commit b42ecda533.

That commit introduced a allocator field to hashmap, which indirectly
added a field to Scopes, where the field, effectively storing a Zone, is
unnecessary because the Zone can be accessed in other ways.

Review-Url: https://codereview.chromium.org/2351393003
Cr-Commit-Position: refs/heads/master@{#39623}
2016-09-22 11:08:58 +00:00
bmeurer
a0fb619621 [compiler] Bump --max-inlined-nodes default to 200.
R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2361793002
Cr-Commit-Position: refs/heads/master@{#39622}
2016-09-22 10:58:14 +00:00
mvstanton
e13a825b6e [turbofan] Eliminate uses of representation dimension of Type.
BUG=

Review-Url: https://codereview.chromium.org/2355253002
Cr-Commit-Position: refs/heads/master@{#39621}
2016-09-22 10:33:25 +00:00
georgia.kouveli
5b81f5868d [arm64] Check sign with TBZ/TBNZ.
Generate TBZ/TBNZ for certain comparisons against zero. E.g. instead of:

    cmp w0, 0x0
    b.lt/ge <addr>

we can generate:

    tbnz/tbz w0, 31, <addr>

BUG=

Review-Url: https://codereview.chromium.org/2359723004
Cr-Commit-Position: refs/heads/master@{#39620}
2016-09-22 10:24:57 +00:00
bmeurer
b63de989db [turbofan] Bailout for call sites w/o feedback.
If a JSCallFunction node doesn't have any callee information, either
from feedback taken on input nodes, i.e. on property loads, or from
the CallIC, we insert a soft deoptimization exit instead.

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

Review-Url: https://codereview.chromium.org/2361773002
Cr-Commit-Position: refs/heads/master@{#39619}
2016-09-22 10:02:09 +00:00
epertoso
7c498d979a [builtins] Fix Generate_AtomicsStore.
An AtomicStore was used as an input to SmiTag.

R=jgruber@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2360993002
Cr-Commit-Position: refs/heads/master@{#39618}
2016-09-22 08:55:23 +00:00
ishell
76cfb388de [ic][ia32][x87] Pass value, slot and vector to StoreIC and KeyedStoreIC through the stack.
The handlers cleanup will be done in a follow-up CL.

BUG=v8:5407

Review-Url: https://codereview.chromium.org/2357163003
Cr-Commit-Position: refs/heads/master@{#39617}
2016-09-22 08:44:06 +00:00