| 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 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 rti = new RuntimeTypes(compiler), | 452 rti = new RuntimeTypes(compiler), |
| 453 specializedGetInterceptors = new Map<String, Set<ClassElement>>(), | 453 specializedGetInterceptors = new Map<String, Set<ClassElement>>(), |
| 454 super(compiler) { | 454 super(compiler) { |
| 455 emitter = new CodeEmitterTask(compiler, namer, generateSourceMap); | 455 emitter = new CodeEmitterTask(compiler, namer, generateSourceMap); |
| 456 typeVariableHandler = new TypeVariableHandler(this); | 456 typeVariableHandler = new TypeVariableHandler(this); |
| 457 customElementsAnalysis = new CustomElementsAnalysis(this); | 457 customElementsAnalysis = new CustomElementsAnalysis(this); |
| 458 constantCompilerTask = new JavaScriptConstantTask(compiler); | 458 constantCompilerTask = new JavaScriptConstantTask(compiler); |
| 459 resolutionCallbacks = new JavaScriptResolutionCallbacks(this); | 459 resolutionCallbacks = new JavaScriptResolutionCallbacks(this); |
| 460 patchResolverTask = new PatchResolverTask(compiler); | 460 patchResolverTask = new PatchResolverTask(compiler); |
| 461 functionCompiler = USE_CPS_IR | 461 functionCompiler = USE_CPS_IR |
| 462 ? new CspFunctionCompiler(compiler, this) | 462 ? new CpsFunctionCompiler(compiler, this) |
| 463 : new SsaFunctionCompiler(this, generateSourceMap); | 463 : new SsaFunctionCompiler(this, generateSourceMap); |
| 464 } | 464 } |
| 465 | 465 |
| 466 ConstantSystem get constantSystem => constants.constantSystem; | 466 ConstantSystem get constantSystem => constants.constantSystem; |
| 467 | 467 |
| 468 /// Returns constant environment for the JavaScript interpretation of the | 468 /// Returns constant environment for the JavaScript interpretation of the |
| 469 /// constants. | 469 /// constants. |
| 470 JavaScriptConstantCompiler get constants { | 470 JavaScriptConstantCompiler get constants { |
| 471 return constantCompilerTask.jsConstantCompiler; | 471 return constantCompilerTask.jsConstantCompiler; |
| 472 } | 472 } |
| (...skipping 2057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2530 } | 2530 } |
| 2531 } | 2531 } |
| 2532 | 2532 |
| 2533 /// Records that [constant] is used by the element behind [registry]. | 2533 /// Records that [constant] is used by the element behind [registry]. |
| 2534 class Dependency { | 2534 class Dependency { |
| 2535 final ConstantValue constant; | 2535 final ConstantValue constant; |
| 2536 final Element annotatedElement; | 2536 final Element annotatedElement; |
| 2537 | 2537 |
| 2538 const Dependency(this.constant, this.annotatedElement); | 2538 const Dependency(this.constant, this.annotatedElement); |
| 2539 } | 2539 } |
| OLD | NEW |