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

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

Issue 1299413002: Move common identifiers, names and selectors to a separate library. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 years, 4 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/serialization/modelz.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.dart
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index 6021ffcbecdb4207af86a1ec257d66a322da61fe..89b97ed88e9b191798652516ba69dfec68ea1f48 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -2471,7 +2471,7 @@ class SsaBuilder extends ast.Visitor
<HInstruction>[buildFunctionType(type), original];
pushInvokeDynamic(
null,
- new Selector.call(name, backend.jsHelperLibrary, 1),
+ new Selector.call(new Name(name, backend.jsHelperLibrary), 1),
null,
arguments);
@@ -3746,7 +3746,7 @@ class SsaBuilder extends ast.Visitor
List arguments = [buildFunctionType(type), expression];
pushInvokeDynamic(
node,
- new Selector.call('_isTest', backend.jsHelperLibrary, 1),
+ new Selector.call(new Name('_isTest', backend.jsHelperLibrary), 1),
null,
arguments);
return new HIs.compound(type, expression, pop(), backend.boolType);
@@ -4400,7 +4400,7 @@ class SsaBuilder extends ast.Visitor
String name = selector.name;
ClassElement cls = currentNonClosureClass;
- Element element = cls.lookupSuperMember(Compiler.NO_SUCH_METHOD);
+ Element element = cls.lookupSuperMember(Identifiers.noSuchMethod_);
if (compiler.enabledInvokeOn
&& element.enclosingElement.declaration != compiler.objectClass) {
// Register the call as dynamic if [noSuchMethod] on the super
@@ -4443,7 +4443,7 @@ class SsaBuilder extends ast.Visitor
typeMask: backend.dynamicType);
var inputs = <HInstruction>[pop()];
- push(buildInvokeSuper(compiler.noSuchMethodSelector, element, inputs));
+ push(buildInvokeSuper(Selectors.noSuchMethod_, element, inputs));
}
/// Generate a call to a super method or constructor.
@@ -7126,7 +7126,7 @@ class SsaBuilder extends ast.Visitor
buildBody);
}, () {
pushInvokeDynamic(node,
- new Selector.call("cancel", null, 0),
+ Selectors.cancel,
null,
[streamIterator]);
push(new HAwait(pop(), new TypeMask.subclass(compiler.objectClass,
@@ -8298,12 +8298,13 @@ class StringBuilderVisitor extends ast.Visitor {
// If the `toString` method is guaranteed to return a string we can call it
// directly.
- Selector selector = new Selector.call('toString', null, 0);
+ Selector selector = Selectors.toString_;
TypeMask type = TypeMaskFactory.inferredTypeForSelector(
selector, expression.instructionType, compiler);
if (type.containsOnlyString(compiler.world)) {
builder.pushInvokeDynamic(
- node, selector, expression.instructionType, <HInstruction>[expression]);
+ node, selector,
+ expression.instructionType, <HInstruction>[expression]);
append(builder.pop());
return;
}
« no previous file with comments | « pkg/compiler/lib/src/serialization/modelz.dart ('k') | pkg/compiler/lib/src/ssa/ssa.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698