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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/_internal/compiler/js_lib/js_rti.dart ('k') | no next file » | 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 /// Contains the names of globals that are embedded into the output by the 5 /// Contains the names of globals that are embedded into the output by the
6 /// compiler. 6 /// compiler.
7 /// 7 ///
8 /// Variables embedded this way should be access with `JS_EMBEDDED_GLOBAL` from 8 /// Variables embedded this way should be access with `JS_EMBEDDED_GLOBAL` from
9 /// the `_foreign_helper` library. 9 /// the `_foreign_helper` library.
10 /// 10 ///
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 CALL_CATCH_ALL, 82 CALL_CATCH_ALL,
83 REFLECTABLE, 83 REFLECTABLE,
84 CLASS_DESCRIPTOR_PROPERTY, 84 CLASS_DESCRIPTOR_PROPERTY,
85 REQUIRED_PARAMETER_PROPERTY, 85 REQUIRED_PARAMETER_PROPERTY,
86 DEFAULT_VALUES_PROPERTY, 86 DEFAULT_VALUES_PROPERTY,
87 CALL_NAME_PROPERTY, 87 CALL_NAME_PROPERTY,
88 DEFERRED_ACTION_PROPERTY 88 DEFERRED_ACTION_PROPERTY
89 } 89 }
90 90
91 enum JsBuiltin { 91 enum JsBuiltin {
92 /// Returns the JavaScript constructor function for Dart's Object class. 92 /// Returns the JavaScript constructor function for Dart's Object class.
93 /// This can be used for type tests, as in 93 /// This can be used for type tests, as in
94 /// 94 ///
95 /// var constructor = JS_BUILTIN('', JsBuiltin.dartObjectContructor); 95 /// var constructor = JS_BUILTIN('', JsBuiltin.dartObjectContructor);
96 /// if (JS('bool', '# instanceof #', obj, constructor)) 96 /// if (JS('bool', '# instanceof #', obj, constructor))
97 /// ... 97 /// ...
98 dartObjectConstructor, 98 dartObjectConstructor,
99 99
100 /// Returns the class name given an [isCheckProperty].
101 ///
102 /// This relies on a deterministic encoding of is-check properties (for
103 /// example `$isFoo` for a class `Foo`). In minified code the returned
104 /// classname is the minified name of the class.
105 ///
106 /// JS_BUILTIN('returns:String;depends:none;effects:none',
107 /// JsBuiltin.classNameFromIsCheckProperty,
108 /// isCheckProperty);
109 classNameFromIsCheckProperty,
110
100 /// Returns true if the given type is a function type. Returns false for 111 /// Returns true if the given type is a function type. Returns false for
101 /// the one `Function` type singleton. (See [isFunctionTypeSingleton]). 112 /// the one `Function` type singleton. (See [isFunctionTypeSingleton]).
102 /// 113 ///
103 /// JS_BUILTIN('bool', JsBuiltin.isFunctionType, o) 114 /// JS_BUILTIN('bool', JsBuiltin.isFunctionType, o)
104 isFunctionType, 115 isFunctionType,
105 116
106 /// Returns true if the given type is the `Function` type literal. 117 /// Returns true if the given type is the `Function` type literal.
107 /// 118 ///
108 /// JS_BUILTIN('returns:bool;effects:none;depends:none', 119 /// JS_BUILTIN('returns:bool;effects:none;depends:none',
109 /// JsBuiltin.isFunctionTypeLiteral, type); 120 /// JsBuiltin.isFunctionTypeLiteral, type);
110 isFunctionTypeLiteral, 121 isFunctionTypeLiteral,
111 122
112 /// Returns a new function type object. 123 /// Returns a new function type object.
113 /// 124 ///
114 /// JS_BUILTIN('=Object', JsBuiltin.createFunctionType) 125 /// JS_BUILTIN('=Object', JsBuiltin.createFunctionType)
115 createFunctionType, 126 createFunctionType,
116 127
117 /// Returns the class name of the given type. 128 /// Returns the class name of the given type.
118 /// 129 ///
119 /// JS_BUILTIN('String', JsBuiltin.typeName, type) 130 /// JS_BUILTIN('String', JsBuiltin.typeName, type)
120 typeName, 131 typeName,
121 132
122 /// Returns the raw runtime type of the given object. The given argument 133 /// Returns the raw runtime type of the given object. The given argument
123 /// [o] should be the interceptor (for non-Dart objects). 134 /// [o] should be the interceptor (for non-Dart objects).
124 /// 135 ///
125 /// JS_BUILTIN('', JsBuiltin.rawRuntimeType, o) 136 /// JS_BUILTIN('', JsBuiltin.rawRuntimeType, o)
126 rawRuntimeType, 137 rawRuntimeType,
127 } 138 }
OLDNEW
« 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