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

Unified Diff: lib/src/compiler/code_generator.dart

Issue 1998843002: Flatten _Future at runtime as well (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/runtime/dart_sdk.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/compiler/code_generator.dart
diff --git a/lib/src/compiler/code_generator.dart b/lib/src/compiler/code_generator.dart
index 9071eeeb95ee8869b534b8bad7455d800b256e7b..19eb10c970763c2e28b3499610a5efd9c30bc9ff 100644
--- a/lib/src/compiler/code_generator.dart
+++ b/lib/src/compiler/code_generator.dart
@@ -825,7 +825,8 @@ class CodeGenerator extends GeneralizingAstVisitor
assert(formals.isNotEmpty);
var genericCall = js.call('dart.generic((#) => { #; return #; })',
[_emitTypeFormals(formals), body, element.name]);
- if (element.type.isDartAsyncFuture) {
+ if (element.library.isDartAsync &&
+ (element.name == "Future" || element.name == "_Future")) {
genericCall = js.call('dart.flattenFutures(#)', [genericCall]);
}
var genericDef = js.statement(
« no previous file with comments | « lib/runtime/dart_sdk.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698