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

Side by Side Diff: pkg/compiler/lib/src/common_elements.dart

Issue 2858463002: js_runtime: Split _asyncHelper into separate functions (Closed)
Patch Set: remove debug comment Created 3 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 unified diff | Download patch
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 4
5 // TODO(sigmund): rename and move to common/elements.dart 5 // TODO(sigmund): rename and move to common/elements.dart
6 library dart2js.type_system; 6 library dart2js.type_system;
7 7
8 import 'common/names.dart' show Identifiers, Uris; 8 import 'common/names.dart' show Identifiers, Uris;
9 import 'js_backend/constant_system_javascript.dart'; 9 import 'js_backend/constant_system_javascript.dart';
10 import 'elements/types.dart'; 10 import 'elements/types.dart';
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 classElement == jsNullClass; 494 classElement == jsNullClass;
495 } 495 }
496 496
497 // From dart:async 497 // From dart:async
498 ClassEntity _findAsyncHelperClass(String name) => 498 ClassEntity _findAsyncHelperClass(String name) =>
499 _findClass(asyncLibrary, name); 499 _findClass(asyncLibrary, name);
500 500
501 FunctionEntity _findAsyncHelperFunction(String name) => 501 FunctionEntity _findAsyncHelperFunction(String name) =>
502 _findLibraryMember(asyncLibrary, name); 502 _findLibraryMember(asyncLibrary, name);
503 503
504 FunctionEntity get asyncHelper => _findAsyncHelperFunction("_asyncHelper"); 504 FunctionEntity get asyncHelperStart =>
505 _findAsyncHelperFunction("_asyncStart");
506 FunctionEntity get asyncHelperAwait =>
507 _findAsyncHelperFunction("_asyncAwait");
508 FunctionEntity get asyncHelperReturn =>
509 _findAsyncHelperFunction("_asyncReturn");
510 FunctionEntity get asyncHelperRethrow =>
511 _findAsyncHelperFunction("_asyncRethrow");
505 512
506 FunctionEntity get wrapBody => 513 FunctionEntity get wrapBody =>
507 _findAsyncHelperFunction("_wrapJsFunctionForAsync"); 514 _findAsyncHelperFunction("_wrapJsFunctionForAsync");
508 515
509 FunctionEntity get yieldStar => _env.lookupClassMember( 516 FunctionEntity get yieldStar => _env.lookupClassMember(
510 _findAsyncHelperClass("_IterationMarker"), "yieldStar"); 517 _findAsyncHelperClass("_IterationMarker"), "yieldStar");
511 518
512 FunctionEntity get yieldSingle => _env.lookupClassMember( 519 FunctionEntity get yieldSingle => _env.lookupClassMember(
513 _findAsyncHelperClass("_IterationMarker"), "yieldSingle"); 520 _findAsyncHelperClass("_IterationMarker"), "yieldSingle");
514 521
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
1238 DartType getUnaliasedType(DartType type); 1245 DartType getUnaliasedType(DartType type);
1239 1246
1240 /// Returns the [CallStructure] corresponding to calling [entity] with all 1247 /// Returns the [CallStructure] corresponding to calling [entity] with all
1241 /// arguments, both required and optional. 1248 /// arguments, both required and optional.
1242 CallStructure getCallStructure(FunctionEntity entity); 1249 CallStructure getCallStructure(FunctionEntity entity);
1243 1250
1244 /// Returns `true` if [member] a the synthetic getter `loadLibrary` injected 1251 /// Returns `true` if [member] a the synthetic getter `loadLibrary` injected
1245 /// on deferred libraries. 1252 /// on deferred libraries.
1246 bool isDeferredLoadLibraryGetter(MemberEntity member); 1253 bool isDeferredLoadLibraryGetter(MemberEntity member);
1247 } 1254 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js/rewrite_async.dart » ('j') | pkg/compiler/lib/src/js/rewrite_async.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698