mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 07:27:52 +01:00
pass the method with signature to the VariableManager as fallback
This commit is contained in:
parent
35c9845886
commit
a0ddb00a73
@ -158,14 +158,14 @@ class LocaleVariableManager {
|
|||||||
if( maxLocals > 0 && vars.length == 0 && method != null ) {
|
if( maxLocals > 0 && vars.length == 0 && method != null ) {
|
||||||
ValueTypeParser parser = new ValueTypeParser( method.getType(), types );
|
ValueTypeParser parser = new ValueTypeParser( method.getType(), types );
|
||||||
if( !method.isStatic() ) {
|
if( !method.isStatic() ) {
|
||||||
resetAddVar( ValueType.anyref );
|
resetAddVar( ValueType.anyref, size );
|
||||||
}
|
}
|
||||||
while( size < maxLocals ) {
|
while( size < maxLocals ) {
|
||||||
AnyType type = parser.next();
|
AnyType type = parser.next();
|
||||||
if( type == null ) {
|
if( type == null ) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
resetAddVar( type );
|
resetAddVar( type, size );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -177,7 +177,7 @@ class LocaleVariableManager {
|
|||||||
continue NEXT;
|
continue NEXT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
resetAddVar( null );
|
resetAddVar( null, i );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -186,13 +186,15 @@ class LocaleVariableManager {
|
|||||||
*
|
*
|
||||||
* @param type
|
* @param type
|
||||||
* the type of the variable
|
* the type of the variable
|
||||||
|
* @param slot
|
||||||
|
* the slot of the variable
|
||||||
*/
|
*/
|
||||||
private void resetAddVar( AnyType type ) {
|
private void resetAddVar( AnyType type, int slot ) {
|
||||||
ensureCapacity( size + 1 );
|
ensureCapacity( size + 1 );
|
||||||
Variable var = variables[size];
|
Variable var = variables[size];
|
||||||
var.valueType = type;
|
var.valueType = type;
|
||||||
var.name = null;
|
var.name = null;
|
||||||
var.idx = size;
|
var.idx = slot;
|
||||||
var.startPos = 0;
|
var.startPos = 0;
|
||||||
var.endPos = Integer.MAX_VALUE;
|
var.endPos = Integer.MAX_VALUE;
|
||||||
size++;
|
size++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user