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

Side by Side Diff: frog/leg/resolver.dart

Issue 9421035: Support break and labeled statements. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. Update expectations. Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | frog/leg/ssa/bailout.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) 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 interface TreeElements { 5 interface TreeElements {
6 Element operator[](Node node); 6 Element operator[](Node node);
7 Selector getSelector(Send send); 7 Selector getSelector(Send send);
8 } 8 }
9 9
10 class TreeElementMapping implements TreeElements { 10 class TreeElementMapping implements TreeElements {
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 671
672 visitBlock(Block node) { 672 visitBlock(Block node) {
673 visitIn(node.statements, new BlockScope(context)); 673 visitIn(node.statements, new BlockScope(context));
674 } 674 }
675 675
676 visitDoWhile(DoWhile node) { 676 visitDoWhile(DoWhile node) {
677 visitLoopBodyIn(node, node.body, new BlockScope(context)); 677 visitLoopBodyIn(node, node.body, new BlockScope(context));
678 visit(node.condition); 678 visit(node.condition);
679 } 679 }
680 680
681 visitEmptyStatement(EmptyStatement node) { }
682
681 visitExpressionStatement(ExpressionStatement node) { 683 visitExpressionStatement(ExpressionStatement node) {
682 visit(node.expression); 684 visit(node.expression);
683 } 685 }
684 686
685 visitFor(For node) { 687 visitFor(For node) {
686 Scope scope = new BlockScope(context); 688 Scope scope = new BlockScope(context);
687 visitIn(node.initializer, scope); 689 visitIn(node.initializer, scope);
688 visitIn(node.condition, scope); 690 visitIn(node.condition, scope);
689 visitIn(node.update, scope); 691 visitIn(node.update, scope);
690 visitLoopBodyIn(node, node.body, scope); 692 visitLoopBodyIn(node, node.body, scope);
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
1425 class TopScope extends Scope { 1427 class TopScope extends Scope {
1426 LibraryElement get library() => element; 1428 LibraryElement get library() => element;
1427 1429
1428 TopScope(LibraryElement library) : super(null, library); 1430 TopScope(LibraryElement library) : super(null, library);
1429 Element lookup(SourceString name) => library.find(name); 1431 Element lookup(SourceString name) => library.find(name);
1430 1432
1431 Element add(Element element) { 1433 Element add(Element element) {
1432 throw "Cannot add an element in the top scope"; 1434 throw "Cannot add an element in the top scope";
1433 } 1435 }
1434 } 1436 }
OLDNEW
« no previous file with comments | « no previous file | frog/leg/ssa/bailout.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698