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

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

Issue 11299009: Support type literals as compile-time constants. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 1 month 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 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 * The members of instantiated interceptor classes: maps a member 691 * The members of instantiated interceptor classes: maps a member
692 * name to the list of members that have that name. This map is used 692 * name to the list of members that have that name. This map is used
693 * by the codegen to know whether a send must be intercepted or not. 693 * by the codegen to know whether a send must be intercepted or not.
694 */ 694 */
695 final Map<SourceString, List<Element>> interceptedElements; 695 final Map<SourceString, List<Element>> interceptedElements;
696 696
697 List<CompilerTask> get tasks { 697 List<CompilerTask> get tasks {
698 return <CompilerTask>[builder, optimizer, generator, emitter]; 698 return <CompilerTask>[builder, optimizer, generator, emitter];
699 } 699 }
700 700
701 final RuntimeTypeInformation rti;
702
701 JavaScriptBackend(Compiler compiler, bool generateSourceMap, bool disableEval) 703 JavaScriptBackend(Compiler compiler, bool generateSourceMap, bool disableEval)
702 : namer = determineNamer(compiler), 704 : namer = determineNamer(compiler),
703 returnInfo = new Map<Element, ReturnInfo>(), 705 returnInfo = new Map<Element, ReturnInfo>(),
704 invalidateAfterCodegen = new List<Element>(), 706 invalidateAfterCodegen = new List<Element>(),
705 interceptors = new Interceptors(compiler), 707 interceptors = new Interceptors(compiler),
706 usedInterceptors = new Set<Selector>(), 708 usedInterceptors = new Set<Selector>(),
707 interceptedElements = new Map<SourceString, List<Element>>(), 709 interceptedElements = new Map<SourceString, List<Element>>(),
710 rti = new RuntimeTypeInformation(compiler),
708 super(compiler, JAVA_SCRIPT_CONSTANT_SYSTEM) { 711 super(compiler, JAVA_SCRIPT_CONSTANT_SYSTEM) {
709 emitter = disableEval 712 emitter = disableEval
710 ? new CodeEmitterNoEvalTask(compiler, namer, generateSourceMap) 713 ? new CodeEmitterNoEvalTask(compiler, namer, generateSourceMap)
711 : new CodeEmitterTask(compiler, namer, generateSourceMap); 714 : new CodeEmitterTask(compiler, namer, generateSourceMap);
712 builder = new SsaBuilderTask(this); 715 builder = new SsaBuilderTask(this);
713 optimizer = new SsaOptimizerTask(this); 716 optimizer = new SsaOptimizerTask(this);
714 generator = new SsaCodeGeneratorTask(this); 717 generator = new SsaCodeGeneratorTask(this);
715 argumentTypes = new ArgumentTypesRegistry(this); 718 argumentTypes = new ArgumentTypesRegistry(this);
716 fieldTypes = new FieldTypesRegistry(this); 719 fieldTypes = new FieldTypesRegistry(this);
717 } 720 }
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
1084 print("Inferred return types:"); 1087 print("Inferred return types:");
1085 print("----------------------"); 1088 print("----------------------");
1086 dumpReturnTypes(); 1089 dumpReturnTypes();
1087 print(""); 1090 print("");
1088 print("Inferred field types:"); 1091 print("Inferred field types:");
1089 print("------------------------"); 1092 print("------------------------");
1090 fieldTypes.dump(); 1093 fieldTypes.dump();
1091 print(""); 1094 print("");
1092 } 1095 }
1093 } 1096 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698