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

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

Issue 11364175: Cleanup how we query for interceptors. (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/ssa/builder.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/optimize.dart (revision 14723)
+++ sdk/lib/_internal/compiler/implementation/ssa/optimize.dart (working copy)
@@ -654,12 +654,16 @@
final String name = "SsaCheckInserter";
HGraph graph;
Element lengthInterceptor;
+ Selector lengthSelector;
SsaCheckInserter(JavaScriptBackend backend, this.types, this.boundsChecked)
: constantSystem = backend.constantSystem {
SourceString lengthString = const SourceString('length');
+ lengthSelector = new Selector.getter(
+ lengthString,
+ backend.compiler.currentElement.getLibrary());
lengthInterceptor =
- backend.builder.interceptors.getStaticGetInterceptor(lengthString);
+ backend.builder.interceptors.getStaticInterceptor(lengthSelector);
}
void visitGraph(HGraph graph) {
@@ -681,11 +685,8 @@
HInstruction index) {
HStatic interceptor = new HStatic(lengthInterceptor);
node.block.addBefore(node, interceptor);
- Selector selector = new Selector.getter(
- const SourceString('length'),
- lengthInterceptor.getLibrary()); // TODO(kasperl): Wrong.
HInvokeInterceptor length = new HInvokeInterceptor(
- selector, <HInstruction>[interceptor, receiver], true);
+ lengthSelector, <HInstruction>[interceptor, receiver], true);
types[length] = HType.INTEGER;
node.block.addBefore(node, length);
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698