I think IRETURN and HALT are the same commend in IJVM. Because I tried both and both stopped the interpreter.
            Asked
            
        
        
            Active
            
        
            Viewed 65 times
        
    2
            
            
        
        Federico klez Culloca
        
- 26,308
 - 17
 - 56
 - 95
 
1 Answers
2
            They are not the same (what would be the point of having two instructions doing the same thing?).
See the description in https://en.wikipedia.org/wiki/IJVM:
HALT is described as "Halt the simulator"
IRETURN is described as "Return from method with integer value"
If your code is running the top level method they may appear to have the same effect.
If you your top level method calls other methods you will see the distinction if the instructions are placed within the called methods:
HALTwill still halt the simulator, thereby aborting any ongoing calculationsIRETURNwill return from the called method to the caller
        Thomas Kläger
        
- 17,754
 - 3
 - 23
 - 34