| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1128 | 1128 |
| 1129 bool IsArguments() { | 1129 bool IsArguments() { |
| 1130 Variable* variable = AsVariable(); | 1130 Variable* variable = AsVariable(); |
| 1131 return (variable == NULL) ? false : variable->is_arguments(); | 1131 return (variable == NULL) ? false : variable->is_arguments(); |
| 1132 } | 1132 } |
| 1133 | 1133 |
| 1134 Handle<String> name() const { return name_; } | 1134 Handle<String> name() const { return name_; } |
| 1135 Variable* var() const { return var_; } | 1135 Variable* var() const { return var_; } |
| 1136 bool is_this() const { return is_this_; } | 1136 bool is_this() const { return is_this_; } |
| 1137 bool inside_with() const { return inside_with_; } | 1137 bool inside_with() const { return inside_with_; } |
| 1138 int position() const { return position_; } |
| 1138 | 1139 |
| 1139 void MarkAsTrivial() { is_trivial_ = true; } | 1140 void MarkAsTrivial() { is_trivial_ = true; } |
| 1140 | 1141 |
| 1141 // Bind this proxy to the variable var. | 1142 // Bind this proxy to the variable var. |
| 1142 void BindTo(Variable* var); | 1143 void BindTo(Variable* var); |
| 1143 | 1144 |
| 1144 protected: | 1145 protected: |
| 1145 Handle<String> name_; | 1146 Handle<String> name_; |
| 1146 Variable* var_; // resolved variable, or NULL | 1147 Variable* var_; // resolved variable, or NULL |
| 1147 bool is_this_; | 1148 bool is_this_; |
| 1148 bool inside_with_; | 1149 bool inside_with_; |
| 1149 bool is_trivial_; | 1150 bool is_trivial_; |
| 1151 int position_; |
| 1150 | 1152 |
| 1151 VariableProxy(Handle<String> name, bool is_this, bool inside_with); | 1153 VariableProxy(Handle<String> name, |
| 1154 bool is_this, |
| 1155 bool inside_with, |
| 1156 int position = RelocInfo::kNoPosition); |
| 1152 explicit VariableProxy(bool is_this); | 1157 explicit VariableProxy(bool is_this); |
| 1153 | 1158 |
| 1154 friend class Scope; | 1159 friend class Scope; |
| 1155 }; | 1160 }; |
| 1156 | 1161 |
| 1157 | 1162 |
| 1158 class VariableProxySentinel: public VariableProxy { | 1163 class VariableProxySentinel: public VariableProxy { |
| 1159 public: | 1164 public: |
| 1160 virtual bool IsValidLeftHandSide() { return !is_this(); } | 1165 virtual bool IsValidLeftHandSide() { return !is_this(); } |
| 1161 | 1166 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1309 | 1314 |
| 1310 void RecordTypeFeedback(TypeFeedbackOracle* oracle); | 1315 void RecordTypeFeedback(TypeFeedbackOracle* oracle); |
| 1311 virtual ZoneMapList* GetReceiverTypes() { return receiver_types_; } | 1316 virtual ZoneMapList* GetReceiverTypes() { return receiver_types_; } |
| 1312 virtual bool IsMonomorphic() { return is_monomorphic_; } | 1317 virtual bool IsMonomorphic() { return is_monomorphic_; } |
| 1313 CheckType check_type() const { return check_type_; } | 1318 CheckType check_type() const { return check_type_; } |
| 1314 Handle<JSFunction> target() { return target_; } | 1319 Handle<JSFunction> target() { return target_; } |
| 1315 Handle<JSObject> holder() { return holder_; } | 1320 Handle<JSObject> holder() { return holder_; } |
| 1316 Handle<JSGlobalPropertyCell> cell() { return cell_; } | 1321 Handle<JSGlobalPropertyCell> cell() { return cell_; } |
| 1317 | 1322 |
| 1318 bool ComputeTarget(Handle<Map> type, Handle<String> name); | 1323 bool ComputeTarget(Handle<Map> type, Handle<String> name); |
| 1319 bool ComputeGlobalTarget(Handle<GlobalObject> global, Handle<String> name); | 1324 bool ComputeGlobalTarget(Handle<GlobalObject> global, LookupResult* lookup); |
| 1320 | 1325 |
| 1321 // Bailout support. | 1326 // Bailout support. |
| 1322 int ReturnId() const { return return_id_; } | 1327 int ReturnId() const { return return_id_; } |
| 1323 | 1328 |
| 1324 #ifdef DEBUG | 1329 #ifdef DEBUG |
| 1325 // Used to assert that the FullCodeGenerator records the return site. | 1330 // Used to assert that the FullCodeGenerator records the return site. |
| 1326 bool return_is_recorded_; | 1331 bool return_is_recorded_; |
| 1327 #endif | 1332 #endif |
| 1328 | 1333 |
| 1329 private: | 1334 private: |
| (...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2225 | 2230 |
| 2226 private: | 2231 private: |
| 2227 Isolate* isolate_; | 2232 Isolate* isolate_; |
| 2228 bool stack_overflow_; | 2233 bool stack_overflow_; |
| 2229 }; | 2234 }; |
| 2230 | 2235 |
| 2231 | 2236 |
| 2232 } } // namespace v8::internal | 2237 } } // namespace v8::internal |
| 2233 | 2238 |
| 2234 #endif // V8_AST_H_ | 2239 #endif // V8_AST_H_ |
| OLD | NEW |