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

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

Issue 10901002: Hook up the --minify option in dart2js and use it to get rid of unnecessary whitespace inside funct… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge. Created 8 years, 3 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 final HTypeMap types; 255 final HTypeMap types;
256 256
257 JavaScriptItemCompilationContext() : types = new HTypeMap(); 257 JavaScriptItemCompilationContext() : types = new HTypeMap();
258 } 258 }
259 259
260 class JavaScriptBackend extends Backend { 260 class JavaScriptBackend extends Backend {
261 SsaBuilderTask builder; 261 SsaBuilderTask builder;
262 SsaOptimizerTask optimizer; 262 SsaOptimizerTask optimizer;
263 SsaCodeGeneratorTask generator; 263 SsaCodeGeneratorTask generator;
264 CodeEmitterTask emitter; 264 CodeEmitterTask emitter;
265
265 final Map<Element, Map<Element, HType>> fieldInitializers; 266 final Map<Element, Map<Element, HType>> fieldInitializers;
266 final Map<Element, Map<Element, HType>> fieldConstructorSetters; 267 final Map<Element, Map<Element, HType>> fieldConstructorSetters;
267 final Map<Element, Map<Element, HType>> fieldSettersType; 268 final Map<Element, Map<Element, HType>> fieldSettersType;
268 269
269 final Map<Element, ReturnInfo> returnInfo; 270 final Map<Element, ReturnInfo> returnInfo;
270 271
271 final List<Element> invalidateAfterCodegen; 272 final List<Element> invalidateAfterCodegen;
272 ArgumentTypesRegistry argumentTypes; 273 ArgumentTypesRegistry argumentTypes;
273 274
274 List<CompilerTask> get tasks { 275 List<CompilerTask> get tasks {
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 HType optimisticReturnTypesWithRecompilationOnTypeChange( 500 HType optimisticReturnTypesWithRecompilationOnTypeChange(
500 FunctionElement caller, FunctionElement callee) { 501 FunctionElement caller, FunctionElement callee) {
501 returnInfo.putIfAbsent(callee, () => new ReturnInfo.unknownType()); 502 returnInfo.putIfAbsent(callee, () => new ReturnInfo.unknownType());
502 ReturnInfo info = returnInfo[callee]; 503 ReturnInfo info = returnInfo[callee];
503 if (info.returnType != HType.UNKNOWN && caller != null) { 504 if (info.returnType != HType.UNKNOWN && caller != null) {
504 info.addCompiledFunction(caller); 505 info.addCompiledFunction(caller);
505 } 506 }
506 return info.returnType; 507 return info.returnType;
507 } 508 }
508 } 509 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/js/printer.dart ('k') | lib/compiler/implementation/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698