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

Unified Diff: src/ast.h

Issue 7280012: Introduce scopes to keep track of catch blocks at compile time. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Update to HEAD. Created 9 years, 6 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/ast.h
diff --git a/src/ast.h b/src/ast.h
index 045404a49db3fa5029d0a142d7d4d826c639c19f..805a4065324233b1bb16c0446ed1fa9fe4d24401 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -772,20 +772,26 @@ class TryStatement: public Statement {
class TryCatchStatement: public TryStatement {
public:
- TryCatchStatement(Block* try_block, Handle<String> name, Block* catch_block)
+ TryCatchStatement(Block* try_block,
+ Scope* scope,
+ Variable* variable,
+ Block* catch_block)
: TryStatement(try_block),
- name_(name),
+ scope_(scope),
+ variable_(variable),
catch_block_(catch_block) {
}
DECLARE_NODE_TYPE(TryCatchStatement)
+ Scope* scope() { return scope_; }
+ Variable* variable() { return variable_; }
Block* catch_block() const { return catch_block_; }
- Handle<String> name() const { return name_; }
virtual bool IsInlineable() const;
private:
- Handle<String> name_;
+ Scope* scope_;
+ Variable* variable_;
Block* catch_block_;
};

Powered by Google App Engine
This is Rietveld 408576698