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

Unified Diff: src/ast.h

Issue 18143: Change the handling of catch blocks to use context extension objects... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 11 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/codegen-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
===================================================================
--- src/ast.h (revision 1089)
+++ src/ast.h (working copy)
@@ -77,6 +77,7 @@
V(RegExpLiteral) \
V(ObjectLiteral) \
V(ArrayLiteral) \
+ V(CatchExtensionObject) \
V(Assignment) \
V(Throw) \
V(Property) \
@@ -722,6 +723,26 @@
};
+// Node for constructing a context extension object for a catch block.
+// The catch context extension object has one property, the catch
+// variable, which should be DontDelete.
+class CatchExtensionObject: public Expression {
+ public:
+ CatchExtensionObject(Literal* key, VariableProxy* value)
+ : key_(key), value_(value) {
+ }
+
+ virtual void Accept(AstVisitor* v);
+
+ Literal* key() const { return key_; }
+ VariableProxy* value() const { return value_; }
+
+ private:
+ Literal* key_;
+ VariableProxy* value_;
+};
+
+
class VariableProxy: public Expression {
public:
virtual void Accept(AstVisitor* v);
« no previous file with comments | « no previous file | src/codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698