Changeset 187 for trunk/thune/mkboot.t

Show
Ignore:
Timestamp:
06/20/06 05:09:27 (3 years ago)
Author:
krobillard
Message:

Thune - Major improvement to the handling of local function values.
Locals can now be passed to inner functions and caught when returned.
Functions are no longer tied to the thread which created them.

The localArgBlk has been eliminated and locals are now stored on the stack.
To accomodate this, the data stack is now separate from the control stack
and grows upwards. This also means that functions can no longer access the
stack below the function call. A limit of one returned value is in place.

To regain full stack usage, locals could be stored on the control stack.
The only downside would be an extra copy of arguments from the data to
the control stack.

ur_wordCell() is now a function rather than a macro.

uc_do() has been merged into ur_eval() and 'do is now implemented as an opcode.

. & .s now use uc_console_out() rather than dprint.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/thune/mkboot.t

    r182 r187  
    1515  opcode! 10 'rot     make :rot 
    1616  opcode! 11 'rot.r   make :rot.r 
    17 ; opcode! 12 'do      make :xx-do 
     17  opcode! 12 'do      make :do 
    1818  opcode! 13 'proc    make :proc 
    1919  opcode! 14 'iter    make :iter 
     
    7272proc :loop   ;(block count -- ) 
    7373 
    74 [body] 
     74[ser body] 
    7575[ 
    76   [first body do] iter 
     76  ser [first body do] iter 
    7777] func :each     ;(ser body -- ) 
    7878 
    79 [| body words len-1] 
     79[ser words body | len-1] 
    8080[ 
    81    block! block! verify/2 
    82    :body :words 
     81   ;block! block! verify/2 
     82   ;:body :words 
    8383   words [first word! verify drop] iter 
    8484 
     85   ser 
    8586   words length? 
    8687   dup dec :len-1