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

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

Issue 11280034: Move more methods to the new interceptor scheme (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/lib/js_string.dart ('k') | tests/corelib/string_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/ssa/builder.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/builder.dart (revision 15076)
+++ sdk/lib/_internal/compiler/implementation/ssa/builder.dart (working copy)
@@ -424,13 +424,21 @@
directLocals[closureData.thisElement] = builder.thisInstruction;
}
- if (builder.backend.isInterceptorClass(element.getEnclosingClass())) {
+ ClassElement cls = element.getEnclosingClass();
+ if (builder.backend.isInterceptorClass(cls)) {
Element parameter = new Element(
const SourceString('receiver'), ElementKind.VARIABLE, element);
HParameterValue value = new HParameterValue(parameter);
builder.graph.entry.addAfter(
directLocals[closureData.thisElement], value);
directLocals[closureData.thisElement] = value;
+ HType type = HType.UNKNOWN;
+ if (cls == builder.backend.jsArrayClass) {
+ type = HType.READABLE_ARRAY;
+ } else if (cls == builder.backend.jsStringClass) {
+ type = HType.STRING;
+ }
+ value.guaranteedType = type;
}
}
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/lib/js_string.dart ('k') | tests/corelib/string_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698