Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Unified Diff: src/full-codegen.cc

Issue 15300018: Add initial parser support for harmony iteration (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Use subtyping instead of enumerated value Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/full-codegen.cc
diff --git a/src/full-codegen.cc b/src/full-codegen.cc
index dc646b1a98c88c1192730be5b2d6e9e6d7e36d14..5140d8cd9e7a75a2f350ac890e1a73567c67a141 100644
--- a/src/full-codegen.cc
+++ b/src/full-codegen.cc
@@ -163,6 +163,12 @@ void BreakableStatementChecker::VisitForInStatement(ForInStatement* stmt) {
}
+void BreakableStatementChecker::VisitForOfStatement(ForOfStatement* stmt) {
+ // Mark for in statements breakable if the iterable expression is.
+ Visit(stmt->iterable());
+}
+
+
void BreakableStatementChecker::VisitTryCatchStatement(
TryCatchStatement* stmt) {
// Mark try catch as breakable to avoid adding a break slot in front of it.
@@ -1386,6 +1392,10 @@ void FullCodeGenerator::VisitForStatement(ForStatement* stmt) {
}
+void FullCodeGenerator::VisitForOfStatement(ForOfStatement* stmt) {
rossberg 2013/06/06 10:32:33 Normally I'd want a TODO here, but since that's in
wingo 2013/06/06 14:09:51 Well, why not :) Done.
+}
+
+
void FullCodeGenerator::VisitTryCatchStatement(TryCatchStatement* stmt) {
Comment cmnt(masm_, "[ TryCatchStatement");
SetStatementPosition(stmt);

Powered by Google App Engine
This is Rietveld 408576698