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

Unified Diff: src/variables.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
Index: src/variables.h
===================================================================
--- src/variables.h (revision 2255)
+++ src/variables.h (working copy)
@@ -137,6 +137,12 @@
// in a context
};
+ enum Kind {
+ NORMAL,
+ THIS,
+ ARGUMENTS
+ };
+
// Printing support
static const char* Mode2String(Mode mode);
@@ -172,7 +178,8 @@
}
bool is_global() const;
- bool is_this() const { return is_this_; }
+ bool is_this() const { return kind_ == THIS; }
+ bool is_arguments() const { return kind_ == ARGUMENTS; }
Variable* local_if_not_shadowed() const {
ASSERT(mode_ == DYNAMIC_LOCAL && local_if_not_shadowed_ != NULL);
@@ -190,13 +197,13 @@
private:
Variable(Scope* scope, Handle<String> name, Mode mode, bool is_valid_LHS,
- bool is_this);
+ Kind kind);
Scope* scope_;
Handle<String> name_;
Mode mode_;
bool is_valid_LHS_;
- bool is_this_;
+ Kind kind_;
Variable* local_if_not_shadowed_;
« src/ia32/codegen-ia32.cc ('K') | « src/scopes.cc ('k') | src/variables.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698