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

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

Issue 2986093002: Revert two Kernel changes that were causing test failures. (Closed)
Patch Set: Revert "Migrate language/async_backwards... ... language/async_star_take..." Created 3 years, 4 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/kernel/lib/binary/ast_to_binary.dart ('k') | runtime/vm/kernel_binary_flowgraph.h » ('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 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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 330
331 visitVariableDeclaration(VariableDeclaration node) { 331 visitVariableDeclaration(VariableDeclaration node) {
332 var parent = node.parent; 332 var parent = node.parent;
333 if (parent is! Block && 333 if (parent is! Block &&
334 !(parent is Catch && parent.body != node) && 334 !(parent is Catch && parent.body != node) &&
335 !(parent is FunctionNode && parent.body != node) && 335 !(parent is FunctionNode && parent.body != node) &&
336 parent is! FunctionDeclaration && 336 parent is! FunctionDeclaration &&
337 !(parent is ForStatement && parent.body != node) && 337 !(parent is ForStatement && parent.body != node) &&
338 !(parent is ForInStatement && parent.body != node) && 338 !(parent is ForInStatement && parent.body != node) &&
339 parent is! Let && 339 parent is! Let &&
340 parent is! LocalInitializer && 340 parent is! LocalInitializer) {
341 parent is! Typedef) {
342 problem( 341 problem(
343 node, 342 node,
344 "VariableDeclaration must be a direct child of a Block, " 343 "VariableDeclaration must be a direct child of a Block, "
345 "not ${parent.runtimeType}."); 344 "not ${parent.runtimeType}.");
346 } 345 }
347 visitChildren(node); 346 visitChildren(node);
348 declareVariable(node); 347 declareVariable(node);
349 } 348 }
350 349
351 visitVariableGet(VariableGet node) { 350 visitVariableGet(VariableGet node) {
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 var oldParent = parent; 601 var oldParent = parent;
603 parent = node; 602 parent = node;
604 node.visitChildren(this); 603 node.visitChildren(this);
605 parent = oldParent; 604 parent = oldParent;
606 } 605 }
607 } 606 }
608 607
609 void checkInitializers(Constructor constructor) { 608 void checkInitializers(Constructor constructor) {
610 // TODO(ahe): I'll add more here in other CLs. 609 // TODO(ahe): I'll add more here in other CLs.
611 } 610 }
OLDNEW
« no previous file with comments | « pkg/kernel/lib/binary/ast_to_binary.dart ('k') | runtime/vm/kernel_binary_flowgraph.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698