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

Side by Side Diff: src/ast.h

Issue 7904008: Introduce with scope and rework variable resolution. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Latest version. Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/ast.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1116 1116
1117 bool IsVariable(Handle<String> n) { 1117 bool IsVariable(Handle<String> n) {
1118 return !is_this() && name().is_identical_to(n); 1118 return !is_this() && name().is_identical_to(n);
1119 } 1119 }
1120 1120
1121 bool IsArguments() { return var_ != NULL && var_->is_arguments(); } 1121 bool IsArguments() { return var_ != NULL && var_->is_arguments(); }
1122 1122
1123 Handle<String> name() const { return name_; } 1123 Handle<String> name() const { return name_; }
1124 Variable* var() const { return var_; } 1124 Variable* var() const { return var_; }
1125 bool is_this() const { return is_this_; } 1125 bool is_this() const { return is_this_; }
1126 bool inside_with() const { return inside_with_; }
1127 int position() const { return position_; } 1126 int position() const { return position_; }
1128 1127
1129 void MarkAsTrivial() { is_trivial_ = true; } 1128 void MarkAsTrivial() { is_trivial_ = true; }
1130 1129
1131 // Bind this proxy to the variable var. 1130 // Bind this proxy to the variable var.
1132 void BindTo(Variable* var); 1131 void BindTo(Variable* var);
1133 1132
1134 protected: 1133 protected:
1135 Handle<String> name_; 1134 Handle<String> name_;
1136 Variable* var_; // resolved variable, or NULL 1135 Variable* var_; // resolved variable, or NULL
1137 bool is_this_; 1136 bool is_this_;
1138 bool inside_with_;
1139 bool is_trivial_; 1137 bool is_trivial_;
1140 int position_; 1138 int position_;
1141 1139
1142 VariableProxy(Isolate* isolate, 1140 VariableProxy(Isolate* isolate,
1143 Handle<String> name, 1141 Handle<String> name,
1144 bool is_this, 1142 bool is_this,
1145 bool inside_with,
1146 int position = RelocInfo::kNoPosition); 1143 int position = RelocInfo::kNoPosition);
1147 1144
1148 friend class Scope; 1145 friend class Scope;
1149 }; 1146 };
1150 1147
1151 1148
1152 class Property: public Expression { 1149 class Property: public Expression {
1153 public: 1150 public:
1154 Property(Isolate* isolate, 1151 Property(Isolate* isolate,
1155 Expression* obj, 1152 Expression* obj,
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after
2140 2137
2141 private: 2138 private:
2142 Isolate* isolate_; 2139 Isolate* isolate_;
2143 bool stack_overflow_; 2140 bool stack_overflow_;
2144 }; 2141 };
2145 2142
2146 2143
2147 } } // namespace v8::internal 2144 } } // namespace v8::internal
2148 2145
2149 #endif // V8_AST_H_ 2146 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698