section-compatibility in kernel

parent 6bc31d2d
Pipeline #996 failed with stage
in 46 minutes and 52 seconds
......@@ -2228,7 +2228,7 @@ X has? f83headerstring [IF]
[ELSE] 0 allocate throw 0 included-files 2! [THEN]
[IFDEF] loadfilename# loadfilename# off [THEN]
s" kernel/main.fs" h-add-included-file ;
: reset-locs ( -- ) T here H to glocs-start ;
: reset-locs ( -- ) $100 to glocs-start ;
: glocs-start glocs-start ;
: shorten-path ( addr u -- addr' u' ) 2>r
fpath path>string BEGIN next-path dup WHILE
......
......@@ -58,7 +58,6 @@ hex
\ dictionary
(
user-o current-section
0 0
......@@ -70,10 +69,12 @@ cell uvar locs[]
Constant section-desc
drop
)
image-header current-section !
image-header 4 cells + unlock cross-boot$[] >stack lock
: dictionary-end ( -- addr )
forthstart 2@ + ;
section-start 2@ + ;
: usable-dictionary-end1 ( -- addr )
dictionary-end [ word-pno-size pad-minsize + ] Literal - ;
......
......@@ -308,16 +308,14 @@ is basic-block-end
\ record locations
40 value bt-pos-width
0 AValue locs-start
$variable locs[]
Defer xt-location
: has-locs? ( -- flag )
locs-start in-dictionary? ;
locs[] @ 0<> ;
: xt-location1 ( addr -- addr )
\ note that an xt was compiled at addr, for backtrace-locate functionality
has-locs? IF
dup locs-start - cell/ >r
dup section-start @ - cell/ >r
current-view dup r> 1+ locs[] $[] cell- 2!
THEN
0 to replace-sourceview ;
......@@ -325,8 +323,8 @@ Defer xt-location
: addr>view ( ip-addr -- view / 0 )
\G give @i{view} information for instruction address @i{ip-addr}
dup cell- locs-start here within has-locs? and
locs-start and ?dup-IF
dup cell- section-start @ here within has-locs? and
section-start @ and ?dup-IF
- cell/ 1- locs[] $[] @ EXIT
THEN drop 0 ;
' addr>view alias name>view ( nt -- view / 0 )
......
......@@ -54,8 +54,8 @@ here 1802 over
A, \ base address
has? kernel-size , \ dict size
0 , \ image size (without tags)
0 , \ section name
0 , \ locs[]
0 A, \ section name
0 A, \ locs[]
has? stack-size , \ data stack size
has? fstack-size , \ FP stack size
has? rstack-size , \ return stack size
......
......@@ -33,8 +33,6 @@ dup forth-wordlist has? ec 0= [IF] wordlist-id [THEN] ! Last !
unlock vt, tvtable-list @ lock vtable-list !
glocs-start .s cr to locs-start
\ list of arrays to restore at boot
align here boot[][] ! boot[][],
......@@ -46,10 +44,10 @@ included-files, included-files !
align here default-recognizer !
2 cells , ' rec-num A, ' rec-word A,
align here image-header 4 cells + !
locs[],
align here wheres !
wheres,
align here locs[] !
locs[],
>ram here normal-dp !
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment