| 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 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1021 enqueueInResolution(getGetRuntimeTypeArgument()); | 1021 enqueueInResolution(getGetRuntimeTypeArgument()); |
| 1022 } | 1022 } |
| 1023 | 1023 |
| 1024 void registerRuntimeType() { | 1024 void registerRuntimeType() { |
| 1025 enqueueInResolution(getSetRuntimeTypeInfo()); | 1025 enqueueInResolution(getSetRuntimeTypeInfo()); |
| 1026 enqueueInResolution(getGetRuntimeTypeInfo()); | 1026 enqueueInResolution(getGetRuntimeTypeInfo()); |
| 1027 enqueueInResolution(getGetRuntimeTypeArgument()); | 1027 enqueueInResolution(getGetRuntimeTypeArgument()); |
| 1028 compiler.enqueuer.resolution.registerInstantiatedClass(compiler.listClass); | 1028 compiler.enqueuer.resolution.registerInstantiatedClass(compiler.listClass); |
| 1029 } | 1029 } |
| 1030 | 1030 |
| 1031 void registerTypeVariable() { |
| 1032 registerRuntimeType(); |
| 1033 enqueueInResolution(getRuntimeTypeToString()); |
| 1034 enqueueInResolution(getCreateRuntimeType()); |
| 1035 } |
| 1036 |
| 1031 void registerIsCheck(DartType type, Enqueuer world) { | 1037 void registerIsCheck(DartType type, Enqueuer world) { |
| 1032 bool isTypeVariable = type.kind == TypeKind.TYPE_VARIABLE; | 1038 bool isTypeVariable = type.kind == TypeKind.TYPE_VARIABLE; |
| 1033 if (!type.isRaw || isTypeVariable) { | 1039 if (!type.isRaw || isTypeVariable) { |
| 1034 enqueueInResolution(getSetRuntimeTypeInfo()); | 1040 enqueueInResolution(getSetRuntimeTypeInfo()); |
| 1035 enqueueInResolution(getGetRuntimeTypeInfo()); | 1041 enqueueInResolution(getGetRuntimeTypeInfo()); |
| 1036 enqueueInResolution(getGetRuntimeTypeArgument()); | 1042 enqueueInResolution(getGetRuntimeTypeArgument()); |
| 1037 enqueueInResolution(getCheckArguments()); | 1043 enqueueInResolution(getCheckArguments()); |
| 1038 if (isTypeVariable) enqueueInResolution(getGetObjectIsSubtype()); | 1044 if (isTypeVariable) enqueueInResolution(getGetObjectIsSubtype()); |
| 1039 world.registerInstantiatedClass(compiler.listClass); | 1045 world.registerInstantiatedClass(compiler.listClass); |
| 1040 } | 1046 } |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1480 } | 1486 } |
| 1481 | 1487 |
| 1482 Element getGetRuntimeTypeInfo() { | 1488 Element getGetRuntimeTypeInfo() { |
| 1483 return compiler.findHelper(const SourceString('getRuntimeTypeInfo')); | 1489 return compiler.findHelper(const SourceString('getRuntimeTypeInfo')); |
| 1484 } | 1490 } |
| 1485 | 1491 |
| 1486 Element getGetRuntimeTypeArgument() { | 1492 Element getGetRuntimeTypeArgument() { |
| 1487 return compiler.findHelper(const SourceString('getRuntimeTypeArgument')); | 1493 return compiler.findHelper(const SourceString('getRuntimeTypeArgument')); |
| 1488 } | 1494 } |
| 1489 | 1495 |
| 1496 Element getRuntimeTypeToString() { |
| 1497 return compiler.findHelper(const SourceString('runtimeTypeToString')); |
| 1498 } |
| 1499 |
| 1490 Element getCheckArguments() { | 1500 Element getCheckArguments() { |
| 1491 return compiler.findHelper(const SourceString('checkArguments')); | 1501 return compiler.findHelper(const SourceString('checkArguments')); |
| 1492 } | 1502 } |
| 1493 | 1503 |
| 1494 Element getGetObjectIsSubtype() { | 1504 Element getGetObjectIsSubtype() { |
| 1495 return compiler.findHelper(const SourceString('objectIsSubtype')); | 1505 return compiler.findHelper(const SourceString('objectIsSubtype')); |
| 1496 } | 1506 } |
| 1497 | 1507 |
| 1498 Element getThrowNoSuchMethod() { | 1508 Element getThrowNoSuchMethod() { |
| 1499 return compiler.findHelper(const SourceString('throwNoSuchMethod')); | 1509 return compiler.findHelper(const SourceString('throwNoSuchMethod')); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 1525 assert(invariant(element, element.isDeclaration)); | 1535 assert(invariant(element, element.isDeclaration)); |
| 1526 generatedCode.remove(element); | 1536 generatedCode.remove(element); |
| 1527 generatedBailoutCode.remove(element); | 1537 generatedBailoutCode.remove(element); |
| 1528 compiler.enqueuer.codegen.addToWorkList(element); | 1538 compiler.enqueuer.codegen.addToWorkList(element); |
| 1529 } | 1539 } |
| 1530 | 1540 |
| 1531 bool isNullImplementation(ClassElement cls) { | 1541 bool isNullImplementation(ClassElement cls) { |
| 1532 return cls == jsNullClass; | 1542 return cls == jsNullClass; |
| 1533 } | 1543 } |
| 1534 } | 1544 } |
| OLD | NEW |