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

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: 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 1506 matching lines...) Expand 10 before | Expand all | Expand 10 after
1517 } 1517 }
1518 1518
1519 void addedDynamicSetter(Selector setter, HType type) { 1519 void addedDynamicSetter(Selector setter, HType type) {
1520 fieldTypes.addedDynamicSetter(setter, type); 1520 fieldTypes.addedDynamicSetter(setter, type);
1521 } 1521 }
1522 1522
1523 HType optimisticFieldType(Element element) { 1523 HType optimisticFieldType(Element element) {
1524 return fieldTypes.optimisticFieldType(element); 1524 return fieldTypes.optimisticFieldType(element);
1525 } 1525 }
1526 1526
1527 Element getImplementationClass(Element element) {
1528 if (element == compiler.intClass) {
1529 return jsIntClass;
1530 } else if (element == compiler.boolClass) {
1531 return jsBoolClass;
1532 } else if (element == compiler.numClass) {
1533 return jsNumberClass;
1534 } else if (element == compiler.doubleClass) {
1535 return jsDoubleClass;
1536 } else if (element == compiler.stringClass) {
1537 return jsStringClass;
1538 } else if (element == compiler.listClass) {
1539 return jsArrayClass;
1540 } else {
1541 return element;
1542 }
1543 }
1544
1527 /** 1545 /**
1528 * Returns the checked mode helper that will be needed to do a type check/type 1546 * Returns the checked mode helper that will be needed to do a type check/type
1529 * cast on [type] at runtime. Note that this method is being called both by 1547 * cast on [type] at runtime. Note that this method is being called both by
1530 * the resolver with interface types (int, String, ...), and by the SSA 1548 * the resolver with interface types (int, String, ...), and by the SSA
1531 * backend with implementation types (JSInt, JSString, ...). 1549 * backend with implementation types (JSInt, JSString, ...).
1532 */ 1550 */
1533 Element getCheckedModeHelper(DartType type, {bool typeCast}) { 1551 Element getCheckedModeHelper(DartType type, {bool typeCast}) {
1534 return compiler.findHelper(getCheckedModeHelperName( 1552 return compiler.findHelper(getCheckedModeHelperName(
1535 type, typeCast: typeCast, nativeCheckOnly: false)); 1553 type, typeCast: typeCast, nativeCheckOnly: false));
1536 } 1554 }
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1775 ClassElement get constListImplementation => jsArrayClass; 1793 ClassElement get constListImplementation => jsArrayClass;
1776 ClassElement get fixedListImplementation => jsFixedArrayClass; 1794 ClassElement get fixedListImplementation => jsFixedArrayClass;
1777 ClassElement get growableListImplementation => jsExtendableArrayClass; 1795 ClassElement get growableListImplementation => jsExtendableArrayClass;
1778 ClassElement get mapImplementation => mapLiteralClass; 1796 ClassElement get mapImplementation => mapLiteralClass;
1779 ClassElement get constMapImplementation => constMapLiteralClass; 1797 ClassElement get constMapImplementation => constMapLiteralClass;
1780 ClassElement get functionImplementation => jsFunctionClass; 1798 ClassElement get functionImplementation => jsFunctionClass;
1781 ClassElement get typeImplementation => typeLiteralClass; 1799 ClassElement get typeImplementation => typeLiteralClass;
1782 ClassElement get boolImplementation => jsBoolClass; 1800 ClassElement get boolImplementation => jsBoolClass;
1783 ClassElement get nullImplementation => jsNullClass; 1801 ClassElement get nullImplementation => jsNullClass;
1784 } 1802 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698