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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/types.dart

Issue 14052009: Improve optimization of operations on indexables by using more inferred type information and by dis… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix dartc warnings. Created 7 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/implementation/ssa/types.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/types.dart b/sdk/lib/_internal/compiler/implementation/ssa/types.dart
index e6a90448d03f18e4d4a77746e5f89787ce3062fa..93dfcd89251567cbf9a719c68ccb08e131bfbcef 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/types.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/types.dart
@@ -197,10 +197,15 @@ abstract class HType {
// TODO(kasperl): Get rid of this one.
bool isIndexablePrimitive() => false;
- bool isIndexable(Compiler compiler) =>
- implementsInterface(compiler.backend.jsIndexableClass, compiler);
- bool isMutableIndexable(Compiler compiler) =>
- implementsInterface(compiler.backend.jsMutableIndexableClass, compiler);
+ bool isIndexable(Compiler compiler) {
+ JavaScriptBackend backend = compiler.backend;
+ return implementsInterface(backend.jsIndexableClass, compiler);
+ }
+
+ bool isMutableIndexable(Compiler compiler) {
+ JavaScriptBackend backend = compiler.backend;
+ return implementsInterface(backend.jsMutableIndexableClass, compiler);
+ }
bool implementsInterface(ClassElement interfaceElement, Compiler compiler) {
DartType interfaceType = interfaceElement.computeType(compiler);

Powered by Google App Engine
This is Rietveld 408576698