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

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

Issue 869953002: dart2js: add type lookup in the new emitter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Indent Created 5 years, 11 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 4cce9fd08b3259ce6a3717ab69e7bb19face72a9..764edab355e4621491b893b99f678cc71bc3fa73 100644
--- a/sdk/lib/_internal/compiler/js_lib/js_helper.dart
+++ b/sdk/lib/_internal/compiler/js_lib/js_helper.dart
@@ -5,7 +5,7 @@
library _js_helper;
import 'dart:_js_embedded_names' show
- ALL_CLASSES,
+ GET_TYPE_FROM_NAME,
GET_ISOLATE_TAG,
INTERCEPTED_NAMES,
INTERCEPTORS_BY_TAG,
@@ -3148,8 +3148,8 @@ class RuntimeTypePlain extends RuntimeType {
RuntimeTypePlain(this.name);
toRti() {
- var allClasses = JS_EMBEDDED_GLOBAL('', ALL_CLASSES);
- var rti = JS('', '#[#]', allClasses, name);
+ var getTypeFromName = JS_EMBEDDED_GLOBAL('', GET_TYPE_FROM_NAME);
+ var rti = JS('', '#(#)', getTypeFromName, name);
if (rti == null) throw "no type for '$name'";
return rti;
}
@@ -3166,8 +3166,8 @@ class RuntimeTypeGeneric extends RuntimeType {
toRti() {
if (rti != null) return rti;
- var allClasses = JS_EMBEDDED_GLOBAL('', ALL_CLASSES);
- var result = JS('JSExtendableArray', '[#[#]]', allClasses, name);
+ var getTypeFromName = JS_EMBEDDED_GLOBAL('', GET_TYPE_FROM_NAME);
+ var result = JS('JSExtendableArray', '[#(#)]', getTypeFromName, name);
if (result[0] == null) {
throw "no type for '$name<...>'";
}
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart ('k') | sdk/lib/_internal/compiler/js_lib/shared/embedded_names.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698