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

Side by Side Diff: pkg/compiler/lib/src/ssa/loop_handler.dart

Issue 2682823002: Fix the loops break label test with Kernel. (Closed)
Patch Set: . Created 3 years, 10 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 | tests/compiler/dart2js/kernel/loops_test.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 import 'package:kernel/ast.dart' as ir; 5 import 'package:kernel/ast.dart' as ir;
6 6
7 import '../elements/elements.dart' show JumpTarget, LabelDefinition; 7 import '../elements/elements.dart' show JumpTarget, LabelDefinition;
8 import '../io/source_information.dart'; 8 import '../io/source_information.dart';
9 import '../tree/tree.dart' as ast; 9 import '../tree/tree.dart' as ast;
10 10
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 361
362 @override 362 @override
363 JumpHandler createJumpHandler(ir.TreeNode node, {bool isLoopJump}) => 363 JumpHandler createJumpHandler(ir.TreeNode node, {bool isLoopJump}) =>
364 builder.createJumpHandler(node, isLoopJump: isLoopJump); 364 builder.createJumpHandler(node, isLoopJump: isLoopJump);
365 365
366 @override 366 @override
367 ast.Node getNode(ir.TreeNode node) => astAdapter.getNode(node); 367 ast.Node getNode(ir.TreeNode node) => astAdapter.getNode(node);
368 368
369 @override 369 @override
370 JumpTarget getTargetDefinition(ir.TreeNode node) => 370 JumpTarget getTargetDefinition(ir.TreeNode node) =>
371 astAdapter.getJumpTarget(node.parent); 371 astAdapter.getJumpTarget(node);
372 372
373 @override 373 @override
374 int loopKind(ir.TreeNode node) => node.accept(new _KernelLoopTypeVisitor()); 374 int loopKind(ir.TreeNode node) => node.accept(new _KernelLoopTypeVisitor());
375 375
376 // TODO(het): return the actual source information 376 // TODO(het): return the actual source information
377 @override 377 @override
378 SourceInformation loopSourceInformation(ir.TreeNode node) => null; 378 SourceInformation loopSourceInformation(ir.TreeNode node) => null;
379 } 379 }
380 380
381 class _KernelLoopTypeVisitor extends ir.Visitor<int> { 381 class _KernelLoopTypeVisitor extends ir.Visitor<int> {
(...skipping 12 matching lines...) Expand all
394 HLoopBlockInformation.DO_WHILE_LOOP; 394 HLoopBlockInformation.DO_WHILE_LOOP;
395 395
396 @override 396 @override
397 int visitForInStatement(ir.ForInStatement node) => 397 int visitForInStatement(ir.ForInStatement node) =>
398 HLoopBlockInformation.FOR_IN_LOOP; 398 HLoopBlockInformation.FOR_IN_LOOP;
399 399
400 @override 400 @override
401 int visitSwitchStatement(ir.SwitchStatement node) => 401 int visitSwitchStatement(ir.SwitchStatement node) =>
402 HLoopBlockInformation.SWITCH_CONTINUE_LOOP; 402 HLoopBlockInformation.SWITCH_CONTINUE_LOOP;
403 } 403 }
OLDNEW
« no previous file with comments | « no previous file | tests/compiler/dart2js/kernel/loops_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698