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

Unified Diff: sdk/lib/_internal/compiler/js_lib/foreign_helper.dart

Issue 954253002: dart2js: add compiler builtins to the core-runtime. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix bad return type. (Also removes duplicate getInterceptor call). 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 | « pkg/js_ast/lib/src/builder.dart ('k') | sdk/lib/_internal/compiler/js_lib/js_helper.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8d83d5ce764fbac35303546c1a8c6c8606b0007b..6b587934b4d35a82ba1afefa0d0c7eac130e476d 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;
+import 'dart:_js_embedded_names' show JsGetName, JsBuiltin;
/**
* Emits a JavaScript code fragment parameterized by arguments.
@@ -190,15 +190,6 @@ 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
@@ -222,9 +213,6 @@ 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.
@@ -242,9 +230,6 @@ 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.
@@ -283,6 +268,16 @@ 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) {}
« no previous file with comments | « pkg/js_ast/lib/src/builder.dart ('k') | sdk/lib/_internal/compiler/js_lib/js_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698