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

Unified Diff: sdk/lib/_internal/compiler/implementation/js_backend/backend.dart

Issue 15724021: Move array and string related HType from const to a field in the backend. (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/js_backend/backend.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/js_backend/backend.dart (revision 23841)
+++ sdk/lib/_internal/compiler/implementation/js_backend/backend.dart (working copy)
@@ -69,6 +69,14 @@
Element getInterceptorMethod;
Element interceptedNames;
+ HType stringType;
+ HType indexablePrimitiveType;
+ HType readableArrayType;
+ HType mutableArrayType;
+ HType fixedArrayType;
+ HType extendableArrayType;
+
+
// TODO(9577): Make it so that these are not needed when there are no native
// classes.
Element dispatchPropertyName;
@@ -371,6 +379,19 @@
..add(jsNullClass);
validateInterceptorImplementsAllObjectMethods(jsInterceptorClass);
+
+ stringType = new HBoundedType(
+ new TypeMask.nonNullExact(jsStringClass.rawType));
+ indexablePrimitiveType = new HBoundedType(
+ new TypeMask.nonNullSubtype(jsIndexableClass.rawType));
+ readableArrayType = new HBoundedType(
+ new TypeMask.nonNullSubclass(jsArrayClass.rawType));
+ mutableArrayType = new HBoundedType(
+ new TypeMask.nonNullSubclass(jsMutableArrayClass.rawType));
+ fixedArrayType = new HBoundedType(
+ new TypeMask.nonNullExact(jsFixedArrayClass.rawType));
+ extendableArrayType = new HBoundedType(
+ new TypeMask.nonNullExact(jsExtendableArrayClass.rawType));
}
void validateInterceptorImplementsAllObjectMethods(
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/compiler.dart ('k') | sdk/lib/_internal/compiler/implementation/native_handler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698