mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2025-04-07 01:39:11 +00:00
Add support for inline procedure names as documented in IIgs tech note #103.
These are enabled when bit 15 is set in the #pragma debug directive. Support is still needed to ensure these work properly with pre-compiled headers. This patch is from Kelvin Sherlock.
This commit is contained in:
parent
d9523c145c
commit
e7cc513ad4
2
CGI.pas
2
CGI.pas
@ -308,6 +308,7 @@ var
|
||||
currentSegment,defaultSegment: segNameType; {current & default seg names}
|
||||
segmentKind: integer; {kind field of segment (ored with start/data)}
|
||||
debugFlag: boolean; {generate debugger calls?}
|
||||
debugStrFlag: boolean; {gsbug/niftylist debug names?}
|
||||
dataBank: boolean; {save, restore data bank?}
|
||||
floatCard: integer; {0 -> SANE; 1 -> FPE}
|
||||
floatSlot: integer; {FPE slot}
|
||||
@ -765,6 +766,7 @@ stringSize := 0; {no strings, yet}
|
||||
rangeCheck := false; {don't generate range checks}
|
||||
profileFlag := false; {don't generate profiling code}
|
||||
debugFlag := false; {don't generate debug code}
|
||||
debugStrFlag := false; {don't generate gsbug debug strings}
|
||||
traceBack := false; {don't generate traceback code}
|
||||
volatile := false; {no volatile quialifiers found}
|
||||
|
||||
|
19
Gen.pas
19
Gen.pas
@ -4133,11 +4133,26 @@ procedure GenTree {op: icptr};
|
||||
end; {GenDviMod}
|
||||
|
||||
|
||||
procedure GenEnt;
|
||||
procedure GenEnt(op: icptr);
|
||||
|
||||
{ Generate code for a pc_ent }
|
||||
|
||||
var
|
||||
i: integer;
|
||||
len: integer;
|
||||
|
||||
begin {GenEnt}
|
||||
|
||||
if debugStrFlag then begin {gsbug/niftylist debug string}
|
||||
len := length(op^.lab^);
|
||||
CnOut(m_brl);
|
||||
CnOut2(len + 3);
|
||||
CnOut2($7771);
|
||||
CnOut(len);
|
||||
for i := 1 to len do
|
||||
CnOut(ord(op^.lab^[i]));
|
||||
end;
|
||||
|
||||
if rangeCheck then begin {if range checking is on, check for a stack overflow}
|
||||
GenNative(m_pea, immediate, localSize - returnSize - 1, nil, 0);
|
||||
GenCall(1);
|
||||
@ -5429,7 +5444,7 @@ case op^.opcode of
|
||||
pc_cup: GenCup(op);
|
||||
pc_dec,pc_inc: GenIncDec(op, nil);
|
||||
pc_dvi,pc_mod,pc_udi,pc_uim: GenDviMod(op);
|
||||
pc_ent: GenEnt;
|
||||
pc_ent: GenEnt(op);
|
||||
pc_equ,pc_neq: GenEquNeq(op, op^.opcode, 0);
|
||||
pc_fjp,pc_tjp: GenFjpTjp(op);
|
||||
pc_geq,pc_grt,pc_leq,pc_les: GenCmp(op, op^.opcode, 0);
|
||||
|
@ -3471,7 +3471,7 @@ if isFunction then begin
|
||||
firstCompoundStatement := true;
|
||||
Gen0 (dc_pin);
|
||||
if not isAsm then
|
||||
Gen0(pc_ent);
|
||||
Gen1Name(pc_ent, 0, variable^.name);
|
||||
nextLocalLabel := 1; {initialize GetLocalLabel}
|
||||
returnLabel := GenLabel; {set up an exit point}
|
||||
tempList := nil; {initialize the work label list}
|
||||
|
@ -2632,6 +2632,7 @@ if ch in ['a','d','e','i','l','p','u'] then begin
|
||||
profileFlag := odd(val >> 2);
|
||||
traceBack := odd(val >> 3);
|
||||
checkStack := odd(val >> 4);
|
||||
debugStrFlag := odd(val >> 15);
|
||||
profileFlag := profileFlag or debugFlag;
|
||||
if token.kind <> eolsy then
|
||||
Error(11);
|
||||
|
Loading…
x
Reference in New Issue
Block a user