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

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

Issue 11188004: Add a content-security-policy (CSP) flag. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: More fixes. 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 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 final List<Element> invalidateAfterCodegen; 660 final List<Element> invalidateAfterCodegen;
661 ArgumentTypesRegistry argumentTypes; 661 ArgumentTypesRegistry argumentTypes;
662 FieldTypesRegistry fieldTypes; 662 FieldTypesRegistry fieldTypes;
663 663
664 final Interceptors interceptors; 664 final Interceptors interceptors;
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,
671 bool generateSourceMap,
672 bool disableEval)
671 : namer = new Namer(compiler), 673 : namer = new Namer(compiler),
672 returnInfo = new Map<Element, ReturnInfo>(), 674 returnInfo = new Map<Element, ReturnInfo>(),
673 invalidateAfterCodegen = new List<Element>(), 675 invalidateAfterCodegen = new List<Element>(),
674 interceptors = new Interceptors(compiler), 676 interceptors = new Interceptors(compiler),
675 super(compiler, JAVA_SCRIPT_CONSTANT_SYSTEM) { 677 super(compiler, JAVA_SCRIPT_CONSTANT_SYSTEM) {
676 emitter = new CodeEmitterTask(compiler, namer, generateSourceMap); 678 emitter = disableEval
679 ? new CodeEmitterNoEvalTask(compiler, namer, generateSourceMap)
680 : new CodeEmitterTask(compiler, namer, generateSourceMap);
677 builder = new SsaBuilderTask(this); 681 builder = new SsaBuilderTask(this);
678 optimizer = new SsaOptimizerTask(this); 682 optimizer = new SsaOptimizerTask(this);
679 generator = new SsaCodeGeneratorTask(this); 683 generator = new SsaCodeGeneratorTask(this);
680 argumentTypes = new ArgumentTypesRegistry(this); 684 argumentTypes = new ArgumentTypesRegistry(this);
681 fieldTypes = new FieldTypesRegistry(this); 685 fieldTypes = new FieldTypesRegistry(this);
682 } 686 }
683 687
684 Element get cyclicThrowHelper { 688 Element get cyclicThrowHelper {
685 return compiler.findHelper(const SourceString("throwCyclicInit")); 689 return compiler.findHelper(const SourceString("throwCyclicInit"));
686 } 690 }
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 print("Inferred return types:"); 945 print("Inferred return types:");
942 print("----------------------"); 946 print("----------------------");
943 dumpReturnTypes(); 947 dumpReturnTypes();
944 print(""); 948 print("");
945 print("Inferred field types:"); 949 print("Inferred field types:");
946 print("------------------------"); 950 print("------------------------");
947 fieldTypes.dump(); 951 fieldTypes.dump();
948 print(""); 952 print("");
949 } 953 }
950 } 954 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/dart2js.dart ('k') | lib/compiler/implementation/js_backend/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698