Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 #ifndef VM_AST_H_ | 5 #ifndef VM_AST_H_ |
| 6 #define VM_AST_H_ | 6 #define VM_AST_H_ |
| 7 | 7 |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/allocation.h" | 9 #include "vm/allocation.h" |
| 10 #include "vm/growable_array.h" | 10 #include "vm/growable_array.h" |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 213 } | 213 } |
| 214 intptr_t length() const { return nodes_.length(); } | 214 intptr_t length() const { return nodes_.length(); } |
| 215 AstNode* NodeAt(intptr_t index) const { return nodes_[index]; } | 215 AstNode* NodeAt(intptr_t index) const { return nodes_[index]; } |
| 216 void SetNodeAt(intptr_t index, AstNode* node) { nodes_[index] = node; } | 216 void SetNodeAt(intptr_t index, AstNode* node) { nodes_[index] = node; } |
| 217 const Array& names() const { | 217 const Array& names() const { |
| 218 return names_; | 218 return names_; |
| 219 } | 219 } |
| 220 void set_names(const Array& names) { | 220 void set_names(const Array& names) { |
| 221 names_ = names.raw(); | 221 names_ = names.raw(); |
| 222 } | 222 } |
| 223 const GrowableArray<AstNode*>& nodes() const { | |
| 224 return nodes_; | |
| 225 } | |
|
regis
2013/08/28 21:10:54
This could fit on one line.
names() and set_names(
zra
2013/08/28 22:47:00
Done.
| |
| 223 | 226 |
| 224 DECLARE_COMMON_NODE_FUNCTIONS(ArgumentListNode); | 227 DECLARE_COMMON_NODE_FUNCTIONS(ArgumentListNode); |
| 225 | 228 |
| 226 private: | 229 private: |
| 227 GrowableArray<AstNode*> nodes_; | 230 GrowableArray<AstNode*> nodes_; |
| 228 Array& names_; | 231 Array& names_; |
| 229 | 232 |
| 230 DISALLOW_COPY_AND_ASSIGN(ArgumentListNode); | 233 DISALLOW_COPY_AND_ASSIGN(ArgumentListNode); |
| 231 }; | 234 }; |
| 232 | 235 |
| (...skipping 1520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1753 const intptr_t try_index_; | 1756 const intptr_t try_index_; |
| 1754 | 1757 |
| 1755 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); | 1758 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); |
| 1756 }; | 1759 }; |
| 1757 | 1760 |
| 1758 } // namespace dart | 1761 } // namespace dart |
| 1759 | 1762 |
| 1760 #undef DECLARE_COMMON_NODE_FUNCTIONS | 1763 #undef DECLARE_COMMON_NODE_FUNCTIONS |
| 1761 | 1764 |
| 1762 #endif // VM_AST_H_ | 1765 #endif // VM_AST_H_ |
| OLD | NEW |