| 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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 /// Resolution and codegen support for generating table of interceptors and | 434 /// Resolution and codegen support for generating table of interceptors and |
| 435 /// constructors for custom elements. | 435 /// constructors for custom elements. |
| 436 CustomElementsAnalysis customElementsAnalysis; | 436 CustomElementsAnalysis customElementsAnalysis; |
| 437 | 437 |
| 438 JavaScriptConstantTask constantCompilerTask; | 438 JavaScriptConstantTask constantCompilerTask; |
| 439 | 439 |
| 440 JavaScriptResolutionCallbacks resolutionCallbacks; | 440 JavaScriptResolutionCallbacks resolutionCallbacks; |
| 441 | 441 |
| 442 PatchResolverTask patchResolverTask; | 442 PatchResolverTask patchResolverTask; |
| 443 | 443 |
| 444 bool get canHandleCompilationFailed => true; |
| 445 |
| 444 JavaScriptBackend(Compiler compiler, bool generateSourceMap) | 446 JavaScriptBackend(Compiler compiler, bool generateSourceMap) |
| 445 : namer = determineNamer(compiler), | 447 : namer = determineNamer(compiler), |
| 446 oneShotInterceptors = new Map<String, Selector>(), | 448 oneShotInterceptors = new Map<String, Selector>(), |
| 447 interceptedElements = new Map<String, Set<Element>>(), | 449 interceptedElements = new Map<String, Set<Element>>(), |
| 448 rti = new RuntimeTypes(compiler), | 450 rti = new RuntimeTypes(compiler), |
| 449 specializedGetInterceptors = new Map<String, Set<ClassElement>>(), | 451 specializedGetInterceptors = new Map<String, Set<ClassElement>>(), |
| 450 super(compiler) { | 452 super(compiler) { |
| 451 emitter = new CodeEmitterTask(compiler, namer, generateSourceMap); | 453 emitter = new CodeEmitterTask(compiler, namer, generateSourceMap); |
| 452 typeVariableHandler = new TypeVariableHandler(this); | 454 typeVariableHandler = new TypeVariableHandler(this); |
| 453 customElementsAnalysis = new CustomElementsAnalysis(this); | 455 customElementsAnalysis = new CustomElementsAnalysis(this); |
| (...skipping 2071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2525 } | 2527 } |
| 2526 } | 2528 } |
| 2527 | 2529 |
| 2528 /// Records that [constant] is used by the element behind [registry]. | 2530 /// Records that [constant] is used by the element behind [registry]. |
| 2529 class Dependency { | 2531 class Dependency { |
| 2530 final ConstantValue constant; | 2532 final ConstantValue constant; |
| 2531 final Element annotatedElement; | 2533 final Element annotatedElement; |
| 2532 | 2534 |
| 2533 const Dependency(this.constant, this.annotatedElement); | 2535 const Dependency(this.constant, this.annotatedElement); |
| 2534 } | 2536 } |
| OLD | NEW |