| 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 js_backend; | 5 part of js_backend; |
| 6 | 6 |
| 7 typedef void Recompile(Element element); | 7 typedef void Recompile(Element element); |
| 8 | 8 |
| 9 class ReturnInfo { | 9 class ReturnInfo { |
| 10 HType returnType; | 10 HType returnType; |
| (...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 857 } else { | 857 } else { |
| 858 specializedGetInterceptors[name] = classes; | 858 specializedGetInterceptors[name] = classes; |
| 859 } | 859 } |
| 860 } | 860 } |
| 861 | 861 |
| 862 void initializeNoSuchMethod() { | 862 void initializeNoSuchMethod() { |
| 863 // In case the emitter generates noSuchMethod calls, we need to | 863 // In case the emitter generates noSuchMethod calls, we need to |
| 864 // make sure all [noSuchMethod] methods know they might take a | 864 // make sure all [noSuchMethod] methods know they might take a |
| 865 // [JsInvocationMirror] as parameter. | 865 // [JsInvocationMirror] as parameter. |
| 866 HTypeList types = new HTypeList(1); | 866 HTypeList types = new HTypeList(1); |
| 867 types[0] = new HType.fromBoundedType( | 867 types[0] = new HBoundedType.exact( |
| 868 compiler.jsInvocationMirrorClass.computeType(compiler), | 868 compiler.jsInvocationMirrorClass.computeType(compiler)); |
| 869 compiler, | |
| 870 false); | |
| 871 argumentTypes.registerDynamicInvocation(types, new Selector.noSuchMethod()); | 869 argumentTypes.registerDynamicInvocation(types, new Selector.noSuchMethod()); |
| 872 } | 870 } |
| 873 | 871 |
| 874 void registerInstantiatedClass(ClassElement cls, Enqueuer enqueuer) { | 872 void registerInstantiatedClass(ClassElement cls, Enqueuer enqueuer) { |
| 875 if (!seenAnyClass) { | 873 if (!seenAnyClass) { |
| 876 initializeInterceptorElements(); | 874 initializeInterceptorElements(); |
| 877 initializeNoSuchMethod(); | 875 initializeNoSuchMethod(); |
| 878 seenAnyClass = true; | 876 seenAnyClass = true; |
| 879 } | 877 } |
| 880 ClassElement result = null; | 878 ClassElement result = null; |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1253 * | 1251 * |
| 1254 * Invariant: [element] must be a declaration element. | 1252 * Invariant: [element] must be a declaration element. |
| 1255 */ | 1253 */ |
| 1256 void eagerRecompile(Element element) { | 1254 void eagerRecompile(Element element) { |
| 1257 assert(invariant(element, element.isDeclaration)); | 1255 assert(invariant(element, element.isDeclaration)); |
| 1258 generatedCode.remove(element); | 1256 generatedCode.remove(element); |
| 1259 generatedBailoutCode.remove(element); | 1257 generatedBailoutCode.remove(element); |
| 1260 compiler.enqueuer.codegen.addToWorkList(element); | 1258 compiler.enqueuer.codegen.addToWorkList(element); |
| 1261 } | 1259 } |
| 1262 } | 1260 } |
| OLD | NEW |