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

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

Issue 1198293002: dart2js: Use an abstract Name class for names in the generated JavaScript ast. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix tests Created 5 years, 6 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 4270ab576d2e43084f28ac99258d89c433f6be9a..9ff6a6785b41d99bf6a97f928de2e15452eca1e1 100644
--- a/sdk/lib/_internal/compiler/js_lib/js_helper.dart
+++ b/sdk/lib/_internal/compiler/js_lib/js_helper.dart
@@ -147,7 +147,9 @@ bool builtinIsSubtype(type, String other) {
@ForceInline()
bool isDartFunctionTypeRti(Object type) {
return JS_BUILTIN('returns:bool;effects:none;depends:none',
- JsBuiltin.isFunctionTypeRti, type);
+ JsBuiltin.isGivenTypeRti,
+ type,
+ JS_GET_NAME(JsGetName.FUNCTION_CLASS_TYPE_NAME));
}
/// Returns whether the given type is _the_ Dart Object type.
@@ -155,7 +157,9 @@ bool isDartFunctionTypeRti(Object type) {
@ForceInline()
bool isDartObjectTypeRti(type) {
return JS_BUILTIN('returns:bool;effects:none;depends:none',
- JsBuiltin.isDartObjectTypeRti, type);
+ JsBuiltin.isGivenTypeRti,
+ type,
+ JS_GET_NAME(JsGetName.OBJECT_CLASS_TYPE_NAME));
}
/// Returns whether the given type is _the_ null type.
@@ -163,7 +167,9 @@ bool isDartObjectTypeRti(type) {
@ForceInline()
bool isNullTypeRti(type) {
return JS_BUILTIN('returns:bool;effects:none;depends:none',
- JsBuiltin.isNullTypeRti, type);
+ JsBuiltin.isGivenTypeRti,
+ type,
+ JS_GET_NAME(JsGetName.NULL_CLASS_TYPE_NAME));
}
/// Returns the metadata of the given [index].

Powered by Google App Engine
This is Rietveld 408576698