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

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

Issue 1136913006: dart2js: remove JS_OBJECT_CLASS_NAME and JS_NULL_CLASS_NAME from foreign (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove empty lines. Created 5 years, 7 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
Index: sdk/lib/_internal/compiler/js_lib/js_helper.dart
diff --git a/sdk/lib/_internal/compiler/js_lib/js_helper.dart b/sdk/lib/_internal/compiler/js_lib/js_helper.dart
index 448bfe6f87dad7ac0cf9fe7416d5eea2904cbb94..ff4701d2c9f0b0c1f6dedb3bd025be792e15c13a 100644
--- a/sdk/lib/_internal/compiler/js_lib/js_helper.dart
+++ b/sdk/lib/_internal/compiler/js_lib/js_helper.dart
@@ -57,8 +57,6 @@ import 'dart:_foreign_helper' show
JS_GET_NAME,
JS_HAS_EQUALS,
JS_IS_INDEXABLE_FIELD_NAME,
- JS_NULL_CLASS_NAME,
- JS_OBJECT_CLASS_NAME,
JS_OPERATOR_AS_PREFIX,
JS_SIGNATURE_NAME,
JS_STRING_CONCAT,
@@ -115,14 +113,6 @@ createDartFunctionType() {
JsBuiltin.createFunctionType);
}
-/// Returns true if the given [type] is _the_ `Function` type.
-// TODO(floitsch): move this to foreign_helper.dart or similar.
-@ForceInline()
-bool isDartFunctionTypeLiteral(Object type) {
- return JS_BUILTIN('returns:bool;effects:none;depends:none',
- JsBuiltin.isFunctionTypeLiteral, type);
-}
-
/// Retrieves the class name from type information stored on the constructor of
/// [type].
// TODO(floitsch): move this to foreign_helper.dart or similar.
@@ -147,11 +137,36 @@ Object getRawRuntimeType(Object o) {
///
/// The argument [other] is the name of the other type, as computed by
/// [runtimeTypeToString].
+@ForceInline()
bool builtinIsSubtype(type, String other) {
return JS_BUILTIN('returns:bool;effects:none;depends:none',
JsBuiltin.isSubtype, other, type);
}
+/// Returns true if the given [type] is _the_ `Function` type.
+// TODO(floitsch): move this to foreign_helper.dart or similar.
+@ForceInline()
+bool isDartFunctionTypeRti(Object type) {
+ return JS_BUILTIN('returns:bool;effects:none;depends:none',
+ JsBuiltin.isFunctionTypeRti, type);
+}
+
+/// Returns whether the given type is _the_ Dart Object type.
+// TODO(floitsch): move this to foreign_helper.dart or similar.
+@ForceInline()
+bool isDartObjectTypeRti(type) {
+ return JS_BUILTIN('returns:bool;effects:none;depends:none',
+ JsBuiltin.isDartObjectTypeRti, type);
+}
+
+/// Returns whether the given type is _the_ null type.
+// TODO(floitsch): move this to foreign_helper.dart or similar.
+@ForceInline()
+bool isNullTypeRti(type) {
+ return JS_BUILTIN('returns:bool;effects:none;depends:none',
+ JsBuiltin.isNullTypeRti, type);
+}
+
/// Returns the metadata of the given [index].
@ForceInline()
getMetadata(int index) {
« no previous file with comments | « sdk/lib/_internal/compiler/js_lib/foreign_helper.dart ('k') | sdk/lib/_internal/compiler/js_lib/js_rti.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698