Debugger::printValue uses decimal representation for all datatypes#339
Debugger::printValue uses decimal representation for all datatypes#339tolauwae wants to merge 6 commits into
Conversation
|
PR #342 should fix the Latch framework from silently failing in the CI. Once merge in main the CI will show how this PR breaks the spec tests so we can fix it. |
539ec77 to
667abcc
Compare
|
Spectest now fails because latch loses connection with the VM. I suspect the VM crashes for the first suite WARDuino/src/Debug/debugger.cpp Lines 581 to 582 in 050bdc5 Here |
050bdc5 to
89c6d8e
Compare
89c6d8e to
b1d9409
Compare
b1d9409 to
566cec9
Compare
This simplifies the frontend which no longer has to parse the value of a stack element in hex if it's a float or in decimal if it's an integer. It can just always parse it as a decimal.
566cec9 to
8f774e5
Compare
|
@MaartenS11 After fixing the latch side parsing, I think this PR does not do what you think it does. The I got this to work by using the However, the following you wrote does not seem true:
The decimal value is not the actual float, you still need to do conversion. In latch this conversion is now more complicated if anything. (same for the 32 bit ofc) Did I miss something? |
In MIO the value of a wam stack element is always of type Long, the idea here was that the value would always be represented as an integer (even if it's a float) so that the parsing never has to check the data class WasmStackValue(
val idx: Int,
val type: String,
val value: Long
)Of course to see the actual float values it later needs conversion, which MIO also does when representing the values in the watch window, but internally the data is always represented in the same way. when(stackElement.type) {
"F32" -> Float.fromBits(stackElement.value)
"F64" -> Double.fromBits(stackElement.value)
else -> stackElement.value
})I would also be fine with just having the hex value be prefixed with |
a25740d to
a70c1a2
Compare
|
Alright that makes sense. I changed everything to unsigned in that case. Should be decimal for all values now. There were a few in dump locals that were overlooked before too. Thanks for the help. I will merge once the CI passes all checks. |
|
endianness spec test fail now |
Note
Attempt number two.
This simplifies the frontend which no longer has to parse the value of a stack element in hex if it's a float or in decimal if it's an integer. It can just always parse it as a decimal.