* fix #16815 round+places works again in vm * improve tests; fix for linux 32bit * fix test for windows
This commit is contained in:
parent
37a98c6c58
commit
b0f38a63c4
3 changed files with 41 additions and 29 deletions
|
|
@ -41,6 +41,9 @@ template getX(k, field) {.dirty.} =
|
|||
doAssert a.slots[i+a.rb+1].kind == k
|
||||
result = a.slots[i+a.rb+1].field
|
||||
|
||||
proc numArgs*(a: VmArgs): int =
|
||||
result = a.rc-1
|
||||
|
||||
proc getInt*(a: VmArgs; i: Natural): BiggestInt = getX(rkInt, intVal)
|
||||
proc getBool*(a: VmArgs; i: Natural): bool = getInt(a, i) != 0
|
||||
proc getFloat*(a: VmArgs; i: Natural): BiggestFloat = getX(rkFloat, floatVal)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue