| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |