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

Unified Diff: sdk/lib/_internal/compiler/js_lib/shared/embedded_names.dart

Issue 1106613006: dart2js: add classNameFromIsCheckProperty to compiler builtins. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reformat. Created 5 years, 8 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 | « sdk/lib/_internal/compiler/js_lib/js_rti.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/js_lib/shared/embedded_names.dart
diff --git a/sdk/lib/_internal/compiler/js_lib/shared/embedded_names.dart b/sdk/lib/_internal/compiler/js_lib/shared/embedded_names.dart
index 89768733d665fc4eea654dada17e79dbe33fbd93..7287cf70515594b960b531e87ffcca5b2bf3fea9 100644
--- a/sdk/lib/_internal/compiler/js_lib/shared/embedded_names.dart
+++ b/sdk/lib/_internal/compiler/js_lib/shared/embedded_names.dart
@@ -89,14 +89,25 @@ enum JsGetName {
}
enum JsBuiltin {
- /// Returns the JavaScript constructor function for Dart's Object class.
- /// This can be used for type tests, as in
- ///
- /// var constructor = JS_BUILTIN('', JsBuiltin.dartObjectContructor);
- /// if (JS('bool', '# instanceof #', obj, constructor))
- /// ...
+ /// Returns the JavaScript constructor function for Dart's Object class.
+ /// This can be used for type tests, as in
+ ///
+ /// var constructor = JS_BUILTIN('', JsBuiltin.dartObjectContructor);
+ /// if (JS('bool', '# instanceof #', obj, constructor))
+ /// ...
dartObjectConstructor,
+ /// Returns the class name given an [isCheckProperty].
+ ///
+ /// This relies on a deterministic encoding of is-check properties (for
+ /// example `$isFoo` for a class `Foo`). In minified code the returned
+ /// classname is the minified name of the class.
+ ///
+ /// JS_BUILTIN('returns:String;depends:none;effects:none',
+ /// JsBuiltin.classNameFromIsCheckProperty,
+ /// isCheckProperty);
+ classNameFromIsCheckProperty,
+
/// Returns true if the given type is a function type. Returns false for
/// the one `Function` type singleton. (See [isFunctionTypeSingleton]).
///
« no previous file with comments | « sdk/lib/_internal/compiler/js_lib/js_rti.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698