Commit Graph

4233 Commits

Author SHA1 Message Date
dusan.milosavljevic
30dcf800df Make ParameterTraits specializations for 32-bit integers valid for all arches.
TEST=
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27441}
2015-03-25 14:21:29 +00:00
mstarzinger
38a719f965 Switch full-codegen from StackHandlers to handler table.
This switches full-codegen to no longer push and pop StackHandler
markers onto the operand stack, but relies on a range-based handler
table instead. We only use StackHandlers in JSEntryStubs to mark the
transition from C to JS code.

Note that this makes deoptimization and OSR from within any try-block
work out of the box, makes the non-exception paths faster and should
overall be neutral on the memory footprint (pros).

On the other hand it makes the exception paths slower and actually
throwing and exception more expensive (cons).

R=yangguo@chromium.org
TEST=cctest/test-run-jsexceptions/DeoptTry

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

Cr-Commit-Position: refs/heads/master@{#27440}
2015-03-25 13:14:02 +00:00
dslomov
1f6c46879b Test for access checks on super assignments.
R=verwaest@chromium.org
BUG=chromium:470113
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27438}
2015-03-25 12:52:11 +00:00
dcarney
637f96b8d3 fix nonmasking interceptor ic with interceptor on receiver
TBR=verwaest@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27436}
2015-03-25 12:34:10 +00:00
mvstanton
d1478f4e4f VectorICs: Address test-heap TODOS
Tests for non-clearing of weak cells in LoadICs weren't running when
vector ICs are enabled.

R=ulan@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27435}
2015-03-25 11:15:22 +00:00
ulan
f86aadd1d4 Reland "Filter invalid slots out from the SlotsBuffer after marking."
> There are two reasons that could cause invalid slots appearance in SlotsBuffer:
> 1) If GC trims "tail" of an array for which it has already recorded a slots and then migrate another object to the "tail".
> 2) Tagged slot could become a double slot after migrating of an object to another map with "shifted" fields (for example as a result of generalizing immutable data property to a data field).

> This CL also adds useful machinery that helps triggering incremental write barriers.

> BUG=chromium:454297
> LOG=Y

NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#27433}
2015-03-25 08:52:58 +00:00
machenbach
4629f8023a Revert of Filter invalid slots out from the SlotsBuffer after marking. (patchset #6 id:220001 of https://codereview.chromium.org/1010363005/)
Reason for revert:
Need to revert in order to revert https://codereview.chromium.org/1029323003/

Original issue's description:
> Filter invalid slots out from the SlotsBuffer after marking.
>
> There are two reasons that could cause invalid slots appearance in SlotsBuffer:
> 1) If GC trims "tail" of an array for which it has already recorded a slots and then migrate another object to the "tail".
> 2) Tagged slot could become a double slot after migrating of an object to another map with "shifted" fields (for example as a result of generalizing immutable data property to a data field).
>
> This CL also adds useful machinery that helps triggering incremental write barriers.
>
> BUG=chromium:454297
> LOG=Y
>
> Committed: https://crrev.com/5c47c1c0d3e4a488f190c16a64ee02f5a14e6561
> Cr-Commit-Position: refs/heads/master@{#27423}

TBR=hpayer@chromium.org,erik.corry@gmail.com,ishell@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:454297

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

Cr-Commit-Position: refs/heads/master@{#27426}
2015-03-24 22:01:40 +00:00
titzer
006ae96dab Set test expectations prior to enabling --turbo-osr.
R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27425}
2015-03-24 19:02:55 +00:00
ishell
5c47c1c0d3 Filter invalid slots out from the SlotsBuffer after marking.
There are two reasons that could cause invalid slots appearance in SlotsBuffer:
1) If GC trims "tail" of an array for which it has already recorded a slots and then migrate another object to the "tail".
2) Tagged slot could become a double slot after migrating of an object to another map with "shifted" fields (for example as a result of generalizing immutable data property to a data field).

This CL also adds useful machinery that helps triggering incremental write barriers.

BUG=chromium:454297
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#27423}
2015-03-24 17:07:44 +00:00
marja
cb7279da81 [strong] Check strong mode free variables against the global object.
Gather references to unbound variables where the reference (VariableProxy) is
inside strong mode. Check them against the global object when a script is bound
to a context (during compilation).

This CL only checks unbound variables which are not inside lazy functions - TBD
how do we solve that; alternatives: add developer mode which disables laziness /
do the check whenever lazy functions are really compiled.

BUG=v8:3956
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27422}
2015-03-24 16:46:59 +00:00
dcarney
a3b7c8320e fix attribute lookup for all can read indexed interceptors
R=verwaest@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27420}
2015-03-24 16:10:06 +00:00
svenpanne
20dce719ee Added %_HeapObjectGetMap and %_MapGetInstanceType intrinsics.
These are needed (among other things) for a TurboFan-generated
StringAddStub. Furthermore, they can be used to nuke the overly
complex %_IsInstanceType intrisic, it's completely expressible in
JavaScript now, but that will be done in a separate CL.

Alpha-sorted things a bit on the way to ease navigation.

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

Cr-Commit-Position: refs/heads/master@{#27415}
2015-03-24 15:20:57 +00:00
ulan
1efcca7f04 Reload length of retained_maps array after GC.
This fixes flaky GC stress failure:

> Fatal error in ../src/heap/mark-compact.cc, line 2127
> Check failed: retained_maps->Get(i)->IsWeakCell().

BUG=
TEST=test-heap/RegressArrayListGC

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

Cr-Commit-Position: refs/heads/master@{#27412}
2015-03-24 14:36:09 +00:00
mstarzinger
1fefa31df6 Remove CompilationInfoWithZone from public API.
This removes the CompilationInfoWithZone class from the header file
because it is more than a pure convenience class and shouldn't be used
outside of the compiler at all.

R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27411}
2015-03-24 14:17:17 +00:00
titzer
9ac4ab799c [turbofan] Remove Instruction::IsControl() and Instruction::MarkAsControl()
R=dcarney@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27409}
2015-03-24 14:05:35 +00:00
dcarney
adeb82ef23 fix disposal of phantom handles in GlobalValueMap
additionally, add a drive by fix to WeakCallbackInfo

R=jochen@chromium.org, erikcorry@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27407}
2015-03-24 13:22:15 +00:00
loislo
ae461b9ed0 CpuProfiler: push the collected information about deopts to cpu profiler
it is the last patch of https://codereview.chromium.org/1012633002

All that we need here is to push the collected info to the profiler
and convert it into actionable information about deopt.

On the Next: get the info accessible by embedder.

BUG=chromium:452067
LOG=n
TEST=DeoptAtFirstLevelInlinedSource, DeoptAtSecondLevelInlinedSource, DeoptUntrackedFunction

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

Cr-Commit-Position: refs/heads/master@{#27403}
2015-03-24 12:46:26 +00:00
titzer
e62f754de7 [turbofan] Rename Node::RemoveAllInputs() to Node::NullAllInputs().
R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27401}
2015-03-24 12:40:13 +00:00
jochen
d19d0be8a0 Remove calls to IdleNotification()
All users should use IdleNotificationDeadline() instead

BUG=none
R=hpayer@chromium.org
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#27386}
2015-03-24 08:30:02 +00:00
mstarzinger
7421c7f598 Remove dangerous constructor from CompilationInfoWithZone.
This removes the stub-based constructor from CompilationInfoWithZone
as this class is more than a pure convenience class and only by chance
doesn't have an effect in the destructor.

R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27376}
2015-03-23 17:30:45 +00:00
ulan
c56fa73699 Reland "Fix memory leak caused by field type in descriptor array."
BUG=v8:3877
LOG=NO

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

Cr-Commit-Position: refs/heads/master@{#27362}
2015-03-23 11:20:50 +00:00
chunyang.dai
9fe378be22 Remove the check for turbofan unsupported platform.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27359}
2015-03-23 10:06:27 +00:00
caitpotter88
fd51f615eb [es6] remove --harmony-templates flag
BUG=v8:3230
R=dslomov@chromium.org, arv@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27352}
2015-03-23 07:01:48 +00:00
Benedikt Meurer
3aa206b865 [turbofan] Turn Math.clz32 into an inlinable builtin.
R=dcarney@chromium.org, yangguo@chromium.org
BUG=v8:3952
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#27329}
2015-03-20 08:37:34 +00:00
hpayer
cbfcee5575 Revert "Merge old data and pointer space."
TBR=verwaest@chromium.org,ulan@chromium.org,ishell@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#27323}
2015-03-19 22:03:32 +00:00
rossberg
74cf8e0122 [strong] Check constructor returns
R=dslomov@chromium.org
BUG=v8:3956
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27320}
2015-03-19 19:40:04 +00:00
titzer
cd33978480 [turbofan] Remove last_use_ field from Node.
R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27319}
2015-03-19 15:44:35 +00:00
jarin
b7dc9c580a [turbofan] Remember types for deoptimization during simplified lowering.
With this change, we remember the types of frame state inputs (in a new
operator, called TypedStateValues). Instead of inferring the value types
when building translations, we used the recorded types.

The original approach was not reliable because the passes after
simplified lowering can change node types, and this in turn confuses
the translation builder.

BUG=chromium:468727
LOG=n
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27310}
2015-03-19 14:00:33 +00:00
dusan.milosavljevic
a1331af594 MIPS64: Fix bug in jump table test.
TEST=test-assembler-mips64/jump_tables3
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27301}
2015-03-19 12:42:11 +00:00
mstarzinger
addca70725 [turbofan] Remove stale TODO from FunctionTester.
R=titzer@chromium.org
TEST=cctest/test-run-jsexceptions

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

Cr-Commit-Position: refs/heads/master@{#27300}
2015-03-19 12:41:05 +00:00
rodolph.perfetta
abf78583b9 [arm64] Assembler support for internal references.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27296}
2015-03-19 10:24:54 +00:00
Benedikt Meurer
a75e4cea8f [turbofan] Remove indirection in JSToBoolean/JSUnaryNot lowering.
This reduces the overhead of typed lowering, because we lower
JSToBoolean/JSUnaryNot directly if possible, instead of first lowering
to AnyToBoolean, and then letting the SimplifiedOperatorReducer do the
further lowering.

Also remove some obsolete tests from the cctest suite that have since
been removed by proper unittests. And improve unitttest coverage for the
typed lowering cases.

R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27295}
2015-03-19 10:13:12 +00:00
michael_dawson
8849c00095 PPC: cleanup excludes
Updated excludes to remove SKIPs where possible. Either
removing if no longer needed or replacing with SLOW where
tests just need more time to run

	modified:   test/cctest/cctest.status
	modified:   test/mjsunit/mjsunit.status

R=danno@chromium.org, svenpanne@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27287}
2015-03-19 07:44:47 +00:00
yangguo
3f10f409c8 Revert of Reland of "Fix memory leak caused by field type in descriptor array."
TBR=ulan@chromium.org
BUG=v8:3969
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27286}
2015-03-19 07:43:37 +00:00
yangguo
7c149afb6c Serializer: serialize internal references via object visitor.
Review URL: https://codereview.chromium.org/1005183006

Cr-Commit-Position: refs/heads/master@{#27275}
2015-03-18 13:38:45 +00:00
dcarney
0880d4da26 add interceptors which do not mask existing properties
R=verwaest@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27271}
2015-03-18 12:50:48 +00:00
svenpanne
9118b2fa87 Tweak the TurboFan pipeline for stub compilation.
Review URL: https://codereview.chromium.org/1010673004

Cr-Commit-Position: refs/heads/master@{#27268}
2015-03-18 11:42:44 +00:00
jochen
fe3544b370 Make tests pass with weak closure overapproximation enabled
BUG=v8:3862
R=hpayer@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#27261}
2015-03-18 10:01:36 +00:00
hpayer
257ff48931 Merge old data and pointer space.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27259}
2015-03-18 09:39:03 +00:00
michael_dawson
8685219066 PPC: Changes to allow AIX to compile with gcc 4.8.3
We were able to remove most of our changes needed to compile
on AIX with an earlier compiler level.  These changes are the
remaining ones.

The changes in heap/heap.cc are needed because otherwise the
compiler complains that result is potentially used before
it is initialized.

The changes in heap/mark-compact.cc are required because
AIX supports the full 64 bit address range so the check
being guarded is invalid.

The changes in build/toolchain.gypi and
test/cctest/cctest/gyp are aix only and are adjust the
compile/link options to allow the AIX build to succeed.

	modified:   build/toolchain.gypi
	modified:   src/heap/heap.cc
	modified:   src/heap/mark-compact.cc
	modified:   test/cctest/cctest.gyp

R=danno@chromium.org, svenpanne@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27255}
2015-03-18 08:43:28 +00:00
titzer
434d1ad014 [turbofan] Fix bug in OSR deconstruction.
In constructing the transfer between loop copies, we need to merge the backedges from all the previous copies of the given loop. The control reduction will work out which ones are really reachable.

R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27246}
2015-03-17 17:55:29 +00:00
mvstanton
7478c5a0cc Feedback vector: ASAN found memory leaks during AST Numbering pass.
The cause was dynamic allocation of an accounting structure used to
create/initialize the type feedback vector, done at the end of the
numbering pass. The solution is to Zone-allocate the structure to
bring it's lifetime in line with the compilation unit.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27241}
2015-03-17 15:16:36 +00:00
dcarney
85a0e8075f convert String::New functions to maybe
R=svenpanne@chromium.org
BUG=v8:3929
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#27236}
2015-03-17 11:45:50 +00:00
mvstanton
34a1a76ddf Use platform specific stubs for vector-based Load/KeyedLoad.
A hydrogen code stub is not the best approach because it builds a frame
and doesn't have the technology to discard roots at tail call exits.
Platform-specific stubs provide much better performance at this point.

R=verwaest@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27235}
2015-03-17 11:28:21 +00:00
yangguo
d74f5c6f09 Serializer: Cache FlagList::Hash result.
R=vogelheim@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27234}
2015-03-17 11:04:29 +00:00
ulan
d4cd05e6df Retain maps that have live prototypes.
BUG=v8:3664
LOG=NO

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

Cr-Commit-Position: refs/heads/master@{#27233}
2015-03-17 10:52:12 +00:00
yangguo
567e45a192 Promote code from code cache to compilation cache.
The per-isolate compilation cache is a lot faster still than
the serialized code cache. Promote code to compilation cache
after deserialization.

R=vogelheim@chromium.org
BUG=chromium:399580
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27220}
2015-03-16 13:19:20 +00:00
dusan.milosavljevic
17ada20c17 MIPS64: Unify and improve Word32 compares to use same instructions as Word64 compares.
The CL enables the same instructions are selected for Word32 and Word64 compare
operations which is possible due to a fact 32-bit inputs and produced values
are always sign-extended.

TEST=
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27212}
2015-03-16 11:00:12 +00:00
ishell
52cb51fb8d Revert of Reland of Remove slots that point to unboxed doubles from the StoreBuffer/SlotsBuffer. (patchset #3 id:40001 of https://codereview.chromium.org/988363002/)
Reason for revert:
Increased rate of Chrome crashes. Requires further investigation.

Original issue's description:
> Reland of Remove slots that point to unboxed doubles from the StoreBuffer/SlotsBuffer.
>
> The problem is that tagged slot could become a double slot after migrating of an object to another map with "shifted" fields (for example as a result of generalizing immutable data property to a data field).
> This CL also adds useful machinery that helps triggering incremental write barriers.
>
> BUG=chromium:454297, chromium:465273
> LOG=Y
>
> Committed: https://crrev.com/6d0677d845c47ab9fa297de61d0e3d8e5480a02a
> Cr-Commit-Position: refs/heads/master@{#27141}

TBR=hpayer@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:454297, chromium:465273

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

Cr-Commit-Position: refs/heads/master@{#27207}
2015-03-16 09:40:47 +00:00
michael_dawson
b74b0a8b16 PPC: Further leverage internal references.
Enable code dependent on the newly provided common code support for
encoded internal references.

	modified:   src/ppc/code-stubs-ppc.cc
	modified:   test/cctest/cctest.status

R=danno@chromium.org, svenpanne@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27204}
2015-03-16 08:40:19 +00:00
bmeurer
523dec1234 [turbofan] Fix typo in ControlReducer.
R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27201}
2015-03-16 07:28:06 +00:00
dslomov
a8289230a3 Fix test for function declarations syntax error.
Also fix parsing of declarations after case labels.

R=waldron.rick@gmail.com,rossberg@chromium.org
BUG=v8:3939
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27189}
2015-03-13 16:57:35 +00:00
rossberg
3fcb38f772 [strong] Check super constructor calls
R=marja@chromium.org
BUG=v8:3956
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27188}
2015-03-13 16:26:52 +00:00
dslomov
92138c73a7 Remove --harmony-scoping flag.
We have been shipping harmony scoping for 2 Chrome releases now (M41
and M42). Time to remove the flag.

R=rossberg@chromium.org
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#27187}
2015-03-13 15:15:57 +00:00
dslomov
de8e2be875 Implement TDZ in StoreIC for top-level lexicals.
StoreIC::Store was missing a check present in LoadIC::Load.

R=rossberg@chromium.org
BUG=v8:3941
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#27182}
2015-03-13 13:28:18 +00:00
yangguo
057857ef06 PPC: fix allocation issues for PPC64.
R=hpayer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27179}
2015-03-13 11:18:31 +00:00
bmeurer
99f8d57f3c [turbofan] Introduce optional Float64Min and Float64Max machine operators.
Basically recognize certain x < y ? x : y constructs and turn that into
Float64Min/Float64Max operations, if the target machine supports that.
On x86 we lower to (v)minsd/(v)maxsd.

R=dcarney@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27160}
2015-03-12 14:07:39 +00:00
Sven Panne
40567349df Remove funky 2-stage initialization of ParserInfo and an adventurous memset.
R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27155}
2015-03-12 11:46:32 +00:00
balazs.kilvady
1320b9dc5f MIPS: CpuProfiler: enable tests except four failing tests.
Port 84e90b2d0d

Original commit message:
Four tests are failing due to a problem with no frame ranges.

TEST=cctest/test-cpu-profiler/CollectDeoptEvents
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27152}
2015-03-12 10:46:31 +00:00
dcarney
317ce1170d add 0 length guard in IsNonArrayIndexInteger
TBR=verwaest@chromium.org

BUG=466086
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27151}
2015-03-12 10:44:38 +00:00
mvstanton
4ededa8694 Vector-ICs: Implement slot sharing for global loads.
We can reduce the number of type feedback vector slots required, and
also reduce IC misses.

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

Cr-Commit-Position: refs/heads/master@{#27149}
2015-03-12 09:23:01 +00:00
bmeurer
b5197ea478 [turbofan] Remove unused diamonds during control reduction.
A diamond is unused if the Merge node has no Phi/EffectPhi uses, exactly
two inputs, one IfTrue and one IfFalse, which have the same Branch
control input and no other uses except for the Merge. In this case the
diamond can safely be removed.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27148}
2015-03-12 09:02:22 +00:00
machenbach
8329f04abe Mark ProcessDebugMessagesThreaded as flaky.
TBR=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27147}
2015-03-12 08:15:55 +00:00
michael_dawson
7cbdadd495 PPC: remove test excludes no longer required
The test/cctest/cctest.status and test/mjsunit/mjsunit.status
tests now pass under the simulator so removing these
excludes

	modified:   test/cctest/cctest.status
	modified:   test/mjsunit/mjsunit.status

R=danno@chromium.org, svenpanne@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27145}
2015-03-12 07:54:38 +00:00
adamk
9703c057c5 Modules: simplify logic around allocation of module internal variables
Since recursive modules are gone, only the top-level scope can have
module inner scopes. Rename Scope::AllocateModulesRecursively to
Scope::AllocateModules, and add test showing the module Variables
are still allocated appropriately in the top level scope.

BUG=v8:1569,v8:3940
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#27143}
2015-03-11 23:19:57 +00:00
ishell
6d0677d845 Reland of Remove slots that point to unboxed doubles from the StoreBuffer/SlotsBuffer.
The problem is that tagged slot could become a double slot after migrating of an object to another map with "shifted" fields (for example as a result of generalizing immutable data property to a data field).
This CL also adds useful machinery that helps triggering incremental write barriers.

BUG=chromium:454297, chromium:465273
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#27141}
2015-03-11 19:29:57 +00:00
michael_dawson
d88656af9f cctest/test-deoptimization/DeoptimizeCompare was failing on PPC because the path that is optimized for isel incorrectly used integer values instead of Smi's
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27136}
2015-03-11 14:58:03 +00:00
hpayer
aab76eff43 Just visit young array buffers during scavenge. Additionally keep the views in new space in a separate global list and move them to the corresponding array buffers when they get promoted.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27128}
2015-03-11 10:58:03 +00:00
michael_dawson
45e4a78911 Contribution of PowerPC port (continuation of 422063005) - uplevel
Contribution of PowerPC port (continuation of 422063005,
817143002,866843003, and 901083004). This patch updates
the ppc directories to make them current with changes in
common code as of today.

We had to exclude the test test-serialize/SerializeInternalReference
until we agree on the right way to add those changes for PPC as
outlined in the description in the google doc provided earlier.

We also had to exclude a couple of other tests due to new
failures seen since the last uplevel.  We excluded as opposed
to waiting until we could investigate to maximize the chance
of getting PPC compiling in the google repos before new
breaking changes are made.

I'll note that before applying any of our changes the
mozilla part of quickcheck was already broken when using
the lastest repo content so I had to run without that

	modified:   src/compiler/ppc/code-generator-ppc.cc
	modified:   src/compiler/ppc/instruction-codes-ppc.h
	modified:   src/compiler/ppc/instruction-selector-ppc.cc
	modified:   src/ic/ppc/handler-compiler-ppc.cc
	modified:   src/ic/ppc/ic-compiler-ppc.cc
	modified:   src/ppc/assembler-ppc-inl.h
	modified:   src/ppc/assembler-ppc.cc
	modified:   src/ppc/assembler-ppc.h
	modified:   src/ppc/builtins-ppc.cc
	modified:   src/ppc/code-stubs-ppc.cc
	modified:   src/ppc/codegen-ppc.cc
	modified:   src/ppc/full-codegen-ppc.cc
	modified:   src/ppc/lithium-codegen-ppc.cc
	modified:   src/ppc/macro-assembler-ppc.cc
	modified:   src/ppc/macro-assembler-ppc.h
	modified:   test/cctest/cctest.status

R=danno@chromium.org, svenpanne@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27125}
2015-03-11 08:49:33 +00:00
caitpotter88
f950ddf581 [parser] parse arrow function only if no linefeed before =>
BUG=v8:3954
LOG=N
R=arv@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27122}
2015-03-10 19:25:03 +00:00
dcarney
040225a315 handle the special snowflakes that are Integer Indexed Exotic objects
the implementation doesn't yet throw on strict mode assignment

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27121}
2015-03-10 19:11:20 +00:00
loislo
84e90b2d0d CpuProfiler: enable tests except four failing tests.
Four tests are failing due to a problem with no frame ranges.

BUG=
LOG=n

Committed: https://crrev.com/2be160e726f2be6272b77e53fbd556aded6024f1
Cr-Commit-Position: refs/heads/master@{#27035}

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

Cr-Commit-Position: refs/heads/master@{#27116}
2015-03-10 16:18:36 +00:00
yurys
619d4535cc Remove uid and title from HeapSnapshot
None of these fields is used in Blink. Embedder always can implement them using existing API.

BUG=chromium:465651
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#27113}
2015-03-10 15:14:07 +00:00
loislo
82e6824eb7 CpuProfiler: fix for CollectDeoptEvents test on arm64
We use slightly different schema for JumpTable on arm64 than for x64.

We do a branch (B) to the JumpTable from the code,
then a branch (B) to the end of jump table code
and then branch to the deoptimizer code with putting
the return address into lr register (Call which is actually Blr).

As a result the 'from' address in Deoptimizer always points to
the end of JumpTable code and we can get nothing from this information.

0) I moved save_doubles and needs_frame code out of for_loop.

1) I replaced B commands with Bl so we put different return addresses
to lr register for the different jump table entries and replaced
the final Call with Br which do not touch lr register.

Also I removed the last_entry check so we will always do the Bl
even for the last entry because we need the right address in lr.
I don't think that this will affect the performance because it
just one more branch for entire deopt mechanics.

BUG=chromium:452067
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#27094}
2015-03-10 10:45:21 +00:00
bmeurer
022ea7e057 [turbofan] Unify Math.floor / Math.ceil optimization.
Provide an intrinsic %MathFloor / %_MathFloor that is used to optimize
both Math.ceil and Math.floor, and use the JS inlining mechanism to
inline Math.ceil into TurboFan code. Although we need to touch code
outside of TurboFan to make this work, this does not affect the way we
handle Math.ceil and/or Math.floor in CrankShaft, because for CrankShaft
the old-style builtin function id based inlining still kicks in first.

Once this solution is stabilized, we can use it for Math.floor as well.
And once that is settled, we can establish it as the unified way to
inline builtins, and get rid of the specialized builtin function id
based inlining at some point.

Note that "builtin" applies to basically every piece of internal
JavaScript/intrinsics based code, so this also applies to the yet to be
defined JavaScript based code stubs and handlers.

BUG=v8:3953
LOG=n
R=yangguo@chromium.org,svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27086}
2015-03-10 08:42:53 +00:00
bmeurer
a556a104c0 [turbofan] Context specialize during inlining.
Context specialization enables inlining (at least currently it is the
only enabler for inlining), but inlining enables more possibilities for
context specialization. So we really need to run them together.

This is especially important with the "module based builtins" that we're
working towards.

BUG=v8:3952
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#27085}
2015-03-10 08:37:26 +00:00
dcarney
60c1ad026d remove phantom naming from the api
since the old style weakness is slated for removal, we might as well reuse the name to limit confusion.  additionally I simplified the callback type to a enum to either get internal field values or not

this should be a non-breaking change with the exception of PhantomPersistentValueMap, which is unused.

R=jochen@chromium.org, erikcorry@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27084}
2015-03-09 21:48:09 +00:00
titzer
0f6702562e Extract ParseInfo from CompilationInfo.
Rationale: separate the inputs and outputs of parsing + analysis from the business of compiling (i.e. generating machine code).

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27078}
2015-03-09 14:51:24 +00:00
loislo
66ab309e73 CpuProfiler: fix for GetDeoptReason code.
The original code always returned the first entry from RelocInfo that matched with
bailout_id. But we may have a few different deopt reasons for one bailout_id.
So we need to get the one which matches with a particular call from JumpTable.

We can do this by checking not 'target_address' (it maps to bailout_id)
but 'from' address which maps to a particular JumpTable entry.

The test was reworked so it tests identical functions against different reasons.

BUG=chromium:452067
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#27076}
2015-03-09 14:43:40 +00:00
jarin
6f559b7ec3 [turbofan] Fix lazy deopt for JSToNumber conversions in binary operations.
This slightly hacky change provides lazy deopt points for to-number conversions in binops: When we deopt from a to-number conversion, we create a frame state with the already-converted value(s) so that we do not repeat the side effect of the conversion.

Embenchen numbers are below. It is not quite clear what happened to fasta - the hot code looks nearly identical.

Current: EmbenchenBox2d(RunTime): 12746 ms.
d8-master: EmbenchenBox2d(RunTime): 13861 ms.
----------- bullet.js
Current: EmbenchenBullet(RunTime): 17680 ms.
d8-master: EmbenchenBullet(RunTime): 19170 ms.
----------- copy.js
Current: EmbenchenCopy(RunTime): 4939 ms.
d8-master: EmbenchenCopy(RunTime): 4943 ms.
----------- corrections.js
Current: EmbenchenCorrections(RunTime): 6639 ms.
d8-master: EmbenchenCorrections(RunTime): 6728 ms.
----------- fannkuch.js
Current: EmbenchenFannkuch(RunTime): 4630 ms.
d8-master: EmbenchenFannkuch(RunTime): 4872 ms.
----------- fasta.js
Current: EmbenchenFasta(RunTime): 10209 ms.
d8-master: EmbenchenFasta(RunTime): 9673 ms.
----------- lua_binarytrees.js
Current: EmbenchenLuaBinaryTrees(RunTime): 12936 ms.
d8-master: EmbenchenLuaBinaryTrees(RunTime): 15529 ms.
----------- memops.js
Current: EmbenchenMemOps(RunTime): 7357 ms.
d8-master: EmbenchenMemOps(RunTime): 7340 ms.
----------- primes.js
Current: EmbenchenPrimes(RunTime): 7530 ms.
d8-master: EmbenchenPrimes(RunTime): 7457 ms.
----------- skinning.js
Current: EmbenchenSkinning(RunTime): 15832 ms.
d8-master: EmbenchenSkinning(RunTime): 15630 ms.
----------- zlib.js
Current: EmbenchenZLib(RunTime): 11176 ms.
d8-master: EmbenchenZLib(RunTime): 11324 ms.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27071}
2015-03-09 13:24:42 +00:00
dcarney
d7f25f557c use a hash table for the function cache as blink is leaking functiontemplates
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27066}
2015-03-09 12:26:28 +00:00
ishell@chromium.org
67a02321c2 Revert of Remove slots that point to unboxed doubles from the StoreBuffer/SlotsBuffer. (patchset #4 id:230001 of https://codereview.chromium.org/957273002/)
Reason for revert:
It caused a lot of Canary crashes.

Original issue's description:
> Remove slots that point to unboxed doubles from the StoreBuffer/SlotsBuffer.
>
> The problem is that tagged slot could become a double slot after migrating of an object to another map with "shifted" fields (for example as a result of generalizing immutable data property to a data field).
> This CL also adds useful machinery that helps triggering incremental write barriers.
>
> BUG=chromium:454297
> LOG=Y
>
> Committed: https://crrev.com/9633ebabd405c264d33f603f8798c31f59418dcd
> Cr-Commit-Position: refs/heads/master@{#27054}

TBR=verwaest@chromium.org,hpayer@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:454297

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

Cr-Commit-Position: refs/heads/master@{#27063}
2015-03-09 10:10:46 +00:00
Jaroslav Sevcik
02e318517f [turbofan] Add an extra frame state for deoptimization before binary op.
BUG=
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27060}
2015-03-09 08:37:17 +00:00
Benedikt Meurer
25895aeeaf [turbofan] Add support for inlining of builtins.
We mark certain builtins for inlining, and those should always be
inlined into optimized code (CrankShaft already handles it this way), so
we should support that in TurboFan as well. Currently this mainly
affects a certain set of Math functions, but once have the basics in
place we can extend this to any kind of builtin/code stub/accessor.

This adds a new flag --turbo_builtin_inlining (enabled by default), that
forces the inliner to always inline builtins marked for inlining, but
does not affect inlining of other functions (this is still controlled by
the --turbo-inlining flag).

BUG=v8:3952
LOG=n
R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27059}
2015-03-09 08:05:45 +00:00
ishell
9633ebabd4 Remove slots that point to unboxed doubles from the StoreBuffer/SlotsBuffer.
The problem is that tagged slot could become a double slot after migrating of an object to another map with "shifted" fields (for example as a result of generalizing immutable data property to a data field).
This CL also adds useful machinery that helps triggering incremental write barriers.

BUG=chromium:454297
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#27054}
2015-03-06 23:55:13 +00:00
dusan.milosavljevic
6f946d6c02 MIPS: Update test status files.
TEST=
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27050}
2015-03-06 16:41:35 +00:00
jkummerow
233ea0eef8 Reland: Simplify and compact transitions storage
Original issue: https://codereview.chromium.org/980573002/

Simple transitions are now stored in a map's "transitions" field (as a WeakCell wrapping the target map); full TransitionArrays are used when that's not sufficient.
To encapsulate these storage format implementation details, functions for manipulating and querying transitions have been refactored to be static functions on the TransitionArray class, and take maps as inputs.

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

Cr-Commit-Position: refs/heads/master@{#27044}
2015-03-06 14:08:47 +00:00
ulan
1b00451f57 Retain maps embedded in optimized code for several garbage collections.
This keeps dying maps alive for FLAG_retain_maps_for_n_gc garbage collections
to increase chances of them being reused for new objects in future and
decrease number of deoptimizations.

BUG=v8:3664
LOG=N
TEST=cctest/test-heap/MapRetaining

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

Cr-Commit-Position: refs/heads/master@{#27040}
2015-03-06 12:36:32 +00:00
loislo
b2ae7a7594 Revert of CpuProfiler: enable tests except four failing tests. (patchset #3 id:100001 of https://codereview.chromium.org/976203003/)
Reason for revert:
Some tests still flaky

Original issue's description:
> CpuProfiler: enable tests except four failing tests.
>
> Four tests are failing due to a problem with no frame ranges.
>
> BUG=
> LOG=n
>
> Committed: https://crrev.com/2be160e726f2be6272b77e53fbd556aded6024f1
> Cr-Commit-Position: refs/heads/master@{#27035}

TBR=yurys@chromium.org,svenpanne@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27037}
2015-03-06 10:20:00 +00:00
mstarzinger
e6ff16d6bf [turbofan] Preserve pending message while inside finally-block.
This makes sure that any pending message is saved before entering
and restored after exiting a finally block. It also makes sure that
operand stacks are kept in sync to full-codegen.

R=bmeurer@chromium.org
TEST=cctest/test-run-jsexceptions/ThrowMessage

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

Cr-Commit-Position: refs/heads/master@{#27036}
2015-03-06 10:16:02 +00:00
loislo
2be160e726 CpuProfiler: enable tests except four failing tests.
Four tests are failing due to a problem with no frame ranges.

BUG=
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#27035}
2015-03-06 10:01:49 +00:00
yangguo
a8e82da6a5 Serializer: simplify external reference encoding.
External references are encoded as a tuple of type and ID. This
requires both the external reference encode and the decoder to
create a mapping between the encoding and the external reference
table index.

Instead, we simply use the external reference table index as
encoding.

We now also assume that there are no duplicate entries. Existing
duplicates have been removed in this change.

R=vogelheim@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27033}
2015-03-06 08:15:28 +00:00
yangguo
e571065c14 Only reference constant root list entries in the snapshot.
R=hpayer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27031}
2015-03-05 21:24:24 +00:00
jkummerow
948a973d45 Revert of Simplify and compact transitions storage (patchset #4 id:80001 of https://codereview.chromium.org/980573002/)
Reason for revert:
x64 test failures

Original issue's description:
> Simplify and compact transitions storage
>
> Simple transitions are now stored in a map's "transitions" field (as a WeakCell wrapping the target map); full TransitionArrays are used when that's not sufficient.
> To encapsulate these storage format implementation details, functions for manipulating and querying transitions have been refactored to be static functions on the TransitionArray class, and take maps as inputs.
>
> Committed: https://crrev.com/45fbef7f2252fce10634931cb103ccc1fc95ae6a
> Cr-Commit-Position: refs/heads/master@{#27029}

TBR=verwaest@chromium.org,ulan@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#27030}
2015-03-05 20:42:03 +00:00
jkummerow
45fbef7f22 Simplify and compact transitions storage
Simple transitions are now stored in a map's "transitions" field (as a WeakCell wrapping the target map); full TransitionArrays are used when that's not sufficient.
To encapsulate these storage format implementation details, functions for manipulating and querying transitions have been refactored to be static functions on the TransitionArray class, and take maps as inputs.

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

Cr-Commit-Position: refs/heads/master@{#27029}
2015-03-05 20:09:41 +00:00
kozyatinskiy
54196b17c8 [V8] Use Function.name for stack frames in v8::StackTrace
If function.name property has string type then stack frame will contain it otherwise DebugName from shared function info.

BUG=17356
LOG=Y
R=yurys@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27025}
2015-03-05 18:31:49 +00:00
Dan Carney
4873d8c74e disable some arm tests after r27020
TBR=yangguo@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27024}
2015-03-05 17:49:45 +00:00
Yang Guo
e522cb6e3f Disable turbofan for serializer tests.
TBR=dcarney@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27022}
2015-03-05 14:46:56 +00:00
yangguo
ce45b00e4b Serializer: correctly deal with internal references.
Internal references are absolute addresses into the instruction
stream. Turn them into relative addresses when serializing and
back when deserializing to keep them valid.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27020}
2015-03-05 13:46:46 +00:00
dcarney
00c52d424a reland rename UniquePersistent to Global
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27018}
2015-03-05 13:26:35 +00:00
yurys
e33ae81ce1 Allow passing sourceMapUrl when compiling scripts
According to Source Map specification [1] source map url can be passed either as a magic comment at the end of script or as SourceMap http header. We already parse the former value and expose it on Script object. This change allows to unify the way we deal with source map urls received in http header by providing api for passing that url into the script being compiled.

source_map_url is intentionally not passed into CompilationCacheScript::Lookup. The cache is anyways disabled when debugger is on.

[1] https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit

LOG=Y
BUG=chromium:462572

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

Cr-Commit-Position: refs/heads/master@{#27017}
2015-03-05 13:03:57 +00:00
mstarzinger
1382879f29 [turbofan] Implement throwing exceptions into TurboFan code.
This extends the stack unwinding logic to respect optimized frames
and perform a lookup in the handler table to find handlers. It also
contains fixes to the API call stubs to allow a stack walk while
promoting scheduled exceptions.

R=jarin@chromium.org
TEST=cctest/test-run-jsexceptions

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

Cr-Commit-Position: refs/heads/master@{#27016}
2015-03-05 13:02:46 +00:00
machenbach
8465f39792 Revert of rename UniquePersistent to Global (patchset #2 id:20001 of https://codereview.chromium.org/980173003/)
Reason for revert:
breaks arm compile

Original issue's description:
> rename UniquePersistent to Global
>
> BUG=
>
> Committed: https://crrev.com/3f5ae16c62b031ad572f750d81ffc71c5d6d1f9b
> Cr-Commit-Position: refs/heads/master@{#27011}

TBR=svenpanne@chromium.org,dcarney@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27012}
2015-03-05 12:10:32 +00:00
dcarney
3f5ae16c62 rename UniquePersistent to Global
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27011}
2015-03-05 11:40:43 +00:00
loislo
5cd7707c55 CpuProfiler: simplify test.
BUG=
LOG=n
TBR=yurys, svenpanne

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

Cr-Commit-Position: refs/heads/master@{#27008}
2015-03-05 10:38:07 +00:00
bmeurer
4436c2642a [turbofan] Support for %_DoubleHi, %_DoubleLo and %_ConstructDouble.
This adds support for the double bits intrinsics to TurboFan, and is
a first step towards fast Math functions inlined into TurboFan code
or even compiled by themselves with TurboFan.

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

Cr-Commit-Position: refs/heads/master@{#27006}
2015-03-05 09:22:38 +00:00
mstarzinger
23fb4eb8f3 [turbofan] Enable DeoptFinallyReturn test that no longer fails.
This was fixed by 064be2385a and will no longer fail, even on the
no-snap ARM64 simulator.

R=bmeurer@chromium.org
TEST=cctest/test-run-jsexceptions/DeoptFinallyReturn

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

Cr-Commit-Position: refs/heads/master@{#27005}
2015-03-05 09:17:12 +00:00
yangguo
bdc7b2f43c Serializer: still install experimental globals when creating a snapshot.
Experimental globals are simply flag values on the builtins object to
turn on/off harmony features. We still need to declare them even when
we don't turn on harmony features for the snapshot.

R=vogelheim@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26992}
2015-03-04 15:02:06 +00:00
yangguo
1a608493e5 Refactor BreakLocationIterator.
We now have BreakLocation::Iterator to iterate via RelocIterator, and
create a BreakLocation when we are done iterating. The reloc info is
stored in BreakLocation in a GC-safe way and instantiated on demand.

R=ulan@chromium.org
BUG=v8:3924
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26983}
2015-03-04 13:15:34 +00:00
yangguo
efe828e699 Disable experimental natives when creating a start-up snapshot.
Re-installing experimental natives after deserialization causes failures if
said experimental native is already included in the snapshot. However, there
is no way to tell whether a certain harmony feature has been included.

Experimental natives may also be turned on/off on-demand, which a snapshot
that includes them would not support for all cases.

The simple solution for the meantime is to never include experimental natives
in the snapshot and initialize them after deserialization on-demand.

R=vogelheim@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26982}
2015-03-04 13:01:28 +00:00
mstarzinger
b1d2097dca [turbofan] Disable test-run-jsexceptions/DeoptFinallyReturn
Reason for disabling failure on ARM64 simulator in no-snap mode.

TBR=dslomov@chromium.org
TEST=cctest/test-run-jsexceptions/DeoptFinallyReturn
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#26970}
2015-03-03 18:32:44 +00:00
mstarzinger
d016387e81 [turbofan] Add test coverage for deopt within try-catch.
This just contains test, no fixes. Note that some of the tests are
still disabled because they either fail or we don't want ClusterFuzz
to pick up the flag yet.

R=jarin@chromium.org
TEST=cctest/test-run-jsexceptions/Deopt,mjsunit/compiler/try-deopt

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

Cr-Commit-Position: refs/heads/master@{#26968}
2015-03-03 17:23:42 +00:00
yangguo
32979cf6d8 Use locker when creating snapshot if necessary.
R=vogelheim@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26964}
2015-03-03 16:14:15 +00:00
bmeurer
a19cfb0ea5 [turbofan] Support inlining of unguarded loops.
Also allow inlining of native functions.

R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26959}
2015-03-03 13:09:53 +00:00
michael_dawson
a3465838bc Contribution of PowerPC port (continuation of 422063005) - currency
Contribution of PowerPC port (continuation of 422063005, 817143002,
866843003, and 901083004. This patch updates the ppc directories
to make them current with changes in common code, removes the
optimization to use the ool constant pool, and excludes tests that
don't pass under the ppc simulator given a 240s timeout.

Subsequent patches will cover:
   - remaining optimizations for PPC
   - remaining AIX changes not resolved by 4.8 compiler (4.8 is only recently available for AIX)
   - incremental updates required to ppc directories due to platform specific changes made
    in google repos while we complete the above steps.

	modified:   src/compiler/ppc/code-generator-ppc.cc
	modified:   src/ic/ppc/handler-compiler-ppc.cc
	modified:   src/ppc/assembler-ppc-inl.h
	modified:   src/ppc/assembler-ppc.cc
	modified:   src/ppc/assembler-ppc.h
	modified:   src/ppc/builtins-ppc.cc
	modified:   src/ppc/code-stubs-ppc.cc
	modified:   src/ppc/debug-ppc.cc
	modified:   src/ppc/deoptimizer-ppc.cc
	modified:   src/ppc/frames-ppc.cc
	modified:   src/ppc/frames-ppc.h
	modified:   src/ppc/full-codegen-ppc.cc
	modified:   src/ppc/lithium-codegen-ppc.cc
	modified:   src/ppc/lithium-ppc.cc
	modified:   src/ppc/lithium-ppc.h
	modified:   src/ppc/macro-assembler-ppc.cc
	modified:   src/ppc/macro-assembler-ppc.h
	modified:   test/cctest/cctest.status
	modified:   test/mjsunit/mjsunit.status

R=danno@chromium.org, svenpanne@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26951}
2015-03-03 07:05:00 +00:00
Dan Carney
1fcedda668 convert object::* to return maybe values
BUG=v8:3929
LOG=y
R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26940}
2015-03-02 13:13:31 +00:00
Benedikt Meurer
5f3914fc19 [turbofan] Use the typer to statically detect Smis.
R=rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26939}
2015-03-02 13:10:42 +00:00
Sven Panne
602d0dab93 Removed funky Maybe constructor and made fields private.
BUG=v8:3929
LOG=y
R=dcarney@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26937}
2015-03-02 12:22:37 +00:00
Benedikt Meurer
155278d6f2 [turbofan] Skip write barriers when storing smi.
On 64-bit targets, we can skip the write barrier for Store nodes if the
input is ChangeInt32ToTagged, because the value being stored is
definitely represented as a smi then.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26934}
2015-03-02 09:09:08 +00:00
adamk
38d7a796b1 Create ImportDeclarations for default imports.
BUG=v8:1569
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26921}
2015-02-27 18:06:32 +00:00
adamk
a7840a2b3e Allow lookup of module exports by export name.
This required fixing the exports_ hash map to use the appropriate
comparison function instead of pointer comparison.

BUG=v8:1569
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26920}
2015-02-27 18:04:56 +00:00
bmeurer
b0f52cad08 [turbofan] Properly unlink dead nodes in simplified lowering.
R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26910}
2015-02-27 09:37:54 +00:00
bmeurer
643f020cd2 [x64] Make r12 allocatable.
Review URL: https://codereview.chromium.org/926553004

Cr-Commit-Position: refs/heads/master@{#26907}
2015-02-27 08:04:07 +00:00
svenpanne
5d4c76eae7 Test StringLengthStub generation via TurboFan.
For now we just use the RawMachineAssembler, this will be changed
later to use the whole TurboFan pipeline.

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

Cr-Commit-Position: refs/heads/master@{#26902}
2015-02-27 06:56:59 +00:00
adamk
fa293dd79f Re-introduce ImportDeclaration to the parser
This also adds a new VariableMode, IMPORT, which will be
used to do appropriate binding for Import-declared Variables.

Only named imports are handled for now. "import *" and default
import syntaxes have had their TODOs adjusted to match the new
code structure.

BUG=v8:1569
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26895}
2015-02-26 18:41:04 +00:00
ulan
bbf8c0f23d Revert "Revert of Fix memory leak caused by field type in descriptor array."
This reverts commit b57be748b1 and
disables the test/mjsunit/debug-clearbreakpointgroup.js because
BreakLocationIterator::ClearBreakPoint is already broken for unrelated reasons (see v8:3924).

BUG=v8:3877
LOG=N
TEST=cctest/test-heap/Regress3877

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

Cr-Commit-Position: refs/heads/master@{#26893}
2015-02-26 18:38:34 +00:00
marja
b57be748b1 Revert of Fix memory leak caused by field type in descriptor array. (patchset #3 id:40001 of https://codereview.chromium.org/955063002/)
Reason for revert:
Breaks test/mjsunit/debug-clearbreakpointgroup.js on arm64.debug.

Original issue's description:
> Fix memory leak caused by field type in descriptor array.
>
> When a field type is a map, it is wrapped in a weak cell upon storing to the descriptor array.
>
> Map::GetFieldType(i) does the unwrapping.
>
> BUG=v8:3877
> LOG=N
> TEST=cctest/test-heap/Regress3877
>
> Committed: https://crrev.com/77d3ae0e119893ac8d34ea6ca090cddd5bbf987e
> Cr-Commit-Position: refs/heads/master@{#26879}

TBR=verwaest@chromium.org,ulan@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:3877

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

Cr-Commit-Position: refs/heads/master@{#26883}
2015-02-26 14:46:07 +00:00
ulan
77d3ae0e11 Fix memory leak caused by field type in descriptor array.
When a field type is a map, it is wrapped in a weak cell upon storing to the descriptor array.

Map::GetFieldType(i) does the unwrapping.

BUG=v8:3877
LOG=N
TEST=cctest/test-heap/Regress3877

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

Cr-Commit-Position: refs/heads/master@{#26879}
2015-02-26 13:16:39 +00:00
verwaest
b5fc4b808c Remove internal use of v8::AccessType, always pass v8::ACCESS_HAS instead.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26874}
2015-02-26 10:34:50 +00:00
bmeurer
0f783c676b [turbofan] Fix bogus covering of Word64Equal w/ zero.
Review URL: https://codereview.chromium.org/960783002

Cr-Commit-Position: refs/heads/master@{#26870}
2015-02-26 07:18:42 +00:00
verwaest
6b1bddb454 Remove NativeContext from Literal array, since we always create the literals in the native context of the current closure.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26867}
2015-02-25 22:41:48 +00:00
dcarney
e928c9d52b [turbofan] remove dependence of InstructionBlock on BasicBlock
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26859}
2015-02-25 16:37:58 +00:00
ben
726eb0582b Add v8::Object::GetRealNamedPropertyAttributes()
Add v8::Object::GetRealNamedPropertyAttributes() and
v8::Object::GetRealNamedPropertyAttributesInPrototypeChain().

See https://github.com/iojs/io.js/issues/864 for background.

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

Cr-Commit-Position: refs/heads/master@{#26855}
2015-02-25 15:09:20 +00:00
yangguo
4b5ff0c5e2 Attach snapshot data blob to the isolate.
R=vogelheim@chromium.org
BUG=chromium:461259
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26845}
2015-02-25 11:14:56 +00:00
adamk
1a8dc98cbf Fix up ParseProgram and ParseModule to do something sane with module scopes
The FunctionLiteral returned from the parser for modules now has a MODULE_SCOPE,
instead of associating the module scope with a Block inside it. This makes
it easy to get at the ModuleDescriptor from the caller of Parse(), so I've added
a basic test that pokes at the scope and the descriptor. Expect more tests
in this vein.

BUG=v8:1569
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26836}
2015-02-24 22:39:35 +00:00
michael_dawson
bf3691ae88 Contribution of PowerPC port (continuation of 422063005) - PPC opt 2
Contribution of PowerPC port (continuation of 422063005, 817143002,
866843003, and 901083004. The bulk of the changes are to remove some
hard coded assumptions about heap page size within existing tests.
The remaining change is to use a larger heap page size for PPC linux
as this provides a performance benefit due to the larger memory page size.

	modified:   src/base/build_config.h
	modified:   src/heap/heap.cc
	modified:   test/cctest/test-alloc.cc
	modified:   test/cctest/test-constantpool.cc
	modified:   test/cctest/test-heap.cc
	modified:   test/cctest/test-spaces.cc
	modified:   test/cctest/test-weakmaps.cc
	modified:   test/cctest/test-weaksets.cc

R=danno@chromium.org, svenpanne@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26833}
2015-02-24 19:05:29 +00:00
dslomov
675f7d2d5a Invalidate property cells for non-existent properties properly.
R=verwaest@chromium.org
BUG=v8:3914
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26822}
2015-02-24 13:05:13 +00:00
yangguo
dafd73016c Reland "Correctly propagate terminate exception in TryCall."
BUG=v8:3892
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#26810}
2015-02-24 08:30:30 +00:00
ishell
4349b186b7 More tests added to cctest/tests/test-migrations.cc.
This also includes a regression test for crbug/459512.

BUG=chromium:459512
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26795}
2015-02-23 11:59:50 +00:00
dcarney
102ddf35cf disable some harmony scoping tests
R=verwaest@chromium.org

BUG=v8:3914
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26794}
2015-02-23 11:58:54 +00:00
machenbach
035b144b16 Revert of Correctly propagate terminate exception in TryCall. (patchset #2 id:20001 of https://codereview.chromium.org/928193002/)
Reason for revert:
See crbug.com/460412 and crbug.com/460356. Reverting on master in order to roll from master again soon.

Original issue's description:
> Correctly propagate terminate exception in TryCall.
>
> BUG=v8:3892
> LOG=Y
>
> Committed: https://crrev.com/a49b55b78844557b65a98e7a77dd26078157ed7f
> Cr-Commit-Position: refs/heads/master@{#26685}

TBR=ishell@chromium.org,yangguo@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:3892

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

Cr-Commit-Position: refs/heads/master@{#26792}
2015-02-23 07:17:30 +00:00
bmeurer
6c701d1597 [turbofan] Don't compute unneeded gray set in AllNodes.
R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26773}
2015-02-20 12:30:30 +00:00
mstarzinger
6fe12676ce Simplify computation of environment stack delta.
R=titzer@chromium.org
TEST=cctest/test-run-jsexceptions/CatchCall

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

Cr-Commit-Position: refs/heads/master@{#26768}
2015-02-20 10:48:21 +00:00
Benedikt Meurer
9e6181d5c3 [turbofan] Finally get rid of the generic algorithm.
R=svenpanne@chromium.org

Committed: https://crrev.com/5bbe693e4817011b6a496c638c9f09026fd3dac9
Cr-Commit-Position: refs/heads/master@{#26760}

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

Cr-Commit-Position: refs/heads/master@{#26767}
2015-02-20 10:12:00 +00:00
mstarzinger
6881d7609a Model exceptional edges from call nodes in TurboFan.
R=titzer@chromium.org,bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26766}
2015-02-20 09:55:00 +00:00
yangguo
afb2706103 Limit size of first page based on serialized data.
R=hpayer@chromium.org
BUG=chromium:453111
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#26764}
2015-02-20 09:34:11 +00:00
machenbach
c7810004bb Revert of [turbofan] Finally get rid of the generic algorithm. (patchset #2 id:20001 of https://codereview.chromium.org/944803002/)
Reason for revert:
Breaks dbg builds.

Original issue's description:
> [turbofan] Finally get rid of the generic algorithm.
>
> R=svenpanne@chromium.org
>
> Committed: https://crrev.com/5bbe693e4817011b6a496c638c9f09026fd3dac9
> Cr-Commit-Position: refs/heads/master@{#26760}

TBR=svenpanne@chromium.org,bmeurer@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#26763}
2015-02-20 09:14:44 +00:00
Benedikt Meurer
5bbe693e48 [turbofan] Finally get rid of the generic algorithm.
R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26760}
2015-02-20 08:42:51 +00:00
adamk
a538d945e3 Teach ModuleDescriptor about basic local exports
Add() becomes AddLocalExport, which takes an export_name and a local_name.
New parsing tests exercise this.

Also start generating exports for default exports (though this doesn't yet
handle anonymous default exports).

BUG=v8:1569
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26758}
2015-02-19 20:15:13 +00:00
rossberg
7d089a5929 [strong] Deprecate for-in
R=marja@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26751}
2015-02-19 13:50:41 +00:00
titzer
8e241468ed [turbofan] Transfer types from loop phis to OSR values.
R=jarin@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26746}
2015-02-19 12:38:54 +00:00
titzer
d050c331eb [turbofan] Simplify context specialization and fix for OSR.
AstGraphBuilder puts a constant context in from the beginning.
Also fix bug in merging contexts in environment.

R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26745}
2015-02-19 11:36:50 +00:00
loislo
36ed9ca348 A few tests fails when I run them with --hydrogen-track-positions
The root of problem is the fact that we don't track the position of 'this' statement but use them when visit compare statement.
As a result we have -1 as the position of left expression and the resulting relative position is negative and doesn't fit into BitField.

BUG=452067
TEST=test-cpu-profiler/SourceLocation
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26741}
2015-02-19 10:07:54 +00:00
ulan
5242700da4 Revert "Remove IC age from Code."
This reverts commit 3cd889 for regressing Kraken benchmark

BUG=chromium:457174
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26740}
2015-02-19 09:56:19 +00:00
ishell
34b5565eb6 Fix for cctest/test-api/SetJitCodeEventHandler: generate less objects during execution to avoid unwanted GCs.
BUG=v8:3899
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26721}
2015-02-18 14:02:58 +00:00
verwaest
7138634d5a Move LookupResult into crankshaft as that's now the only place where it's still used
Additionally handlify the "transition" field so that GC can stop caring about it.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26718}
2015-02-18 13:21:43 +00:00
adamk
522937cb49 Strip Interface class of most of its logic, make it all about Module exports
This gets Variable and VariableProxy out of the business of worrying about
Interfaces.

At the same time, get rid of the notion of "module variables". In ES6, variables
that refer to modules will be simply be CONST bindings to module namespace
objects.

The only change in logic here is one more early error:
duplicate export names are now rejected.

BUG=v8:1569
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26708}
2015-02-17 20:51:35 +00:00
mstarzinger
22dd6dc2a6 Fix representation for CompareIC in JSGenericLowering.
R=jarin@chromium.org
TEST=mjsunit/regress/regress-3884
BUG=v8:3884
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26702}
2015-02-17 16:37:36 +00:00
Andreas Rossberg
c503241945 [strong] deprecate empty sub-statements
R=marja@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26701}
2015-02-17 16:26:06 +00:00
balazs.kilvady
01538bffb8 MIPS64: Assembler support for internal references.
Port 49cbe537e7

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26700}
2015-02-17 16:25:38 +00:00
Andreas Rossberg
f55242948e [strong] Deprecate delete
R=marja@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26698}
2015-02-17 16:08:11 +00:00
marja
34281c8322 [strong] Forbid var.
R=rossberg@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26697}
2015-02-17 15:41:25 +00:00
bmeurer
acd9c46ca7 [turbofan] Optimize certain chains of Branch into a Switch.
This adds a new ControlFlowOptimizer that - for now - recognizes chains
of Branches generated by the SwitchBuilder for a subset of javascript
switches into Switch nodes. Those Switch nodes are then lowered to
either table or lookup switches.

Also rename Case to IfValue (and introduce IfDefault) for consistency.

BUG=v8:3872
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26691}
2015-02-17 13:29:46 +00:00
titzer
00d70d63e6 [turbofan] Fix control reducer for dead loops.
Note OSR special case.
Also improved robustness of OSR tests.

R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26686}
2015-02-17 11:52:53 +00:00
yangguo
a49b55b788 Correctly propagate terminate exception in TryCall.
BUG=v8:3892
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#26685}
2015-02-17 11:44:43 +00:00
verwaest
839efa2e26 Reduce field type tracking to a single stable map per field.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26679}
2015-02-17 08:58:05 +00:00
ishell@chromium.org
90734ca186 GCMole issues fixes (part 2).
R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26674}
2015-02-16 18:48:21 +00:00
caitpotter88
663a9eeae4 [parsing]: eval/arguments parameter names are ok in sloppy mode
BUG=v8:3891
LOG=N
R=arv@chromium.org, marja@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26673}
2015-02-16 18:18:20 +00:00
ishell
b7458cfa5e Fixed GCMole issues after r26667.
Review URL: https://codereview.chromium.org/927133002

Cr-Commit-Position: refs/heads/master@{#26670}
2015-02-16 17:46:31 +00:00
ishell@chromium.org
3d824f020d Fix for the compilation failure due to multi-line comments in test-migrations.cc
TBR=verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26668}
2015-02-16 15:50:06 +00:00
ishell
35841b5055 Property reconfiguring implemented.
Previous approach for property reconfiguration was to create a free-floating map with generalized representations of all fields. This patch does it right.

When property is reconfigured either by changing its kind (kData <-> kAccessor) or its attributes it implies creation of a new branch in transition tree. If such a branch already existed before reconfiguration then it should be merged with the old (or source) branch of the transition tree. Merging procedure includes all the heavy machinery such as property location changes (kDescriptor -> kField), field representation/field type generalization, map deprecation, etc.

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

Cr-Commit-Position: refs/heads/master@{#26667}
2015-02-16 15:25:54 +00:00
verwaest
a1f7b01ccf Remove prototype key from the prototype transitions since its also embedded in the target map.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26662}
2015-02-16 13:10:06 +00:00
ishell
6834d3abdf ifdefs around LayoutDescriptor::IsConsistenWithMap() removed.
This avoids potential mess with different compilation modes.

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

Cr-Commit-Position: refs/heads/master@{#26656}
2015-02-16 11:29:49 +00:00
yangguo
e66d39a6be Revert "Fix JSArrayBufferView visitor template to fix ARM build."
and "Just visit young array buffers during scavenge. Additionally keep the views in new space in a separate global list and move them to the corresponding array buffers when they get promoted."

This reverts commit 295ab27830
and commit bd61a85faf.

TBR=hpayer@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#26653}
2015-02-16 09:21:02 +00:00
chunyang.dai
a10ed727bc X87: Assembler support for internal references.
port 5c119485b4 (r26478).

original commit message:

  Assembler support for internal references.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26648}
2015-02-15 06:50:11 +00:00
arv
765e002a4f Fix lazy parsing for functions that use super.
The preparser needs to log the usage of super properties and then update
the scope when we create the function later.

BUG=v8:3888
LOG=N
R=dslomov@chromium.org, marja

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

Cr-Commit-Position: refs/heads/master@{#26642}
2015-02-13 18:35:09 +00:00
loislo
2cfebcf92e Fix compilation for the case dcheck_always_on=1.
It is a default option for some try bots.

otherwise compilation fails on
DCHECK(layout_descriptor->IsConsistentWithMap(*map));

BUG=none
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26636}
2015-02-13 10:29:30 +00:00
Erik Arvidsson
1dcce1c8ef Make super() a syntax error in base class constructor
BUG=v8:3330
LOG=N
R=dslomov@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26633}
2015-02-12 23:04:54 +00:00
loislo
d23ab23b05 CPUProfiler: Push deopt reason further to ProfileNode.
1) create beefy RelocInfo table when cpu profiler is active, so if a function
was optimized when profiler was active RelocInfo would get separate DeoptInfo
for the each deopt case.

2) push DeoptInfo from CodeEntry to ProfileNode.
When deopt happens we put the info collected on #1 into CodeEntry and record stack sample.
On the sampling thread we grab the deopt data and append it to the corresponding ProfileNode deopts list.

Sample profile dump.
[Top down]:
    0  (root) 0 #1
    1     29 #2
    1      test 29 #3
    2        opt_function 29 #4
    2          opt_function 29 #5
                   deopted at 118 with reason 'not a heap number'
                   deopted at 137 with reason 'division by zero'

BUG=452067
LOG=n

Committed: https://crrev.com/ce8701b247d3c6604f24f17a90c02d17b4417f54
Cr-Commit-Position: refs/heads/master@{#26615}

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

Cr-Commit-Position: refs/heads/master@{#26630}
2015-02-12 19:51:37 +00:00
mstarzinger
d202d79a6a Add missing FrameState to JSTypedLoweringTester::Binop.
R=titzer@chromium.org
TEST=cctest/test-js-typed-lowering

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

Cr-Commit-Position: refs/heads/master@{#26626}
2015-02-12 17:08:53 +00:00
rossberg
eecde44f82 Properly thread language mode to compilation cache
Fixes the TSAN issue.

R=mstarzinger@chromium.org
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26623}
2015-02-12 16:29:54 +00:00
jarin
8bd0bd522e [turbofan] Make the representation type component independent of the semantic component.
R=rossberg@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26621}
2015-02-12 15:21:33 +00:00
jochen
58deea0ad0 Make it possible to define arguments for CompileFunctionInContext
Also make sure that the function body really produces only one function literal.

LOG=y
BUG=none
R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26617}
2015-02-12 14:39:03 +00:00
loislo
cb6ea146dc Revert of CPUProfiler: Push deopt reason further to ProfileNode. (patchset #1 id:1 of https://codereview.chromium.org/919953002/)
Reason for revert:
static initializers broke the build

Original issue's description:
> CPUProfiler: Push deopt reason further to ProfileNode.
>
> 1) create beefy RelocInfo table when cpu profiler is active, so if a function
> was optimized when profiler was active RelocInfo would get separate DeoptInfo
> for the each deopt case.
>
> 2) push DeoptInfo from CodeEntry to ProfileNode.
> When deopt happens we put the info collected on #1 into CodeEntry and record stack sample.
> On the sampling thread we grab the deopt data and append it to the corresponding ProfileNode deopts list.
>
> Sample profile dump.
> [Top down]:
>     0  (root) 0 #1
>     1     29 #2
>     5      test 29 #3
>     3        opt_function 29 #4
>                  deopted at 52 with reason 'not a heap number'
>                  deopted at 71 with reason 'division by zero'
>
> BUG=452067
> LOG=n
>
> Committed: https://crrev.com/ce8701b247d3c6604f24f17a90c02d17b4417f54
> Cr-Commit-Position: refs/heads/master@{#26615}

TBR=jarin@chromium.org,svenpanne@chromium.org,yurys@chromium.org,alph@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=452067

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

Cr-Commit-Position: refs/heads/master@{#26616}
2015-02-12 14:36:37 +00:00
loislo
ce8701b247 CPUProfiler: Push deopt reason further to ProfileNode.
1) create beefy RelocInfo table when cpu profiler is active, so if a function
was optimized when profiler was active RelocInfo would get separate DeoptInfo
for the each deopt case.

2) push DeoptInfo from CodeEntry to ProfileNode.
When deopt happens we put the info collected on #1 into CodeEntry and record stack sample.
On the sampling thread we grab the deopt data and append it to the corresponding ProfileNode deopts list.

Sample profile dump.
[Top down]:
    0  (root) 0 #1
    1     29 #2
    5      test 29 #3
    3        opt_function 29 #4
                 deopted at 52 with reason 'not a heap number'
                 deopted at 71 with reason 'division by zero'

BUG=452067
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26615}
2015-02-12 13:25:17 +00:00
ulan
b79b985988 Use weak cells in dependent code.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26614}
2015-02-12 13:21:13 +00:00
marja
df0cb9999f Parsing: Make Parser not know about Isolate during background parsing.
Parser must be able to operate independent of Isolate and the V8 heap during
parsing. After the heap-independent phase, there is a heap dependent phase,
during which we internalize strings, handle errors, etc.

This makes Isolate (also via CompilationInfo) unaccessible during parsing, and
thus decreases the probability of accidental code changes which would add
heap-dependent operations into the heap-independent phase.

Since Isolate is also accessible via CompilationInfo, now CompilationInfo is
only passed to the entry points of parsing, and not stored in Parser.

R=rossberg@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26612}
2015-02-12 13:02:44 +00:00
svenpanne
222001ace4 Removed one bogus CompilationInfo constructor.
Use a fake code stub instead, basically following the null object pattern.

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

Cr-Commit-Position: refs/heads/master@{#26610}
2015-02-12 12:57:19 +00:00
danno
e87c0bac35 Remove redundant source position information in RelocInfo
Previously, emitting two more more unique source positions at the same pc would
generate two or more RelocInfo entries. Now, only the last emitted source
position for any pc is added to the RelocInfo.

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

Cr-Commit-Position: refs/heads/master@{#26608}
2015-02-12 12:15:31 +00:00
Ben L. Titzer
d9790bc7ed Inline the ParseInfo structure as parameters to the Parser constructor.
R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26606}
2015-02-12 11:57:11 +00:00
hpayer
bd61a85faf Just visit young array buffers during scavenge. Additionally keep the views in new space in a separate global list and move them to the corresponding array buffers when they get promoted.
This reduces young generation garbage collections when many array buffers are allocated.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26605}
2015-02-12 10:00:44 +00:00
svenpanne
d1b5aa0716 Removed most of the bogus CompilationInfo constructor calls.
A CompilationInfo constructed from just an Isolate* and a Zone* is in
weird an inconsistent state (calling e.g. flags() on it will crash),
so we need to avoid them. This CL removes almost all of them, the
remaining 2 call sites in (for testing only) will be handled in a
separate CL. Things which have been changed:

  * Linkage is basically a decorator for CallDescriptor now.

  * ChangeLowering doesn't need Linkage at all.

  * JSGenericLowering doesn't need a full CompilationInfo*, just a
    single flag.

  * JSContextSpecializer doesn't need the full CompilationInfo, just a
    Context.

  * Removed unused CompilationInfo from SimplifiedLoweringTester.

This nicely decouples things already a bit more, but there's still
work to do...

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

Cr-Commit-Position: refs/heads/master@{#26580}
2015-02-11 14:12:15 +00:00
titzer
31637fb396 [turbofan] Use heavy-handed graph duplication to do loop peeling for OSR.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26576}
2015-02-11 13:26:45 +00:00
yangguo
12e1b959d2 Fix NewStringRangeError failure due to failing malloc.
R=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26575}
2015-02-11 12:06:29 +00:00
yangguo
8aae1b3096 Throw on range error when creating a string via API.
R=jkummerow@chromium.org
BUG=v8:3853
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#26574}
2015-02-11 10:21:25 +00:00
dcarney
79417664b2 remove undetectable strings
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26571}
2015-02-11 09:28:12 +00:00
dcarney
307d2bdd81 add transitions for global properties in ics
R=verwaest@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26569}
2015-02-11 09:15:33 +00:00
svenpanne
41e74ad4e8 Relaxed parameter types a bit.
Somehow these changes didn't make it into https://codereview.chromium.org/915583002 ... :-/

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

Cr-Commit-Position: refs/heads/master@{#26567}
2015-02-11 08:52:38 +00:00
loislo
754cc1a9e4 Remove obsolete method ProfileTree::AddPathFromStart and the corresponding test.
BUG=
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26565}
2015-02-11 07:27:09 +00:00
arv
68e4897586 Remove Function.prototype.toMethod
Function.prototype.toMethod was removed from ES6.

This removes the function and updates the tests to either
use %ToMethod or a dedicated syntax (using concise method
or a class).

BUG=v8:3330
LOG=N
R=dslomov@chromium.org, adamk

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

Cr-Commit-Position: refs/heads/master@{#26559}
2015-02-10 22:13:43 +00:00