OLD | NEW |
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 CALL_PREFIX2, | 80 CALL_PREFIX2, |
81 CALL_PREFIX3, | 81 CALL_PREFIX3, |
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 |
| 91 enum JsBuiltin { |
| 92 /// Returns the JavaScript constructor function for Dart's Object class. |
| 93 /// This can be used for type tests, as in |
| 94 /// |
| 95 /// var constructor = JS_BUILTIN('', JsBuiltin.dartObjectContructor); |
| 96 /// if (JS('bool', '# instanceof #', obj, constructor)) |
| 97 /// ... |
| 98 dartObjectConstructor, |
| 99 |
| 100 /// Returns true if the given type is a function type. Returns false for |
| 101 /// the one `Function` type singleton. (See [isFunctionTypeSingleton]). |
| 102 /// |
| 103 /// JS_BUILTIN('bool', JsBuiltin.isFunctionType, o) |
| 104 isFunctionType, |
| 105 |
| 106 /// Returns true if the given type is the `Function` type literal. |
| 107 /// |
| 108 /// JS_BUILTIN('returns:bool;effects:none;depends:none', |
| 109 /// JsBuiltin.isFunctionTypeLiteral, type); |
| 110 isFunctionTypeLiteral, |
| 111 |
| 112 /// Returns a new function type object. |
| 113 /// |
| 114 /// JS_BUILTIN('=Object', JsBuiltin.createFunctionType) |
| 115 createFunctionType, |
| 116 |
| 117 /// Returns the class name of the given type. |
| 118 /// |
| 119 /// JS_BUILTIN('String', JsBuiltin.typeName, type) |
| 120 typeName, |
| 121 |
| 122 /// Returns the raw runtime type of the given object. The given argument |
| 123 /// [o] should be the interceptor (for non-Dart objects). |
| 124 /// |
| 125 /// JS_BUILTIN('', JsBuiltin.rawRuntimeType, o) |
| 126 rawRuntimeType, |
| 127 } |
OLD | NEW |