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

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

Issue 2858463002: js_runtime: Split _asyncHelper into separate functions (Closed)
Patch Set: update test 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js/rewrite_async.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) 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 'constants/values.dart'; 9 import 'constants/values.dart';
10 import 'elements/types.dart'; 10 import 'elements/types.dart';
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 classElement == jsNullClass; 500 classElement == jsNullClass;
501 } 501 }
502 502
503 // From dart:async 503 // From dart:async
504 ClassEntity _findAsyncHelperClass(String name) => 504 ClassEntity _findAsyncHelperClass(String name) =>
505 _findClass(asyncLibrary, name); 505 _findClass(asyncLibrary, name);
506 506
507 FunctionEntity _findAsyncHelperFunction(String name) => 507 FunctionEntity _findAsyncHelperFunction(String name) =>
508 _findLibraryMember(asyncLibrary, name); 508 _findLibraryMember(asyncLibrary, name);
509 509
510 FunctionEntity get asyncHelper => _findAsyncHelperFunction("_asyncHelper"); 510 FunctionEntity get asyncHelperStart =>
511 _findAsyncHelperFunction("_asyncStart");
512 FunctionEntity get asyncHelperAwait =>
513 _findAsyncHelperFunction("_asyncAwait");
514 FunctionEntity get asyncHelperReturn =>
515 _findAsyncHelperFunction("_asyncReturn");
516 FunctionEntity get asyncHelperRethrow =>
517 _findAsyncHelperFunction("_asyncRethrow");
511 518
512 FunctionEntity get wrapBody => 519 FunctionEntity get wrapBody =>
513 _findAsyncHelperFunction("_wrapJsFunctionForAsync"); 520 _findAsyncHelperFunction("_wrapJsFunctionForAsync");
514 521
515 FunctionEntity get yieldStar => _env.lookupClassMember( 522 FunctionEntity get yieldStar => _env.lookupClassMember(
516 _findAsyncHelperClass("_IterationMarker"), "yieldStar"); 523 _findAsyncHelperClass("_IterationMarker"), "yieldStar");
517 524
518 FunctionEntity get yieldSingle => _env.lookupClassMember( 525 FunctionEntity get yieldSingle => _env.lookupClassMember(
519 _findAsyncHelperClass("_IterationMarker"), "yieldSingle"); 526 _findAsyncHelperClass("_IterationMarker"), "yieldSingle");
520 527
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
1250 /// arguments, both required and optional. 1257 /// arguments, both required and optional.
1251 CallStructure getCallStructure(FunctionEntity entity); 1258 CallStructure getCallStructure(FunctionEntity entity);
1252 1259
1253 /// Returns `true` if [member] a the synthetic getter `loadLibrary` injected 1260 /// Returns `true` if [member] a the synthetic getter `loadLibrary` injected
1254 /// on deferred libraries. 1261 /// on deferred libraries.
1255 bool isDeferredLoadLibraryGetter(MemberEntity member); 1262 bool isDeferredLoadLibraryGetter(MemberEntity member);
1256 1263
1257 /// Returns the metadata constants declared on [member]. 1264 /// Returns the metadata constants declared on [member].
1258 Iterable<ConstantValue> getMemberMetadata(MemberEntity member); 1265 Iterable<ConstantValue> getMemberMetadata(MemberEntity member);
1259 } 1266 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js/rewrite_async.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698