| OLD | NEW |
| 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 const VERBOSE_OPTIMIZER_HINTS = false; | 7 const VERBOSE_OPTIMIZER_HINTS = false; |
| 8 | 8 |
| 9 const bool USE_CPS_IR = const bool.fromEnvironment("USE_CPS_IR"); | 9 const bool USE_CPS_IR = const bool.fromEnvironment("USE_CPS_IR"); |
| 10 | 10 |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 rti = new RuntimeTypes(compiler), | 454 rti = new RuntimeTypes(compiler), |
| 455 specializedGetInterceptors = new Map<String, Set<ClassElement>>(), | 455 specializedGetInterceptors = new Map<String, Set<ClassElement>>(), |
| 456 super(compiler) { | 456 super(compiler) { |
| 457 emitter = new CodeEmitterTask(compiler, namer, generateSourceMap); | 457 emitter = new CodeEmitterTask(compiler, namer, generateSourceMap); |
| 458 typeVariableHandler = new TypeVariableHandler(this); | 458 typeVariableHandler = new TypeVariableHandler(this); |
| 459 customElementsAnalysis = new CustomElementsAnalysis(this); | 459 customElementsAnalysis = new CustomElementsAnalysis(this); |
| 460 constantCompilerTask = new JavaScriptConstantTask(compiler); | 460 constantCompilerTask = new JavaScriptConstantTask(compiler); |
| 461 resolutionCallbacks = new JavaScriptResolutionCallbacks(this); | 461 resolutionCallbacks = new JavaScriptResolutionCallbacks(this); |
| 462 patchResolverTask = new PatchResolverTask(compiler); | 462 patchResolverTask = new PatchResolverTask(compiler); |
| 463 functionCompiler = USE_CPS_IR | 463 functionCompiler = USE_CPS_IR |
| 464 ? new CpsFunctionCompiler(compiler, this) | 464 ? new CpsFunctionCompiler( |
| 465 compiler, this, generateSourceMap: generateSourceMap) |
| 465 : new SsaFunctionCompiler(this, generateSourceMap); | 466 : new SsaFunctionCompiler(this, generateSourceMap); |
| 466 } | 467 } |
| 467 | 468 |
| 468 ConstantSystem get constantSystem => constants.constantSystem; | 469 ConstantSystem get constantSystem => constants.constantSystem; |
| 469 | 470 |
| 470 /// Returns constant environment for the JavaScript interpretation of the | 471 /// Returns constant environment for the JavaScript interpretation of the |
| 471 /// constants. | 472 /// constants. |
| 472 JavaScriptConstantCompiler get constants { | 473 JavaScriptConstantCompiler get constants { |
| 473 return constantCompilerTask.jsConstantCompiler; | 474 return constantCompilerTask.jsConstantCompiler; |
| 474 } | 475 } |
| (...skipping 2218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2693 } | 2694 } |
| 2694 } | 2695 } |
| 2695 | 2696 |
| 2696 /// Records that [constant] is used by the element behind [registry]. | 2697 /// Records that [constant] is used by the element behind [registry]. |
| 2697 class Dependency { | 2698 class Dependency { |
| 2698 final ConstantValue constant; | 2699 final ConstantValue constant; |
| 2699 final Element annotatedElement; | 2700 final Element annotatedElement; |
| 2700 | 2701 |
| 2701 const Dependency(this.constant, this.annotatedElement); | 2702 const Dependency(this.constant, this.annotatedElement); |
| 2702 } | 2703 } |
| OLD | NEW |