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

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

Issue 1686973002: Dart2js CPS: Implement 'await for'. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Not all for-in local variables are declared in the for-in. Created 4 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.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) 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; 5 library dart2js.ir_builder;
6 6
7 import '../closure.dart' as closure; 7 import '../closure.dart' as closure;
8 import '../common.dart'; 8 import '../common.dart';
9 import '../common/names.dart' show 9 import '../common/names.dart' show
10 Names, 10 Names,
(...skipping 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after
1394 currentMask, 1394 currentMask,
1395 emptyArguments)); 1395 emptyArguments));
1396 // TODO(johnniwinther): Extract this as a provided strategy. 1396 // TODO(johnniwinther): Extract this as a provided strategy.
1397 if (Elements.isLocal(variableElement)) { 1397 if (Elements.isLocal(variableElement)) {
1398 bodyBuilder.buildLocalVariableSet(variableElement, currentValue); 1398 bodyBuilder.buildLocalVariableSet(variableElement, currentValue);
1399 } else if (Elements.isError(variableElement) || 1399 } else if (Elements.isError(variableElement) ||
1400 Elements.isMalformed(variableElement)) { 1400 Elements.isMalformed(variableElement)) {
1401 Selector selector = new Selector.setter( 1401 Selector selector = new Selector.setter(
1402 new Name(variableElement.name, variableElement.library)); 1402 new Name(variableElement.name, variableElement.library));
1403 List<ir.Primitive> value = <ir.Primitive>[currentValue]; 1403 List<ir.Primitive> value = <ir.Primitive>[currentValue];
1404 // Note the order of the comparisons below. It can be the case that an 1404 // Note the comparison below. It can be the case that an element isError
1405 // element isError and isMalformed. 1405 // and isMalformed.
1406 if (Elements.isError(variableElement)) { 1406 if (Elements.isError(variableElement)) {
1407 bodyBuilder.buildStaticNoSuchMethod(selector, value); 1407 bodyBuilder.buildStaticNoSuchMethod(selector, value);
1408 } else { 1408 } else {
1409 bodyBuilder.buildErroneousInvocation(variableElement, selector, value); 1409 bodyBuilder.buildErroneousInvocation(variableElement, selector, value);
1410 } 1410 }
1411 } else if (Elements.isStaticOrTopLevel(variableElement)) { 1411 } else if (Elements.isStaticOrTopLevel(variableElement)) {
1412 if (variableElement.isField) { 1412 if (variableElement.isField) {
1413 bodyBuilder.addPrimitive( 1413 bodyBuilder.addPrimitive(
1414 new ir.SetStatic(variableElement, currentValue)); 1414 new ir.SetStatic(variableElement, currentValue));
1415 } else { 1415 } else {
(...skipping 1427 matching lines...) Expand 10 before | Expand all | Expand 10 after
2843 this.stackTraceVariable, 2843 this.stackTraceVariable,
2844 this.buildCatchBlock}); 2844 this.buildCatchBlock});
2845 } 2845 }
2846 2846
2847 class SwitchCaseInfo { 2847 class SwitchCaseInfo {
2848 final SubbuildFunction buildCondition; 2848 final SubbuildFunction buildCondition;
2849 final SubbuildFunction buildBody; 2849 final SubbuildFunction buildBody;
2850 2850
2851 SwitchCaseInfo(this.buildCondition, this.buildBody); 2851 SwitchCaseInfo(this.buildCondition, this.buildBody);
2852 } 2852 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698