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 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 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 | 665 |
666 List<CompilerTask> get tasks { | 666 List<CompilerTask> get tasks { |
667 return <CompilerTask>[builder, optimizer, generator, emitter]; | 667 return <CompilerTask>[builder, optimizer, generator, emitter]; |
668 } | 668 } |
669 | 669 |
670 JavaScriptBackend(Compiler compiler, bool generateSourceMap) | 670 JavaScriptBackend(Compiler compiler, bool generateSourceMap) |
671 : namer = new Namer(compiler), | 671 : namer = new Namer(compiler), |
672 returnInfo = new Map<Element, ReturnInfo>(), | 672 returnInfo = new Map<Element, ReturnInfo>(), |
673 invalidateAfterCodegen = new List<Element>(), | 673 invalidateAfterCodegen = new List<Element>(), |
674 interceptors = new Interceptors(compiler), | 674 interceptors = new Interceptors(compiler), |
675 super(compiler, constantSystem: JAVA_SCRIPT_CONSTANT_SYSTEM) { | 675 super(compiler, JAVA_SCRIPT_CONSTANT_SYSTEM) { |
676 emitter = new CodeEmitterTask(compiler, namer, generateSourceMap); | 676 emitter = new CodeEmitterTask(compiler, namer, generateSourceMap); |
677 builder = new SsaBuilderTask(this); | 677 builder = new SsaBuilderTask(this); |
678 optimizer = new SsaOptimizerTask(this); | 678 optimizer = new SsaOptimizerTask(this); |
679 generator = new SsaCodeGeneratorTask(this); | 679 generator = new SsaCodeGeneratorTask(this); |
680 argumentTypes = new ArgumentTypesRegistry(this); | 680 argumentTypes = new ArgumentTypesRegistry(this); |
681 fieldTypes = new FieldTypesRegistry(this); | 681 fieldTypes = new FieldTypesRegistry(this); |
682 } | 682 } |
683 | 683 |
684 Element get cyclicThrowHelper { | 684 Element get cyclicThrowHelper { |
685 return compiler.findHelper(const SourceString("throwCyclicInit")); | 685 return compiler.findHelper(const SourceString("throwCyclicInit")); |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 } |
OLD | NEW |