Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Unified Diff: pkg/compiler/lib/src/ssa/builder_kernel.dart

Issue 2893293002: Share more logic between the Ssa(Ast)Builder and SsaKernelBuilder (Closed)
Patch Set: Rebased Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | pkg/compiler/lib/src/ssa/ssa.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | pkg/compiler/lib/src/ssa/ssa.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698