| 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 library js_backend.backend; | 5 library js_backend.backend; |
| 6 | 6 |
| 7 import 'dart:async' show Future; | 7 import 'dart:async' show Future; |
| 8 | 8 |
| 9 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; | 9 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; |
| 10 | 10 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 import '../util/util.dart'; | 65 import '../util/util.dart'; |
| 66 import '../world.dart' show ClosedWorld; | 66 import '../world.dart' show ClosedWorld; |
| 67 import 'backend_helpers.dart'; | 67 import 'backend_helpers.dart'; |
| 68 import 'backend_impact.dart'; | 68 import 'backend_impact.dart'; |
| 69 import 'backend_serialization.dart' show JavaScriptBackendSerialization; | 69 import 'backend_serialization.dart' show JavaScriptBackendSerialization; |
| 70 import 'checked_mode_helpers.dart'; | 70 import 'checked_mode_helpers.dart'; |
| 71 import 'constant_handler_javascript.dart'; | 71 import 'constant_handler_javascript.dart'; |
| 72 import 'custom_elements_analysis.dart'; | 72 import 'custom_elements_analysis.dart'; |
| 73 import 'enqueuer.dart'; | 73 import 'enqueuer.dart'; |
| 74 import 'js_interop_analysis.dart' show JsInteropAnalysis; | 74 import 'js_interop_analysis.dart' show JsInteropAnalysis; |
| 75 import 'kernel_task.dart'; | 75 import '../kernel/task.dart'; |
| 76 import 'lookup_map_analysis.dart' show LookupMapAnalysis; | 76 import 'lookup_map_analysis.dart' show LookupMapAnalysis; |
| 77 import 'namer.dart'; | 77 import 'namer.dart'; |
| 78 import 'native_data.dart' show NativeData; | 78 import 'native_data.dart' show NativeData; |
| 79 import 'no_such_method_registry.dart'; | 79 import 'no_such_method_registry.dart'; |
| 80 import 'patch_resolver.dart'; | 80 import 'patch_resolver.dart'; |
| 81 import 'type_variable_handler.dart'; | 81 import 'type_variable_handler.dart'; |
| 82 | 82 |
| 83 part 'runtime_types.dart'; | 83 part 'runtime_types.dart'; |
| 84 | 84 |
| 85 const VERBOSE_OPTIMIZER_HINTS = false; | 85 const VERBOSE_OPTIMIZER_HINTS = false; |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 /** | 469 /** |
| 470 * A set of members that are called from subclasses via `super`. | 470 * A set of members that are called from subclasses via `super`. |
| 471 */ | 471 */ |
| 472 final Set<FunctionElement> aliasedSuperMembers = | 472 final Set<FunctionElement> aliasedSuperMembers = |
| 473 new Setlet<FunctionElement>(); | 473 new Setlet<FunctionElement>(); |
| 474 | 474 |
| 475 List<CompilerTask> get tasks { | 475 List<CompilerTask> get tasks { |
| 476 List<CompilerTask> result = functionCompiler.tasks; | 476 List<CompilerTask> result = functionCompiler.tasks; |
| 477 result.add(emitter); | 477 result.add(emitter); |
| 478 result.add(patchResolverTask); | 478 result.add(patchResolverTask); |
| 479 result.add(kernelTask); |
| 479 return result; | 480 return result; |
| 480 } | 481 } |
| 481 | 482 |
| 482 final RuntimeTypes rti; | 483 final RuntimeTypes rti; |
| 483 final RuntimeTypesEncoder rtiEncoder; | 484 final RuntimeTypesEncoder rtiEncoder; |
| 484 | 485 |
| 485 /// True if a call to preserveMetadataMarker has been seen. This means that | 486 /// True if a call to preserveMetadataMarker has been seen. This means that |
| 486 /// metadata must be retained for dart:mirrors to work correctly. | 487 /// metadata must be retained for dart:mirrors to work correctly. |
| 487 bool mustRetainMetadata = false; | 488 bool mustRetainMetadata = false; |
| 488 | 489 |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 frontend = new JSFrontendAccess(compiler), | 623 frontend = new JSFrontendAccess(compiler), |
| 623 super(compiler) { | 624 super(compiler) { |
| 624 emitter = new CodeEmitterTask( | 625 emitter = new CodeEmitterTask( |
| 625 compiler, namer, generateSourceMap, useStartupEmitter); | 626 compiler, namer, generateSourceMap, useStartupEmitter); |
| 626 typeVariableHandler = new TypeVariableHandler(compiler); | 627 typeVariableHandler = new TypeVariableHandler(compiler); |
| 627 customElementsAnalysis = new CustomElementsAnalysis(this); | 628 customElementsAnalysis = new CustomElementsAnalysis(this); |
| 628 lookupMapAnalysis = new LookupMapAnalysis(this, reporter); | 629 lookupMapAnalysis = new LookupMapAnalysis(this, reporter); |
| 629 jsInteropAnalysis = new JsInteropAnalysis(this); | 630 jsInteropAnalysis = new JsInteropAnalysis(this); |
| 630 | 631 |
| 631 noSuchMethodRegistry = new NoSuchMethodRegistry(this); | 632 noSuchMethodRegistry = new NoSuchMethodRegistry(this); |
| 632 kernelTask = new KernelTask(this); | 633 kernelTask = new KernelTask(compiler); |
| 633 constantCompilerTask = new JavaScriptConstantTask(compiler); | 634 constantCompilerTask = new JavaScriptConstantTask(compiler); |
| 634 impactTransformer = new JavaScriptImpactTransformer(this); | 635 impactTransformer = new JavaScriptImpactTransformer(this); |
| 635 patchResolverTask = new PatchResolverTask(compiler); | 636 patchResolverTask = new PatchResolverTask(compiler); |
| 636 functionCompiler = | 637 functionCompiler = |
| 637 new SsaFunctionCompiler(this, sourceInformationStrategy, useKernel); | 638 new SsaFunctionCompiler(this, sourceInformationStrategy, useKernel); |
| 638 serialization = new JavaScriptBackendSerialization(this); | 639 serialization = new JavaScriptBackendSerialization(this); |
| 639 backendClasses = new JavaScriptBackendClasses(helpers); | 640 backendClasses = new JavaScriptBackendClasses(helpers); |
| 640 } | 641 } |
| 641 | 642 |
| 642 ConstantSystem get constantSystem => constants.constantSystem; | 643 ConstantSystem get constantSystem => constants.constantSystem; |
| (...skipping 2644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3287 ClassElement get mapImplementation => helpers.mapLiteralClass; | 3288 ClassElement get mapImplementation => helpers.mapLiteralClass; |
| 3288 ClassElement get constMapImplementation => helpers.constMapLiteralClass; | 3289 ClassElement get constMapImplementation => helpers.constMapLiteralClass; |
| 3289 ClassElement get typeImplementation => helpers.typeLiteralClass; | 3290 ClassElement get typeImplementation => helpers.typeLiteralClass; |
| 3290 ClassElement get boolImplementation => helpers.jsBoolClass; | 3291 ClassElement get boolImplementation => helpers.jsBoolClass; |
| 3291 ClassElement get nullImplementation => helpers.jsNullClass; | 3292 ClassElement get nullImplementation => helpers.jsNullClass; |
| 3292 ClassElement get syncStarIterableImplementation => helpers.syncStarIterable; | 3293 ClassElement get syncStarIterableImplementation => helpers.syncStarIterable; |
| 3293 ClassElement get asyncFutureImplementation => helpers.futureImplementation; | 3294 ClassElement get asyncFutureImplementation => helpers.futureImplementation; |
| 3294 ClassElement get asyncStarStreamImplementation => helpers.controllerStream; | 3295 ClassElement get asyncStarStreamImplementation => helpers.controllerStream; |
| 3295 ClassElement get functionImplementation => helpers.coreClasses.functionClass; | 3296 ClassElement get functionImplementation => helpers.coreClasses.functionClass; |
| 3296 } | 3297 } |
| OLD | NEW |