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

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: 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') | frog/leg/ssa/nodes.dart » ('J')
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 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 601
602 visitBlock(Block node) { 602 visitBlock(Block node) {
603 visitIn(node.statements, new BlockScope(context)); 603 visitIn(node.statements, new BlockScope(context));
604 } 604 }
605 605
606 visitDoWhile(DoWhile node) { 606 visitDoWhile(DoWhile node) {
607 visitLoopBodyIn(node, node.body, new BlockScope(context)); 607 visitLoopBodyIn(node, node.body, new BlockScope(context));
608 visit(node.condition); 608 visit(node.condition);
609 } 609 }
610 610
611 visitEmptyStatement(EmptyStatement node) { }
612
611 visitExpressionStatement(ExpressionStatement node) { 613 visitExpressionStatement(ExpressionStatement node) {
612 visit(node.expression); 614 visit(node.expression);
613 } 615 }
614 616
615 visitFor(For node) { 617 visitFor(For node) {
616 Scope scope = new BlockScope(context); 618 Scope scope = new BlockScope(context);
617 visitIn(node.initializer, scope); 619 visitIn(node.initializer, scope);
618 visitIn(node.condition, scope); 620 visitIn(node.condition, scope);
619 visitIn(node.update, scope); 621 visitIn(node.update, scope);
620 visitLoopBodyIn(node, node.body, scope); 622 visitLoopBodyIn(node, node.body, scope);
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
1355 class TopScope extends Scope { 1357 class TopScope extends Scope {
1356 LibraryElement get library() => element; 1358 LibraryElement get library() => element;
1357 1359
1358 TopScope(LibraryElement library) : super(null, library); 1360 TopScope(LibraryElement library) : super(null, library);
1359 Element lookup(SourceString name) => library.find(name); 1361 Element lookup(SourceString name) => library.find(name);
1360 1362
1361 Element add(Element element) { 1363 Element add(Element element) {
1362 throw "Cannot add an element in the top scope"; 1364 throw "Cannot add an element in the top scope";
1363 } 1365 }
1364 } 1366 }
OLDNEW
« no previous file with comments | « no previous file | frog/leg/ssa/bailout.dart » ('j') | frog/leg/ssa/nodes.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698