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 | 4 |
5 import '../common/tasks.dart'; | 5 import '../common/tasks.dart'; |
6 import '../elements/elements.dart'; | 6 import '../elements/elements.dart'; |
7 import '../io/source_information.dart'; | 7 import '../io/source_information.dart'; |
8 import '../js_backend/backend.dart' show JavaScriptBackend; | 8 import '../js_backend/backend.dart' show JavaScriptBackend; |
9 import '../js_backend/element_strategy.dart' show ElementCodegenWorkItem; | 9 import '../js_backend/element_strategy.dart' show ElementCodegenWorkItem; |
10 import '../kernel/kernel.dart'; | 10 import '../kernel/kernel.dart'; |
(...skipping 30 matching lines...) Expand all Loading... |
41 element, | 41 element, |
42 element.contextClass, | 42 element.contextClass, |
43 astAdapter.getMemberNode(element), | 43 astAdapter.getMemberNode(element), |
44 backend.compiler, | 44 backend.compiler, |
45 astAdapter, | 45 astAdapter, |
46 typeInferenceMap, | 46 typeInferenceMap, |
47 astAdapter, | 47 astAdapter, |
48 closedWorld, | 48 closedWorld, |
49 backend.compiler.codegenWorldBuilder, | 49 backend.compiler.codegenWorldBuilder, |
50 work.registry, | 50 work.registry, |
51 backend.compiler.closureDataLookup, | 51 backend.compiler.backendStrategy.closureDataLookup, |
52 sourceInformationFactory.createBuilderForContext(work.element), | 52 sourceInformationFactory.createBuilderForContext(work.element), |
53 resolvedAst.kind == ResolvedAstKind.PARSED ? resolvedAst.node : null, | 53 resolvedAst.kind == ResolvedAstKind.PARSED ? resolvedAst.node : null, |
54 targetIsConstructorBody: element is ConstructorBodyElement); | 54 targetIsConstructorBody: element is ConstructorBodyElement); |
55 HGraph graph = builder.build(); | 55 HGraph graph = builder.build(); |
56 | 56 |
57 if (backend.tracer.isEnabled) { | 57 if (backend.tracer.isEnabled) { |
58 String name; | 58 String name; |
59 if (element.isClassMember) { | 59 if (element.isClassMember) { |
60 String className = element.enclosingClass.name; | 60 String className = element.enclosingClass.name; |
61 String memberName = element.name; | 61 String memberName = element.name; |
62 name = "$className.$memberName"; | 62 name = "$className.$memberName"; |
63 if (element.isGenerativeConstructorBody) { | 63 if (element.isGenerativeConstructorBody) { |
64 name = "$name (body)"; | 64 name = "$name (body)"; |
65 } | 65 } |
66 } else { | 66 } else { |
67 name = "${element.name}"; | 67 name = "${element.name}"; |
68 } | 68 } |
69 backend.tracer.traceCompilation(name); | 69 backend.tracer.traceCompilation(name); |
70 backend.tracer.traceGraph('builder', graph); | 70 backend.tracer.traceGraph('builder', graph); |
71 } | 71 } |
72 | 72 |
73 return graph; | 73 return graph; |
74 }); | 74 }); |
75 } | 75 } |
76 } | 76 } |
OLD | NEW |