Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(445)

Side by Side Diff: runtime/vm/ast.h

Issue 2112973002: Remove invalid assertion in the optimizer (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: added const Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 const bool is_initializer_;
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
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_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698