| 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 fb7b0792020f66244d7417a1f4fd6991fdcbb99b..62865436a57faae8f117f7a659d336df6b2a0a8a 100644
|
| --- a/pkg/compiler/lib/src/ssa/builder.dart
|
| +++ b/pkg/compiler/lib/src/ssa/builder.dart
|
| @@ -26,7 +26,7 @@ class SsaFunctionCompiler implements FunctionCompiler {
|
| JavaScriptBackend backend = builder.backend;
|
|
|
| AsyncRewriterBase rewriter = null;
|
| - String name = backend.namer.methodPropertyName(element);
|
| + js.Name name = backend.namer.methodPropertyName(element);
|
| if (element.asyncMarker == AsyncMarker.ASYNC) {
|
| rewriter = new AsyncRewriter(
|
| backend.compiler,
|
| @@ -3697,10 +3697,10 @@ class SsaBuilder extends NewResolvedVisitor {
|
| HInstruction representations =
|
| buildTypeArgumentRepresentations(type);
|
| add(representations);
|
| - String operator = backend.namer.operatorIs(element);
|
| - HInstruction isFieldName = addConstantString(operator);
|
| + js.Name operator = backend.namer.operatorIs(element);
|
| + HInstruction isFieldName = addConstantStringFromName(operator);
|
| HInstruction asFieldName = compiler.world.hasAnyStrictSubtype(element)
|
| - ? addConstantString(backend.namer.substitutionName(element))
|
| + ? addConstantStringFromName(backend.namer.substitutionName(element))
|
| : graph.addConstantNull(compiler);
|
| List<HInstruction> inputs = <HInstruction>[expression,
|
| isFieldName,
|
| @@ -4053,7 +4053,7 @@ class SsaBuilder extends NewResolvedVisitor {
|
| EnumClassElement enumClass = element.enclosingClass;
|
| int index = enumClass.enumValues.indexOf(element);
|
| stack.add(
|
| - addConstantString(
|
| + addConstantStringFromName(
|
| backend.namer.getNameForJsGetName(
|
| argument, JsGetName.values[index])));
|
| }
|
| @@ -4323,9 +4323,7 @@ class SsaBuilder extends NewResolvedVisitor {
|
| ConstantValue nameConstant = constantSystem.createString(
|
| new ast.DartString.literal(publicName));
|
|
|
| - String internalName = backend.namer.invocationName(selector);
|
| - ConstantValue internalNameConstant =
|
| - constantSystem.createString(new ast.DartString.literal(internalName));
|
| + js.Name internalName = backend.namer.invocationName(selector);
|
|
|
| Element createInvocationMirror = backend.getCreateInvocationMirror();
|
| var argumentsInstruction = buildLiteralList(arguments);
|
| @@ -4346,7 +4344,7 @@ class SsaBuilder extends NewResolvedVisitor {
|
| pushInvokeStatic(null,
|
| createInvocationMirror,
|
| [graph.addConstant(nameConstant, compiler),
|
| - graph.addConstant(internalNameConstant, compiler),
|
| + graph.addConstantStringFromName(internalName, compiler),
|
| graph.addConstant(kindConstant, compiler),
|
| argumentsInstruction,
|
| argumentNamesInstruction],
|
| @@ -4612,12 +4610,12 @@ class SsaBuilder extends NewResolvedVisitor {
|
| // TODO(ahe): Creating a string here is unfortunate. It is slow (due to
|
| // string concatenation in the implementation), and may prevent
|
| // segmentation of '$'.
|
| - String substitutionNameString = backend.namer.runtimeTypeName(cls);
|
| - HInstruction substitutionName = graph.addConstantString(
|
| - new ast.LiteralDartString(substitutionNameString), compiler);
|
| + js.Name substitutionName = backend.namer.runtimeTypeName(cls);
|
| + HInstruction substitutionNameInstr = graph.addConstantStringFromName(
|
| + substitutionName, compiler);
|
| pushInvokeStatic(null,
|
| backend.getGetRuntimeTypeArgument(),
|
| - [target, substitutionName, index],
|
| + [target, substitutionNameInstr, index],
|
| typeMask: backend.dynamicType);
|
| } else {
|
| pushInvokeStatic(null, backend.getGetTypeArgumentByIndex(),
|
| @@ -5217,8 +5215,11 @@ class SsaBuilder extends NewResolvedVisitor {
|
|
|
| HConstant addConstantString(String string) {
|
| ast.DartString dartString = new ast.DartString.literal(string);
|
| - ConstantValue constant = constantSystem.createString(dartString);
|
| - return graph.addConstant(constant, compiler);
|
| + return graph.addConstantString(dartString, compiler);
|
| + }
|
| +
|
| + HConstant addConstantStringFromName(js.Name name) {
|
| + return graph.addConstantStringFromName(name, compiler);
|
| }
|
|
|
| visitClassTypeLiteralGet(
|
|
|