Commit bfd9de4b authored by Bernd Paysan's avatar Bernd Paysan

Add uval-o, value-flavored user-o

parent 21154f11
Pipeline #568 passed with stage
in 8 minutes and 18 seconds
......@@ -3477,6 +3477,11 @@ DO: true abort" not in cross compiler!" ;DO
Build: 0 au, dup class-o ! X , ;Build
by User
Builder uval-o
DO: true abort" not in cross compiler!" ;DO
Build: 0 au, dup class-o ! X , ;Build
by UValue
>TARGET
: umethod ( m v -- m' v )
over >r no-loop on T : H compile u#exec class-o @ T , H
......@@ -3854,6 +3859,7 @@ Cond: IS cross-record-name T ' >body H compile ALiteral compile ! ;Cond
Cond: TO T ' >body H compile ALiteral compile ! ;Cond
: TO T ' >body ! H ;
Cond: UTO compile useraddr T ' >body @ , H compile ! ;Cond
: UTO T ' >body @ H tup@ + X ! ;
Cond: UADDR compile useraddr T ' >body @ , H ;Cond
[THEN]
......
......@@ -25,8 +25,8 @@ here
' heap-resize a,
A, here Aconstant heap-words
user-o current-memory-words
heap-words current-memory-words A!
uval-o current-memory-words
heap-words uto current-memory-words
0 0
umethod allocate ( u -- a_addr wior ) \ memory
\G Allocate @i{u} address units of contiguous data space. The
......
......@@ -4,6 +4,8 @@ Variable class-o
: user-o ( "name" -- )
0 uallot class-o ! User ;
: uval-o ( "name" -- )
0 uallot class-o ! UValue ;
: umethod ( m v -- m' v )
postpone nocov[
......
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