| 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 typedef void Recompile(Element element); | 5 typedef void Recompile(Element element); |
| 6 | 6 |
| 7 class ReturnInfo { | 7 class ReturnInfo { |
| 8 HType returnType; | 8 HType returnType; |
| 9 List<Element> compiledFunctions; | 9 List<Element> compiledFunctions; |
| 10 | 10 |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 optimizedStaticFunctions[field].add(element); | 415 optimizedStaticFunctions[field].add(element); |
| 416 } else { | 416 } else { |
| 417 optimizedFunctions.putIfAbsent( | 417 optimizedFunctions.putIfAbsent( |
| 418 field, () => new FunctionSet(backend.compiler)); | 418 field, () => new FunctionSet(backend.compiler)); |
| 419 optimizedFunctions[field].add(element); | 419 optimizedFunctions[field].add(element); |
| 420 } | 420 } |
| 421 } | 421 } |
| 422 | 422 |
| 423 void dump() { | 423 void dump() { |
| 424 Set<Element> allFields = new Set<Element>(); | 424 Set<Element> allFields = new Set<Element>(); |
| 425 fieldInitializerTypeMap.getKeys().forEach(allFields.add); | 425 fieldInitializerTypeMap.keys.forEach(allFields.add); |
| 426 fieldConstructorTypeMap.getKeys().forEach(allFields.add); | 426 fieldConstructorTypeMap.keys.forEach(allFields.add); |
| 427 fieldTypeMap.getKeys().forEach(allFields.add); | 427 fieldTypeMap.keys.forEach(allFields.add); |
| 428 allFields.forEach((Element field) { | 428 allFields.forEach((Element field) { |
| 429 print("Inferred $field has type ${optimisticFieldType(field)}"); | 429 print("Inferred $field has type ${optimisticFieldType(field)}"); |
| 430 }); | 430 }); |
| 431 } | 431 } |
| 432 } | 432 } |
| 433 | 433 |
| 434 class ArgumentTypesRegistry { | 434 class ArgumentTypesRegistry { |
| 435 final JavaScriptBackend backend; | 435 final JavaScriptBackend backend; |
| 436 | 436 |
| 437 /** | 437 /** |
| (...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 945 print("Inferred return types:"); | 945 print("Inferred return types:"); |
| 946 print("----------------------"); | 946 print("----------------------"); |
| 947 dumpReturnTypes(); | 947 dumpReturnTypes(); |
| 948 print(""); | 948 print(""); |
| 949 print("Inferred field types:"); | 949 print("Inferred field types:"); |
| 950 print("------------------------"); | 950 print("------------------------"); |
| 951 fieldTypes.dump(); | 951 fieldTypes.dump(); |
| 952 print(""); | 952 print(""); |
| 953 } | 953 } |
| 954 } | 954 } |
| OLD | NEW |