diff options
author | Thomas Huth <thuth@linux.vnet.ibm.com> | 2011-12-01 22:50:46 +0100 |
---|---|---|
committer | Thomas Huth <thuth@linux.vnet.ibm.com> | 2011-12-20 17:56:48 +0100 |
commit | 631dd47cc8be019abf7c08d229ff659a0bccc20e (patch) | |
tree | 2eede4d8678dee0452ec647bdaf7baadad4ba64b /slof | |
parent | 4530bc4d6b663a341d522c37de7c4a7f01affaff (diff) | |
download | SLOF-631dd47cc8be019abf7c08d229ff659a0bccc20e.zip SLOF-631dd47cc8be019abf7c08d229ff659a0bccc20e.tar.gz SLOF-631dd47cc8be019abf7c08d229ff659a0bccc20e.tar.bz2 |
Fixed the BEHAVIOR function to also work with INSTANCE DEFERs
The BEHAVIOR function only worked with normal DEFER variables so far. It was
not aware of INSTANCE DEFERs yet. This problem has been fixed now.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Diffstat (limited to 'slof')
-rw-r--r-- | slof/fs/instance.fs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/slof/fs/instance.fs b/slof/fs/instance.fs index 58b3839..99768fa 100644 --- a/slof/fs/instance.fs +++ b/slof/fs/instance.fs @@ -108,6 +108,14 @@ CONSTANT <instancevariable> THEN ; IMMEDIATE +: behavior ( defer-xt -- contents-xt ) + dup cell+ @ <instancedefer> = IF \ Is defer-xt an INSTANCE DEFER ? + 2 cells + @ >instance @ + ELSE + behavior + THEN +; + : INSTANCE ALSO instance-words ; : my-parent my-self instance>parent @ ; |