OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/ast.h" | 5 #include "vm/ast.h" |
6 #include "vm/compiler.h" | 6 #include "vm/compiler.h" |
7 #include "vm/dart_entry.h" | 7 #include "vm/dart_entry.h" |
8 #include "vm/isolate.h" | 8 #include "vm/isolate.h" |
9 #include "vm/object_store.h" | 9 #include "vm/object_store.h" |
10 #include "vm/resolver.h" | 10 #include "vm/resolver.h" |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 return new StoreStaticFieldNode(token_pos(), field(), rhs); | 318 return new StoreStaticFieldNode(token_pos(), field(), rhs); |
319 } | 319 } |
320 | 320 |
321 | 321 |
322 AstNode* InstanceGetterNode::MakeAssignmentNode(AstNode* rhs) { | 322 AstNode* InstanceGetterNode::MakeAssignmentNode(AstNode* rhs) { |
323 return new InstanceSetterNode(token_pos(), receiver(), field_name(), rhs); | 323 return new InstanceSetterNode(token_pos(), receiver(), field_name(), rhs); |
324 } | 324 } |
325 | 325 |
326 | 326 |
327 AstNode* LoadIndexedNode::MakeAssignmentNode(AstNode* rhs) { | 327 AstNode* LoadIndexedNode::MakeAssignmentNode(AstNode* rhs) { |
328 return new StoreIndexedNode(token_pos(), array(), index_expr(), rhs); | 328 return new StoreIndexedNode(token_pos(), array(), index_expr(), |
| 329 rhs, super_class()); |
329 } | 330 } |
330 | 331 |
331 | 332 |
332 AstNode* StaticGetterNode::MakeAssignmentNode(AstNode* rhs) { | 333 AstNode* StaticGetterNode::MakeAssignmentNode(AstNode* rhs) { |
333 const String& setter_name = String::Handle(Field::SetterName(field_name())); | 334 const String& setter_name = String::Handle(Field::SetterName(field_name())); |
334 | 335 |
335 if (is_super_getter_) { | 336 if (is_super_getter_) { |
336 // Resolve the (dynamic) setter method. | 337 // Resolve the (dynamic) setter method. |
337 ASSERT(receiver() != NULL); | 338 ASSERT(receiver() != NULL); |
338 const Function& super_setter = Function::ZoneHandle( | 339 const Function& super_setter = Function::ZoneHandle( |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 if (result.IsError() || result.IsNull()) { | 421 if (result.IsError() || result.IsNull()) { |
421 // TODO(turnidge): We could get better error messages by returning | 422 // TODO(turnidge): We could get better error messages by returning |
422 // the Error object directly to the parser. This will involve | 423 // the Error object directly to the parser. This will involve |
423 // replumbing all of the EvalConstExpr methods. | 424 // replumbing all of the EvalConstExpr methods. |
424 return NULL; | 425 return NULL; |
425 } | 426 } |
426 return &Instance::ZoneHandle(Instance::Cast(result).raw()); | 427 return &Instance::ZoneHandle(Instance::Cast(result).raw()); |
427 } | 428 } |
428 | 429 |
429 } // namespace dart | 430 } // namespace dart |
OLD | NEW |