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

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

Issue 15222002: Handle super calls in the backend type inferrer. (Closed) Base URL: http://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
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/ssa/builder.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 if (allUnknown) return HTypeList.ALL_UNKNOWN; 88 if (allUnknown) return HTypeList.ALL_UNKNOWN;
89 89
90 HTypeList result = new HTypeList(node.inputs.length); 90 HTypeList result = new HTypeList(node.inputs.length);
91 for (int i = 0; i < result.types.length; i++) { 91 for (int i = 0; i < result.types.length; i++) {
92 result.types[i] = node.inputs[i].instructionType; 92 result.types[i] = node.inputs[i].instructionType;
93 assert(!result.types[i].isConflicting()); 93 assert(!result.types[i].isConflicting());
94 } 94 }
95 return result; 95 return result;
96 } 96 }
97 97
98 factory HTypeList.fromDynamicInvocation(HInvokeDynamic node, 98 factory HTypeList.fromDynamicInvocation(HInvoke node,
99 Selector selector) { 99 Selector selector) {
100 HTypeList result; 100 HTypeList result;
101 int argumentsCount = node.inputs.length - 1; 101 int argumentsCount = node.inputs.length - 1;
102 int startInvokeIndex = HInvoke.ARGUMENTS_OFFSET; 102 int startInvokeIndex = HInvoke.ARGUMENTS_OFFSET;
103 103
104 if (node.isInterceptedCall) { 104 if (node.isInterceptedCall) {
105 argumentsCount--; 105 argumentsCount--;
106 startInvokeIndex++; 106 startInvokeIndex++;
107 } 107 }
108 108
(...skipping 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after
1430 assert(invariant(element, element.isDeclaration)); 1430 assert(invariant(element, element.isDeclaration));
1431 if (compiler.phase == Compiler.PHASE_COMPILING) { 1431 if (compiler.phase == Compiler.PHASE_COMPILING) {
1432 invalidateAfterCodegen.add(element); 1432 invalidateAfterCodegen.add(element);
1433 } 1433 }
1434 } 1434 }
1435 1435
1436 /** 1436 /**
1437 * Register a dynamic invocation and collect the provided types for the 1437 * Register a dynamic invocation and collect the provided types for the
1438 * named selector. 1438 * named selector.
1439 */ 1439 */
1440 void registerDynamicInvocation(HInvokeDynamic node, Selector selector) { 1440 void registerDynamicInvocation(HInvoke node, Selector selector) {
1441 HTypeList providedTypes = 1441 HTypeList providedTypes =
1442 new HTypeList.fromDynamicInvocation(node, selector); 1442 new HTypeList.fromDynamicInvocation(node, selector);
1443 argumentTypes.registerDynamicInvocation(providedTypes, selector); 1443 argumentTypes.registerDynamicInvocation(providedTypes, selector);
1444 } 1444 }
1445 1445
1446 /** 1446 /**
1447 * Register a static invocation and collect the provided types for the 1447 * Register a static invocation and collect the provided types for the
1448 * named selector. 1448 * named selector.
1449 */ 1449 */
1450 void registerStaticInvocation(HInvokeStatic node) { 1450 void registerStaticInvocation(HInvokeStatic node) {
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
1830 ClassElement get listImplementation => jsArrayClass; 1830 ClassElement get listImplementation => jsArrayClass;
1831 ClassElement get constListImplementation => jsArrayClass; 1831 ClassElement get constListImplementation => jsArrayClass;
1832 ClassElement get fixedListImplementation => jsFixedArrayClass; 1832 ClassElement get fixedListImplementation => jsFixedArrayClass;
1833 ClassElement get growableListImplementation => jsExtendableArrayClass; 1833 ClassElement get growableListImplementation => jsExtendableArrayClass;
1834 ClassElement get mapImplementation => mapLiteralClass; 1834 ClassElement get mapImplementation => mapLiteralClass;
1835 ClassElement get constMapImplementation => constMapLiteralClass; 1835 ClassElement get constMapImplementation => constMapLiteralClass;
1836 ClassElement get typeImplementation => typeLiteralClass; 1836 ClassElement get typeImplementation => typeLiteralClass;
1837 ClassElement get boolImplementation => jsBoolClass; 1837 ClassElement get boolImplementation => jsBoolClass;
1838 ClassElement get nullImplementation => jsNullClass; 1838 ClassElement get nullImplementation => jsNullClass;
1839 } 1839 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698