What's this?

From: Dennis Ruffer <druffer_at_worldnet.att.net>
Date: Fri, 20 Feb 2009 18:59:13 -0600

I'm finding a strange problem with the pfDatabase plug-in I published
at: http://vf-plugins.googlecode.com/files/pfDatabase.zip. It
involves code that saves and restores the file information to the
return stack. The code is defined like this:

: SAVE ( -- ) ( R: -- f# db# r# ) R> R# @ >R DB# @ >R F# @ >R >R ;
: RESTORE ( -- ) ( R: f# db# r# -- ) R> R> F# ! R> DB# ! R> R# ! >R ;

This works fine, except when the RESTORE is immediately followed by a
; to exit the definition. Then I get a PRIVILEGED_INSTRUCTION error.

Now that I think about it, is there some tail recursion optimization
going on here? That would explain why it used to work and works fine
in gforth. Something rings a bell here, but I forget what to do about
it.

DaR
----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and
bug reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Fri Feb 20 2009 - 16:59:35 PST


Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!

This archive was generated 07-Feb-2012. Archive updated nightly.