code optimize

This commit is contained in:
Volker Berlin 2020-03-29 18:39:45 +02:00
parent b1c6794a94
commit 7a9750afdd

View File

@ -77,10 +77,10 @@ class StackInspector {
} }
try { try {
StackValue stackValue = null; StackValue stackValue;
for( int p = 0; p < count; p++ ) { do {
stackValue = stack.pop(); stackValue = stack.pop();
} } while( --count > 0 );
return stackValue; return stackValue;
} catch( NoSuchElementException ex ) { } catch( NoSuchElementException ex ) {
throw new WasmException( "Push instruction not found", -1 ); // should never occur throw new WasmException( "Push instruction not found", -1 ); // should never occur