boxing.factor: Change Stack Effects

flac
kusumotonorio 2020-01-16 23:34:24 +09:00 committed by Steve Ayerhart
parent 94a595cf5e
commit 38b64043f8
No known key found for this signature in database
GPG Key ID: 5BFD39C5359E967D
1 changed files with 6 additions and 2 deletions

View File

@ -12,18 +12,22 @@ SYMBOL: struct-return-area
SYMBOLS: int-reg-reps float-reg-reps ;
<PRIVATE
: inc-not-f ( variable -- ) dup get [ inc ] [ drop ] if ; inline
: dec-not-f ( variable -- ) dup get [ dec ] [ drop ] if ; inline
: record-reg-reps ( seq -- seq )
PRIVATE>
: record-reg-reps ( reps -- reps )
dup [
dup second not [ ! on-stack?: f
first int-rep? int-reg-reps float-reg-reps ? inc-not-f
] [ drop ] if
] each ;
: unrecord-reg-reps ( seq -- seq )
: unrecord-reg-reps ( reps -- reps )
dup [
dup second not [ ! on-stack?: f
first int-rep? int-reg-reps float-reg-reps ? dec-not-f