update jump.stackMap if jump != null

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@503 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent 295632ab86
commit 73985b87a4
  1. 36
      jode/jode/flow/IfThenElseBlock.java

@ -1,20 +1,22 @@
/* IfThenElseBlock (c) 1998 Jochen Hoenicke
/* IfThenElseBlock Copyright (C) 1998-1999 Jochen Hoenicke.
*
* You may distribute under the terms of the GNU General Public License.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* IN NO EVENT SHALL JOCHEN HOENICKE BE LIABLE TO ANY PARTY FOR DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF
* THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF JOCHEN HOENICKE
* HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* JOCHEN HOENICKE SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS"
* BASIS, AND JOCHEN HOENICKE HAS NO OBLIGATION TO PROVIDE MAINTENANCE,
* SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id$
*/
package jode.flow;
import jode.decompiler.LocalInfo;
import jode.decompiler.TabbedPrintWriter;
@ -110,9 +112,15 @@ public class IfThenElseBlock extends StructuredBlock {
} else
newStack = stack;
return VariableStack.merge(thenBlock.mapStackToLocal(newStack),
elseBlock == null ? newStack
: elseBlock.mapStackToLocal(newStack));
VariableStack after
= VariableStack.merge(thenBlock.mapStackToLocal(newStack),
elseBlock == null ? newStack
: elseBlock.mapStackToLocal(newStack));
if (jump != null) {
jump.stackMap = after;
return null;
}
return after;
}
public void removePush() {

Loading…
Cancel
Save