Index: pkg/compiler/lib/src/ssa/builder_kernel.dart |
diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart |
index 38902b25916dca1981ad4ca16f8abd3ba0f9c413..89ca7e01945b19f44f1d7164bbe0b058805afc9e 100644 |
--- a/pkg/compiler/lib/src/ssa/builder_kernel.dart |
+++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart |
@@ -8,7 +8,6 @@ import '../closure.dart'; |
import '../common.dart'; |
import '../common/codegen.dart' show CodegenRegistry; |
import '../common/names.dart'; |
-import '../common/tasks.dart' show CompilerTask; |
import '../compiler.dart'; |
import '../constants/values.dart' |
show |
@@ -32,6 +31,7 @@ import '../universe/selector.dart'; |
import '../universe/side_effects.dart' show SideEffects; |
import '../universe/use.dart' show DynamicUse; |
import '../world.dart'; |
+import 'builder.dart'; |
import 'graph_builder.dart'; |
import 'jump_handler.dart'; |
import 'kernel_ast_adapter.dart'; |
@@ -44,18 +44,20 @@ import 'switch_continue_analysis.dart'; |
import 'type_builder.dart'; |
import 'types.dart' show TypeMaskFactory; |
-class SsaKernelBuilderTask extends CompilerTask { |
- final JavaScriptBackend backend; |
+class SsaKernelBuilderTask extends SsaAstBuilderBase { |
Siggi Cherem (dart-lang)
2017/05/23 21:17:30
Just to be clear, SsaKernelBuilderTask will become
Johnni Winther
2017/05/24 07:54:46
Correct
|
final SourceInformationStrategy sourceInformationFactory; |
String get name => 'SSA kernel builder'; |
SsaKernelBuilderTask(JavaScriptBackend backend, this.sourceInformationFactory) |
- : backend = backend, |
- super(backend.compiler.measurer); |
+ : super(backend); |
HGraph build(ElementCodegenWorkItem work, ClosedWorld closedWorld) { |
return measure(() { |
+ if (handleConstantField(work)) { |
+ // No code is generated for `work.element`. |
+ return null; |
+ } |
MemberElement element = work.element.implementation; |
Kernel kernel = backend.kernelTask.kernel; |
KernelSsaBuilder builder = new KernelSsaBuilder( |