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

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

Issue 49813002: Infer types for parameters even in the presence of InvocationMirror.delegate. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 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 3349 matching lines...) Expand 10 before | Expand all | Expand 10 after
3360 } 3360 }
3361 } 3361 }
3362 3362
3363 generateSuperNoSuchMethodSend(Send node, 3363 generateSuperNoSuchMethodSend(Send node,
3364 Selector selector, 3364 Selector selector,
3365 List<HInstruction> arguments) { 3365 List<HInstruction> arguments) {
3366 String name = selector.name; 3366 String name = selector.name;
3367 3367
3368 ClassElement cls = currentNonClosureClass; 3368 ClassElement cls = currentNonClosureClass;
3369 Element element = cls.lookupSuperMember(Compiler.NO_SUCH_METHOD); 3369 Element element = cls.lookupSuperMember(Compiler.NO_SUCH_METHOD);
3370 if (element.enclosingElement.declaration != compiler.objectClass) { 3370 if (compiler.enabledInvokeOn
3371 && element.enclosingElement.declaration != compiler.objectClass) {
3371 // Register the call as dynamic if [noSuchMethod] on the super 3372 // Register the call as dynamic if [noSuchMethod] on the super
3372 // class is _not_ the default implementation from [Object], in 3373 // class is _not_ the default implementation from [Object], in
3373 // case the [noSuchMethod] implementation calls 3374 // case the [noSuchMethod] implementation calls
3374 // [JSInvocationMirror._invokeOn]. 3375 // [JSInvocationMirror._invokeOn].
3375 compiler.enqueuer.codegen.registerSelectorUse(selector); 3376 compiler.enqueuer.codegen.registerSelectorUse(selector.asUntyped);
3376 } 3377 }
3377 String publicName = name; 3378 String publicName = name;
3378 if (selector.isSetter()) publicName += '='; 3379 if (selector.isSetter()) publicName += '=';
3379 3380
3380 Constant nameConstant = constantSystem.createString( 3381 Constant nameConstant = constantSystem.createString(
3381 new DartString.literal(publicName), node); 3382 new DartString.literal(publicName), node);
3382 3383
3383 String internalName = backend.namer.invocationName(selector); 3384 String internalName = backend.namer.invocationName(selector);
3384 Constant internalNameConstant = 3385 Constant internalNameConstant =
3385 constantSystem.createString(new DartString.literal(internalName), node); 3386 constantSystem.createString(new DartString.literal(internalName), node);
(...skipping 2207 matching lines...) Expand 10 before | Expand all | Expand 10 after
5593 new HSubGraphBlockInformation(elseBranch.graph)); 5594 new HSubGraphBlockInformation(elseBranch.graph));
5594 5595
5595 HBasicBlock conditionStartBlock = conditionBranch.block; 5596 HBasicBlock conditionStartBlock = conditionBranch.block;
5596 conditionStartBlock.setBlockFlow(info, joinBlock); 5597 conditionStartBlock.setBlockFlow(info, joinBlock);
5597 SubGraph conditionGraph = conditionBranch.graph; 5598 SubGraph conditionGraph = conditionBranch.graph;
5598 HIf branch = conditionGraph.end.last; 5599 HIf branch = conditionGraph.end.last;
5599 assert(branch is HIf); 5600 assert(branch is HIf);
5600 branch.blockInformation = conditionStartBlock.blockFlow; 5601 branch.blockInformation = conditionStartBlock.blockFlow;
5601 } 5602 }
5602 } 5603 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698