| 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 implement [TypedElement.type] because our | 9 * methods. We need to implement [TypedElement.type] because our |
| 10 * optimizers may look at its declared type. | 10 * optimizers may look at its declared type. |
| (...skipping 3550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3561 'JavaScriptIndexingBehavior'); | 3561 'JavaScriptIndexingBehavior'); |
| 3562 stack.add(addConstantString(backend.namer.operatorIs(element))); | 3562 stack.add(addConstantString(backend.namer.operatorIs(element))); |
| 3563 } else if (name == 'JS_CURRENT_ISOLATE') { | 3563 } else if (name == 'JS_CURRENT_ISOLATE') { |
| 3564 handleForeignJsCurrentIsolate(node); | 3564 handleForeignJsCurrentIsolate(node); |
| 3565 } else if (name == 'JS_GET_NAME') { | 3565 } else if (name == 'JS_GET_NAME') { |
| 3566 handleForeignJsGetName(node); | 3566 handleForeignJsGetName(node); |
| 3567 } else if (name == 'JS_EFFECT') { | 3567 } else if (name == 'JS_EFFECT') { |
| 3568 stack.add(graph.addConstantNull(compiler)); | 3568 stack.add(graph.addConstantNull(compiler)); |
| 3569 } else if (name == 'JS_INTERCEPTOR_CONSTANT') { | 3569 } else if (name == 'JS_INTERCEPTOR_CONSTANT') { |
| 3570 handleJsInterceptorConstant(node); | 3570 handleJsInterceptorConstant(node); |
| 3571 } else if (name == 'loadLibrary') { |
| 3572 // TODO(sigurdm): Also make it possible to closurize loadLibrary. |
| 3573 FunctionElement deferredLoader = elements[node]; |
| 3574 Element loadFunction = compiler.loadLibraryFunction; |
| 3575 PrefixElement prefixElement = deferredLoader.enclosingElement; |
| 3576 String loadId = |
| 3577 compiler.deferredLoadTask.importDeferName[prefixElement.import]; |
| 3578 var inputs = [graph.addConstantString(new ast.DartString.literal(loadId), |
| 3579 compiler)]; |
| 3580 push(new HInvokeStatic(loadFunction, inputs, backend.nonNullType, |
| 3581 targetCanThrow: false)); |
| 3571 } else { | 3582 } else { |
| 3572 throw "Unknown foreign: ${selector}"; | 3583 throw "Unknown foreign: ${selector}"; |
| 3573 } | 3584 } |
| 3574 } | 3585 } |
| 3575 | 3586 |
| 3576 generateSuperNoSuchMethodSend(ast.Send node, | 3587 generateSuperNoSuchMethodSend(ast.Send node, |
| 3577 Selector selector, | 3588 Selector selector, |
| 3578 List<HInstruction> arguments) { | 3589 List<HInstruction> arguments) { |
| 3579 String name = selector.name; | 3590 String name = selector.name; |
| 3580 | 3591 |
| (...skipping 2535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6116 DartType unaliased = type.unalias(builder.compiler); | 6127 DartType unaliased = type.unalias(builder.compiler); |
| 6117 if (unaliased is TypedefType) throw 'unable to unalias $type'; | 6128 if (unaliased is TypedefType) throw 'unable to unalias $type'; |
| 6118 unaliased.accept(this, builder); | 6129 unaliased.accept(this, builder); |
| 6119 } | 6130 } |
| 6120 | 6131 |
| 6121 void visitDynamicType(DynamicType type, SsaBuilder builder) { | 6132 void visitDynamicType(DynamicType type, SsaBuilder builder) { |
| 6122 ClassElement cls = builder.compiler.findHelper('DynamicRuntimeType'); | 6133 ClassElement cls = builder.compiler.findHelper('DynamicRuntimeType'); |
| 6123 builder.push(new HDynamicType(type, new TypeMask.exact(cls))); | 6134 builder.push(new HDynamicType(type, new TypeMask.exact(cls))); |
| 6124 } | 6135 } |
| 6125 } | 6136 } |
| OLD | NEW |