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 3096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3107 } else if (name == const SourceString('DART_CLOSURE_TO_JS')) { | 3107 } else if (name == const SourceString('DART_CLOSURE_TO_JS')) { |
3108 handleForeignDartClosureToJs(node, 'DART_CLOSURE_TO_JS'); | 3108 handleForeignDartClosureToJs(node, 'DART_CLOSURE_TO_JS'); |
3109 } else if (name == const SourceString('RAW_DART_FUNCTION_REF')) { | 3109 } else if (name == const SourceString('RAW_DART_FUNCTION_REF')) { |
3110 handleForeignRawFunctionRef(node, 'RAW_DART_FUNCTION_REF'); | 3110 handleForeignRawFunctionRef(node, 'RAW_DART_FUNCTION_REF'); |
3111 } else if (name == const SourceString('JS_SET_CURRENT_ISOLATE')) { | 3111 } else if (name == const SourceString('JS_SET_CURRENT_ISOLATE')) { |
3112 handleForeignSetCurrentIsolate(node); | 3112 handleForeignSetCurrentIsolate(node); |
3113 } else if (name == const SourceString('JS_CREATE_ISOLATE')) { | 3113 } else if (name == const SourceString('JS_CREATE_ISOLATE')) { |
3114 handleForeignCreateIsolate(node); | 3114 handleForeignCreateIsolate(node); |
3115 } else if (name == const SourceString('JS_OPERATOR_IS_PREFIX')) { | 3115 } else if (name == const SourceString('JS_OPERATOR_IS_PREFIX')) { |
3116 stack.add(addConstantString(node, backend.namer.operatorIsPrefix())); | 3116 stack.add(addConstantString(node, backend.namer.operatorIsPrefix())); |
| 3117 } else if (name == const SourceString('JS_OBJECT_CLASS_NAME')) { |
| 3118 String name = backend.namer.getRuntimeTypeName(compiler.objectClass); |
| 3119 stack.add(addConstantString(node, name)); |
3117 } else if (name == const SourceString('JS_OPERATOR_AS_PREFIX')) { | 3120 } else if (name == const SourceString('JS_OPERATOR_AS_PREFIX')) { |
3118 stack.add(addConstantString(node, backend.namer.operatorAsPrefix())); | 3121 stack.add(addConstantString(node, backend.namer.operatorAsPrefix())); |
3119 } else if (name == const SourceString('JS_DART_OBJECT_CONSTRUCTOR')) { | 3122 } else if (name == const SourceString('JS_DART_OBJECT_CONSTRUCTOR')) { |
3120 handleForeignDartObjectJsConstructorFunction(node); | 3123 handleForeignDartObjectJsConstructorFunction(node); |
3121 } else if (name == const SourceString('JS_IS_INDEXABLE_FIELD_NAME')) { | 3124 } else if (name == const SourceString('JS_IS_INDEXABLE_FIELD_NAME')) { |
3122 Element element = compiler.findHelper( | 3125 Element element = compiler.findHelper( |
3123 const SourceString('JavaScriptIndexingBehavior')); | 3126 const SourceString('JavaScriptIndexingBehavior')); |
3124 stack.add(addConstantString(node, backend.namer.operatorIs(element))); | 3127 stack.add(addConstantString(node, backend.namer.operatorIs(element))); |
3125 } else { | 3128 } else { |
3126 throw "Unknown foreign: ${selector}"; | 3129 throw "Unknown foreign: ${selector}"; |
(...skipping 2245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5372 new HSubGraphBlockInformation(elseBranch.graph)); | 5375 new HSubGraphBlockInformation(elseBranch.graph)); |
5373 | 5376 |
5374 HBasicBlock conditionStartBlock = conditionBranch.block; | 5377 HBasicBlock conditionStartBlock = conditionBranch.block; |
5375 conditionStartBlock.setBlockFlow(info, joinBlock); | 5378 conditionStartBlock.setBlockFlow(info, joinBlock); |
5376 SubGraph conditionGraph = conditionBranch.graph; | 5379 SubGraph conditionGraph = conditionBranch.graph; |
5377 HIf branch = conditionGraph.end.last; | 5380 HIf branch = conditionGraph.end.last; |
5378 assert(branch is HIf); | 5381 assert(branch is HIf); |
5379 branch.blockInformation = conditionStartBlock.blockFlow; | 5382 branch.blockInformation = conditionStartBlock.blockFlow; |
5380 } | 5383 } |
5381 } | 5384 } |
OLD | NEW |