dmd.backend.symbol

Compiler implementation of the D programming language.

Members

Functions

Symbol_Salignsize
int Symbol_Salignsize(Symbol* s)

Return alignment of symbol.

Symbol_Sisdead
bool Symbol_Sisdead(Symbol* s, bool anyInlineAsm)

Aver if Symbol is not only merely dead, but really most sincerely dead.

Symbol_isAffected
bool Symbol_isAffected(Symbol s)

Determine if s may be affected if an assignment is done through a pointer.

Symbol_needThis
int Symbol_needThis(Symbol* s)

Determine if symbol needs a 'this' pointer.

baseclass_find
baseclass_t* baseclass_find(baseclass_t* bm, Classsym* sbase)

Look down baseclass list to find sbase.

baseclass_nitems
int baseclass_nitems(baseclass_t* b)

Calculate number of baseclasses in list.

createglobalsymtab
void createglobalsymtab()

Create a new symbol table.

createlocalsymtab
void createlocalsymtab()

Create a new symbol table.

defsy
Symbol* defsy(const(char)* p, Symbol** parent)

Define symbol in specified symbol table.

deletesymtab
void deletesymtab()

Delete current symbol table and back up one.

findsy
Symbol* findsy(const(char)* p, Symbol* rover)

Search for symbol in symbol table. Input: p . identifier string rover . where to start looking

freesymtab
void freesymtab(Symbol** stab, SYMIDX n1, SYMIDX n2)

Free up the symbols stab[n1 .. n2]

lookupsym
Symbol* lookupsym(const(char)* p)

Search for symbol in multiple symbol tables, starting with most recently nested one. Input: p . identifier string

meminit_free
void meminit_free(meminit_t* m)

Delete symbol from symbol table, taking care to delete all children of a symbol. Make sure there are no more forward references (labels, tags). Input: pointer to a symbol

symbol_add
SYMIDX symbol_add(Symbol* s)

Add symbol to current symbol array.

symbol_addtotree
void symbol_addtotree(Symbol** parent, Symbol* s)

Insert symbol in specified symbol table.

symbol_calloc
Symbol* symbol_calloc(const(char)* id)

Create a new symbol.

symbol_check
void symbol_check(Symbol* s)

Check integrity of symbol data structure.

symbol_copy
Symbol* symbol_copy(Symbol* s)

Create a copy of a symbol.

symbol_dehydrate
void symbol_dehydrate(Symbol** ps)

Dehydrate a symbol.

symbol_func
void symbol_func(Symbol* s)

Add in the variants for a function symbol.

symbol_funcalias
Funcsym* symbol_funcalias(Funcsym* sf)

Create a symbol that is an alias to another function symbol.

symbol_genauto
Symbol* symbol_genauto(type* t)

Generate an auto symbol, and add it to the symbol table.

symbol_genauto
Symbol* symbol_genauto(elem* e)

Generate symbol into which we can copy the contents of expression e.

symbol_genauto
Symbol* symbol_genauto(tym_t ty)

Generate symbol into which we can copy the contents of expression e.

symbol_gendebuginfo
void symbol_gendebuginfo()

Symbol table search routine for members of structs, given that we don't know which struct it is in. Give error message if it appears more than once.

symbol_generate
Symbol* symbol_generate(int sclass, type* t)

Create a symbol, give it a name, storage class and type.

symbol_hydrate
Symbol* symbol_hydrate(Symbol** ps)

Hydrate a symbol.

symbol_ident
const(char)* symbol_ident(Symbol* s)

Get user name of symbol.

symbol_insert
SYMIDX symbol_insert(symtab_t symtab, Symbol* s, SYMIDX n)

Insert s into symtab at position n.

symbol_keep
void symbol_keep(Symbol* s)

Keep symbol around until symbol_term().

symbol_membersearch
Symbol* symbol_membersearch(const(char)* id)

Symbol table search routine for members of structs, given that we don't know which struct it is in. Give error message if it appears more than once.

symbol_name
Symbol* symbol_name(const(char)* name, int sclass, type* t)

Create a symbol, given a name and type.

symbol_pointerType
tym_t symbol_pointerType(Symbol* s)

Determine pointer type needed to access a Symbol, essentially what type an OPrelconst should get for that Symbol.

symbol_print
void symbol_print(Symbol* s)

Type out symbol information.

symbol_reset
void symbol_reset(Symbol* s)

Reset Symbol so that it's now an "extern" to the next obj file being created.

symbol_search
Symbol* symbol_search(const(char)* id)

Search for symbol in sequence of symbol tables. Input: glbl !=0 if global symbol table only

symbol_searchlist
Symbol* symbol_searchlist(symlist_t sl, const(char)* vident)

Search list for a symbol with an identifier that matches.

symbol_struct_addField
void symbol_struct_addField(Symbol* s, const(char)* name, type* t, uint offset)

Add a field to a struct s. Input: s the struct symbol name field name t the type of the field offset offset of the field

symbol_symdefs_dehydrate
void symbol_symdefs_dehydrate(Symbol** ps)

Dehydrate threaded list of symbols.

symbol_symdefs_hydrate
void symbol_symdefs_hydrate(Symbol** psx, Symbol** parent, int flag)

Hydrate threaded list of symbols. Input: *psx start of threaded list *parent root of symbol table to add symbol into flag !=0 means add onto existing stuff 0 means hydrate in place

symbol_tree_check
void symbol_tree_check(const(Symbol)* s)

Check integrity of symbol data structure.

symbol_tree_dehydrate
void symbol_tree_dehydrate(Symbol** ps)

Dehydrate a symbol tree.

symbol_tree_hydrate
void symbol_tree_hydrate(Symbol** ps)

Hydrate a symbol tree.

symboltable_clean
void symboltable_clean(Symbol* s)

Go through symbol table preparing it to be written to a precompiled header. That means removing references to things in the .OBJ file.

symboltable_hydrate
void symboltable_hydrate(Symbol* s, Symbol** parent)

Put symbol table s into parent symbol table.

Structs

Paramblock
struct Paramblock

Symbol table search routine for members of structs, given that we don't know which struct it is in. Give error message if it appears more than once.

Meta

Suggestion Box / Bug Report