Commit Graph

21659 Commits

Author SHA1 Message Date
balazs.kilvady
9c8bead966 MIPS: [turbofan] Unify Math.floor / Math.ceil optimization.
Port 022ea7e057

Original commit message:
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

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

Cr-Commit-Position: refs/heads/master@{#27117}
2015-03-10 16:34:51 +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
mstarzinger
36e69a916f Remove frame pointer from StackHandler.
This reduces the size of the StackHandler by yet another word. We no
longer need to keep track of the frame pointer, as the stack walk will
be able to recalculate it.

R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27115}
2015-03-10 15:56:27 +00:00
loislo
a925f3f478 CpuProfiler: fix for CollectDeoptEvents test on arm
The same idea as in https://codereview.chromium.org/984893003/

BUG=chromium:452067
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#27114}
2015-03-10 15:15:24 +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
0fcebccd7e CpuProfiler: slightly reduce the size of JumpTable code on arm64.
BUG=chromium:452067
LOG=n
R=svenpanne@chromium.org, jacob.bramley@arm.com, yurys@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27112}
2015-03-10 15:13:05 +00:00
Ben L. Titzer
c1d0f845a9 Refactor TypeFeedbackOracle to accept Handle<Name> instead of Handle<String>.
R=verwaest@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27111}
2015-03-10 15:06:24 +00:00
svenpanne
db2d31ab3b Removed bailout-only 'implementations' of intrinsics in Crankshaft.
Doing a runtime call should always be better than totally giving up
(unless we have fullcode-only intrinsics, which we'll probably never
have).

BUG=v8:3947
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#27110}
2015-03-10 15:00:18 +00:00
mstarzinger
37729a52fd Simplify and correctify pending message location handling.
This makes sure that the pending message location is only tracked by
the message object, as only this is saved for finally-blocks. The
location information is duplicated and becomes stale.

R=titzer@chromium.org
TEST=maeh, not so much.

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

Cr-Commit-Position: refs/heads/master@{#27109}
2015-03-10 14:45:26 +00:00
jarin
a3e06f5489 [turbofan] Do not generate any framestates with --noturbo-deoptimization.
BUG=chromium:465701
LOG=n
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27108}
2015-03-10 14:40:21 +00:00
hpayer
d49657edd7 Remove unnecessary NoBarrier_load instructions in store buffer.
There are no stale store buffer pointers anymore. The sweeper thread can not be in conflict with store buffer processing.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27107}
2015-03-10 14:19:25 +00:00
arv
8d946b9c3f [es6] Throw TypeError for computed static prototype property name
The prototype of a class constructor function is read only. When we set
computed property names we were ignoring this and we were overriding the
property.

Since the prototype is the only possible own read only property on the
constructor function object we special case this so we do not have to
check this for every property in the class literal.

BUG=v8:3945
LOG=N
R=mstarzinger@chromium.org, dslomov@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27106}
2015-03-10 14:14:38 +00:00
hpayer
02ce445394 Remove lazy sweeping of new space and corresponding complicated pointer updating logic.
We can do that now since we have the invariant that the store buffer always has valid slots after marking.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27105}
2015-03-10 13:42:21 +00:00
hpayer
0fd9bf8f14 Reland Fix old space check in IsSlotInBlackObject.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27104}
2015-03-10 13:26:10 +00:00
mstarzinger
e0aa8ebf93 Remove code object from StackHandler.
This reduces the size of the StackHandler by one word. We no longer
need to keep track of the code object, as the stack walk finds it.

R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27103}
2015-03-10 13:20:23 +00:00
svenpanne
507c11a026 Converted Crankshaft to have its own list of known intrinsics.
We can remove a few of them now (those which unconditionally bailout),
but this will be done in a separate CL to see any impact separately.

BUG=v8:3947
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#27102}
2015-03-10 13:18:06 +00:00
v8-autoroll
1bdef1caee Update V8 DEPS.
Rolling v8/tools/clang to ed79fd57317ab9f09ce52a5e1c7424eebb80a73e

BUG=chromium:464657
LOG=n

TBR=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27101}
2015-03-10 12:24:59 +00:00
Sven Panne
49c3864b4b Added a workaround for undefined behavior.
Note that this patch is not really a *solution*, it is just enough to
make the undefined behavior unobservable. The real fix would be being
much more correct about sizes and signedness in our code base...

BUG=chromium:464657
LOG=n
R=dcarney@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27100}
2015-03-10 12:13:01 +00:00
jarin
00f4350403 In PrintCode, keep the debug_name string alive for all uses.
BUG=chromium:465645
LOG=n
R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27099}
2015-03-10 12:02:53 +00:00
bmeurer
1982186b6f [turbofan] Use builtin inlining mechanism for Math.floor.
BUG=v8:3952
LOG=n
R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27098}
2015-03-10 11:59:31 +00:00
yurys
39d329103f Remove deprecated CpuProfiler methods
BUG=None
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#27097}
2015-03-10 11:58:24 +00:00
marja
3ff7da93d8 Fix CompilerHints flag order to match FunctionKind.
The bits in CompilerHints are accessed via FunctionKindBits, and on the other
hand, with accessors defined by BOOL_ACCESSORS(SharedFunctionInfo,
compiler_hints, is_accessor_function, kIsAccessorFunction) etc.

So the bit order in FunctionKind must match CompilerHints.

This is not causing problems (yet) because there's no accessor for these two
bits, but if somebody adds one, things will go wrong.

R=dslomov@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27096}
2015-03-10 11:57:20 +00:00
hpayer
d484d5bc49 Revert of Fix old space check in IsSlotInBlackObject. (patchset #1 id:1 of https://codereview.chromium.org/993513009/)
Reason for revert:
Breaks arm.debug.

Original issue's description:
> Fix old space check in IsSlotInBlackObject.
>
> BUG=
>
> Committed: https://crrev.com/4f865389bcecdff6aa56512fab3a147507a95a51
> Cr-Commit-Position: refs/heads/master@{#27090}

TBR=ulan@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27095}
2015-03-10 11:56:04 +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
yangguo
3ed5dea6f7 Add test case for serializing external references to runtime functions.
R=svenpanne@chromium.org
BUG=chromium:465564
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27093}
2015-03-10 10:36:16 +00:00
hpayer
8baa5a087d Don't scan on scavenge dead large objects.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27092}
2015-03-10 10:34:20 +00:00
ulan
3f5ff276f3 Make sweeper threads respect the max_available_threads constraint.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27091}
2015-03-10 09:58:31 +00:00
hpayer
4f865389bc Fix old space check in IsSlotInBlackObject.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27090}
2015-03-10 09:49:50 +00:00
mstarzinger
8fb6660e76 Fix runtime assert in %LiveEditCheckAndDropActivations.
R=jarin@chromium.org
BUG=chromium:465663
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#27089}
2015-03-10 09:48:18 +00:00
titzer
0b3f4af12c [turbofan] Fix --turbo-osr for OSRing into inner loop inside for-in.
R=mstarzinger@chromium.org
BUG=chromium:462775
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#27088}
2015-03-10 09:27:40 +00:00
dcarney
66969fb2ad convert Function and Promise to maybe
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27087}
2015-03-10 09:15:59 +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
balazs.kilvady
18bf4c27b5 Fix 'MIPS: [turbofan] Support for %_DoubleHi, %_DoubleLo and %_ConstructDouble.'
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27083}
2015-03-09 17:47:04 +00:00
machenbach
fcbe10739b Fix full rebuilding after clang rolls.
BUG=chromium:464657
LOG=n
TBR=jochen@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27082}
2015-03-09 17:22:33 +00:00
machenbach
1bbe1da661 Force full rebuilding after clang rolls.
BUG=chromium:464657
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#27081}
2015-03-09 16:24:46 +00:00
svenpanne
ea2f15e2a9 Handle *all* runtime versions of intrinsics in the serializer.
Note that this is done only for consistency at this point in time.
The change should probably have been in
https://codereview.chromium.org/984963002/ already.

BUG=v8:3947
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#27080}
2015-03-09 15:11:46 +00:00
jochen
34c43513a3 Make VerifyMarking work in the presence of grey objects
R=hpayer@chromium.org
LOG=n
BUG=none

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

Cr-Commit-Position: refs/heads/master@{#27079}
2015-03-09 15:01:42 +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
marja
bb69648804 Debugger & classes: add debugger tests for classes.
R=dslomov@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27077}
2015-03-09 14:49:54 +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
marja
4a709dd658 [strong] Fix scoping related errors for methods.
Methods can refer to the class name.

BUG=v8:3927
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#27075}
2015-03-09 14:30:40 +00:00
yangguo
9dedcc3dfc Simplify promise event on throw handling.
R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27074}
2015-03-09 13:41:55 +00:00
hpayer
ded6ffbb2a Recorded slots in store buffer are never in free space. Remove migration consistency check.
After establishing the invariant that the store buffer always has valid slots after marking, the store buffer integrity check is not needed anymore.

BUG=454157
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#27073}
2015-03-09 13:33:16 +00:00
yangguo
67bc45c278 Hide Math function implementations in a closure.
R=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27072}
2015-03-09 13:25:44 +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
mstarzinger
dcb502a4ee [turbofan] Only reduce inline %DeoptimizeNow.
This makes sure only the %_DeoptimizeNow intrinsic is inlined, and
not the %DeoptimizeNow one. It hence re-establishes the invariant
that JSIntrinsicLowering only deals with inline intrinsics.

R=jarin@chromium.org
TEST=mjsunit/compiler/eager-deopt-simple

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

Cr-Commit-Position: refs/heads/master@{#27070}
2015-03-09 13:20:26 +00:00
Benedikt Meurer
eacd6d8b7d [turbofan] Make inlining independent of typing.
The JSInliner used to load the context from the JSFunction node at
runtime, which introduced a HeapConstant (because we had to materialize
the JSFunction after context specialization) and a LoadField operation,
independent whether the inlinee actually uses the context. This is
rather cumbersome currently, and therefore this is now changed to just
embed the context constant instead. Once we do inlining based on
SharedFunctionInfo rather than JSFunction, we should reconsider this
decision and come up with a proper heuristic.

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

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

Cr-Commit-Position: refs/heads/master@{#27069}
2015-03-09 13:01:44 +00:00
hpayer
aee169ec65 Eliminate invalid pointers in store buffer after marking.
The store buffer can contain stale store buffer entries, i.e., slot in dead objects pointing to new space objects. These slots are treaded as live slots which cause problems with non-pointer fields and makes concurrent sweeping complicated. Removing these pointers from the store buffer before it is used makes life easier.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27068}
2015-03-09 12:49:58 +00:00