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

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

Issue 2969013002: Support creating elements from IR nodes in JsKernelToElementMap (Closed)
Patch Set: Updated cf. comments Created 3 years, 5 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_model/elements.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/entities.dart'; 10 import 'elements/entities.dart';
(...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 _findHelperFunction('throwAbstractClassInstantiationError'); 935 _findHelperFunction('throwAbstractClassInstantiationError');
936 936
937 FunctionEntity _cachedCheckConcurrentModificationError; 937 FunctionEntity _cachedCheckConcurrentModificationError;
938 FunctionEntity get checkConcurrentModificationError => 938 FunctionEntity get checkConcurrentModificationError =>
939 _cachedCheckConcurrentModificationError ??= 939 _cachedCheckConcurrentModificationError ??=
940 _findHelperFunction('checkConcurrentModificationError'); 940 _findHelperFunction('checkConcurrentModificationError');
941 941
942 FunctionEntity get throwConcurrentModificationError => 942 FunctionEntity get throwConcurrentModificationError =>
943 _findHelperFunction('throwConcurrentModificationError'); 943 _findHelperFunction('throwConcurrentModificationError');
944 944
945 FunctionEntity _checkInt; 945 /// Return `true` if [member] is the 'checkInt' function defined in
946 FunctionEntity get checkInt => _checkInt ??= _findHelperFunction('checkInt'); 946 /// dart:_js_helpers.
947 bool isCheckInt(MemberEntity member) {
948 return member.isFunction &&
949 member.isTopLevel &&
950 member.library == jsHelperLibrary &&
951 member.name == 'checkInt';
952 }
947 953
948 FunctionEntity _checkNum; 954 /// Return `true` if [member] is the 'checkNum' function defined in
949 FunctionEntity get checkNum => _checkNum ??= _findHelperFunction('checkNum'); 955 /// dart:_js_helpers.
956 bool isCheckNum(MemberEntity member) {
957 return member.isFunction &&
958 member.isTopLevel &&
959 member.library == jsHelperLibrary &&
960 member.name == 'checkNum';
961 }
950 962
951 FunctionEntity _checkString; 963 /// Return `true` if [member] is the 'checkString' function defined in
952 FunctionEntity get checkString => 964 /// dart:_js_helpers.
953 _checkString ??= _findHelperFunction('checkString'); 965 bool isCheckString(MemberEntity member) {
966 return member.isFunction &&
967 member.isTopLevel &&
968 member.library == jsHelperLibrary &&
969 member.name == 'checkString';
970 }
954 971
955 FunctionEntity get stringInterpolationHelper => _findHelperFunction('S'); 972 FunctionEntity get stringInterpolationHelper => _findHelperFunction('S');
956 973
957 FunctionEntity get wrapExceptionHelper => 974 FunctionEntity get wrapExceptionHelper =>
958 _findHelperFunction('wrapException'); 975 _findHelperFunction('wrapException');
959 976
960 FunctionEntity get throwExpressionHelper => 977 FunctionEntity get throwExpressionHelper =>
961 _findHelperFunction('throwExpression'); 978 _findHelperFunction('throwExpression');
962 979
963 FunctionEntity get closureConverter => 980 FunctionEntity get closureConverter =>
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
1293 // TODO(johnniwinther): Remove this when the resolver is removed. 1310 // TODO(johnniwinther): Remove this when the resolver is removed.
1294 DartType getUnaliasedType(DartType type); 1311 DartType getUnaliasedType(DartType type);
1295 1312
1296 /// Returns `true` if [member] a the synthetic getter `loadLibrary` injected 1313 /// Returns `true` if [member] a the synthetic getter `loadLibrary` injected
1297 /// on deferred libraries. 1314 /// on deferred libraries.
1298 bool isDeferredLoadLibraryGetter(MemberEntity member); 1315 bool isDeferredLoadLibraryGetter(MemberEntity member);
1299 1316
1300 /// Returns the metadata constants declared on [member]. 1317 /// Returns the metadata constants declared on [member].
1301 Iterable<ConstantValue> getMemberMetadata(MemberEntity member); 1318 Iterable<ConstantValue> getMemberMetadata(MemberEntity member);
1302 } 1319 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_model/elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698