FreeBASIC  0.91.0
ir-hlc.bas File Reference
#include "fb.bi"
#include "fbint.bi"
#include "ir.bi"
#include "rtl.bi"
#include "flist.bi"
#include "lex.bi"
Include dependency graph for ir-hlc.bas:

Go to the source code of this file.

Data Structures

class  IRCALLARG
 
class  SECTIONENTRY
 
class  EXPRNODE
 
class  EXPRCACHENODE
 
class  IRHLCCTX
 

Enumerations

enum  {
  EXPRCLASS_TEXT = 0, EXPRCLASS_IMM, EXPRCLASS_SYM, EXPRCLASS_CAST,
  EXPRCLASS_UOP, EXPRCLASS_BOP
}
 
enum  EMITPROC_OPTIONS { EMITPROC_ISPROTO = &h1, EMITPROC_ISPROCPTR = &h2 }
 

Functions

function_as_string hEmitType (byval_as_integer dtype, byval_as_FBSYMBOL_ptr subtype)
 
sub hEmitStruct (byval_as_FBSYMBOL_ptr s, byval_as_integer is_ptr)
 
sub _emitDBG (byval_as_integer op, byval_as_FBSYMBOL_ptr proc, byval_as_integer ex)
 
sub exprFreeNode (byval_as_EXPRNODE_ptr n)
 
sub exprDump (byval_as_EXPRNODE_ptr n)
 
private sub _init ()
 
private sub _end ()
 
private sub sectionBegin ()
 
private sub sectionWriteLine (byval_as_zstring_ptr s)
 
private sub sectionIndent ()
 
private sub sectionUnindent ()
 
private function_as_integer sectionInsideProc ()
 
private sub sectionEnd ()
 
private function_as_integer sectionGosub (byval_as_integer section)
 
private sub sectionReturn (byval_as_integer section)
 
private sub hWriteLine (byval_as_zstring_ptr s, byval_as_integer noline=FALSE)
 
private sub hWriteStaticAssert (byref_as_string expr)
 
private sub hAppendCtorAttrib (byref_as_string ln, byval_as_FBSYMBOL_ptr proc, byval_as_integer in_front)
 
private function_as_string hEmitProcHeader (byval_as_FBSYMBOL_ptr proc, byval_as_EMITPROC_OPTIONS options)
 
private function_as_string hGetUdtTag (byval_as_FBSYMBOL_ptr sym)
 
private function_as_string hGetUdtId (byval_as_FBSYMBOL_ptr sym)
 
private function_as_string hGetUdtName (byval_as_FBSYMBOL_ptr sym)
 
private sub hEmitEnum (byval_as_FBSYMBOL_ptr s)
 
private sub hEmitUDT (byval_as_FBSYMBOL_ptr s, byval_as_integer is_ptr)
 
private function_as_string hEmitArrayDecl (byval_as_FBSYMBOL_ptr sym)
 
private sub hEmitVar (byval_as_FBSYMBOL_ptr sym, byval_as_zstring_ptr varini)
 
private sub hEmitVariable (byval_as_FBSYMBOL_ptr s)
 
private sub hEmitGccBuiltinWrapper (byval_as_FBSYMBOL_ptr sym)
 
private sub hEmitFuncProto (byval_as_FBSYMBOL_ptr s)
 
private
function_as_FBSYMBOL_ptr_ptr 
hFindParentAnonAlreadyOnStack (byval_as_FBSYMBOL_ptr fld)
 
private sub hPushAnonParents (byval_as_FBSYMBOL_ptr baseparent, byval_as_FBSYMBOL_ptr parent)
 
private sub hPopAnonParents (byval_as_FBSYMBOL_ptr_ptr anonnode)
 
private sub hEmitDecls (byval_as_FBSYMBOL_ptr s, byval_as_integer procs)
 
private sub hEmitDataStmt ()
 
private sub hWriteX86FTOI (byref_as_string fname, byval_as_integer rtype, byval_as_integer ptype)
 
private sub hWriteGenericFTOI (byref_as_string fname, byval_as_integer rtype, byval_as_integer ptype)
 
private sub hWriteFTOI (byref_as_string fname, byval_as_integer rtype, byval_as_integer ptype)
 
private sub hEmitFTOIBuiltins ()
 
private function_as_integer _emitBegin ()
 
private sub _emitEnd (byval_as_double tottime)
 
private function_as_integer _getOptionValue (byval_as_IR_OPTIONVALUE opt)
 
private sub _procBegin (byval_as_FBSYMBOL_ptr proc)
 
private sub _procEnd (byval_as_FBSYMBOL_ptr proc)
 
private sub _scopeBegin (byval_as_FBSYMBOL_ptr s)
 
private sub _scopeEnd (byval_as_FBSYMBOL_ptr s)
 
private sub _procAllocStaticVars (byval_as_FBSYMBOL_ptr sym)
 
private function_as_IRVREG_ptr hNewVR (byval_as_integer dtype, byval_as_FBSYMBOL_ptr subtype, byval_as_integer vtype)
 
private function_as_IRVREG_ptr _allocVreg (byval_as_integer dtype, byval_as_FBSYMBOL_ptr subtype)
 
private function_as_IRVREG_ptr _allocVrImm (byval_as_integer dtype, byval_as_FBSYMBOL_ptr subtype, byval_as_longint value)
 
private function_as_IRVREG_ptr _allocVrImmF (byval_as_integer dtype, byval_as_FBSYMBOL_ptr subtype, byval_as_double value)
 
private function_as_IRVREG_ptr _allocVrVar (byval_as_integer dtype, byval_as_FBSYMBOL_ptr subtype, byval_as_FBSYMBOL_ptr symbol, byval_as_longint ofs)
 
private function_as_IRVREG_ptr _allocVrIdx (byval_as_integer dtype, byval_as_FBSYMBOL_ptr subtype, byval_as_FBSYMBOL_ptr symbol, byval_as_longint ofs, byval_as_integer mult, byval_as_IRVREG_ptr vidx)
 
private function_as_IRVREG_ptr _allocVrPtr (byval_as_integer dtype, byval_as_FBSYMBOL_ptr subtype, byval_as_longint ofs, byval_as_IRVREG_ptr vidx)
 
private function_as_IRVREG_ptr _allocVrOfs (byval_as_integer dtype, byval_as_FBSYMBOL_ptr subtype, byval_as_FBSYMBOL_ptr symbol, byval_as_longint ofs)
 
private sub _setVregDataType (byval_as_IRVREG_ptr vreg, byval_as_integer dtype, byval_as_FBSYMBOL_ptr subtype)
 
private sub hLoadVreg (byval_as_IRVREG_ptr vreg)
 
private function_as_EXPRNODE_ptr exprNew (byval_as_integer class_, byval_as_integer dtype, byval_as_FBSYMBOL_ptr subtype)
 
private sub exprFreeTree (byval_as_EXPRNODE_ptr n)
 
private function_as_EXPRNODE_ptr exprNewTEXT (byval_as_integer dtype, byval_as_FBSYMBOL_ptr subtype, byval_as_zstring_ptr s)
 
private function_as_EXPRNODE_ptr exprNewIMMi (byval_as_longint i, byval_as_integer dtype=FB_DATATYPE_INTEGER)
 
private function_as_EXPRNODE_ptr exprNewIMMf (byval_as_double f, byval_as_integer dtype)
 
private function_as_integer symbIsCArray (byval_as_FBSYMBOL_ptr sym)
 
private function_as_EXPRNODE_ptr exprNewCAST (byval_as_integer dtype, byval_as_FBSYMBOL_ptr subtype, byval_as_EXPRNODE_ptr l)
 
private function_as_EXPRNODE_ptr exprNewSYM (byval_as_FBSYMBOL_ptr sym)
 
private function_as_integer typeCBop (byval_as_integer op, byval_as_integer a, byval_as_FBSYMBOL_ptr asubtype, byval_as_integer b, byval_as_FBSYMBOL_ptr bsubtype)
 
private function_as_EXPRNODE_ptr exprNewUOP (byval_as_integer op, byval_as_EXPRNODE_ptr l)
 
private function_as_EXPRNODE_ptr exprNewBOP (byval_as_integer op, byval_as_EXPRNODE_ptr l, byval_as_EXPRNODE_ptr r)
 
private sub exprCache (byval_as_integer vregid, byval_as_EXPRNODE_ptr expr)
 
private function_as_EXPRNODE_ptr exprLookup (byval_as_integer vregid)
 
private function_as_string hEmitInt (byval_as_integer dtype, byval_as_longint value)
 
private function_as_string hEmitFloat (byval_as_integer dtype, byval_as_double value)
 
private sub hBuildStrLit (byref_as_string ln, byval_as_zstring_ptr z, byval_as_longint length)
 
private sub hBuildWstrLit (byref_as_string ln, byval_as_wstring_ptr w, byval_as_longint length)
 
private function_as_zstring_ptr hBopToStr (byval_as_integer op)
 
private sub hExprFlush (byval_as_EXPRNODE_ptr n, byval_as_integer need_parens)
 
private function_as_string exprFlush (byval_as_EXPRNODE_ptr n, byval_as_integer need_parens=FALSE)
 
private function_as_EXPRNODE_ptr exprNewOFFSET (byval_as_FBSYMBOL_ptr sym, byval_as_longint ofs)
 
private function_as_EXPRNODE_ptr exprNewVREG (byval_as_IRVREG_ptr vreg, byval_as_integer is_lvalue=FALSE)
 
private sub _emitLabel (byval_as_FBSYMBOL_ptr label)
 
private sub exprSTORE (byval_as_IRVREG_ptr vr, byval_as_EXPRNODE_ptr r, byval_as_integer has_sidefx=FALSE)
 
private sub _emitBop (byval_as_integer op, byval_as_IRVREG_ptr v1, byval_as_IRVREG_ptr v2, byval_as_IRVREG_ptr vr, byval_as_FBSYMBOL_ptr ex)
 
private sub _emitUop (byval_as_integer op, byval_as_IRVREG_ptr v1, byval_as_IRVREG_ptr vr)
 
private sub _emitStore (byval_as_IRVREG_ptr v1, byval_as_IRVREG_ptr v2)
 
private sub _emitSpillRegs ()
 
private sub _emitLoad (byval_as_IRVREG_ptr v1)
 
private sub _emitLoadRes (byval_as_IRVREG_ptr v1, byval_as_IRVREG_ptr vr)
 
private sub _emitAddr (byval_as_integer op, byval_as_IRVREG_ptr v1, byval_as_IRVREG_ptr vr)
 
private sub hDoCall (byref_as_string s, byval_as_integer bytestopop, byval_as_IRVREG_ptr vr, byval_as_integer level)
 
private sub _emitCall (byval_as_FBSYMBOL_ptr proc, byval_as_integer bytestopop, byval_as_IRVREG_ptr vr, byval_as_integer level)
 
private sub _emitCallPtr (byval_as_IRVREG_ptr v1, byval_as_IRVREG_ptr vr, byval_as_integer bytestopop, byval_as_integer level)
 
private sub _emitJumpPtr (byval_as_IRVREG_ptr v1)
 
private sub _emitBranch (byval_as_integer op, byval_as_FBSYMBOL_ptr label)
 
private sub _emitJmpTb (byval_as_IRVREG_ptr v1, byval_as_FBSYMBOL_ptr tbsym, byval_as_ulongint_ptr values, byval_as_FBSYMBOL_ptr_ptr labels, byval_as_integer labelcount, byval_as_FBSYMBOL_ptr deflabel, byval_as_ulongint minval, byval_as_ulongint maxval)
 
private sub _emitMem (byval_as_integer op, byval_as_IRVREG_ptr v1, byval_as_IRVREG_ptr v2, byval_as_longint bytes)
 
private sub _emitDECL (byval_as_FBSYMBOL_ptr sym)
 
private sub _emitComment (byval_as_zstring_ptr text)
 
private function_as_string hGetMangledNameForASM (byval_as_FBSYMBOL_ptr sym)
 
private sub _emitAsmBegin ()
 
private sub _emitAsmText (byval_as_zstring_ptr text)
 
private sub _emitAsmSymb (byval_as_FBSYMBOL_ptr sym)
 
private sub _emitAsmEnd ()
 
private sub _emitVarIniBegin (byval_as_FBSYMBOL_ptr sym)
 
private sub _emitVarIniEnd (byval_as_FBSYMBOL_ptr sym)
 
private sub hVarIniSeparator ()
 
private sub _emitVarIniI (byval_as_FBSYMBOL_ptr sym, byval_as_longint value)
 
private sub _emitVarIniF (byval_as_FBSYMBOL_ptr sym, byval_as_double value)
 
private sub _emitVarIniOfs (byval_as_FBSYMBOL_ptr sym, byval_as_longint ofs)
 
private sub _emitVarIniStr (byval_as_longint varlength, byval_as_zstring_ptr literal, byval_as_longint litlength)
 
private sub _emitVarIniWstr (byval_as_longint varlength, byval_as_wstring_ptr literal, byval_as_longint litlength)
 
private sub _emitVarIniPad (byval_as_longint bytes)
 
private sub _emitVarIniScopeBegin ()
 
private sub _emitVarIniScopeEnd ()
 
private sub _emitFbctinfBegin ()
 
private sub _emitFbctinfString (byval_as_zstring_ptr s)
 
private sub _emitFbctinfEnd ()
 
private sub _emitProcBegin (byval_as_FBSYMBOL_ptr proc, byval_as_FBSYMBOL_ptr initlabel)
 
private sub _emitProcEnd (byval_as_FBSYMBOL_ptr proc, byval_as_FBSYMBOL_ptr initlabel, byval_as_FBSYMBOL_ptr exitlabel)
 
private sub _emitPushArg (byval_as_FBSYMBOL_ptr param, byval_as_IRVREG_ptr vr, byval_as_longint udtlen, byval_as_integer level)
 
private sub _emitScopeBegin (byval_as_FBSYMBOL_ptr s)
 
private sub _emitScopeEnd (byval_as_FBSYMBOL_ptr s)
 

Variables

const VAR MAX_SECTIONS = FB_MAXSCOPEDEPTH + 1
 
IRHLCCTX ctx
 
const_zstring_ptr dtypeName [toFB_DATATYPES+1] =
 
IR_VTBL irhlc_vtbl =
 

Enumeration Type Documentation

anonymous enum
Enumerator
EXPRCLASS_TEXT 
EXPRCLASS_IMM 
EXPRCLASS_SYM 
EXPRCLASS_CAST 
EXPRCLASS_UOP 
EXPRCLASS_BOP 

Definition at line 51 of file ir-hlc.bas.

Enumerator
EMITPROC_ISPROTO 
EMITPROC_ISPROCPTR 

Definition at line 328 of file ir-hlc.bas.

Function Documentation

private function_as_IRVREG_ptr _allocVreg ( byval_as_integer  dtype,
byval_as_FBSYMBOL_ptr  subtype 
)

Definition at line 1470 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private function_as_IRVREG_ptr _allocVrIdx ( byval_as_integer  dtype,
byval_as_FBSYMBOL_ptr  subtype,
byval_as_FBSYMBOL_ptr  symbol,
byval_as_longint  ofs,
byval_as_integer  mult,
byval_as_IRVREG_ptr  vidx 
)

Definition at line 1529 of file ir-hlc.bas.

Here is the call graph for this function:

private function_as_IRVREG_ptr _allocVrImm ( byval_as_integer  dtype,
byval_as_FBSYMBOL_ptr  subtype,
byval_as_longint  value 
)

Definition at line 1480 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private function_as_IRVREG_ptr _allocVrImmF ( byval_as_integer  dtype,
byval_as_FBSYMBOL_ptr  subtype,
byval_as_double  value 
)

Definition at line 1495 of file ir-hlc.bas.

Here is the call graph for this function:

private function_as_IRVREG_ptr _allocVrOfs ( byval_as_integer  dtype,
byval_as_FBSYMBOL_ptr  subtype,
byval_as_FBSYMBOL_ptr  symbol,
byval_as_longint  ofs 
)

Definition at line 1568 of file ir-hlc.bas.

Here is the call graph for this function:

private function_as_IRVREG_ptr _allocVrPtr ( byval_as_integer  dtype,
byval_as_FBSYMBOL_ptr  subtype,
byval_as_longint  ofs,
byval_as_IRVREG_ptr  vidx 
)

Definition at line 1550 of file ir-hlc.bas.

Here is the call graph for this function:

private function_as_IRVREG_ptr _allocVrVar ( byval_as_integer  dtype,
byval_as_FBSYMBOL_ptr  subtype,
byval_as_FBSYMBOL_ptr  symbol,
byval_as_longint  ofs 
)

Definition at line 1511 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _emitAddr ( byval_as_integer  op,
byval_as_IRVREG_ptr  v1,
byval_as_IRVREG_ptr  vr 
)

Definition at line 2876 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _emitAsmBegin ( )

Definition at line 3181 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _emitAsmEnd ( )

Definition at line 3244 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _emitAsmSymb ( byval_as_FBSYMBOL_ptr  sym)

Definition at line 3211 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _emitAsmText ( byval_as_zstring_ptr  text)

Definition at line 3207 of file ir-hlc.bas.

private function_as_integer _emitBegin ( )

Definition at line 1237 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _emitBop ( byval_as_integer  op,
byval_as_IRVREG_ptr  v1,
byval_as_IRVREG_ptr  v2,
byval_as_IRVREG_ptr  vr,
byval_as_FBSYMBOL_ptr  ex 
)

Definition at line 2760 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private sub _emitBranch ( byval_as_integer  op,
byval_as_FBSYMBOL_ptr  label 
)

Definition at line 3010 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _emitCall ( byval_as_FBSYMBOL_ptr  proc,
byval_as_integer  bytestopop,
byval_as_IRVREG_ptr  vr,
byval_as_integer  level 
)

Definition at line 2977 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _emitCallPtr ( byval_as_IRVREG_ptr  v1,
byval_as_IRVREG_ptr  vr,
byval_as_integer  bytestopop,
byval_as_integer  level 
)

Definition at line 2992 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _emitComment ( byval_as_zstring_ptr  text)

Definition at line 3140 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _emitDBG ( byval_as_integer  op,
byval_as_FBSYMBOL_ptr  proc,
byval_as_integer  ex 
)

Definition at line 3128 of file ir-hlc.bas.

Here is the caller graph for this function:

private sub _emitDECL ( byval_as_FBSYMBOL_ptr  sym)

Definition at line 3102 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _emitEnd ( byval_as_double  tottime)

Definition at line 1285 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _emitFbctinfBegin ( )

Definition at line 3413 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _emitFbctinfEnd ( )

Definition at line 3431 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _emitFbctinfString ( byval_as_zstring_ptr  s)

Definition at line 3427 of file ir-hlc.bas.

private sub _emitJmpTb ( byval_as_IRVREG_ptr  v1,
byval_as_FBSYMBOL_ptr  tbsym,
byval_as_ulongint_ptr  values,
byval_as_FBSYMBOL_ptr_ptr  labels,
byval_as_integer  labelcount,
byval_as_FBSYMBOL_ptr  deflabel,
byval_as_ulongint  minval,
byval_as_ulongint  maxval 
)

Definition at line 3016 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _emitJumpPtr ( byval_as_IRVREG_ptr  v1)

Definition at line 3006 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _emitLabel ( byval_as_FBSYMBOL_ptr  label)

Definition at line 2679 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _emitLoad ( byval_as_IRVREG_ptr  v1)

Definition at line 2866 of file ir-hlc.bas.

private sub _emitLoadRes ( byval_as_IRVREG_ptr  v1,
byval_as_IRVREG_ptr  vr 
)

Definition at line 2870 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _emitMem ( byval_as_integer  op,
byval_as_IRVREG_ptr  v1,
byval_as_IRVREG_ptr  v2,
byval_as_longint  bytes 
)

Definition at line 3086 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _emitProcBegin ( byval_as_FBSYMBOL_ptr  proc,
byval_as_FBSYMBOL_ptr  initlabel 
)

Definition at line 3442 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _emitProcEnd ( byval_as_FBSYMBOL_ptr  proc,
byval_as_FBSYMBOL_ptr  initlabel,
byval_as_FBSYMBOL_ptr  exitlabel 
)

Definition at line 3485 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _emitPushArg ( byval_as_FBSYMBOL_ptr  param,
byval_as_IRVREG_ptr  vr,
byval_as_longint  udtlen,
byval_as_integer  level 
)

Definition at line 3512 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _emitScopeBegin ( byval_as_FBSYMBOL_ptr  s)

Definition at line 3528 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _emitScopeEnd ( byval_as_FBSYMBOL_ptr  s)

Definition at line 3534 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _emitSpillRegs ( )

Definition at line 2862 of file ir-hlc.bas.

private sub _emitStore ( byval_as_IRVREG_ptr  v1,
byval_as_IRVREG_ptr  v2 
)

Definition at line 2856 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private sub _emitUop ( byval_as_integer  op,
byval_as_IRVREG_ptr  v1,
byval_as_IRVREG_ptr  vr 
)

Definition at line 2839 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _emitVarIniBegin ( byval_as_FBSYMBOL_ptr  sym)

Definition at line 3274 of file ir-hlc.bas.

private sub _emitVarIniEnd ( byval_as_FBSYMBOL_ptr  sym)

Definition at line 3279 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _emitVarIniF ( byval_as_FBSYMBOL_ptr  sym,
byval_as_double  value 
)

Definition at line 3298 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _emitVarIniI ( byval_as_FBSYMBOL_ptr  sym,
byval_as_longint  value 
)

Definition at line 3290 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _emitVarIniOfs ( byval_as_FBSYMBOL_ptr  sym,
byval_as_longint  ofs 
)

Definition at line 3306 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _emitVarIniPad ( byval_as_longint  bytes)

Definition at line 3390 of file ir-hlc.bas.

private sub _emitVarIniScopeBegin ( )

Definition at line 3396 of file ir-hlc.bas.

private sub _emitVarIniScopeEnd ( )

Definition at line 3401 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _emitVarIniStr ( byval_as_longint  varlength,
byval_as_zstring_ptr  literal,
byval_as_longint  litlength 
)

Definition at line 3319 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _emitVarIniWstr ( byval_as_longint  varlength,
byval_as_wstring_ptr  literal,
byval_as_longint  litlength 
)

Definition at line 3341 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _end ( void  )

Definition at line 190 of file ir-hlc.bas.

Here is the call graph for this function:

private function_as_integer _getOptionValue ( byval_as_IR_OPTIONVALUE  opt)

Definition at line 1355 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _init ( )

Definition at line 172 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _procAllocStaticVars ( byval_as_FBSYMBOL_ptr  sym)

Definition at line 1384 of file ir-hlc.bas.

Here is the call graph for this function:

private sub _procBegin ( byval_as_FBSYMBOL_ptr  proc)

Definition at line 1370 of file ir-hlc.bas.

private sub _procEnd ( byval_as_FBSYMBOL_ptr  proc)

Definition at line 1374 of file ir-hlc.bas.

private sub _scopeBegin ( byval_as_FBSYMBOL_ptr  s)

Definition at line 1378 of file ir-hlc.bas.

private sub _scopeEnd ( byval_as_FBSYMBOL_ptr  s)

Definition at line 1381 of file ir-hlc.bas.

private sub _setVregDataType ( byval_as_IRVREG_ptr  vreg,
byval_as_integer  dtype,
byval_as_FBSYMBOL_ptr  subtype 
)

Definition at line 1586 of file ir-hlc.bas.

Here is the caller graph for this function:

private sub exprCache ( byval_as_integer  vregid,
byval_as_EXPRNODE_ptr  expr 
)

Definition at line 2023 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private sub exprDump ( byval_as_EXPRNODE_ptr  n)

Definition at line 2395 of file ir-hlc.bas.

Here is the call graph for this function:

private function_as_string exprFlush ( byval_as_EXPRNODE_ptr  n,
byval_as_integer  need_parens = FALSE 
)

Definition at line 2381 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private sub exprFreeNode ( byval_as_EXPRNODE_ptr  n)

Definition at line 1690 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private sub exprFreeTree ( byval_as_EXPRNODE_ptr  n)

Definition at line 1697 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private function_as_EXPRNODE_ptr exprLookup ( byval_as_integer  vregid)

Definition at line 2030 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private function_as_EXPRNODE_ptr exprNew ( byval_as_integer  class_,
byval_as_integer  dtype,
byval_as_FBSYMBOL_ptr  subtype 
)

Definition at line 1674 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private function_as_EXPRNODE_ptr exprNewBOP ( byval_as_integer  op,
byval_as_EXPRNODE_ptr  l,
byval_as_EXPRNODE_ptr  r 
)

Definition at line 1997 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private function_as_EXPRNODE_ptr exprNewCAST ( byval_as_integer  dtype,
byval_as_FBSYMBOL_ptr  subtype,
byval_as_EXPRNODE_ptr  l 
)

Definition at line 1788 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private function_as_EXPRNODE_ptr exprNewIMMf ( byval_as_double  f,
byval_as_integer  dtype 
)

Definition at line 1745 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private function_as_EXPRNODE_ptr exprNewIMMi ( byval_as_longint  i,
byval_as_integer  dtype = FB_DATATYPE_INTEGER 
)

Definition at line 1723 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private function_as_EXPRNODE_ptr exprNewOFFSET ( byval_as_FBSYMBOL_ptr  sym,
byval_as_longint  ofs 
)

Definition at line 2472 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private function_as_EXPRNODE_ptr exprNewSYM ( byval_as_FBSYMBOL_ptr  sym)

Definition at line 1826 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private function_as_EXPRNODE_ptr exprNewTEXT ( byval_as_integer  dtype,
byval_as_FBSYMBOL_ptr  subtype,
byval_as_zstring_ptr  s 
)

Definition at line 1708 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private function_as_EXPRNODE_ptr exprNewUOP ( byval_as_integer  op,
byval_as_EXPRNODE_ptr  l 
)

Definition at line 1935 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private function_as_EXPRNODE_ptr exprNewVREG ( byval_as_IRVREG_ptr  vreg,
byval_as_integer  is_lvalue = FALSE 
)

Definition at line 2498 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private sub exprSTORE ( byval_as_IRVREG_ptr  vr,
byval_as_EXPRNODE_ptr  r,
byval_as_integer  has_sidefx = FALSE 
)

Definition at line 2689 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private sub hAppendCtorAttrib ( byref_as_string  ln,
byval_as_FBSYMBOL_ptr  proc,
byval_as_integer  in_front 
)

Definition at line 334 of file ir-hlc.bas.

Here is the caller graph for this function:

private function_as_zstring_ptr hBopToStr ( byval_as_integer  op)

Definition at line 2257 of file ir-hlc.bas.

Here is the caller graph for this function:

private sub hBuildStrLit ( byref_as_string  ln,
byval_as_zstring_ptr  z,
byval_as_longint  length 
)

Definition at line 2156 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private sub hBuildWstrLit ( byref_as_string  ln,
byval_as_wstring_ptr  w,
byval_as_longint  length 
)

Definition at line 2214 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private sub hDoCall ( byref_as_string  s,
byval_as_integer  bytestopop,
byval_as_IRVREG_ptr  vr,
byval_as_integer  level 
)

Definition at line 2922 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private function_as_string hEmitArrayDecl ( byval_as_FBSYMBOL_ptr  sym)

Definition at line 597 of file ir-hlc.bas.

Here is the caller graph for this function:

private sub hEmitDataStmt ( )

Definition at line 1034 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private sub hEmitDecls ( byval_as_FBSYMBOL_ptr  s,
byval_as_integer  procs 
)

Definition at line 992 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private sub hEmitEnum ( byval_as_FBSYMBOL_ptr  s)

Definition at line 527 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private function_as_string hEmitFloat ( byval_as_integer  dtype,
byval_as_double  value 
)

Definition at line 2087 of file ir-hlc.bas.

Here is the caller graph for this function:

private sub hEmitFTOIBuiltins ( )

Definition at line 1136 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private sub hEmitFuncProto ( byval_as_FBSYMBOL_ptr  s)

Definition at line 748 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private sub hEmitGccBuiltinWrapper ( byval_as_FBSYMBOL_ptr  sym)

Definition at line 724 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private function_as_string hEmitInt ( byval_as_integer  dtype,
byval_as_longint  value 
)

Definition at line 2051 of file ir-hlc.bas.

Here is the caller graph for this function:

private function_as_string hEmitProcHeader ( byval_as_FBSYMBOL_ptr  proc,
byval_as_EMITPROC_OPTIONS  options 
)

Definition at line 366 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private sub hEmitStruct ( byval_as_FBSYMBOL_ptr  s,
byval_as_integer  is_ptr 
)

Definition at line 838 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private function_as_string hEmitType ( byval_as_integer  dtype,
byval_as_FBSYMBOL_ptr  subtype 
)

Definition at line 1621 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private sub hEmitUDT ( byval_as_FBSYMBOL_ptr  s,
byval_as_integer  is_ptr 
)

Definition at line 541 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private sub hEmitVar ( byval_as_FBSYMBOL_ptr  sym,
byval_as_zstring_ptr  varini 
)

Definition at line 632 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private sub hEmitVariable ( byval_as_FBSYMBOL_ptr  s)

Definition at line 675 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private sub hExprFlush ( byval_as_EXPRNODE_ptr  n,
byval_as_integer  need_parens 
)

Definition at line 2297 of file ir-hlc.bas.

Here is the call graph for this function:

private function_as_FBSYMBOL_ptr_ptr hFindParentAnonAlreadyOnStack ( byval_as_FBSYMBOL_ptr  fld)

Definition at line 779 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private function_as_string hGetMangledNameForASM ( byval_as_FBSYMBOL_ptr  sym)

Definition at line 3154 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private function_as_string hGetUdtId ( byval_as_FBSYMBOL_ptr  sym)

Definition at line 517 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private function_as_string hGetUdtName ( byval_as_FBSYMBOL_ptr  sym)

Definition at line 523 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private function_as_string hGetUdtTag ( byval_as_FBSYMBOL_ptr  sym)

Definition at line 507 of file ir-hlc.bas.

Here is the caller graph for this function:

private sub hLoadVreg ( byval_as_IRVREG_ptr  vreg)

Definition at line 1599 of file ir-hlc.bas.

Here is the caller graph for this function:

private function_as_IRVREG_ptr hNewVR ( byval_as_integer  dtype,
byval_as_FBSYMBOL_ptr  subtype,
byval_as_integer  vtype 
)

Definition at line 1446 of file ir-hlc.bas.

Here is the call graph for this function:

private sub hPopAnonParents ( byval_as_FBSYMBOL_ptr_ptr  anonnode)

Definition at line 829 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private sub hPushAnonParents ( byval_as_FBSYMBOL_ptr  baseparent,
byval_as_FBSYMBOL_ptr  parent 
)

Definition at line 805 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private sub hVarIniSeparator ( )

Definition at line 3284 of file ir-hlc.bas.

Here is the caller graph for this function:

private sub hWriteFTOI ( byref_as_string  fname,
byval_as_integer  rtype,
byval_as_integer  ptype 
)

Definition at line 1122 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private sub hWriteGenericFTOI ( byref_as_string  fname,
byval_as_integer  rtype,
byval_as_integer  ptype 
)

Definition at line 1095 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private sub hWriteLine ( byval_as_zstring_ptr  s,
byval_as_integer  noline = FALSE 
)

Definition at line 294 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private sub hWriteStaticAssert ( byref_as_string  expr)

Definition at line 311 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private sub hWriteX86FTOI ( byref_as_string  fname,
byval_as_integer  rtype,
byval_as_integer  ptype 
)

Definition at line 1043 of file ir-hlc.bas.

Here is the call graph for this function:

private sub sectionBegin ( )

Definition at line 200 of file ir-hlc.bas.

Here is the caller graph for this function:

private sub sectionEnd ( )

Definition at line 254 of file ir-hlc.bas.

Here is the caller graph for this function:

private function_as_integer sectionGosub ( byval_as_integer  section)

Definition at line 277 of file ir-hlc.bas.

Here is the caller graph for this function:

private sub sectionIndent ( )

Definition at line 240 of file ir-hlc.bas.

Here is the caller graph for this function:

private function_as_integer sectionInsideProc ( )

Definition at line 249 of file ir-hlc.bas.

Here is the caller graph for this function:

private sub sectionReturn ( byval_as_integer  section)

Definition at line 285 of file ir-hlc.bas.

Here is the caller graph for this function:

private sub sectionUnindent ( )

Definition at line 244 of file ir-hlc.bas.

Here is the caller graph for this function:

private sub sectionWriteLine ( byval_as_zstring_ptr  s)

Definition at line 220 of file ir-hlc.bas.

Here is the caller graph for this function:

private function_as_integer symbIsCArray ( byval_as_FBSYMBOL_ptr  sym)

Definition at line 1758 of file ir-hlc.bas.

Here is the caller graph for this function:

private function_as_integer typeCBop ( byval_as_integer  op,
byval_as_integer  a,
byval_as_FBSYMBOL_ptr  asubtype,
byval_as_integer  b,
byval_as_FBSYMBOL_ptr  bsubtype 
)

Definition at line 1865 of file ir-hlc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

IRHLCCTX ctx

Definition at line 141 of file ir-hlc.bas.

const_zstring_ptr dtypeName[toFB_DATATYPES+1] =

Definition at line 144 of file ir-hlc.bas.

IR_VTBL irhlc_vtbl =

Definition at line 3542 of file ir-hlc.bas.

const VAR MAX_SECTIONS = FB_MAXSCOPEDEPTH + 1

Definition at line 43 of file ir-hlc.bas.