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

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

Issue 2693163002: Split backend implementation of EnqueuerListener (Closed)
Patch Set: Updated cf. comments Created 3 years, 10 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
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 247c7a7db01cf9654220726ff659ea24c62c3a77..1b44c1d95d22937bcf4378d2bca0ca41bcbcabfe 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -407,11 +407,11 @@ class SsaBuilder extends ast.Visitor
* Try to inline [element] within the correct context of the builder. The
* insertion point is the state of the builder.
*/
- bool tryInlineMethod(Element element, Selector selector, TypeMask mask,
+ bool tryInlineMethod(MethodElement element, Selector selector, TypeMask mask,
List<HInstruction> providedArguments, ast.Node currentNode,
{ResolutionInterfaceType instanceType}) {
- registry
- .addImpact(backend.registerUsedElement(element, forResolution: false));
+ registry.addImpact(
+ backend.codegenEnqueuerListener.registerUsedElement(element));
if (backend.isJsInterop(element) && !element.isFactoryConstructor) {
// We only inline factory JavaScript interop constructors.
@@ -2685,7 +2685,7 @@ class SsaBuilder extends ast.Visitor
node, 'Too many arguments to JS_CURRENT_ISOLATE_CONTEXT.');
}
- if (!backend.hasIsolateSupport) {
+ if (!backend.backendUsage.isIsolateInUse) {
// If the isolate library is not used, we just generate code
// to fetch the static state.
String name = backend.namer.staticStateHolder;
@@ -2882,7 +2882,7 @@ class SsaBuilder extends ast.Visitor
void handleForeignJsCallInIsolate(ast.Send node) {
Link<ast.Node> link = node.arguments;
- if (!backend.hasIsolateSupport) {
+ if (!backend.backendUsage.isIsolateInUse) {
// If the isolate library is not used, we just invoke the
// closure.
visit(link.tail.head);
@@ -3024,7 +3024,8 @@ class SsaBuilder extends ast.Visitor
ClassElement objectClass = commonElements.objectClass;
element = objectClass.lookupMember(Identifiers.noSuchMethod_);
}
- if (backend.hasInvokeOnSupport && !element.enclosingClass.isObject) {
+ if (backend.backendUsage.isInvokeOnUsed &&
+ !element.enclosingClass.isObject) {
// Register the call as dynamic if [noSuchMethod] on the super
// class is _not_ the default implementation from [Object], in
// case the [noSuchMethod] implementation calls
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart ('k') | pkg/compiler/lib/src/ssa/builder_kernel.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698