Index: sdk/lib/_internal/compiler/js_lib/foreign_helper.dart |
diff --git a/sdk/lib/_internal/compiler/js_lib/foreign_helper.dart b/sdk/lib/_internal/compiler/js_lib/foreign_helper.dart |
index 6b587934b4d35a82ba1afefa0d0c7eac130e476d..8d83d5ce764fbac35303546c1a8c6c8606b0007b 100644 |
--- a/sdk/lib/_internal/compiler/js_lib/foreign_helper.dart |
+++ b/sdk/lib/_internal/compiler/js_lib/foreign_helper.dart |
@@ -4,7 +4,7 @@ |
library _foreign_helper; |
-import 'dart:_js_embedded_names' show JsGetName, JsBuiltin; |
+import 'dart:_js_embedded_names' show JsGetName; |
/** |
* Emits a JavaScript code fragment parameterized by arguments. |
@@ -190,6 +190,15 @@ RAW_DART_FUNCTION_REF(Function function) {} |
void JS_SET_CURRENT_ISOLATE(isolate) {} |
/** |
+ * Returns the JavaScript constructor function for Dart's Object class. |
+ * This can be used for type tests, as in |
+ * |
+ * if (JS('bool', '# instanceof #', obj, JS_DART_OBJECT_CONSTRUCTOR())) |
+ * ... |
+ */ |
+JS_DART_OBJECT_CONSTRUCTOR() {} |
+ |
+/** |
* Returns the interceptor for class [type]. The interceptor is the type's |
* constructor's `prototype` property. [type] will typically be the class, not |
* an interface, e.g. `JS_INTERCEPTOR_CONSTANT(JSInt)`, not |
@@ -213,6 +222,9 @@ String JS_OBJECT_CLASS_NAME() {} |
/// Returns the name of the class `Null` in the generated code. |
String JS_NULL_CLASS_NAME() {} |
+/// Returns the name of the class `Function` in the generated code. |
+String JS_FUNCTION_CLASS_NAME() {} |
+ |
/** |
* Returns the field name used for determining if an object or its |
* interceptor has JavaScript indexing behavior. |
@@ -230,6 +242,9 @@ String JS_SIGNATURE_NAME() {} |
/// Returns the name used to tag typedefs. |
String JS_TYPEDEF_TAG() {} |
+/// Returns the name used to tag function type representations in JavaScript. |
+String JS_FUNCTION_TYPE_TAG() {} |
+ |
/** |
* Returns the name used to tag void return in function type representations |
* in JavaScript. |
@@ -268,16 +283,6 @@ String JS_GET_NAME(JsGetName name) {} |
/// The [name] should be a constant defined in the `_embedded_names` library. |
JS_EMBEDDED_GLOBAL(String typeDescription, String name) {} |
-/// Instructs the compiler to execute the [builtinName] action at the call-site. |
-/// |
-/// The [builtin] should be a constant defined in the `_embedded_names` |
-/// library. |
-// Add additional optional arguments if needed. The method is treated internally |
-// as a variable argument method. |
-JS_BUILTIN(String typeDescription, JsBuiltin builtin, |
- [arg0, arg1, arg2, arg3, arg4, arg5, arg6, |
- arg7, arg8, arg9, arg10, arg11]) {} |
- |
/// Returns the state of a flag that is determined by the state of the compiler |
/// when the program has been analyzed. |
bool JS_GET_FLAG(String name) {} |