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
MIPS: Error found in test262 on ARM: BinaryOpStub could call out to a built-in and push parameters without an enclosing frame.

Port r14665 (15349aa)

This corrupted stackwalking.

BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@14673 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Various minor cctest fixes to make ASAN a bit happier.

   * Running with ASAN needs more stack, so don't set resource constraints too
     tight.

   * Checking boot time memory usage doesn't make sense when running with ASAN,
     it eats tons of memory for itself.

   * Fixed a malloc/delete[] mismatch: Not surprisingly, the pointer wrapped by
     a SmartArrayPointer should better be allocated by, well, NewArray...

Even with these 3 fixes, we still have a few failures when running our test
suite with ASAN. Most of them are either timeouts or failures caused by greatly
increased stack usage.

R=mstarzinger@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@14674 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Ensure all maps gathered from the ICs are updated if deprecated.
Add ASSERT to SmallMapList::Add to ensure no deprecated maps are ever added.

BUG=
R=danno@chromium.org

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

Patch from Toon Verwaest <verwaest@chromium.org>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@14675 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Function constructor should avoid String.prototype methods

Replace a use of .indexOf with a call to StringIndexOf.  As always,
lexical scoping to the rescue.

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

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@14678 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Ignore failing flaky profiler test.

R=mstarzinger@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@14679 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Simplifying GC heuristics, deleted old generation limit factor.

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@14680 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Provide BitField64 utility class.

R=svenpanne@chromium.org
TEST=cctest/test-conversions/BitField64

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@14681 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Remove use_system_v8 logic from the mainline gyp file

Re-upload of https://codereview.chromium.org/14872005/

BUG=chromium:226860
R=ulan@chromium.org

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

Patch from Paweł Hajdan Jr. <phajdan.jr@chromium.org>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@14682 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Fix build failure on Linux since r14681.

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

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@14683 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
GeneratorFunction() makes generator instances

The current specification has GeneratorFunction() be like Function(),
except that it makes generator instances.  This commit implements that
behavior.  It also fills in a piece of the implementation where
otherwise calling GeneratorFunction or GeneratorFunctionPrototype would
cause an abort because they have no code.

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

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@14684 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Slight improvement of object printer for maps.

R=ulan@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@14689 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Shift additional_index by element_shift_size, not shift_size.

R=jkummerow@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@14690 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Add a HBreak instruction for debugging

BUG=
R=jkummerow@chromium.org

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

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