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

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

Issue 14251021: Move invokeOn to InstanceMirror. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of ssa; 5 part of ssa;
6 6
7 /** 7 /**
8 * A special element for the extra parameter taken by intercepted 8 * A special element for the extra parameter taken by intercepted
9 * methods. We need to override [Element.computeType] because our 9 * methods. We need to override [Element.computeType] because our
10 * optimizers may look at its declared type. 10 * optimizers may look at its declared type.
(...skipping 3118 matching lines...) Expand 10 before | Expand all | Expand 10 after
3129 } 3129 }
3130 3130
3131 generateSuperNoSuchMethodSend(Send node, 3131 generateSuperNoSuchMethodSend(Send node,
3132 Selector selector, 3132 Selector selector,
3133 List<HInstruction> arguments) { 3133 List<HInstruction> arguments) {
3134 SourceString name = selector.name; 3134 SourceString name = selector.name;
3135 3135
3136 ClassElement cls = currentElement.getEnclosingClass(); 3136 ClassElement cls = currentElement.getEnclosingClass();
3137 Element element = cls.lookupSuperMember(Compiler.NO_SUCH_METHOD); 3137 Element element = cls.lookupSuperMember(Compiler.NO_SUCH_METHOD);
3138 if (element.enclosingElement.declaration != compiler.objectClass) { 3138 if (element.enclosingElement.declaration != compiler.objectClass) {
3139 // Register the call as dynamic if [:noSuchMethod:] on the super class 3139 // Register the call as dynamic if [noSuchMethod] on the super
3140 // is _not_ the default implementation from [:Object:], in case 3140 // class is _not_ the default implementation from [Object], in
3141 // the [:noSuchMethod:] implementation does an [:invokeOn:] on 3141 // case the [noSuchMethod] implementation calls
3142 // the invocation mirror. 3142 // [JSInvocationMirror._invokeOn].
3143 compiler.enqueuer.codegen.registerSelectorUse(selector); 3143 compiler.enqueuer.codegen.registerSelectorUse(selector);
3144 } 3144 }
3145 HStatic target = new HStatic(element); 3145 HStatic target = new HStatic(element);
3146 add(target); 3146 add(target);
3147 HInstruction self = localsHandler.readThis(); 3147 HInstruction self = localsHandler.readThis();
3148 Constant nameConstant = constantSystem.createString( 3148 Constant nameConstant = constantSystem.createString(
3149 new DartString.literal(name.slowToString()), node); 3149 new DartString.literal(name.slowToString()), node);
3150 3150
3151 String internalName = backend.namer.invocationName(selector); 3151 String internalName = backend.namer.invocationName(selector);
3152 Constant internalNameConstant = 3152 Constant internalNameConstant =
(...skipping 2084 matching lines...) Expand 10 before | Expand all | Expand 10 after
5237 new HSubGraphBlockInformation(elseBranch.graph)); 5237 new HSubGraphBlockInformation(elseBranch.graph));
5238 5238
5239 HBasicBlock conditionStartBlock = conditionBranch.block; 5239 HBasicBlock conditionStartBlock = conditionBranch.block;
5240 conditionStartBlock.setBlockFlow(info, joinBlock); 5240 conditionStartBlock.setBlockFlow(info, joinBlock);
5241 SubGraph conditionGraph = conditionBranch.graph; 5241 SubGraph conditionGraph = conditionBranch.graph;
5242 HIf branch = conditionGraph.end.last; 5242 HIf branch = conditionGraph.end.last;
5243 assert(branch is HIf); 5243 assert(branch is HIf);
5244 branch.blockInformation = conditionStartBlock.blockFlow; 5244 branch.blockInformation = conditionStartBlock.blockFlow;
5245 } 5245 }
5246 } 5246 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698