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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart

Issue 1077093002: Revert "Model 'await for' as an explicit node in tree and fix its handling." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 library dart2js.ir_builder_task; 5 library dart2js.ir_builder_task;
6 6
7 import '../closure.dart' as closurelib; 7 import '../closure.dart' as closurelib;
8 import '../closure.dart' hide ClosureScope; 8 import '../closure.dart' hide ClosureScope;
9 import '../constants/expressions.dart'; 9 import '../constants/expressions.dart';
10 import '../dart_types.dart'; 10 import '../dart_types.dart';
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 } 411 }
412 412
413 visitWhile(ast.While node) { 413 visitWhile(ast.While node) {
414 irBuilder.buildWhile( 414 irBuilder.buildWhile(
415 buildCondition: subbuild(node.condition), 415 buildCondition: subbuild(node.condition),
416 buildBody: subbuild(node.body), 416 buildBody: subbuild(node.body),
417 target: elements.getTargetDefinition(node), 417 target: elements.getTargetDefinition(node),
418 closureScope: getClosureScopeForNode(node)); 418 closureScope: getClosureScopeForNode(node));
419 } 419 }
420 420
421 visitAsyncForIn(ast.AsyncForIn node) { 421 visitForIn(ast.ForIn node) {
422 // await for is not yet implemented.
423 return giveup(node, 'await for');
424 }
425
426 visitSyncForIn(ast.SyncForIn node) {
427 // [node.declaredIdentifier] can be either an [ast.VariableDefinitions] 422 // [node.declaredIdentifier] can be either an [ast.VariableDefinitions]
428 // (defining a new local variable) or a send designating some existing 423 // (defining a new local variable) or a send designating some existing
429 // variable. 424 // variable.
430 ast.Node identifier = node.declaredIdentifier; 425 ast.Node identifier = node.declaredIdentifier;
431 ast.VariableDefinitions variableDeclaration = 426 ast.VariableDefinitions variableDeclaration =
432 identifier.asVariableDefinitions(); 427 identifier.asVariableDefinitions();
433 Element variableElement = elements.getForInVariable(node); 428 Element variableElement = elements.getForInVariable(node);
434 Selector selector = elements.getSelector(identifier); 429 Selector selector = elements.getSelector(identifier);
435 430
436 irBuilder.buildForIn( 431 irBuilder.buildForIn(
(...skipping 2297 matching lines...) Expand 10 before | Expand all | Expand 10 after
2734 SourceInformation buildCall(ast.Node node) { 2729 SourceInformation buildCall(ast.Node node) {
2735 return new PositionSourceInformation( 2730 return new PositionSourceInformation(
2736 new TokenSourceLocation(sourceFile, node.getBeginToken(), name)); 2731 new TokenSourceLocation(sourceFile, node.getBeginToken(), name));
2737 } 2732 }
2738 2733
2739 @override 2734 @override
2740 SourceInformationBuilder forContext(AstElement element) { 2735 SourceInformationBuilder forContext(AstElement element) {
2741 return new PositionSourceInformationBuilder(element); 2736 return new PositionSourceInformationBuilder(element);
2742 } 2737 }
2743 } 2738 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/dart_backend/backend_ast_to_frontend_ast.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698