| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 } | 60 } |
| 61 | 61 |
| 62 | 62 |
| 63 void SequenceNode::VisitChildren(AstNodeVisitor* visitor) const { | 63 void SequenceNode::VisitChildren(AstNodeVisitor* visitor) const { |
| 64 for (intptr_t i = 0; i < this->length(); i++) { | 64 for (intptr_t i = 0; i < this->length(); i++) { |
| 65 NodeAt(i)->Visit(visitor); | 65 NodeAt(i)->Visit(visitor); |
| 66 } | 66 } |
| 67 } | 67 } |
| 68 | 68 |
| 69 | 69 |
| 70 void SequenceNode::Add(AstNode* node) { |
| 71 if (node->IsReturnNode()) { |
| 72 node->AsReturnNode()->set_scope(scope()); |
| 73 } |
| 74 nodes_.Add(node); |
| 75 } |
| 76 |
| 77 |
| 70 void PrimaryNode::VisitChildren(AstNodeVisitor* visitor) const { | 78 void PrimaryNode::VisitChildren(AstNodeVisitor* visitor) const { |
| 71 } | 79 } |
| 72 | 80 |
| 73 | 81 |
| 74 void ArgumentListNode::VisitChildren(AstNodeVisitor* visitor) const { | 82 void ArgumentListNode::VisitChildren(AstNodeVisitor* visitor) const { |
| 75 for (intptr_t i = 0; i < this->length(); i++) { | 83 for (intptr_t i = 0; i < this->length(); i++) { |
| 76 NodeAt(i)->Visit(visitor); | 84 NodeAt(i)->Visit(visitor); |
| 77 } | 85 } |
| 78 } | 86 } |
| 79 | 87 |
| (...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 if (result.IsError() || result.IsNull()) { | 640 if (result.IsError() || result.IsNull()) { |
| 633 // TODO(turnidge): We could get better error messages by returning | 641 // TODO(turnidge): We could get better error messages by returning |
| 634 // the Error object directly to the parser. This will involve | 642 // the Error object directly to the parser. This will involve |
| 635 // replumbing all of the EvalConstExpr methods. | 643 // replumbing all of the EvalConstExpr methods. |
| 636 return NULL; | 644 return NULL; |
| 637 } | 645 } |
| 638 return &Instance::ZoneHandle(Instance::Cast(result).raw()); | 646 return &Instance::ZoneHandle(Instance::Cast(result).raw()); |
| 639 } | 647 } |
| 640 | 648 |
| 641 } // namespace dart | 649 } // namespace dart |
| OLD | NEW |