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

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

Issue 11365170: Start new design for interceptors and implement String.charCodeAt with it. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 /** 660 /**
661 * Documentation wanted -- johnniwinther 661 * Documentation wanted -- johnniwinther
662 * 662 *
663 * Invariant: Elements must be declaration elements. 663 * Invariant: Elements must be declaration elements.
664 */ 664 */
665 final List<Element> invalidateAfterCodegen; 665 final List<Element> invalidateAfterCodegen;
666 ArgumentTypesRegistry argumentTypes; 666 ArgumentTypesRegistry argumentTypes;
667 FieldTypesRegistry fieldTypes; 667 FieldTypesRegistry fieldTypes;
668 668
669 final Interceptors interceptors; 669 final Interceptors interceptors;
670 final Set<Selector> usedInterceptors;
ahe 2012/11/12 13:24:11 Document this variable.
ngeoffray 2012/11/13 11:45:16 Done.
670 671
671 List<CompilerTask> get tasks { 672 List<CompilerTask> get tasks {
672 return <CompilerTask>[builder, optimizer, generator, emitter]; 673 return <CompilerTask>[builder, optimizer, generator, emitter];
673 } 674 }
674 675
675 JavaScriptBackend(Compiler compiler, 676 JavaScriptBackend(Compiler compiler,
676 bool generateSourceMap, 677 bool generateSourceMap,
677 bool disableEval) 678 bool disableEval)
678 : namer = new Namer(compiler), 679 : namer = new Namer(compiler),
679 returnInfo = new Map<Element, ReturnInfo>(), 680 returnInfo = new Map<Element, ReturnInfo>(),
680 invalidateAfterCodegen = new List<Element>(), 681 invalidateAfterCodegen = new List<Element>(),
681 interceptors = new Interceptors(compiler), 682 interceptors = new Interceptors(compiler),
683 usedInterceptors = new Set<Selector>(),
682 super(compiler, JAVA_SCRIPT_CONSTANT_SYSTEM) { 684 super(compiler, JAVA_SCRIPT_CONSTANT_SYSTEM) {
683 emitter = disableEval 685 emitter = disableEval
684 ? new CodeEmitterNoEvalTask(compiler, namer, generateSourceMap) 686 ? new CodeEmitterNoEvalTask(compiler, namer, generateSourceMap)
685 : new CodeEmitterTask(compiler, namer, generateSourceMap); 687 : new CodeEmitterTask(compiler, namer, generateSourceMap);
686 builder = new SsaBuilderTask(this); 688 builder = new SsaBuilderTask(this);
687 optimizer = new SsaOptimizerTask(this); 689 optimizer = new SsaOptimizerTask(this);
688 generator = new SsaCodeGeneratorTask(this); 690 generator = new SsaCodeGeneratorTask(this);
689 argumentTypes = new ArgumentTypesRegistry(this); 691 argumentTypes = new ArgumentTypesRegistry(this);
690 fieldTypes = new FieldTypesRegistry(this); 692 fieldTypes = new FieldTypesRegistry(this);
691 } 693 }
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 print("Inferred return types:"); 954 print("Inferred return types:");
953 print("----------------------"); 955 print("----------------------");
954 dumpReturnTypes(); 956 dumpReturnTypes();
955 print(""); 957 print("");
956 print("Inferred field types:"); 958 print("Inferred field types:");
957 print("------------------------"); 959 print("------------------------");
958 fieldTypes.dump(); 960 fieldTypes.dump();
959 print(""); 961 print("");
960 } 962 }
961 } 963 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698