Don't flush code for generator functions.

R=mstarzinger@chromium.org
BUG=v8:2681
TEST=mjsunit/regress/regress-2681

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@14649 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Only flush SharedFunctionInfo optimized code cache when necessary

R=mstarzinger@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@14650 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
MIPS: Elide hole checks on KeyedLoads of holey double arrays

Port r14630 (124d01e7)

Original commit message:
Improves NavierStokes by about 5%

BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@14651 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
MIPS: Only flush SharedFunctionInfo optimized code cache when necessary

Port r14650 (d045fbd3)

BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@14652 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
BinaryOpStub::GenerateSmiStub() on 32bit would erroneously patch the IC in case of a gc requirement. Brought the behavior into line with ARM and x64. Also some cleanup to label names.

BUG=
R=jkummerow@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@14653 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Prepare push to trunk.  Now working on version 3.19.2.

R=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/15159002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@14654 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Fixed linkage for Is template.

With static linkage, clang 3.3 is unhappy about unused functions

   template <> inline bool Is<JSFunction>(Object* obj)
   template <> inline bool Is<JSArray>(Object* obj)

in any compilation unit apart from acessors.cc.

R=mvstanton@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@14657 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Ensure that soft-deopts don't count against opt_count

This makes sure that Crankshaft doesn't disable optimization to early on hot functions that still contain unexecuted code without type information.

R=jkummerow@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@14658 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Don't use anonymous types declared in an anonymous union.

They are a non-standard extension (probably in C1X, IIRC), but clang is unhappy
with them when -Wnested-anon-types is enabled, which seems to be implied by
-pedantic.

With this change and the previous fix for clang, we are now -Werror clean, even
on clang 3.3.

R=rossberg@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@14659 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Remove HIsNilAndBranch (it's now unused)

R=mstarzinger@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@14660 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Improve dead code elimination by transitively marking live code and removing all dead code. Replace unreachable phi removal algorithm with the new dead code elimination pass, which is more thorough.

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@14661 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Avoid convertion to double when it is not needed.

R=rossberg@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@14664 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Error found in test262 on ARM: BinaryOpStub could call out to a built-in and push parameters without an enclosing frame. This corrupted stackwalking.

BUG=
R=ulan@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@14665 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Implement yield* (delegating yield)

Ideally this would have been implemented via desugaring at parse-time,
but yield* is an expression, and its desugaring includes statements like
while and try/catch.  We'd have to have BlockExpression in the AST to
support that, and it's not worth it for this feature.

So instead we implement all of the logic in
FullCodeGenerator::VisitYield.  Delegating yield AST nodes now have a
try handler index, for the try/catch.  Otherwise the implementation is
straightforward.

R=mstarzinger@chromium.org
BUG=v8:2355
TEST=mjsunit/harmony/generators-iteration

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@14666 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Avoid loading "iter" twice.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@14667 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Revert mistakenly committed r14667 and r14666.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@14668 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Implement yield* (delegating yield)

Ideally this would have been implemented via desugaring at parse-time,
but yield* is an expression, and its desugaring includes statements like
while and try/catch.  We'd have to have BlockExpression in the AST to
support that, and it's not worth it for this feature.

So instead we implement all of the logic in
FullCodeGenerator::VisitYield.  Delegating yield AST nodes now have a
try handler index, for the try/catch.  Otherwise the implementation is
straightforward.

R=rossberg@chromium.org
BUG=v8:2355
TEST=mjsunit/harmony/generators-iteration

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@14669 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Skip samples where top function's stack frame is not setup properly

Stack iterator takes return address based on the frame pointer (ebp) and detects JS frames based on value at fp + StandardFrameConstants::kMarkerOffset. So in order the iterator to work correctly this values should be already setup for the current function. Stack frame is constructed at the very beginning of JS function code and destroyed before return. If sample is taken before before the frame construction is completed or after it was destroyed the stack iterator will wrongly think that FP points at the current functions frame base and will skip callers frame. To avoid this we mark code ranges where  stack frame doesn't exist and completely ignore such samples.

This fixes cctest/test-cpu-profiler/CollectCpuProfile flakiness.

BUG=v8:2628
R=jkummerow@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@14670 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Fix Win64 compilation after r14670

TBR=jkummerow@chromium.org
BUG=v8:2628

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@14671 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
MIPS: Ensure that soft-deopts don't count against opt_count

Port r14658 (12c49bd)

This makes sure that Crankshaft doesn't disable optimization to early on hot functions that still contain unexecuted code without type information.

BUG=

Review URL: https://codereview.chromium.org/15005008
Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@14672 ce2b1a6d-e550-0410-aec6-3dcde31c8c00