OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 import '../elements/elements.dart'; | 4 import '../elements/elements.dart'; |
5 import '../io/source_information.dart'; | 5 import '../io/source_information.dart'; |
6 import '../js_backend/backend.dart' show JavaScriptBackend; | 6 import '../js_backend/backend.dart' show JavaScriptBackend; |
7 import '../js_backend/element_strategy.dart' show ElementCodegenWorkItem; | 7 import '../js_backend/element_strategy.dart' show ElementCodegenWorkItem; |
8 import '../kernel/kernel.dart'; | 8 import '../kernel/kernel.dart'; |
9 import '../world.dart'; | 9 import '../world.dart'; |
10 import 'builder.dart'; | 10 import 'builder.dart'; |
(...skipping 25 matching lines...) Expand all Loading... |
36 new KernelAstTypeInferenceMap(astAdapter); | 36 new KernelAstTypeInferenceMap(astAdapter); |
37 KernelSsaBuilder builder = new KernelSsaBuilder( | 37 KernelSsaBuilder builder = new KernelSsaBuilder( |
38 element, | 38 element, |
39 element.contextClass, | 39 element.contextClass, |
40 astAdapter.getInitialKernelNode(element), | 40 astAdapter.getInitialKernelNode(element), |
41 backend.compiler, | 41 backend.compiler, |
42 astAdapter, | 42 astAdapter, |
43 typeInferenceMap, | 43 typeInferenceMap, |
44 astAdapter, | 44 astAdapter, |
45 closedWorld, | 45 closedWorld, |
| 46 backend.compiler.codegenWorldBuilder, |
46 work.registry, | 47 work.registry, |
47 backend.compiler.closureToClassMapper, | 48 backend.compiler.closureToClassMapper, |
48 sourceInformationFactory.createBuilderForContext(work.element), | 49 sourceInformationFactory.createBuilderForContext(work.element), |
49 resolvedAst.kind == ResolvedAstKind.PARSED ? resolvedAst.node : null, | 50 resolvedAst.kind == ResolvedAstKind.PARSED ? resolvedAst.node : null, |
50 targetIsConstructorBody: element is ConstructorBodyElement); | 51 targetIsConstructorBody: element is ConstructorBodyElement); |
51 HGraph graph = builder.build(); | 52 HGraph graph = builder.build(); |
52 | 53 |
53 if (backend.tracer.isEnabled) { | 54 if (backend.tracer.isEnabled) { |
54 String name; | 55 String name; |
55 if (element.isClassMember) { | 56 if (element.isClassMember) { |
56 String className = element.enclosingClass.name; | 57 String className = element.enclosingClass.name; |
57 String memberName = element.name; | 58 String memberName = element.name; |
58 name = "$className.$memberName"; | 59 name = "$className.$memberName"; |
59 if (element.isGenerativeConstructorBody) { | 60 if (element.isGenerativeConstructorBody) { |
60 name = "$name (body)"; | 61 name = "$name (body)"; |
61 } | 62 } |
62 } else { | 63 } else { |
63 name = "${element.name}"; | 64 name = "${element.name}"; |
64 } | 65 } |
65 backend.tracer.traceCompilation(name); | 66 backend.tracer.traceCompilation(name); |
66 backend.tracer.traceGraph('builder', graph); | 67 backend.tracer.traceGraph('builder', graph); |
67 } | 68 } |
68 | 69 |
69 return graph; | 70 return graph; |
70 }); | 71 }); |
71 } | 72 } |
72 } | 73 } |
OLD | NEW |