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 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1236 | 1236 |
| 1237 DISALLOW_IMPLICIT_CONSTRUCTORS(LoadInstanceFieldNode); | 1237 DISALLOW_IMPLICIT_CONSTRUCTORS(LoadInstanceFieldNode); |
| 1238 }; | 1238 }; |
| 1239 | 1239 |
| 1240 | 1240 |
| 1241 class StoreInstanceFieldNode : public AstNode { | 1241 class StoreInstanceFieldNode : public AstNode { |
| 1242 public: | 1242 public: |
| 1243 StoreInstanceFieldNode(TokenPosition token_pos, | 1243 StoreInstanceFieldNode(TokenPosition token_pos, |
| 1244 AstNode* instance, | 1244 AstNode* instance, |
| 1245 const Field& field, | 1245 const Field& field, |
| 1246 AstNode* value) | 1246 AstNode* value, |
| 1247 bool is_initializer) | |
| 1247 : AstNode(token_pos), | 1248 : AstNode(token_pos), |
| 1248 instance_(instance), | 1249 instance_(instance), |
| 1249 field_(*MayCloneField(field)), | 1250 field_(*MayCloneField(field)), |
| 1250 value_(value) { | 1251 value_(value), |
| 1252 is_initializer_(is_initializer) { | |
| 1251 ASSERT(instance_ != NULL); | 1253 ASSERT(instance_ != NULL); |
| 1252 ASSERT(field_.IsZoneHandle()); | 1254 ASSERT(field_.IsZoneHandle()); |
| 1253 ASSERT(value_ != NULL); | 1255 ASSERT(value_ != NULL); |
| 1254 } | 1256 } |
| 1255 | 1257 |
| 1256 AstNode* instance() const { return instance_; } | 1258 AstNode* instance() const { return instance_; } |
| 1257 const Field& field() const { return field_; } | 1259 const Field& field() const { return field_; } |
| 1258 AstNode* value() const { return value_; } | 1260 AstNode* value() const { return value_; } |
| 1261 bool is_initializer() const { return is_initializer_; } | |
| 1259 | 1262 |
| 1260 virtual void VisitChildren(AstNodeVisitor* visitor) const { | 1263 virtual void VisitChildren(AstNodeVisitor* visitor) const { |
| 1261 instance()->Visit(visitor); | 1264 instance()->Visit(visitor); |
| 1262 value()->Visit(visitor); | 1265 value()->Visit(visitor); |
| 1263 } | 1266 } |
| 1264 | 1267 |
| 1265 DECLARE_COMMON_NODE_FUNCTIONS(StoreInstanceFieldNode); | 1268 DECLARE_COMMON_NODE_FUNCTIONS(StoreInstanceFieldNode); |
| 1266 | 1269 |
| 1267 private: | 1270 private: |
| 1268 AstNode* instance_; | 1271 AstNode* instance_; |
| 1269 const Field& field_; | 1272 const Field& field_; |
| 1270 AstNode* value_; | 1273 AstNode* value_; |
| 1274 bool is_initializer_; | |
|
Vyacheslav Egorov (Google)
2016/07/01 16:28:23
maybe make this const bool?
Florian Schneider
2016/07/01 16:54:31
Done.
| |
| 1271 | 1275 |
| 1272 DISALLOW_IMPLICIT_CONSTRUCTORS(StoreInstanceFieldNode); | 1276 DISALLOW_IMPLICIT_CONSTRUCTORS(StoreInstanceFieldNode); |
| 1273 }; | 1277 }; |
| 1274 | 1278 |
| 1275 | 1279 |
| 1276 class LoadStaticFieldNode : public AstNode { | 1280 class LoadStaticFieldNode : public AstNode { |
| 1277 public: | 1281 public: |
| 1278 LoadStaticFieldNode(TokenPosition token_pos, const Field& field) | 1282 LoadStaticFieldNode(TokenPosition token_pos, const Field& field) |
| 1279 : AstNode(token_pos), | 1283 : AstNode(token_pos), |
| 1280 field_(*MayCloneField(field)), | 1284 field_(*MayCloneField(field)), |
| (...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2015 const intptr_t try_index_; | 2019 const intptr_t try_index_; |
| 2016 | 2020 |
| 2017 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); | 2021 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); |
| 2018 }; | 2022 }; |
| 2019 | 2023 |
| 2020 } // namespace dart | 2024 } // namespace dart |
| 2021 | 2025 |
| 2022 #undef DECLARE_COMMON_NODE_FUNCTIONS | 2026 #undef DECLARE_COMMON_NODE_FUNCTIONS |
| 2023 | 2027 |
| 2024 #endif // VM_AST_H_ | 2028 #endif // VM_AST_H_ |
| OLD | NEW |