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

Unified Diff: src/fast-codegen.h

Issue 341081: Begin using the top-level code generator for code that is inside... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 1 month 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/fast-codegen.h
===================================================================
--- src/fast-codegen.h (revision 3203)
+++ src/fast-codegen.h (working copy)
@@ -43,6 +43,7 @@
function_(NULL),
script_(script),
is_eval_(is_eval),
+ loop_depth_(0),
true_label_(NULL),
false_label_(NULL) {
}
@@ -94,6 +95,13 @@
void SetStatementPosition(Statement* stmt);
void SetSourcePosition(int pos);
+ int loop_depth() { return loop_depth_; }
+ void increment_loop_depth() { loop_depth_++; }
+ void decrement_loop_depth() {
+ ASSERT(loop_depth_ > 0);
+ loop_depth_--;
+ }
+
// AST node visit functions.
#define DECLARE_VISIT(type) virtual void Visit##type(type* node);
AST_NODE_LIST(DECLARE_VISIT)
@@ -107,6 +115,7 @@
Handle<Script> script_;
bool is_eval_;
Label return_label_;
+ int loop_depth_;
Label* true_label_;
Label* false_label_;

Powered by Google App Engine
This is Rietveld 408576698