| Index: sdk/lib/_internal/compiler/implementation/ssa/variable_allocator.dart
|
| ===================================================================
|
| --- sdk/lib/_internal/compiler/implementation/ssa/variable_allocator.dart (revision 14875)
|
| +++ sdk/lib/_internal/compiler/implementation/ssa/variable_allocator.dart (working copy)
|
| @@ -516,19 +516,7 @@
|
| if (name != null) return addAllocatedName(instruction, name);
|
| }
|
|
|
| - if (instruction is HThis) {
|
| - name = "this";
|
| - if (instruction.sourceElement != null) {
|
| - Element cls = instruction.sourceElement.getEnclosingClass();
|
| - // Change the name of [:this:] in a method of a foreign class
|
| - // to use the first parameter of the method, which is the
|
| - // actual receiver.
|
| - JavaScriptBackend backend = compiler.backend;
|
| - if (backend.isInterceptorClass(cls)) {
|
| - name = "primitive";
|
| - }
|
| - }
|
| - } else if (instruction is HParameterValue
|
| + if (instruction is HParameterValue
|
| && instruction.sourceElement.enclosingElement.isNative()) {
|
| // The dom/html libraries have inline JS code that reference
|
| // parameter names directly. Long-term such code will be rejected.
|
| @@ -551,7 +539,7 @@
|
| }
|
|
|
| String addAllocatedName(HInstruction instruction, String name) {
|
| - if (instruction is HParameterValue && name != 'this') {
|
| + if (instruction is HParameterValue) {
|
| parameterNames[instruction.sourceElement] = name;
|
| }
|
| usedNames.add(name);
|
| @@ -633,6 +621,7 @@
|
| // TODO(ngeoffray): locals/parameters are being generated at use site,
|
| // but we need a name for them. We should probably not make
|
| // them generate at use site to make things simpler.
|
| + if (instruction is HThis) return false;
|
| if (instruction is HLocalValue) return true;
|
| if (instruction.usedBy.isEmpty) return false;
|
| if (generateAtUseSite.contains(instruction)) return false;
|
|
|