From 6ede3d2f6cbbb36c9e65c5f77ad3b4e45d2f4573 Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 17 Jun 1999 11:04:17 +0000 Subject: [PATCH] local.getExpression() instead of name checking when creating this operators setCodeAnalyzer() / setLocalInfo() (used for moving super calls for jikes constructors) git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@852 379699f6-c40d-0410-875b-85095c16579e --- jode/jode/expr/LocalLoadOperator.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/jode/jode/expr/LocalLoadOperator.java b/jode/jode/expr/LocalLoadOperator.java index 9aba19e..73d6d6e 100644 --- a/jode/jode/expr/LocalLoadOperator.java +++ b/jode/jode/expr/LocalLoadOperator.java @@ -59,6 +59,15 @@ public class LocalLoadOperator extends Operator return local.getLocalInfo(); } + public void setCodeAnalyzer(CodeAnalyzer ca) { + codeAnalyzer = ca; + } + + public void setLocalInfo(LocalInfo newLocal) { + local = newLocal; + updateType(); + } + public void updateSubTypes() { if ((GlobalOptions.debuggingFlags & GlobalOptions.DEBUG_TYPES) != 0) GlobalOptions.err.println("setType of "+local.getName()+": " @@ -80,12 +89,8 @@ public class LocalLoadOperator extends Operator } public Expression simplify() { - if (local.getName().equals("this") && codeAnalyzer != null) - return new ThisOperator(codeAnalyzer.getClazz(), true).simplify(); - if (local.getName().equals("this$-1") && codeAnalyzer != null) - return new ThisOperator - (((ClassAnalyzer)codeAnalyzer.getClassAnalyzer().getParent()) - .getClazz()).simplify(); + if (local.getExpression() != null) + return local.getExpression().simplify(); return super.simplify(); }