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

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

Issue 2939533002: Apply transformations after comparing to golden files. (Closed)
Patch Set: Created 3 years, 6 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 | « pkg/front_end/testcases/super_rasta_copy.dart.direct.expect ('k') | no next file » | 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 library kernel.checks; 4 library kernel.checks;
5 5
6 import 'ast.dart'; 6 import 'ast.dart';
7 import 'transformations/flags.dart'; 7 import 'transformations/flags.dart';
8 8
9 void verifyProgram(Program program) { 9 void verifyProgram(Program program) {
10 VerifyingVisitor.check(program); 10 VerifyingVisitor.check(program);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 problem(TreeNode node, String details, {TreeNode context}) { 74 problem(TreeNode node, String details, {TreeNode context}) {
75 context ??= this.context; 75 context ??= this.context;
76 throw new VerificationError(context, node, details); 76 throw new VerificationError(context, node, details);
77 } 77 }
78 78
79 TreeNode enterParent(TreeNode node) { 79 TreeNode enterParent(TreeNode node) {
80 if (!identical(node.parent, currentParent)) { 80 if (!identical(node.parent, currentParent)) {
81 problem( 81 problem(
82 node, 82 node,
83 "Incorrect parent pointer on ${node.runtimeType}:" 83 "Incorrect parent pointer on ${node.runtimeType}:"
84 " expected '${node.parent.runtimeType}'," 84 " expected '${currentParent.runtimeType}',"
85 " but found: '${currentParent.runtimeType}'."); 85 " but found: '${node.parent.runtimeType}'.");
86 } 86 }
87 var oldParent = currentParent; 87 var oldParent = currentParent;
88 currentParent = node; 88 currentParent = node;
89 return oldParent; 89 return oldParent;
90 } 90 }
91 91
92 void exitParent(TreeNode oldParent) { 92 void exitParent(TreeNode oldParent) {
93 currentParent = oldParent; 93 currentParent = oldParent;
94 } 94 }
95 95
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 var oldParent = parent; 601 var oldParent = parent;
602 parent = node; 602 parent = node;
603 node.visitChildren(this); 603 node.visitChildren(this);
604 parent = oldParent; 604 parent = oldParent;
605 } 605 }
606 } 606 }
607 607
608 void checkInitializers(Constructor constructor) { 608 void checkInitializers(Constructor constructor) {
609 // TODO(ahe): I'll add more here in other CLs. 609 // TODO(ahe): I'll add more here in other CLs.
610 } 610 }
OLDNEW
« no previous file with comments | « pkg/front_end/testcases/super_rasta_copy.dart.direct.expect ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698