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

Unified Diff: src/ast.h

Issue 7523027: Provisional implementation of stack allocated catch variables. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 5 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
« no previous file with comments | « no previous file | src/ast.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index 23df48b8b1e09a00ee434be3da2f4d2340559d26..0fb2a3add65c6b87359954e369ac2204ae3ccb4e 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -62,6 +62,7 @@ namespace internal {
V(ReturnStatement) \
V(EnterWithContextStatement) \
V(ExitContextStatement) \
+ V(ExitScopedBlockStatement) \
V(SwitchStatement) \
V(DoWhileStatement) \
V(WhileStatement) \
@@ -359,9 +360,21 @@ class Block: public BreakableStatement {
ZoneList<Statement*>* statements() { return &statements_; }
bool is_initializer_block() const { return is_initializer_block_; }
+ int SourceBegStatementPos() const { return source_beg_statement_pos_; }
+ void SetSourceBegStatementPos(int statement_pos) {
+ source_beg_statement_pos_ = statement_pos;
+ }
+ int SourceEndStatementPos() const { return source_end_statement_pos_; }
+ void SetSourceEndStatementPos(int statement_pos) {
+ source_end_statement_pos_ = statement_pos;
+ }
+
private:
ZoneList<Statement*> statements_;
bool is_initializer_block_;
+
+ int source_beg_statement_pos_;
+ int source_end_statement_pos_;
};
@@ -651,6 +664,22 @@ class ExitContextStatement: public Statement {
};
+class ExitScopedBlockStatement: public Statement {
+ public:
+ explicit ExitScopedBlockStatement(Scope* scope)
+ : scope_(scope) { }
+
+ virtual bool IsInlineable() const;
+
+ DECLARE_NODE_TYPE(ExitScopedBlockStatement)
+
+ Scope* scope() { return scope_; }
+
+ private:
+ Scope* scope_;
+};
+
+
class CaseClause: public ZoneObject {
public:
CaseClause(Isolate* isolate,
« no previous file with comments | « no previous file | src/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698