duskos

dusk os fork
git clone git://git.alexwennerberg.com/duskos
Log | Files | Refs | README | LICENSE

func.fs (434B) - raw


      1 \ Function metadata
      2 ?f<< /comp/c/type.fs
      3 
      4 0 value _curfunc \ cdecl of the current function (includes arguments)
      5 0 value _locvars \ the root cdecl of local variables for current function
      6 
      7 : findIdent ( name  -- cdecl-or-0 )
      8   _curfunc if
      9     dup _curfunc to' CDecl args CDecl :find ?dup if nip exit then then ( name )
     10   dup _locvars if to' _locvars CDecl :find else drop 0 then ( name cdecl-or-0 )
     11   ?dup if nip else findSymbol then ;