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 1281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1292 | 1292 |
1293 virtual AstNode* MakeAssignmentNode(AstNode* rhs); | 1293 virtual AstNode* MakeAssignmentNode(AstNode* rhs); |
1294 | 1294 |
1295 virtual bool IsPotentiallyConst() const { | 1295 virtual bool IsPotentiallyConst() const { |
1296 return field_.is_const(); | 1296 return field_.is_const(); |
1297 } | 1297 } |
1298 | 1298 |
1299 virtual const Instance* EvalConstExpr() const { | 1299 virtual const Instance* EvalConstExpr() const { |
1300 ASSERT(field_.is_static()); | 1300 ASSERT(field_.is_static()); |
1301 return !is_deferred_reference_ && field_.is_const() | 1301 return !is_deferred_reference_ && field_.is_const() |
1302 ? &Instance::ZoneHandle(field_.value()) | 1302 ? &Instance::ZoneHandle(field_.StaticFieldValue()) |
1303 : NULL; | 1303 : NULL; |
1304 } | 1304 } |
1305 | 1305 |
1306 DECLARE_COMMON_NODE_FUNCTIONS(LoadStaticFieldNode); | 1306 DECLARE_COMMON_NODE_FUNCTIONS(LoadStaticFieldNode); |
1307 | 1307 |
1308 private: | 1308 private: |
1309 const Field& field_; | 1309 const Field& field_; |
1310 bool is_deferred_reference_; | 1310 bool is_deferred_reference_; |
1311 | 1311 |
1312 DISALLOW_IMPLICIT_CONSTRUCTORS(LoadStaticFieldNode); | 1312 DISALLOW_IMPLICIT_CONSTRUCTORS(LoadStaticFieldNode); |
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2016 const intptr_t try_index_; | 2016 const intptr_t try_index_; |
2017 | 2017 |
2018 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); | 2018 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); |
2019 }; | 2019 }; |
2020 | 2020 |
2021 } // namespace dart | 2021 } // namespace dart |
2022 | 2022 |
2023 #undef DECLARE_COMMON_NODE_FUNCTIONS | 2023 #undef DECLARE_COMMON_NODE_FUNCTIONS |
2024 | 2024 |
2025 #endif // VM_AST_H_ | 2025 #endif // VM_AST_H_ |
OLD | NEW |