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

Unified Diff: sdk/lib/_internal/compiler/implementation/native_handler.dart

Issue 17301008: Remove =List in JS, use JSExtendableArray instead. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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/implementation/native_handler.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/native_handler.dart (revision 24212)
+++ sdk/lib/_internal/compiler/implementation/native_handler.dart (working copy)
@@ -25,9 +25,6 @@
/// The type Object, but no subtypes:
static const JsObject = const SpecialType._('=Object');
-
- /// The specific implementation of List that is JavaScript Array:
- static const JsArray = const SpecialType._('=List');
}
@@ -331,9 +328,7 @@
if (matchedTypeConstraints.contains(type)) continue;
matchedTypeConstraints.add(type);
if (type is SpecialType) {
- if (type == SpecialType.JsArray) {
- world.registerInstantiatedClass(compiler.listClass, elements);
- } else if (type == SpecialType.JsObject) {
+ if (type == SpecialType.JsObject) {
world.registerInstantiatedClass(compiler.objectClass, elements);
}
continue;
@@ -352,6 +347,9 @@
world.registerInstantiatedClass(compiler.nullClass, elements);
} else if (type.element == compiler.boolClass) {
world.registerInstantiatedClass(compiler.boolClass, elements);
+ } else if (compiler.types.isSubtype(
+ type, compiler.backend.listImplementation.rawType)) {
+ world.registerInstantiatedClass(type.element, elements);
}
}
assert(type is DartType);
@@ -634,7 +632,6 @@
//
// 'Type1|Type2'. A union type.
// '=Object'. A JavaScript Object, no subtype.
- // '=List'. A JavaScript Array, no subtype.
var argNodes = jsCall.arguments;
if (argNodes.isEmpty) {
@@ -816,7 +813,6 @@
static _parseType(String typeString, Compiler compiler,
lookup(name), locationNodeOrElement) {
if (typeString == '=Object') return SpecialType.JsObject;
- if (typeString == '=List') return SpecialType.JsArray;
if (typeString == 'dynamic') {
return compiler.dynamicClass.computeType(compiler);
}
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/ssa/types.dart » ('j') | sdk/lib/_internal/lib/js_rti.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698