Chromium Code Reviews| Index: pkg/compiler/lib/src/ssa/codegen.dart |
| diff --git a/pkg/compiler/lib/src/ssa/codegen.dart b/pkg/compiler/lib/src/ssa/codegen.dart |
| index ae57bc2c4bf40c79e17def56488cac6cce9c7cbd..1a1397f7fea70427a9b37f4f84e79792a56b0c1f 100644 |
| --- a/pkg/compiler/lib/src/ssa/codegen.dart |
| +++ b/pkg/compiler/lib/src/ssa/codegen.dart |
| @@ -1641,7 +1641,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor { |
| }); |
| } |
| - push(backend.namer.elementAccess(node.element)); |
| + push(backend.emitter.globalPropertyAccess(node.element)); |
|
floitsch
2014/12/03 17:02:26
staticFunctionAccess
zarah
2014/12/05 08:22:52
Done.
|
| push(new js.Call(pop(), visitArguments(node.inputs, start: 0)), node); |
| } |
| @@ -1682,7 +1682,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor { |
| methodName = backend.namer.getNameOfInstanceMember(superMethod); |
| } |
| push(js.js('#.prototype.#.call(#)', |
| - [backend.namer.elementAccess(superClass), |
| + [backend.emitter.globalPropertyAccess(superClass), |
|
floitsch
2014/12/03 17:02:26
jsConstructorAccess
oder
prototypeAccess (since we
zarah
2014/12/05 08:22:52
Done.
|
| methodName, visitArguments(node.inputs, start: 0)]), |
| node); |
| } else { |
| @@ -1785,7 +1785,8 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor { |
| } |
| visitForeignNew(HForeignNew node) { |
| - js.Expression jsClassReference = backend.namer.elementAccess(node.element); |
| + js.Expression jsClassReference = |
| + backend.emitter.globalPropertyAccess(node.element); |
|
floitsch
2014/12/03 17:02:26
jsConstructorAccess
zarah
2014/12/05 08:22:52
Done.
|
| List<js.Expression> arguments = visitArguments(node.inputs, start: 0); |
| push(new js.New(jsClassReference, arguments), node); |
| registerForeignTypes(node); |
| @@ -2023,7 +2024,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor { |
| void generateThrowWithHelper(String helperName, argument) { |
| Element helper = backend.findHelper(helperName); |
| registry.registerStaticUse(helper); |
| - js.Expression jsHelper = backend.namer.elementAccess(helper); |
| + js.Expression jsHelper = backend.emitter.globalPropertyAccess(helper); |
|
floitsch
2014/12/03 17:02:26
staticFunctionAccess
zarah
2014/12/05 08:22:52
Done.
|
| List arguments = []; |
| var location; |
| if (argument is List) { |
| @@ -2056,7 +2057,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor { |
| Element helper = backend.findHelper("throwExpression"); |
| registry.registerStaticUse(helper); |
| - js.Expression jsHelper = backend.namer.elementAccess(helper); |
| + js.Expression jsHelper = backend.emitter.globalPropertyAccess(helper); |
|
floitsch
2014/12/03 17:02:26
staticFunctionAccess
zarah
2014/12/05 08:22:51
Done.
|
| js.Call value = new js.Call(jsHelper, [pop()]); |
| value = attachLocation(value, argument); |
| push(value, node); |
| @@ -2071,7 +2072,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor { |
| if (element.isFunction) { |
| push(backend.namer.isolateStaticClosureAccess(node.element)); |
| } else { |
| - push(backend.namer.elementAccess(node.element)); |
| + push(backend.emitter.globalPropertyAccess(node.element)); |
|
floitsch
2014/12/03 17:02:26
not sure.
I don't think it's a staticFunctionAcces
zarah
2014/12/05 08:22:51
FieldAccess.
|
| } |
| registry.registerStaticUse(element); |
| } |
| @@ -2087,7 +2088,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor { |
| void visitStaticStore(HStaticStore node) { |
| registry.registerStaticUse(node.element); |
| - js.Node variable = backend.namer.elementAccess(node.element); |
| + js.Node variable = backend.emitter.globalPropertyAccess(node.element); |
|
floitsch
2014/12/03 17:02:26
staticFieldAccess
zarah
2014/12/05 08:22:51
Done.
|
| use(node.inputs[0]); |
| push(new js.Assignment(variable, pop()), node); |
| } |
| @@ -2118,7 +2119,8 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor { |
| } else { |
| Element convertToString = backend.getStringInterpolationHelper(); |
| registry.registerStaticUse(convertToString); |
| - js.Expression jsHelper = backend.namer.elementAccess(convertToString); |
| + js.Expression jsHelper = |
| + backend.emitter.globalPropertyAccess(convertToString); |
|
floitsch
2014/12/03 17:02:26
staticFunctionAccess
zarah
2014/12/05 08:22:52
Done.
|
| use(input); |
| push(new js.Call(jsHelper, <js.Expression>[pop()]), node); |
| } |
| @@ -2673,7 +2675,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor { |
| if (backend.isInterceptorClass(element.enclosingClass)) { |
| int index = RuntimeTypes.getTypeVariableIndex(element); |
| js.Expression receiver = pop(); |
| - js.Expression helper = backend.namer.elementAccess(helperElement); |
| + js.Expression helper = backend.emitter.globalPropertyAccess(helperElement); |
|
floitsch
2014/12/03 17:02:26
staticFunctionAccess
long line.
zarah
2014/12/05 08:22:52
Done.
|
| push(js.js(r'#(#.$builtinTypeInfo && #.$builtinTypeInfo[#])', |
| [helper, receiver, receiver, js.js.number(index)])); |
| } else { |
| @@ -2683,7 +2685,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor { |
| } |
| } else { |
| push(js.js('#(#)', [ |
| - backend.namer.elementAccess( |
| + backend.emitter.globalPropertyAccess( |
|
floitsch
2014/12/03 17:02:26
staticFunctionAccess
zarah
2014/12/05 08:22:52
Done.
|
| backend.findHelper('convertRtiToRuntimeType')), |
| pop()])); |
| } |
| @@ -2697,7 +2699,7 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor { |
| } |
| ClassElement cls = node.dartType.element; |
| - var arguments = [backend.namer.elementAccess(cls)]; |
| + var arguments = [backend.emitter.globalPropertyAccess(cls)]; |
|
floitsch
2014/12/03 17:02:26
classAccess
zarah
2014/12/05 08:22:52
Done.
|
| if (!typeArguments.isEmpty) { |
| arguments.add(new js.ArrayInitializer(typeArguments)); |
| } |
| @@ -2719,6 +2721,6 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor { |
| return js.js('(void 0).$name'); |
| } |
| registry.registerStaticUse(helper); |
| - return backend.namer.elementAccess(helper); |
| + return backend.emitter.globalPropertyAccess(helper); |
|
floitsch
2014/12/03 17:02:26
staticFunctionAccess
zarah
2014/12/05 08:22:52
Done.
|
| } |
| } |