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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 | 192 |
193 void AstLabeler::VisitCatchExtensionObject( | 193 void AstLabeler::VisitCatchExtensionObject( |
194 CatchExtensionObject* expr) { | 194 CatchExtensionObject* expr) { |
195 UNREACHABLE(); | 195 UNREACHABLE(); |
196 } | 196 } |
197 | 197 |
198 | 198 |
199 void AstLabeler::VisitAssignment(Assignment* expr) { | 199 void AstLabeler::VisitAssignment(Assignment* expr) { |
200 Property* prop = expr->target()->AsProperty(); | 200 Property* prop = expr->target()->AsProperty(); |
201 ASSERT(prop != NULL); | 201 ASSERT(prop != NULL); |
202 if (prop != NULL) { | 202 ASSERT(prop->key()->IsPropertyName()); |
203 ASSERT(prop->key()->IsPropertyName()); | 203 VariableProxy* proxy = prop->obj()->AsVariableProxy(); |
204 VariableProxy* proxy = prop->obj()->AsVariableProxy(); | 204 USE(proxy); |
205 if (proxy != NULL && proxy->var()->is_this()) { | 205 ASSERT(proxy != NULL && proxy->var()->is_this()); |
206 info()->set_has_this_properties(true); | 206 info()->set_has_this_properties(true); |
207 } else { | |
208 Visit(prop->obj()); | |
209 } | |
210 } | |
211 Visit(expr->value()); | 207 Visit(expr->value()); |
212 expr->set_num(next_number_++); | 208 expr->set_num(next_number_++); |
213 } | 209 } |
214 | 210 |
215 | 211 |
216 void AstLabeler::VisitThrow(Throw* expr) { | 212 void AstLabeler::VisitThrow(Throw* expr) { |
217 UNREACHABLE(); | 213 UNREACHABLE(); |
218 } | 214 } |
219 | 215 |
220 | 216 |
221 void AstLabeler::VisitProperty(Property* expr) { | 217 void AstLabeler::VisitProperty(Property* expr) { |
222 UNREACHABLE(); | 218 ASSERT(expr->key()->IsPropertyName()); |
| 219 VariableProxy* proxy = expr->obj()->AsVariableProxy(); |
| 220 USE(proxy); |
| 221 ASSERT(proxy != NULL && proxy->var()->is_this()); |
| 222 info()->set_has_this_properties(true); |
| 223 expr->set_num(next_number_++); |
223 } | 224 } |
224 | 225 |
225 | 226 |
226 void AstLabeler::VisitCall(Call* expr) { | 227 void AstLabeler::VisitCall(Call* expr) { |
227 UNREACHABLE(); | 228 UNREACHABLE(); |
228 } | 229 } |
229 | 230 |
230 | 231 |
231 void AstLabeler::VisitCallNew(CallNew* expr) { | 232 void AstLabeler::VisitCallNew(CallNew* expr) { |
232 UNREACHABLE(); | 233 UNREACHABLE(); |
(...skipping 30 matching lines...) Expand all Loading... |
263 void AstLabeler::VisitThisFunction(ThisFunction* expr) { | 264 void AstLabeler::VisitThisFunction(ThisFunction* expr) { |
264 UNREACHABLE(); | 265 UNREACHABLE(); |
265 } | 266 } |
266 | 267 |
267 | 268 |
268 void AstLabeler::VisitDeclaration(Declaration* decl) { | 269 void AstLabeler::VisitDeclaration(Declaration* decl) { |
269 UNREACHABLE(); | 270 UNREACHABLE(); |
270 } | 271 } |
271 | 272 |
272 } } // namespace v8::internal | 273 } } // namespace v8::internal |
OLD | NEW |