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

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

Issue 1349723002: dart2js cps: Set result of 'await' to dynamic instead of empty. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 | tests/language/language_dart2js.status » ('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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library dart2js.cps_ir.type_propagation; 4 library dart2js.cps_ir.type_propagation;
5 5
6 import 'optimizers.dart'; 6 import 'optimizers.dart';
7 7
8 import '../closure.dart' show 8 import '../closure.dart' show
9 ClosureClassElement, Identifiers; 9 ClosureClassElement, Identifiers;
10 import '../common/names.dart' show 10 import '../common/names.dart' show
(...skipping 2493 matching lines...) Expand 10 before | Expand all | Expand 10 after
2504 setValue(node, nonConstant(typeSystem.elementTypeOfIndexable(input.type))); 2504 setValue(node, nonConstant(typeSystem.elementTypeOfIndexable(input.type)));
2505 } 2505 }
2506 2506
2507 @override 2507 @override
2508 void visitSetIndex(SetIndex node) { 2508 void visitSetIndex(SetIndex node) {
2509 setValue(node, nonConstant()); 2509 setValue(node, nonConstant());
2510 } 2510 }
2511 2511
2512 @override 2512 @override
2513 void visitAwait(Await node) { 2513 void visitAwait(Await node) {
2514 Continuation continuation = node.continuation.definition; 2514 setResult(node, nonConstant());
2515 setReachable(continuation);
2516 } 2515 }
2517 2516
2518 @override 2517 @override
2519 void visitRefinement(Refinement node) { 2518 void visitRefinement(Refinement node) {
2520 AbstractValue value = getValue(node.value.definition); 2519 AbstractValue value = getValue(node.value.definition);
2521 if (value.isNothing || 2520 if (value.isNothing ||
2522 typeSystem.areDisjoint(value.type, node.refineType)) { 2521 typeSystem.areDisjoint(value.type, node.refineType)) {
2523 setValue(node, nothing); 2522 setValue(node, nothing);
2524 } else if (value.isConstant) { 2523 } else if (value.isConstant) {
2525 setValue(node, value); 2524 setValue(node, value);
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
2641 processLetPrim(LetPrim node) { 2640 processLetPrim(LetPrim node) {
2642 node.primitive.type = null; 2641 node.primitive.type = null;
2643 values[node.primitive] = null; 2642 values[node.primitive] = null;
2644 } 2643 }
2645 2644
2646 processLetMutable(LetMutable node) { 2645 processLetMutable(LetMutable node) {
2647 node.variable.type = null; 2646 node.variable.type = null;
2648 values[node.variable] = null; 2647 values[node.variable] = null;
2649 } 2648 }
2650 } 2649 }
OLDNEW
« no previous file with comments | « no previous file | tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698