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

Unified Diff: sdk/lib/_internal/compiler/js_lib/js_mirrors.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: Move more foreigns to builtins. 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
Index: sdk/lib/_internal/compiler/js_lib/js_mirrors.dart
diff --git a/sdk/lib/_internal/compiler/js_lib/js_mirrors.dart b/sdk/lib/_internal/compiler/js_lib/js_mirrors.dart
index c69e159d9803716540224ef8862e6814bfdb8b75..ff7e9c509ae724e7ca4ffbb3bd9c019a2fa627b8 100644
--- a/sdk/lib/_internal/compiler/js_lib/js_mirrors.dart
+++ b/sdk/lib/_internal/compiler/js_lib/js_mirrors.dart
@@ -28,7 +28,6 @@ import 'dart:_foreign_helper' show
JS_EMBEDDED_GLOBAL,
JS_GET_NAME,
JS_TYPEDEF_TAG,
- JS_FUNCTION_TYPE_TAG,
JS_FUNCTION_TYPE_RETURN_TYPE_TAG,
JS_FUNCTION_TYPE_VOID_RETURN_TAG,
JS_FUNCTION_TYPE_REQUIRED_PARAMETERS_TAG,
@@ -57,6 +56,7 @@ import 'dart:_js_helper' show
getMetadata,
getType,
getRuntimeType,
+ isDartFunctionType,
runtimeTypeToString,
setRuntimeTypeInfo,
throwInvalidReflectionError,
@@ -2855,12 +2855,10 @@ TypeMirror typeMirrorFromRuntimeTypeRepresentation(
getMangledTypeName(createRuntimeType(representation)));
}
String typedefPropertyName = JS_TYPEDEF_TAG();
- String functionTagPropertyName = JS_FUNCTION_TYPE_TAG();
if (type != null && JS('', '#[#]', type, typedefPropertyName) != null) {
return typeMirrorFromRuntimeTypeRepresentation(
owner, JS('', '#[#]', type, typedefPropertyName));
- } else if (type != null &&
- JS('', '#[#]', type, functionTagPropertyName) != null) {
+ } else if (type != null && isDartFunctionType(type)) {
return new JsFunctionTypeMirror(type, owner);
}
return reflectClass(Function);

Powered by Google App Engine
This is Rietveld 408576698