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 3206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3217 } else if (name == const SourceString('JS_DART_OBJECT_CONSTRUCTOR')) { | 3217 } else if (name == const SourceString('JS_DART_OBJECT_CONSTRUCTOR')) { |
3218 handleForeignDartObjectJsConstructorFunction(node); | 3218 handleForeignDartObjectJsConstructorFunction(node); |
3219 } else if (name == const SourceString('JS_IS_INDEXABLE_FIELD_NAME')) { | 3219 } else if (name == const SourceString('JS_IS_INDEXABLE_FIELD_NAME')) { |
3220 Element element = compiler.findHelper( | 3220 Element element = compiler.findHelper( |
3221 const SourceString('JavaScriptIndexingBehavior')); | 3221 const SourceString('JavaScriptIndexingBehavior')); |
3222 stack.add(addConstantString(node, backend.namer.operatorIs(element))); | 3222 stack.add(addConstantString(node, backend.namer.operatorIs(element))); |
3223 } else if (name == const SourceString('JS_CURRENT_ISOLATE')) { | 3223 } else if (name == const SourceString('JS_CURRENT_ISOLATE')) { |
3224 handleForeignJsCurrentIsolate(node); | 3224 handleForeignJsCurrentIsolate(node); |
3225 } else if (name == const SourceString('JS_GET_NAME')) { | 3225 } else if (name == const SourceString('JS_GET_NAME')) { |
3226 handleForeignJsGetName(node); | 3226 handleForeignJsGetName(node); |
| 3227 } else if (name == const SourceString('JS_EFFECT')) { |
| 3228 stack.add(graph.addConstantNull(compiler)); |
3227 } else { | 3229 } else { |
3228 throw "Unknown foreign: ${selector}"; | 3230 throw "Unknown foreign: ${selector}"; |
3229 } | 3231 } |
3230 } | 3232 } |
3231 | 3233 |
3232 generateSuperNoSuchMethodSend(Send node, | 3234 generateSuperNoSuchMethodSend(Send node, |
3233 Selector selector, | 3235 Selector selector, |
3234 List<HInstruction> arguments) { | 3236 List<HInstruction> arguments) { |
3235 SourceString name = selector.name; | 3237 SourceString name = selector.name; |
3236 | 3238 |
(...skipping 2216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5453 new HSubGraphBlockInformation(elseBranch.graph)); | 5455 new HSubGraphBlockInformation(elseBranch.graph)); |
5454 | 5456 |
5455 HBasicBlock conditionStartBlock = conditionBranch.block; | 5457 HBasicBlock conditionStartBlock = conditionBranch.block; |
5456 conditionStartBlock.setBlockFlow(info, joinBlock); | 5458 conditionStartBlock.setBlockFlow(info, joinBlock); |
5457 SubGraph conditionGraph = conditionBranch.graph; | 5459 SubGraph conditionGraph = conditionBranch.graph; |
5458 HIf branch = conditionGraph.end.last; | 5460 HIf branch = conditionGraph.end.last; |
5459 assert(branch is HIf); | 5461 assert(branch is HIf); |
5460 branch.blockInformation = conditionStartBlock.blockFlow; | 5462 branch.blockInformation = conditionStartBlock.blockFlow; |
5461 } | 5463 } |
5462 } | 5464 } |
OLD | NEW |