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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/variable_allocator.dart

Issue 11358217: Add a getter interceptor to the new interceptor scheme. Also cleanup the "this" that turns into a r… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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 | « sdk/lib/_internal/compiler/implementation/ssa/codegen.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/codegen.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698