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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_model/elements.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/common_elements.dart
diff --git a/pkg/compiler/lib/src/common_elements.dart b/pkg/compiler/lib/src/common_elements.dart
index 760f5d16c2dc7a90abdfcf26d468bf97fe1a9512..1afef190d15917ce852c06f2f934b51050542c36 100644
--- a/pkg/compiler/lib/src/common_elements.dart
+++ b/pkg/compiler/lib/src/common_elements.dart
@@ -942,15 +942,32 @@ class CommonElements {
FunctionEntity get throwConcurrentModificationError =>
_findHelperFunction('throwConcurrentModificationError');
- FunctionEntity _checkInt;
- FunctionEntity get checkInt => _checkInt ??= _findHelperFunction('checkInt');
+ /// Return `true` if [member] is the 'checkInt' function defined in
+ /// dart:_js_helpers.
+ bool isCheckInt(MemberEntity member) {
+ return member.isFunction &&
+ member.isTopLevel &&
+ member.library == jsHelperLibrary &&
+ member.name == 'checkInt';
+ }
- FunctionEntity _checkNum;
- FunctionEntity get checkNum => _checkNum ??= _findHelperFunction('checkNum');
+ /// Return `true` if [member] is the 'checkNum' function defined in
+ /// dart:_js_helpers.
+ bool isCheckNum(MemberEntity member) {
+ return member.isFunction &&
+ member.isTopLevel &&
+ member.library == jsHelperLibrary &&
+ member.name == 'checkNum';
+ }
- FunctionEntity _checkString;
- FunctionEntity get checkString =>
- _checkString ??= _findHelperFunction('checkString');
+ /// Return `true` if [member] is the 'checkString' function defined in
+ /// dart:_js_helpers.
+ bool isCheckString(MemberEntity member) {
+ return member.isFunction &&
+ member.isTopLevel &&
+ member.library == jsHelperLibrary &&
+ member.name == 'checkString';
+ }
FunctionEntity get stringInterpolationHelper => _findHelperFunction('S');
« 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