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

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

Issue 11099044: Register parameter types for closure invocations to the backend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Disable call_test for VM. Created 8 years, 2 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 typedef void Recompile(Element element); 5 typedef void Recompile(Element element);
6 6
7 class ReturnInfo { 7 class ReturnInfo {
8 HType returnType; 8 HType returnType;
9 List<Element> compiledFunctions; 9 List<Element> compiledFunctions;
10 10
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 // When a static is used for anything else than a call target we cannot 491 // When a static is used for anything else than a call target we cannot
492 // infer anything about its parameter types. 492 // infer anything about its parameter types.
493 Element element = node.element; 493 Element element = node.element;
494 assert(invariant(node, element.isDeclaration)); 494 assert(invariant(node, element.isDeclaration));
495 if (optimizedStaticFunctions.contains(element)) { 495 if (optimizedStaticFunctions.contains(element)) {
496 backend.scheduleForRecompilation(element); 496 backend.scheduleForRecompilation(element);
497 } 497 }
498 staticTypeMap[element] = HTypeList.ALL_UNKNOWN; 498 staticTypeMap[element] = HTypeList.ALL_UNKNOWN;
499 } 499 }
500 500
501 void registerDynamicInvocation(HInvokeDynamicMethod node, 501 void registerDynamicInvocation(HInvokeDynamic node,
502 Selector selector, 502 Selector selector,
503 HTypeMap types) { 503 HTypeMap types) {
504 // If there are any getters for this method we cannot know anything about 504 // If there are any getters for this method we cannot know anything about
505 // the types of the provided parameters. Use resolverWorld for now as that 505 // the types of the provided parameters. Use resolverWorld for now as that
506 // information does not change during compilation. 506 // information does not change during compilation.
507 // TODO(sgjesse): These checks should use the codegenWorld and keep track 507 // TODO(sgjesse): These checks should use the codegenWorld and keep track
508 // of changes to this information. 508 // of changes to this information.
509 Element element = node.element; 509 Element element = node.element;
510 Universe resolverWorld = compiler.resolverWorld; 510 Universe resolverWorld = compiler.resolverWorld;
511 if (element != null && 511 if (element != null &&
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 assert(invariant(element, element.isDeclaration)); 757 assert(invariant(element, element.isDeclaration));
758 if (compiler.phase == Compiler.PHASE_COMPILING) { 758 if (compiler.phase == Compiler.PHASE_COMPILING) {
759 invalidateAfterCodegen.add(element); 759 invalidateAfterCodegen.add(element);
760 } 760 }
761 } 761 }
762 762
763 /** 763 /**
764 * Register a dynamic invocation and collect the provided types for the 764 * Register a dynamic invocation and collect the provided types for the
765 * named selector. 765 * named selector.
766 */ 766 */
767 void registerDynamicInvocation(HInvokeDynamicMethod node, 767 void registerDynamicInvocation(HInvokeDynamic node,
768 Selector selector, 768 Selector selector,
769 HTypeMap types) { 769 HTypeMap types) {
770 argumentTypes.registerDynamicInvocation(node, selector, types); 770 argumentTypes.registerDynamicInvocation(node, selector, types);
771 } 771 }
772 772
773 /** 773 /**
774 * Register a static invocation and collect the provided types for the 774 * Register a static invocation and collect the provided types for the
775 * named selector. 775 * named selector.
776 */ 776 */
777 void registerStaticInvocation(HInvokeStatic node, HTypeMap types) { 777 void registerStaticInvocation(HInvokeStatic node, HTypeMap types) {
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 print("Inferred return types:"); 941 print("Inferred return types:");
942 print("----------------------"); 942 print("----------------------");
943 dumpReturnTypes(); 943 dumpReturnTypes();
944 print(""); 944 print("");
945 print("Inferred field types:"); 945 print("Inferred field types:");
946 print("------------------------"); 946 print("------------------------");
947 fieldTypes.dump(); 947 fieldTypes.dump();
948 print(""); 948 print("");
949 } 949 }
950 } 950 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/ssa/codegen.dart » ('j') | tests/compiler/dart2js/mock_compiler.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698