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

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

Issue 1069983005: 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: fix failing assertion rebase 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 visitForIn(ast.ForIn node) { 421 visitAsyncForIn(ast.AsyncForIn node) {
422 // await for is not yet implemented.
423 return giveup(node, 'await for');
424 }
425
426 visitSyncForIn(ast.SyncForIn node) {
422 // [node.declaredIdentifier] can be either an [ast.VariableDefinitions] 427 // [node.declaredIdentifier] can be either an [ast.VariableDefinitions]
423 // (defining a new local variable) or a send designating some existing 428 // (defining a new local variable) or a send designating some existing
424 // variable. 429 // variable.
425 ast.Node identifier = node.declaredIdentifier; 430 ast.Node identifier = node.declaredIdentifier;
426 ast.VariableDefinitions variableDeclaration = 431 ast.VariableDefinitions variableDeclaration =
427 identifier.asVariableDefinitions(); 432 identifier.asVariableDefinitions();
428 Element variableElement = elements.getForInVariable(node); 433 Element variableElement = elements.getForInVariable(node);
429 Selector selector = elements.getSelector(identifier); 434 Selector selector = elements.getSelector(identifier);
430 435
431 irBuilder.buildForIn( 436 irBuilder.buildForIn(
(...skipping 2297 matching lines...) Expand 10 before | Expand all | Expand 10 after
2729 SourceInformation buildCall(ast.Node node) { 2734 SourceInformation buildCall(ast.Node node) {
2730 return new PositionSourceInformation( 2735 return new PositionSourceInformation(
2731 new TokenSourceLocation(sourceFile, node.getBeginToken(), name)); 2736 new TokenSourceLocation(sourceFile, node.getBeginToken(), name));
2732 } 2737 }
2733 2738
2734 @override 2739 @override
2735 SourceInformationBuilder forContext(AstElement element) { 2740 SourceInformationBuilder forContext(AstElement element) {
2736 return new PositionSourceInformationBuilder(element); 2741 return new PositionSourceInformationBuilder(element);
2737 } 2742 }
2738 } 2743 }
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