| 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 import 'dart:collection'; | 5 import 'dart:collection'; |
| 6 | 6 |
| 7 import 'package:js_runtime/shared/embedded_names.dart'; | 7 import 'package:js_runtime/shared/embedded_names.dart'; |
| 8 | 8 |
| 9 import '../closure.dart'; | 9 import '../closure.dart'; |
| 10 import '../common.dart'; | 10 import '../common.dart'; |
| 11 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; | 11 import '../common/codegen.dart' show CodegenRegistry; |
| 12 import '../common/names.dart' show Identifiers, Selectors; | 12 import '../common/names.dart' show Identifiers, Selectors; |
| 13 import '../common/tasks.dart' show CompilerTask; | 13 import '../common/tasks.dart' show CompilerTask; |
| 14 import '../compiler.dart'; | 14 import '../compiler.dart'; |
| 15 import '../constants/constant_system.dart'; | 15 import '../constants/constant_system.dart'; |
| 16 import '../constants/expressions.dart'; | 16 import '../constants/expressions.dart'; |
| 17 import '../constants/values.dart'; | 17 import '../constants/values.dart'; |
| 18 import '../diagnostics/messages.dart' show Message, MessageTemplate; | 18 import '../diagnostics/messages.dart' show Message, MessageTemplate; |
| 19 import '../dump_info.dart' show InfoReporter; | 19 import '../dump_info.dart' show InfoReporter; |
| 20 import '../elements/elements.dart'; | 20 import '../elements/elements.dart'; |
| 21 import '../elements/entities.dart'; | 21 import '../elements/entities.dart'; |
| 22 import '../elements/modelx.dart' show ConstructorBodyElementX; | 22 import '../elements/modelx.dart' show ConstructorBodyElementX; |
| 23 import '../elements/names.dart'; | 23 import '../elements/names.dart'; |
| 24 import '../elements/operators.dart'; | 24 import '../elements/operators.dart'; |
| 25 import '../elements/resolution_types.dart'; | 25 import '../elements/resolution_types.dart'; |
| 26 import '../elements/types.dart'; | 26 import '../elements/types.dart'; |
| 27 import '../io/source_information.dart'; | 27 import '../io/source_information.dart'; |
| 28 import '../js/js.dart' as js; | 28 import '../js/js.dart' as js; |
| 29 import '../js_backend/backend.dart' show JavaScriptBackend; | 29 import '../js_backend/backend.dart' show JavaScriptBackend; |
| 30 import '../js_backend/element_strategy.dart' show ElementCodegenWorkItem; |
| 30 import '../js_backend/runtime_types.dart'; | 31 import '../js_backend/runtime_types.dart'; |
| 31 import '../js_emitter/js_emitter.dart' show CodeEmitterTask, NativeEmitter; | 32 import '../js_emitter/js_emitter.dart' show CodeEmitterTask, NativeEmitter; |
| 32 import '../native/native.dart' as native; | 33 import '../native/native.dart' as native; |
| 33 import '../resolution/semantic_visitor.dart'; | 34 import '../resolution/semantic_visitor.dart'; |
| 34 import '../resolution/tree_elements.dart' show TreeElements; | 35 import '../resolution/tree_elements.dart' show TreeElements; |
| 35 import '../tree/tree.dart' as ast; | 36 import '../tree/tree.dart' as ast; |
| 36 import '../types/types.dart'; | 37 import '../types/types.dart'; |
| 37 import '../universe/call_structure.dart' show CallStructure; | 38 import '../universe/call_structure.dart' show CallStructure; |
| 38 import '../universe/selector.dart' show Selector; | 39 import '../universe/selector.dart' show Selector; |
| 39 import '../universe/side_effects.dart' show SideEffects; | 40 import '../universe/side_effects.dart' show SideEffects; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 58 | 59 |
| 59 String get name => 'SSA builder'; | 60 String get name => 'SSA builder'; |
| 60 | 61 |
| 61 SsaBuilderTask(JavaScriptBackend backend, this.sourceInformationFactory) | 62 SsaBuilderTask(JavaScriptBackend backend, this.sourceInformationFactory) |
| 62 : emitter = backend.emitter, | 63 : emitter = backend.emitter, |
| 63 backend = backend, | 64 backend = backend, |
| 64 super(backend.compiler.measurer); | 65 super(backend.compiler.measurer); |
| 65 | 66 |
| 66 DiagnosticReporter get reporter => backend.reporter; | 67 DiagnosticReporter get reporter => backend.reporter; |
| 67 | 68 |
| 68 HGraph build(CodegenWorkItem work, ClosedWorld closedWorld) { | 69 HGraph build(ElementCodegenWorkItem work, ClosedWorld closedWorld) { |
| 69 return measure(() { | 70 return measure(() { |
| 70 MemberElement element = work.element.implementation; | 71 MemberElement element = work.element.implementation; |
| 71 return reporter.withCurrentElement(element, () { | 72 return reporter.withCurrentElement(element, () { |
| 72 SsaBuilder builder = new SsaBuilder( | 73 SsaBuilder builder = new SsaBuilder( |
| 73 work.element.implementation, | 74 work.element.implementation, |
| 74 work.resolvedAst, | 75 work.resolvedAst, |
| 75 work.registry, | 76 work.registry, |
| 76 backend, | 77 backend, |
| 77 closedWorld, | 78 closedWorld, |
| 78 emitter.nativeEmitter, | 79 emitter.nativeEmitter, |
| (...skipping 6658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6737 this.oldReturnLocal, | 6738 this.oldReturnLocal, |
| 6738 this.oldReturnType, | 6739 this.oldReturnType, |
| 6739 this.oldResolvedAst, | 6740 this.oldResolvedAst, |
| 6740 this.oldStack, | 6741 this.oldStack, |
| 6741 this.oldLocalsHandler, | 6742 this.oldLocalsHandler, |
| 6742 this.inTryStatement, | 6743 this.inTryStatement, |
| 6743 this.allFunctionsCalledOnce, | 6744 this.allFunctionsCalledOnce, |
| 6744 this.oldElementInferenceResults) | 6745 this.oldElementInferenceResults) |
| 6745 : super(function); | 6746 : super(function); |
| 6746 } | 6747 } |
| OLD | NEW |