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

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

Issue 2531303002: Decouple WorkItem from Compiler (Closed)
Patch Set: Updated cf. comments. Created 4 years, 1 month 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/serialization/task.dart ('k') | pkg/compiler/lib/src/universe/use.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.dart
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index 8bb5e0b8251dc8575b52455fde705b746e533156..2fee721a2145bd301e1c5ea20e5da3f133d8929d 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -407,10 +407,8 @@ class SsaBuilder extends ast.Visitor
bool tryInlineMethod(Element element, Selector selector, TypeMask mask,
List<HInstruction> providedArguments, ast.Node currentNode,
{InterfaceType instanceType}) {
- // TODO(johnniwinther): Register this on the [registry]. Currently the
- // [CodegenRegistry] calls the enqueuer, but [element] should _not_ be
- // enqueued.
- backend.registerStaticUse(compiler.enqueuer.codegen, element);
+ registry
+ .addImpact(backend.registerStaticUse(element, forResolution: false));
if (backend.isJsInterop(element) && !element.isFactoryConstructor) {
// We only inline factory JavaScript interop constructors.
@@ -1497,23 +1495,23 @@ class SsaBuilder extends ast.Visitor
insertTraceCall(Element element) {
if (JavaScriptBackend.TRACE_METHOD == 'console') {
- if (element == backend.traceHelper) return;
+ if (element == backend.helpers.traceHelper) return;
n(e) => e == null ? '' : e.name;
String name = "${n(element.library)}:${n(element.enclosingClass)}."
"${n(element)}";
HConstant nameConstant = addConstantString(name);
- add(new HInvokeStatic(backend.traceHelper, <HInstruction>[nameConstant],
- backend.dynamicType));
+ add(new HInvokeStatic(backend.helpers.traceHelper,
+ <HInstruction>[nameConstant], backend.dynamicType));
}
}
insertCoverageCall(Element element) {
if (JavaScriptBackend.TRACE_METHOD == 'post') {
- if (element == backend.traceHelper) return;
+ if (element == backend.helpers.traceHelper) return;
// TODO(sigmund): create a better uuid for elements.
HConstant idConstant = graph.addConstantInt(element.hashCode, compiler);
HConstant nameConstant = addConstantString(element.name);
- add(new HInvokeStatic(backend.traceHelper,
+ add(new HInvokeStatic(backend.helpers.traceHelper,
<HInstruction>[idConstant, nameConstant], backend.dynamicType));
}
}
« no previous file with comments | « pkg/compiler/lib/src/serialization/task.dart ('k') | pkg/compiler/lib/src/universe/use.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698