Commit f3d04b2c authored by Bernd Paysan's avatar Bernd Paysan

Make sure UValue has its optimizers done correctly

parent 8b18c744
Pipeline #1045 passed with stage
in 10 minutes and 51 seconds
......@@ -3433,7 +3433,7 @@ T has? rom H [IF]
by (Value)
[THEN]
Builder UValue
Builder (UValue)
Build: 0 u, T , H ;Build
DO: X @ tup@ + X @ ;DO
vt: [G'] u-compile, gset-optimizer [G'] uvalue-to gset-to ;vt
......@@ -3518,7 +3518,7 @@ by User
Builder uval-o
DO: true abort" not in cross compiler!" ;DO
Build: 0 au, dup class-o ! X , ;Build
by UValue
by (UValue)
>TARGET
: umethod ( m v -- m' v )
......@@ -3620,7 +3620,7 @@ compile: g>body compile lit-perform T A, H ;compile
Builder (Field)
compile: g>body T @ H compile lit+ T V, H ;compile
Builder UValue
Builder (UValue)
compile: g>body compile user@ T @ V, H ;compile
Builder 2Constant
......@@ -3785,6 +3785,8 @@ Cond: ?LEAVE ?leave, ;Cond
compile drop 0 ?DO 1 ncontrols? then, LOOP ; ' (endcase,) plugin-of endcase,
>TARGET
: UValue T (UValue) H ;
Cond: AHEAD ahead, ;Cond
Cond: IF if, ;Cond
Cond: ?dup-IF ?dup-if, ;Cond
......
......@@ -29,11 +29,14 @@ opt: ( uvalue-xt to-xt -- )
?fold-to !!?addr!! >body @ postpone useraddr , !-table to-!, ;
: u-compile, ( xt -- ) >body @ postpone user@ , ;
: UValue ( "name" -- )
: (UValue) ( "name" -- )
\G Define a per-thread value
Create cell uallot , ['] uvalue-to set-to
['] u-compile, set-optimizer
Create cell uallot ,
DOES> @ next-task + @ ;
: UValue ( "name" -- )
(UValue)
['] uvalue-to set-to
['] u-compile, set-optimizer ;
: 2Constant ( w1 w2 "name" -- ) \ double two-constant
Create ( w1 w2 "name" -- )
......
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