Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(296)

Side by Side Diff: sdk/lib/_internal/compiler/implementation/js_backend/backend.dart

Issue 14018036: Remove holders for runtime type information. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1517 matching lines...) Expand 10 before | Expand all | Expand 10 after
1528 } 1528 }
1529 1529
1530 void addedDynamicSetter(Selector setter, HType type) { 1530 void addedDynamicSetter(Selector setter, HType type) {
1531 fieldTypes.addedDynamicSetter(setter, type); 1531 fieldTypes.addedDynamicSetter(setter, type);
1532 } 1532 }
1533 1533
1534 HType optimisticFieldType(Element element) { 1534 HType optimisticFieldType(Element element) {
1535 return fieldTypes.optimisticFieldType(element); 1535 return fieldTypes.optimisticFieldType(element);
1536 } 1536 }
1537 1537
1538 Element getImplementationClass(Element element) {
1539 if (element == compiler.intClass) {
1540 return jsIntClass;
1541 } else if (element == compiler.boolClass) {
1542 return jsBoolClass;
1543 } else if (element == compiler.numClass) {
1544 return jsNumberClass;
1545 } else if (element == compiler.doubleClass) {
1546 return jsDoubleClass;
1547 } else if (element == compiler.stringClass) {
1548 return jsStringClass;
1549 } else if (element == compiler.listClass) {
1550 return jsArrayClass;
1551 } else {
1552 return element;
1553 }
1554 }
1555
1538 /** 1556 /**
1539 * Returns the checked mode helper that will be needed to do a type check/type 1557 * Returns the checked mode helper that will be needed to do a type check/type
1540 * cast on [type] at runtime. Note that this method is being called both by 1558 * cast on [type] at runtime. Note that this method is being called both by
1541 * the resolver with interface types (int, String, ...), and by the SSA 1559 * the resolver with interface types (int, String, ...), and by the SSA
1542 * backend with implementation types (JSInt, JSString, ...). 1560 * backend with implementation types (JSInt, JSString, ...).
1543 */ 1561 */
1544 Element getCheckedModeHelper(DartType type, {bool typeCast}) { 1562 Element getCheckedModeHelper(DartType type, {bool typeCast}) {
1545 return compiler.findHelper(getCheckedModeHelperName( 1563 return compiler.findHelper(getCheckedModeHelperName(
1546 type, typeCast: typeCast, nativeCheckOnly: false)); 1564 type, typeCast: typeCast, nativeCheckOnly: false));
1547 } 1565 }
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1786 ClassElement get constListImplementation => jsArrayClass; 1804 ClassElement get constListImplementation => jsArrayClass;
1787 ClassElement get fixedListImplementation => jsFixedArrayClass; 1805 ClassElement get fixedListImplementation => jsFixedArrayClass;
1788 ClassElement get growableListImplementation => jsExtendableArrayClass; 1806 ClassElement get growableListImplementation => jsExtendableArrayClass;
1789 ClassElement get mapImplementation => mapLiteralClass; 1807 ClassElement get mapImplementation => mapLiteralClass;
1790 ClassElement get constMapImplementation => constMapLiteralClass; 1808 ClassElement get constMapImplementation => constMapLiteralClass;
1791 ClassElement get functionImplementation => jsFunctionClass; 1809 ClassElement get functionImplementation => jsFunctionClass;
1792 ClassElement get typeImplementation => typeLiteralClass; 1810 ClassElement get typeImplementation => typeLiteralClass;
1793 ClassElement get boolImplementation => jsBoolClass; 1811 ClassElement get boolImplementation => jsBoolClass;
1794 ClassElement get nullImplementation => jsNullClass; 1812 ClassElement get nullImplementation => jsNullClass;
1795 } 1813 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698