Looks interesting.

I would like to reserve an object for the stack machine I use. Actually I
will be fine to model the prolog
engine ontop of your segestion if it was not for one idea.

So you have a layout of this
(X Tag14 Data Tag8)

Consider a the following tag in Tag14, frame-tag. Then Data is a frame
number and the next 8 bytes is a SCM value.
The idea is to use a set! like function, like

(frame-set! Frame FrameObj Val)

and use it like
(let ((fr (newframe)))
  (frame-set! *fluid* 1)
  ...
  (frame-set! *fluid* 2)
  ...
  (frame-set! *fluid* 3)
  (unwind fr))


(define (new-frame)
  (set! *fr* (+ *fr* 1))
  *fr*)

So with mem layout,
*fluid* : [Fr SCM]
Fr      : [X frame-tag Data Tag8]
SCM     : [X Tag14     Data Tag8]

(define (frame-set! d val)
   (if (not (eq? *fr*  d.Fr.Data))
       (begin
     (set! f.Fr.Data *fr*)
     (add-to-stack d))
   (set! f.SCM val))

e.g. we can manage an automatic selection between a set-fluid! and
with-fluid
semantics and control it by using newframe and unwind which is more logical
in
the prolog context. The tagging is useful because that we will now directly
that
we are hitting on an element of meta information and the actual data can be
reached in the next comming bytes. How about reserving one tag in Tag14 to
repressent  (X Tag14-xtra TagX Data) where Data is 32 bit and allow it to be

used by applications?

/Stefan

Reply via email to