Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 3350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3361 List<HInstruction> arguments) { | 3361 List<HInstruction> arguments) { |
| 3362 String name = selector.name; | 3362 String name = selector.name; |
| 3363 | 3363 |
| 3364 ClassElement cls = currentNonClosureClass; | 3364 ClassElement cls = currentNonClosureClass; |
| 3365 Element element = cls.lookupSuperMember(Compiler.NO_SUCH_METHOD); | 3365 Element element = cls.lookupSuperMember(Compiler.NO_SUCH_METHOD); |
| 3366 if (element.enclosingElement.declaration != compiler.objectClass) { | 3366 if (element.enclosingElement.declaration != compiler.objectClass) { |
| 3367 // Register the call as dynamic if [noSuchMethod] on the super | 3367 // Register the call as dynamic if [noSuchMethod] on the super |
| 3368 // class is _not_ the default implementation from [Object], in | 3368 // class is _not_ the default implementation from [Object], in |
| 3369 // case the [noSuchMethod] implementation calls | 3369 // case the [noSuchMethod] implementation calls |
| 3370 // [JSInvocationMirror._invokeOn]. | 3370 // [JSInvocationMirror._invokeOn]. |
| 3371 compiler.enqueuer.codegen.registerSelectorUse(selector); | 3371 compiler.enqueuer.codegen.registerSelectorUse(selector.asUntyped); |
|
kasperl
2013/10/29 08:35:27
Do we have to do this at all if invokeOn isn't reg
ngeoffray
2013/10/29 09:19:28
No, nice catch. Done.
| |
| 3372 } | 3372 } |
| 3373 String publicName = name; | 3373 String publicName = name; |
| 3374 if (selector.isSetter()) publicName += '='; | 3374 if (selector.isSetter()) publicName += '='; |
| 3375 | 3375 |
| 3376 Constant nameConstant = constantSystem.createString( | 3376 Constant nameConstant = constantSystem.createString( |
| 3377 new DartString.literal(publicName), node); | 3377 new DartString.literal(publicName), node); |
| 3378 | 3378 |
| 3379 String internalName = backend.namer.invocationName(selector); | 3379 String internalName = backend.namer.invocationName(selector); |
| 3380 Constant internalNameConstant = | 3380 Constant internalNameConstant = |
| 3381 constantSystem.createString(new DartString.literal(internalName), node); | 3381 constantSystem.createString(new DartString.literal(internalName), node); |
| (...skipping 2206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5588 new HSubGraphBlockInformation(elseBranch.graph)); | 5588 new HSubGraphBlockInformation(elseBranch.graph)); |
| 5589 | 5589 |
| 5590 HBasicBlock conditionStartBlock = conditionBranch.block; | 5590 HBasicBlock conditionStartBlock = conditionBranch.block; |
| 5591 conditionStartBlock.setBlockFlow(info, joinBlock); | 5591 conditionStartBlock.setBlockFlow(info, joinBlock); |
| 5592 SubGraph conditionGraph = conditionBranch.graph; | 5592 SubGraph conditionGraph = conditionBranch.graph; |
| 5593 HIf branch = conditionGraph.end.last; | 5593 HIf branch = conditionGraph.end.last; |
| 5594 assert(branch is HIf); | 5594 assert(branch is HIf); |
| 5595 branch.blockInformation = conditionStartBlock.blockFlow; | 5595 branch.blockInformation = conditionStartBlock.blockFlow; |
| 5596 } | 5596 } |
| 5597 } | 5597 } |
| OLD | NEW |