arturo icon indicating copy to clipboard operation
arturo copied to clipboard

[VM/stack] `peekRange` not working

Open github-actions[bot] opened this issue 2 years ago • 0 comments

[VM/stack] peekRange not working

and unused... but it could be fixed, if we can defined reverse ranges

https://github.com/arturo-lang/arturo/blob/364ea53af62abb182f7baa30ff8efe6e293fef6c/src/vm/stack.nim#L63

    Stack[SP-1-pos]

# TODO(VM/stack) `peekRange` not working
#  and unused... but it could be fixed, if we can defined reverse ranges
#  labels: vm, enhancement
template peekRange*(posFrom: int, posTo: int): ValueArray =
    Stack[SP-1-posFrom .. SP-1-posTo]

template sTop*(): Value =
    Stack[SP-1]

ndex 819def254..3e1685deb 100644
++ b/src/vm/values/value.nim

9dc9ed3231d76b09f8667015506337067f087404

github-actions[bot] avatar Sep 21 '22 16:09 github-actions[bot]