Version 3.17.16
Stack trace API: poison stack frames below the first strict mode frame. (issue 2564)
Made Isolate::GetHeapStatistics robust against half-initialized isolates (Chromium issue 2591).
Finished implementation of ES6 symbols aka. private names (issue 2158).
Performance and stability improvements on all platforms.
git-svn-id: http://v8.googlecode.com/svn/trunk@14137 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/full-codegen.cc b/src/full-codegen.cc
index cb6f228..1c6a0b9 100644
--- a/src/full-codegen.cc
+++ b/src/full-codegen.cc
@@ -232,6 +232,12 @@
}
+void BreakableStatementChecker::VisitYield(Yield* expr) {
+ // Yield is breakable if the expression is.
+ Visit(expr->expression());
+}
+
+
void BreakableStatementChecker::VisitThrow(Throw* expr) {
// Throw is breakable if the expression is.
Visit(expr->exception());
@@ -1538,6 +1544,28 @@
}
+void FullCodeGenerator::VisitYield(Yield* expr) {
+ if (expr->is_delegating_yield())
+ UNIMPLEMENTED();
+
+ Comment cmnt(masm_, "[ Yield");
+ VisitForAccumulatorValue(expr->expression());
+ // TODO(wingo): Assert that the operand stack depth is 0, at least while
+ // general yield expressions are unimplemented.
+
+ // TODO(wingo): What follows is as in VisitReturnStatement. Replace it with a
+ // call to a builtin that will resume the generator.
+ NestedStatement* current = nesting_stack_;
+ int stack_depth = 0;
+ int context_length = 0;
+ while (current != NULL) {
+ current = current->Exit(&stack_depth, &context_length);
+ }
+ __ Drop(stack_depth);
+ EmitReturnSequence();
+}
+
+
void FullCodeGenerator::VisitThrow(Throw* expr) {
Comment cmnt(masm_, "[ Throw");
VisitForStackValue(expr->exception());