langtree.c File Reference

#include "frontier.h"
#include "standard.h"
#include "error.h"
#include "memory.h"
#include "lang.h"
#include "langinternal.h"
#include "tablestructure.h"
#include "byteorder.h"

Include dependency graph for langtree.c:

Go to the source code of this file.

Data Structures

struct  tydisktreenode
struct  tydisktreerec
struct  tyOLD42disktreenode
struct  tytreenodeblock
struct  packtreeinfo

Defines

#define treenodeallocator   true
#define treenodeblocksize   1024
#define _entercriticaltreenodesection()
#define _leavecriticaltreenodesection()

Typedefs

typedef tydisktreenodeptrdisktreenode
typedef tydisktreenode ** hdldisktreenode
typedef tydisktreerecptrdisktreerec
typedef tydisktreerec ** hdldisktreerec
typedef tyOLD42disktreenodeptrOLD42disktreenode
typedef tyOLD42disktreenode ** hdlOLD42disktreenode
typedef tytreenodeblockptrtreenodeblock
typedef packtreeinfo typacktreeinfo
typedef packtreeinfoptrpacktreeinfo

Enumerations

enum  tydisktreenodeparaminfo {
  ctparams_mask = 0xf000, ctparams_1 = 0x1000, hasparam1_mask = 0x0800, hasparam2_mask = 0x0400,
  hasparam3_mask = 0x0200, hasparam4_mask = 0x0100, haslink_mask = 0x0080
}

Functions

static boolean alloctreenodeblock (hdltreenode *hfirstfreenode)
static boolean alloctreenode (hdltreenode *hnode)
static void freetreenode (hdltreenode hnode)
boolean langvisitcodetree (hdltreenode htree, langtreevisitcallback visit, ptrvoid refcon)
static boolean counttreenodevisit (hdltreenode hnode, ptrvoid refcon)
short langcounttreenodes (hdltreenode hnode)
boolean langdisposetree (hdltreenode htree)
static boolean equaltrees (hdltreenode h1, hdltreenode h2)
static boolean langnewtreenode (hdltreenode *hnode, short ctparams)
static boolean pushvalue (tytreetype op, tyvaluerecord val, hdltreenode *hreturned)
boolean newconstnode (tyvaluerecord val, hdltreenode *hreturned)
boolean newidnode (tyvaluerecord val, hdltreenode *hreturned)
boolean pushquadruplet (tytreetype op, hdltreenode hp1, hdltreenode hp2, hdltreenode hp3, hdltreenode hp4, hdltreenode *hreturned)
boolean pushtriplet (tytreetype op, hdltreenode hp1, hdltreenode hp2, hdltreenode hp3, hdltreenode *hreturned)
boolean pushbinaryoperation (tytreetype op, hdltreenode hp1, hdltreenode hp2, hdltreenode *hreturned)
boolean pushunaryoperation (tytreetype op, hdltreenode hp1, hdltreenode *hreturned)
boolean pushoperation (tytreetype op, hdltreenode *hreturned)
boolean pushloop (hdltreenode hp1, hdltreenode hp2, hdltreenode hp3, hdltreenode *hreturned)
boolean pushloopbody (hdltreenode hp4, hdltreenode hlist)
boolean pushunarystatementlist (hdltreenode hp1, hdltreenode hlist)
boolean pushtripletstatementlists (hdltreenode hp2, hdltreenode hp3, hdltreenode hlist)
boolean pushfunctioncall (hdltreenode hp1, hdltreenode hp2, hdltreenode *hreturned)
boolean pushkernelcall (hdltreenode hp1, hdltreenode *hreturned)
boolean pushfunctionreference (tyvaluerecord val, hdltreenode *htree)
boolean pushlastlink (hdltreenode hnewlast, hdltreenode hlist)
static boolean langpacktreevisit (hdltreenode htree, ptrvoid refcon)
boolean langpacktree (hdltreenode htree, Handle *hpacked)
static boolean langunpacktreenode (tydisktreenode *rec, hdltreenode *hnode, ptrpacktreeinfo ppi)
static boolean langunpacktreevisit (hdltreenode *htree, ptrpacktreeinfo ppi)
boolean langunpacktree (Handle hpacked, hdltreenode *htree)
boolean langcopytree (hdltreenode hin, hdltreenode *hout)

Variables

static hdltreenode hfirstfreetreenode = nil


Define Documentation

 
#define _entercriticaltreenodesection  ) 
 

Definition at line 183 of file langtree.c.

Referenced by alloctreenode(), and freetreenode().

 
#define _leavecriticaltreenodesection  ) 
 

Definition at line 185 of file langtree.c.

Referenced by alloctreenode(), and freetreenode().

#define treenodeallocator   true
 

Definition at line 145 of file langtree.c.

#define treenodeblocksize   1024
 

Definition at line 147 of file langtree.c.

Referenced by alloctreenodeblock().


Typedef Documentation

typedef struct tydisktreenode ** hdldisktreenode
 

typedef struct tydisktreerec ** hdldisktreerec
 

typedef struct tyOLD42disktreenode ** hdlOLD42disktreenode
 

typedef struct tydisktreenode * ptrdisktreenode
 

typedef struct tydisktreerec * ptrdisktreerec
 

typedef struct tyOLD42disktreenode * ptrOLD42disktreenode
 

typedef struct packtreeinfo * ptrpacktreeinfo
 

typedef struct tytreenodeblock * ptrtreenodeblock
 

typedef struct packtreeinfo typacktreeinfo
 


Enumeration Type Documentation

enum tydisktreenodeparaminfo
 

Enumerator:
ctparams_mask 
ctparams_1 
hasparam1_mask 
hasparam2_mask 
hasparam3_mask 
hasparam4_mask 
haslink_mask 

Definition at line 70 of file langtree.c.


Function Documentation

static boolean alloctreenode hdltreenode hnode  )  [static]
 

Definition at line 224 of file langtree.c.

References _entercriticaltreenodesection, _leavecriticaltreenodesection, alloctreenodeblock(), h, hfirstfreetreenode, hnode, and nil.

Referenced by langnewtreenode().

Here is the call graph for this function:

static boolean alloctreenodeblock hdltreenode hfirstfreenode  )  [static]
 

Definition at line 193 of file langtree.c.

References clearbytes(), memoryerror(), nil, and treenodeblocksize.

Referenced by alloctreenode().

Here is the call graph for this function:

static boolean counttreenodevisit hdltreenode  hnode,
ptrvoid  refcon
[static]
 

Definition at line 318 of file langtree.c.

Referenced by langcounttreenodes().

static boolean equaltrees hdltreenode  h1,
hdltreenode  h2
[static]
 

Definition at line 398 of file langtree.c.

References equalhandles(), langheaptype(), nil, and novaluetype.

Referenced by pushbinaryoperation().

Here is the call graph for this function:

static void freetreenode hdltreenode  hnode  )  [static]
 

Definition at line 252 of file langtree.c.

References _entercriticaltreenodesection, _leavecriticaltreenodesection, clearbytes(), hfirstfreetreenode, and hnode.

Referenced by langdisposetree(), and langunpacktreenode().

Here is the call graph for this function:

boolean langcopytree hdltreenode  hin,
hdltreenode hout
 

Definition at line 1322 of file langtree.c.

References langpacktree(), and langunpacktree().

Here is the call graph for this function:

short langcounttreenodes hdltreenode  hnode  ) 
 

Definition at line 329 of file langtree.c.

References counttreenodevisit(), hnode, and langvisitcodetree().

Referenced by hashgetvaluestring(), langgetvalsize(), and langpacktree().

Here is the call graph for this function:

boolean langdisposetree hdltreenode  htree  ) 
 

Definition at line 339 of file langtree.c.

References disposehandle(), disposevaluerecord(), freetreenode(), h, herrornode, htree, langdisposetree(), nil, and NULL.

Referenced by cmdiconhit(), disposeprocess(), disposevaluerecord(), fwsgetcallbackcodetree(), fwsruncallback(), issafemacro(), langaddapplescriptsyntax(), langbuildnamedparamlist(), langcallscriptwithaddress(), langcompiletext(), langdialogitemhit(), langdisposetree(), langexpandtodotparams(), langipcbuildparamlist(), langipchandletrapverb(), langipcruncode(), langipcrunscript(), langrun(), langrundialog(), langrunmodeless(), langrunscriptcode(), langstriptextsyntax(), langunpacktreevisit(), langwinipcruncode(), meuserselected(), opverbdisposecode(), osaDoScript(), osahandletrapverb(), parseaddress(), processreplacecode(), processruncode(), processruntext(), pushbinaryoperation(), pushkernelcall(), pushquadruplet(), pushtriplet(), pushunaryoperation(), runprocessvisit(), scriptcompiler(), scriptnewprocess(), scriptstringlookup(), stringtolist(), stringtoobjspec(), and threadcallscriptverb().

Here is the call graph for this function:

static boolean langnewtreenode hdltreenode hnode,
short  ctparams
[static]
 

Definition at line 464 of file langtree.c.

References alloctreenode(), ctscanchars, ctscanlines, h, hnode, longsizeof, newclearhandle(), and nil.

Referenced by langunpacktreenode(), pushbinaryoperation(), pushoperation(), pushquadruplet(), pushtriplet(), pushunaryoperation(), and pushvalue().

Here is the call graph for this function:

boolean langpacktree hdltreenode  htree,
Handle hpacked
 

Definition at line 1090 of file langtree.c.

References disposehandle(), htree, info, langcounttreenodes(), langpacktreevisit(), langvisitcodetree(), mergehandles(), newclearhandle(), and newemptyhandle().

Referenced by fwsgetcallbackcodetree(), hashpackvisit(), langcopytree(), and langpackvalue().

Here is the call graph for this function:

static boolean langpacktreevisit hdltreenode  htree,
ptrvoid  refcon
[static]
 

Definition at line 1019 of file langtree.c.

References ctparams_1, disposehandle(), gethandlesize(), haslink_mask, hasparam1_mask, hasparam2_mask, hasparam3_mask, hasparam4_mask, HNoNode, htree, langpackvalue(), moduleop, nil, tydisktreenode::nodetype, novaluetype, pushhandle(), and tyvaluerecord::valuetype.

Referenced by langpacktree().

Here is the call graph for this function:

boolean langunpacktree Handle  hpacked,
hdltreenode htree
 

Definition at line 1273 of file langtree.c.

References assert, disposehandle(), fl, htree, info, langunpacktreevisit(), nil, and unmergehandles().

Referenced by fwsruncallback(), hashunpacktable(), langcopytree(), and langunpackvalue().

Here is the call graph for this function:

static boolean langunpacktreenode tydisktreenode rec,
hdltreenode hnode,
ptrpacktreeinfo  ppi
[static]
 

Definition at line 1129 of file langtree.c.

References ctparams_1, ctparams_mask, disposehandle(), error, freetreenode(), hnode, langnewtreenode(), langunpackvalue(), newhandle(), nil, and pullfromhandle().

Referenced by langunpacktreevisit().

Here is the call graph for this function:

static boolean langunpacktreevisit hdltreenode htree,
ptrpacktreeinfo  ppi
[static]
 

Definition at line 1190 of file langtree.c.

References assert, tydisktreenode::charnum, error, haslink_mask, hasparam1_mask, hasparam2_mask, hasparam3_mask, hasparam4_mask, hnode, htree, langdisposetree(), langunpacktreenode(), tydisktreenode::lnum, nil, and tydisktreenode::nodevalsize.

Referenced by langunpacktree().

Here is the call graph for this function:

boolean langvisitcodetree hdltreenode  htree,
langtreevisitcallback  visit,
ptrvoid  refcon
 

Definition at line 266 of file langtree.c.

References h, htree, langvisitcodetree(), nil, and return().

Referenced by codecontainsfunctioncalls(), langcounttreenodes(), langpacktree(), langrun(), and langvisitcodetree().

Here is the call graph for this function:

boolean newconstnode tyvaluerecord  val,
hdltreenode hreturned
 

Definition at line 538 of file langtree.c.

References constop, and pushvalue().

Referenced by fwsruncallback(), langbuildnamedparamlist(), langbuildparamlist(), langcallscriptwithaddress(), langdialogitemhit(), langipcbuildparamlist(), langscanner(), pushfunctionreference(), and scriptbuildtree().

Here is the call graph for this function:

boolean newidnode tyvaluerecord  val,
hdltreenode hreturned
 

Definition at line 544 of file langtree.c.

References identifierop, and pushvalue().

Referenced by langbuildnamedparamlist(), langscanner(), and osahandletrapverb().

Here is the call graph for this function:

boolean pushbinaryoperation tytreetype  op,
hdltreenode  hp1,
hdltreenode  hp2,
hdltreenode hreturned
 

Definition at line 612 of file langtree.c.

References addop, addvalueop, assignop, equaltrees(), h, langdisposetree(), langnewtreenode(), nil, tytreenode::param1, tytreenode::param2, subtractop, and subtractvalueop.

Referenced by fwsruncallback(), langbuildnamedparamlist(), langipchandletrapverb(), langipcrunscript(), osahandletrapverb(), pushfunctioncall(), scriptbuildtree(), and threadcallscriptverb().

Here is the call graph for this function:

boolean pushfunctioncall hdltreenode  hp1,
hdltreenode  hp2,
hdltreenode hreturned
 

Definition at line 779 of file langtree.c.

References assert, bigstring, disposehandle(), fl, functionop, h, hashtablelookup(), hbuiltinfunctions, hnode, identifierop, pushbinaryoperation(), stringvaluetype, texthandletostring(), tokenvaluetype, and tyvaluerecord::valuetype.

Referenced by langcallscriptwithaddress(), langipchandletrapverb(), langipcrunscript(), langrunscriptcode(), and threadcallscriptverb().

Here is the call graph for this function:

boolean pushfunctionreference tyvaluerecord  val,
hdltreenode htree
 

Definition at line 916 of file langtree.c.

References dereferenceop, exemptfromtmpstack(), htree, newconstnode(), and pushunaryoperation().

Referenced by langcallscriptwithaddress(), langipchandletrapverb(), langipcrunscript(), langrundialog(), langrunmodeless(), langrunscriptcode(), and threadcallscriptverb().

Here is the call graph for this function:

boolean pushkernelcall hdltreenode  hp1,
hdltreenode hreturned
 

Definition at line 837 of file langtree.c.

References assert, bigstring, dotop, efptable, exemptfromtmpstack(), fl, h, hashtablelookup(), herrornode, hnode, kernelop, langdisposetree(), langgetdotparams(), langparamerror(), nil, notefperror, NULL, pophashtable(), pushhashtable(), pushvalue(), setaddressvalue(), tokenvaluetype, and tyvaluerecord::valuetype.

Here is the call graph for this function:

boolean pushlastlink hdltreenode  hnewlast,
hdltreenode  hlist
 

Definition at line 941 of file langtree.c.

References assert, fieldop, tytreenode::link, and nil.

Referenced by fwsruncallback(), langbuildnamedparamlist(), and langbuildparamlist().

boolean pushloop hdltreenode  hp1,
hdltreenode  hp2,
hdltreenode  hp3,
hdltreenode hreturned
 

Definition at line 727 of file langtree.c.

References loopop, nil, and pushquadruplet().

Here is the call graph for this function:

boolean pushloopbody hdltreenode  hp4,
hdltreenode  hlist
 

Definition at line 733 of file langtree.c.

References h, and tytreenode::param4.

boolean pushoperation tytreetype  op,
hdltreenode hreturned
 

Definition at line 716 of file langtree.c.

References langnewtreenode().

Here is the call graph for this function:

boolean pushquadruplet tytreetype  op,
hdltreenode  hp1,
hdltreenode  hp2,
hdltreenode  hp3,
hdltreenode  hp4,
hdltreenode hreturned
 

Definition at line 550 of file langtree.c.

References h, langdisposetree(), langnewtreenode(), tytreenode::param2, tytreenode::param3, and tytreenode::param4.

Referenced by pushloop().

Here is the call graph for this function:

boolean pushtriplet tytreetype  op,
hdltreenode  hp1,
hdltreenode  hp2,
hdltreenode  hp3,
hdltreenode hreturned
 

Definition at line 583 of file langtree.c.

References h, langdisposetree(), langnewtreenode(), tytreenode::param2, and tytreenode::param3.

Here is the call graph for this function:

boolean pushtripletstatementlists hdltreenode  hp2,
hdltreenode  hp3,
hdltreenode  hlist
 

Definition at line 753 of file langtree.c.

References h, tytreenode::param2, and tytreenode::param3.

boolean pushunaryoperation tytreetype  op,
hdltreenode  hp1,
hdltreenode hreturned
 

Definition at line 695 of file langtree.c.

References h, langdisposetree(), and langnewtreenode().

Referenced by pushfunctionreference().

Here is the call graph for this function:

boolean pushunarystatementlist hdltreenode  hp1,
hdltreenode  hlist
 

Definition at line 743 of file langtree.c.

References h, and tytreenode::param1.

static boolean pushvalue tytreetype  op,
tyvaluerecord  val,
hdltreenode hreturned
[static]
 

Definition at line 513 of file langtree.c.

References disposevaluerecord(), h, and langnewtreenode().

Referenced by newconstnode(), newidnode(), and pushkernelcall().

Here is the call graph for this function:


Variable Documentation

hdltreenode hfirstfreetreenode = nil [static]
 

Definition at line 190 of file langtree.c.

Referenced by alloctreenode(), and freetreenode().


Generated on Mon Jun 5 04:42:39 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6