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

Side by Side Diff: pkg/kernel/lib/ast.dart

Issue 2531873002: Add --verify-ir flag to dartk and test.py. (Closed)
Patch Set: Minor fixes Created 4 years 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 | « pkg/kernel/bin/transform.dart ('k') | pkg/kernel/lib/checks.dart » ('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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 /// ----------------------------------------------------------------------- 5 /// -----------------------------------------------------------------------
6 /// ERROR HANDLING 6 /// ERROR HANDLING
7 /// ----------------------------------------------------------------------- 7 /// -----------------------------------------------------------------------
8 /// 8 ///
9 /// As a rule of thumb, errors that can be detected statically are handled by 9 /// As a rule of thumb, errors that can be detected statically are handled by
10 /// the frontend, typically by translating the erroneous code into a 'throw' or 10 /// the frontend, typically by translating the erroneous code into a 'throw' or
(...skipping 2994 matching lines...) Expand 10 before | Expand all | Expand 10 after
3005 bool isConst: false, 3005 bool isConst: false,
3006 this.type: const DynamicType()}) { 3006 this.type: const DynamicType()}) {
3007 assert(type != null); 3007 assert(type != null);
3008 initializer?.parent = this; 3008 initializer?.parent = this;
3009 this.isFinal = isFinal; 3009 this.isFinal = isFinal;
3010 this.isConst = isConst; 3010 this.isConst = isConst;
3011 } 3011 }
3012 3012
3013 static const int FlagFinal = 1 << 0; // Must match serialized bit positions. 3013 static const int FlagFinal = 1 << 0; // Must match serialized bit positions.
3014 static const int FlagConst = 1 << 1; 3014 static const int FlagConst = 1 << 1;
3015 static const int FlagInScope = 1 << 2; // Temporary flag used by verifier.
3015 3016
3016 bool get isFinal => flags & FlagFinal != 0; 3017 bool get isFinal => flags & FlagFinal != 0;
3017 bool get isConst => flags & FlagConst != 0; 3018 bool get isConst => flags & FlagConst != 0;
3018 3019
3019 void set isFinal(bool value) { 3020 void set isFinal(bool value) {
3020 flags = value ? (flags | FlagFinal) : (flags & ~FlagFinal); 3021 flags = value ? (flags | FlagFinal) : (flags & ~FlagFinal);
3021 } 3022 }
3022 3023
3023 void set isConst(bool value) { 3024 void set isConst(bool value) {
3024 flags = value ? (flags | FlagConst) : (flags & ~FlagConst); 3025 flags = value ? (flags | FlagConst) : (flags & ~FlagConst);
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
3631 3632
3632 @override 3633 @override
3633 defaultTreeNode(TreeNode node) { 3634 defaultTreeNode(TreeNode node) {
3634 if (node == child) { 3635 if (node == child) {
3635 return replacement; 3636 return replacement;
3636 } else { 3637 } else {
3637 return node; 3638 return node;
3638 } 3639 }
3639 } 3640 }
3640 } 3641 }
OLDNEW
« no previous file with comments | « pkg/kernel/bin/transform.dart ('k') | pkg/kernel/lib/checks.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698