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 27 matching lines...) Expand all Loading... |
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 backend.compiler.codegenWorldBuilder, |
47 work.registry, | 47 work.registry, |
48 backend.compiler.closureToClassMapper, | 48 backend.compiler.closureDataLookup, |
49 sourceInformationFactory.createBuilderForContext(work.element), | 49 sourceInformationFactory.createBuilderForContext(work.element), |
50 resolvedAst.kind == ResolvedAstKind.PARSED ? resolvedAst.node : null, | 50 resolvedAst.kind == ResolvedAstKind.PARSED ? resolvedAst.node : null, |
51 targetIsConstructorBody: element is ConstructorBodyElement); | 51 targetIsConstructorBody: element is ConstructorBodyElement); |
52 HGraph graph = builder.build(); | 52 HGraph graph = builder.build(); |
53 | 53 |
54 if (backend.tracer.isEnabled) { | 54 if (backend.tracer.isEnabled) { |
55 String name; | 55 String name; |
56 if (element.isClassMember) { | 56 if (element.isClassMember) { |
57 String className = element.enclosingClass.name; | 57 String className = element.enclosingClass.name; |
58 String memberName = element.name; | 58 String memberName = element.name; |
59 name = "$className.$memberName"; | 59 name = "$className.$memberName"; |
60 if (element.isGenerativeConstructorBody) { | 60 if (element.isGenerativeConstructorBody) { |
61 name = "$name (body)"; | 61 name = "$name (body)"; |
62 } | 62 } |
63 } else { | 63 } else { |
64 name = "${element.name}"; | 64 name = "${element.name}"; |
65 } | 65 } |
66 backend.tracer.traceCompilation(name); | 66 backend.tracer.traceCompilation(name); |
67 backend.tracer.traceGraph('builder', graph); | 67 backend.tracer.traceGraph('builder', graph); |
68 } | 68 } |
69 | 69 |
70 return graph; | 70 return graph; |
71 }); | 71 }); |
72 } | 72 } |
73 } | 73 } |
OLD | NEW |