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

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: Minor comment changes and rebase. 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 useContentSecurityPolicyMode)
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 = new CodeEmitterTask(compiler,
679 namer,
680 generateSourceMap,
681 useContentSecurityPolicyMode);
677 builder = new SsaBuilderTask(this); 682 builder = new SsaBuilderTask(this);
678 optimizer = new SsaOptimizerTask(this); 683 optimizer = new SsaOptimizerTask(this);
679 generator = new SsaCodeGeneratorTask(this); 684 generator = new SsaCodeGeneratorTask(this);
680 argumentTypes = new ArgumentTypesRegistry(this); 685 argumentTypes = new ArgumentTypesRegistry(this);
681 fieldTypes = new FieldTypesRegistry(this); 686 fieldTypes = new FieldTypesRegistry(this);
682 } 687 }
683 688
684 Element get cyclicThrowHelper { 689 Element get cyclicThrowHelper {
685 return compiler.findHelper(const SourceString("throwCyclicInit")); 690 return compiler.findHelper(const SourceString("throwCyclicInit"));
686 } 691 }
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 print("Inferred return types:"); 946 print("Inferred return types:");
942 print("----------------------"); 947 print("----------------------");
943 dumpReturnTypes(); 948 dumpReturnTypes();
944 print(""); 949 print("");
945 print("Inferred field types:"); 950 print("Inferred field types:");
946 print("------------------------"); 951 print("------------------------");
947 fieldTypes.dump(); 952 fieldTypes.dump();
948 print(""); 953 print("");
949 } 954 }
950 } 955 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698