| 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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 } | 314 } |
| 315 | 315 |
| 316 void registerFieldInitializer(Element field, HType type) { | 316 void registerFieldInitializer(Element field, HType type) { |
| 317 registerFieldType(fieldInitializerTypeMap, field, type); | 317 registerFieldType(fieldInitializerTypeMap, field, type); |
| 318 } | 318 } |
| 319 | 319 |
| 320 void registerFieldConstructor(Element field, HType type) { | 320 void registerFieldConstructor(Element field, HType type) { |
| 321 registerFieldType(fieldConstructorTypeMap, field, type); | 321 registerFieldType(fieldConstructorTypeMap, field, type); |
| 322 } | 322 } |
| 323 | 323 |
| 324 void registerFieldSetter(FunctionElement element, Element field, HType type) { | 324 void registerFieldSetter(Element element, Element field, HType type) { |
| 325 HType initializerType = fieldInitializerTypeMap[field]; | 325 HType initializerType = fieldInitializerTypeMap[field]; |
| 326 HType constructorType = fieldConstructorTypeMap[field]; | 326 HType constructorType = fieldConstructorTypeMap[field]; |
| 327 HType setterType = fieldTypeMap[field]; | 327 HType setterType = fieldTypeMap[field]; |
| 328 if (type == HType.UNKNOWN | 328 if (type == HType.UNKNOWN |
| 329 && initializerType == null | 329 && initializerType == null |
| 330 && constructorType == null | 330 && constructorType == null |
| 331 && setterType == null) { | 331 && setterType == null) { |
| 332 // Don't register UNKNOWN if there is currently no type information | 332 // Don't register UNKNOWN if there is currently no type information |
| 333 // present for the field. Instead register the function holding the | 333 // present for the field. Instead register the function holding the |
| 334 // setter for recompilation if better type information for the field | 334 // setter for recompilation if better type information for the field |
| (...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1562 } | 1562 } |
| 1563 | 1563 |
| 1564 void registerFieldInitializer(Element field, HType type) { | 1564 void registerFieldInitializer(Element field, HType type) { |
| 1565 fieldTypes.registerFieldInitializer(field, type); | 1565 fieldTypes.registerFieldInitializer(field, type); |
| 1566 } | 1566 } |
| 1567 | 1567 |
| 1568 void registerFieldConstructor(Element field, HType type) { | 1568 void registerFieldConstructor(Element field, HType type) { |
| 1569 fieldTypes.registerFieldConstructor(field, type); | 1569 fieldTypes.registerFieldConstructor(field, type); |
| 1570 } | 1570 } |
| 1571 | 1571 |
| 1572 void registerFieldSetter(FunctionElement element, Element field, HType type) { | 1572 void registerFieldSetter(Element element, Element field, HType type) { |
| 1573 fieldTypes.registerFieldSetter(element, field, type); | 1573 fieldTypes.registerFieldSetter(element, field, type); |
| 1574 } | 1574 } |
| 1575 | 1575 |
| 1576 void addedDynamicSetter(Selector setter, HType type) { | 1576 void addedDynamicSetter(Selector setter, HType type) { |
| 1577 fieldTypes.addedDynamicSetter(setter, type); | 1577 fieldTypes.addedDynamicSetter(setter, type); |
| 1578 } | 1578 } |
| 1579 | 1579 |
| 1580 HType optimisticFieldType(Element element) { | 1580 HType optimisticFieldType(Element element) { |
| 1581 return fieldTypes.optimisticFieldType(element); | 1581 return fieldTypes.optimisticFieldType(element); |
| 1582 } | 1582 } |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1866 ClassElement get listImplementation => jsArrayClass; | 1866 ClassElement get listImplementation => jsArrayClass; |
| 1867 ClassElement get constListImplementation => jsArrayClass; | 1867 ClassElement get constListImplementation => jsArrayClass; |
| 1868 ClassElement get fixedListImplementation => jsFixedArrayClass; | 1868 ClassElement get fixedListImplementation => jsFixedArrayClass; |
| 1869 ClassElement get growableListImplementation => jsExtendableArrayClass; | 1869 ClassElement get growableListImplementation => jsExtendableArrayClass; |
| 1870 ClassElement get mapImplementation => mapLiteralClass; | 1870 ClassElement get mapImplementation => mapLiteralClass; |
| 1871 ClassElement get constMapImplementation => constMapLiteralClass; | 1871 ClassElement get constMapImplementation => constMapLiteralClass; |
| 1872 ClassElement get typeImplementation => typeLiteralClass; | 1872 ClassElement get typeImplementation => typeLiteralClass; |
| 1873 ClassElement get boolImplementation => jsBoolClass; | 1873 ClassElement get boolImplementation => jsBoolClass; |
| 1874 ClassElement get nullImplementation => jsNullClass; | 1874 ClassElement get nullImplementation => jsNullClass; |
| 1875 } | 1875 } |
| OLD | NEW |