mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2025-01-08 07:54:11 -08:00
wasm: display inherited fields in debugger
This commit is contained in:
parent
7bde7d9642
commit
f2ae748705
|
@ -336,33 +336,37 @@ class WasmValueImpl extends Value {
|
||||||
return Collections.emptyMap();
|
return Collections.emptyMap();
|
||||||
}
|
}
|
||||||
var properties = new LinkedHashMap<String, Variable>();
|
var properties = new LinkedHashMap<String, Variable>();
|
||||||
for (var field : cls.instanceFields()) {
|
var ancestorCls = cls;
|
||||||
long longValue;
|
while (ancestorCls != null) {
|
||||||
switch (field.type()) {
|
for (var field : ancestorCls.instanceFields()) {
|
||||||
case BOOLEAN:
|
long longValue;
|
||||||
case BYTE:
|
switch (field.type()) {
|
||||||
longValue = data[field.address()];
|
case BOOLEAN:
|
||||||
break;
|
case BYTE:
|
||||||
case SHORT:
|
longValue = data[field.address()];
|
||||||
case CHAR:
|
break;
|
||||||
longValue = readShort(data, field.address());
|
case SHORT:
|
||||||
break;
|
case CHAR:
|
||||||
case INT:
|
longValue = readShort(data, field.address());
|
||||||
case FLOAT:
|
break;
|
||||||
case ADDRESS:
|
case INT:
|
||||||
case OBJECT:
|
case FLOAT:
|
||||||
longValue = readInt(data, field.address());
|
case ADDRESS:
|
||||||
break;
|
case OBJECT:
|
||||||
case LONG:
|
longValue = readInt(data, field.address());
|
||||||
case DOUBLE:
|
break;
|
||||||
longValue = readLong(data, field.address());
|
case LONG:
|
||||||
break;
|
case DOUBLE:
|
||||||
default:
|
longValue = readLong(data, field.address());
|
||||||
longValue = 0;
|
break;
|
||||||
break;
|
default:
|
||||||
|
longValue = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
var value = new WasmValueImpl(debugger, debugInfo, field.type(), callFrame, longValue);
|
||||||
|
properties.put(field.name(), new Variable(field.name(), value));
|
||||||
}
|
}
|
||||||
var value = new WasmValueImpl(debugger, debugInfo, field.type(), callFrame, longValue);
|
ancestorCls = ancestorCls.superclass();
|
||||||
properties.put(field.name(), new Variable(field.name(), value));
|
|
||||||
}
|
}
|
||||||
addCommonProperties(properties, cls);
|
addCommonProperties(properties, cls);
|
||||||
return properties;
|
return properties;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user