Commit d14af7d7 authored by Bernd Paysan's avatar Bernd Paysan

Add definition for 0 in case it's not available in cross.fs

parent e102e9b4
Pipeline #798 failed with stage
in 5 minutes and 23 seconds
......@@ -1063,6 +1063,18 @@ constant gwhere-struct
0 Value glocs-start
Variable cross-locs[]
: $room ( u $addr -- )
\G generate room for at least u bytes, erase when expanding
>r dup r@ $@len tuck u<= IF rdrop 2drop EXIT THEN
- dup r> $+!len swap 0 fill ;
: $[] ( u $[]addr -- addr' )
\G index into the string array and return the address at index @var{u}
\G The array will be resized as needed
>r cells dup cell+ r@ $room r> $@ drop + ;
: gxt-location ( addr -- addr )
\ note that an xt was compiled at addr, for backtrace-locate functionality
dup glocs-start - T 1 cells H / >r
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment