mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2025-01-16 05:33:25 +00:00
Remove some unused code.
This seemed to be aimed at supporting lazy allocation of symbol tables. That could be a useful optimization, but the code that existed was incomplete and did not do anything useful. That or similar code could be reintroduced as part of a full implementation of lazy allocation, if it is ever done.
This commit is contained in:
parent
f31b5ea1e6
commit
d4c4d18a55
11
Symbol.pas
11
Symbol.pas
@ -22,7 +22,6 @@
|
||||
{ }
|
||||
{ External Variables: }
|
||||
{ }
|
||||
{ noDeclarations - have we declared anything at this level? }
|
||||
{ table - current symbol table }
|
||||
{ }
|
||||
{ charPtr - pointer to the base type for char }
|
||||
@ -79,7 +78,6 @@ type
|
||||
end;
|
||||
|
||||
var
|
||||
noDeclarations: boolean; {have we declared anything at this level?}
|
||||
table: symbolTablePtr; {current symbol table}
|
||||
globalTable: symbolTablePtr; {global symbol table}
|
||||
functionTable: symbolTablePtr; {table for top level of current function}
|
||||
@ -1465,7 +1463,6 @@ staticNum := '~0000'; {no functions processed}
|
||||
table := nil; {initialize the global symbol table}
|
||||
PushTable;
|
||||
globalTable := table;
|
||||
noDeclarations := false;
|
||||
functionTable := nil;
|
||||
{declare base types}
|
||||
new(sCharPtr); {signed char}
|
||||
@ -2055,12 +2052,7 @@ if space <> fieldListSpace then begin {are we defining a function?}
|
||||
and (itype^.fieldList = nil) and doingParameters then begin
|
||||
useGlobalPool := true;
|
||||
end; {else if}
|
||||
if noDeclarations then begin {if we need a symbol table, create it}
|
||||
if not isGlobal then
|
||||
noDeclarations := false;
|
||||
end {if}
|
||||
else begin {check for duplicates}
|
||||
cs := FindSymbol(tk, space, true, false);
|
||||
cs := FindSymbol(tk, space, true, false); {check for duplicates}
|
||||
if cs <> nil then begin
|
||||
if (not CompTypes(cs^.itype, itype))
|
||||
or ((cs^.state = initialized) and (state = initialized))
|
||||
@ -2070,7 +2062,6 @@ if space <> fieldListSpace then begin {are we defining a function?}
|
||||
p := cs;
|
||||
needSymbol := false;
|
||||
end; {if}
|
||||
end; {else}
|
||||
end; {if}
|
||||
if class = staticsy then {statics go in the global symbol table}
|
||||
if not isGLobal then
|
||||
|
Loading…
x
Reference in New Issue
Block a user