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

Unified Diff: src/ast.h

Issue 147075: Allocate arguments object on-demand instead of at function entry.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 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
« no previous file with comments | « src/accessors.cc ('k') | src/ast.cc » ('j') | src/ia32/codegen-ia32.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
===================================================================
--- src/ast.h (revision 2255)
+++ src/ast.h (working copy)
@@ -802,13 +802,20 @@
Variable* AsVariable() {
return this == NULL || var_ == NULL ? NULL : var_->AsVariable();
}
+
virtual bool IsValidLeftHandSide() {
return var_ == NULL ? true : var_->IsValidLeftHandSide();
}
+
bool IsVariable(Handle<String> n) {
return !is_this() && name().is_identical_to(n);
}
+ bool IsArguments() {
+ Variable* variable = AsVariable();
+ return (variable == NULL) ? false : variable->is_arguments();
+ }
+
// If this assertion fails it means that some code has tried to
// treat the special "this" variable as an ordinary variable with
// the name "this".
@@ -890,12 +897,13 @@
virtual void Accept(AstVisitor* v);
// Type testing & conversion
- virtual Slot* AsSlot() { return this; }
+ virtual Slot* AsSlot() { return this; }
// Accessors
- Variable* var() const { return var_; }
- Type type() const { return type_; }
- int index() const { return index_; }
+ Variable* var() const { return var_; }
+ Type type() const { return type_; }
+ int index() const { return index_; }
+ bool is_arguments() const { return var_->is_arguments(); }
private:
Variable* var_;
« no previous file with comments | « src/accessors.cc ('k') | src/ast.cc » ('j') | src/ia32/codegen-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698