mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 10:45:08 +02:00
* germanism removed (aktfilepos -> current_filepos)
git-svn-id: trunk@5099 -
This commit is contained in:
parent
070b86a512
commit
ef7bd58c54
@ -781,7 +781,7 @@ implementation
|
||||
inherited create;
|
||||
if not(inlining_procedure and
|
||||
(cs_gdb_valgrind in current_settings.globalswitches)) then
|
||||
fileinfo:=aktfilepos;
|
||||
fileinfo:=current_filepos;
|
||||
end;
|
||||
|
||||
|
||||
|
@ -442,7 +442,7 @@ implementation
|
||||
if not(hp.typ in SkipLineInfo) then
|
||||
begin
|
||||
hp1 := hp as tailineinfo;
|
||||
aktfilepos:=hp1.fileinfo;
|
||||
current_filepos:=hp1.fileinfo;
|
||||
{ no line info for inlined code }
|
||||
if do_line and (inlinelevel=0) then
|
||||
begin
|
||||
|
@ -966,7 +966,7 @@ implementation
|
||||
if (Insentry=nil) and (InsSize=-1) then
|
||||
exit;
|
||||
{ set the file postion }
|
||||
aktfilepos:=fileinfo;
|
||||
current_filepos:=fileinfo;
|
||||
|
||||
{ tranlate LDR+postfix to complete opcode }
|
||||
if (opcode=A_LDR) and (oppostfix<>PF_None) then
|
||||
@ -1009,7 +1009,7 @@ implementation
|
||||
{ error in pass1 ? }
|
||||
if insentry=nil then
|
||||
exit;
|
||||
aktfilepos:=fileinfo;
|
||||
current_filepos:=fileinfo;
|
||||
{ Generate the instruction }
|
||||
GenCode(objdata);
|
||||
end;
|
||||
@ -1375,7 +1375,7 @@ implementation
|
||||
{ create the .ot fields }
|
||||
create_ot(objdata);
|
||||
{ set the file postion }
|
||||
aktfilepos:=fileinfo;
|
||||
current_filepos:=fileinfo;
|
||||
end
|
||||
else
|
||||
begin
|
||||
|
@ -2149,8 +2149,8 @@ end;
|
||||
i : longint;
|
||||
def: tdef;
|
||||
begin
|
||||
storefilepos:=aktfilepos;
|
||||
aktfilepos:=current_module.mainfilepos;
|
||||
storefilepos:=current_filepos;
|
||||
current_filepos:=current_module.mainfilepos;
|
||||
|
||||
currabbrevnumber:=0;
|
||||
writing_def_dwarf:=false;
|
||||
@ -2263,7 +2263,7 @@ end;
|
||||
deftowritelist.free;
|
||||
deftowritelist:=nil;
|
||||
|
||||
aktfilepos:=storefilepos;
|
||||
current_filepos:=storefilepos;
|
||||
end;
|
||||
|
||||
|
||||
|
@ -1364,8 +1364,8 @@ implementation
|
||||
storefilepos : tfileposinfo;
|
||||
i : longint;
|
||||
begin
|
||||
storefilepos:=aktfilepos;
|
||||
aktfilepos:=current_module.mainfilepos;
|
||||
storefilepos:=current_filepos;
|
||||
current_filepos:=current_module.mainfilepos;
|
||||
|
||||
global_stab_number:=0;
|
||||
defnumberlist:=TFPObjectlist.create(false);
|
||||
@ -1413,7 +1413,7 @@ implementation
|
||||
|
||||
stabsvarlist.free;
|
||||
stabstypelist.free;
|
||||
aktfilepos:=storefilepos;
|
||||
current_filepos:=storefilepos;
|
||||
end;
|
||||
|
||||
|
||||
|
@ -1369,7 +1369,7 @@ uses
|
||||
second_time:=false;
|
||||
current_module:=self;
|
||||
SetCompileModule(current_module);
|
||||
Fillchar(aktfilepos,0,sizeof(aktfilepos));
|
||||
Fillchar(current_filepos,0,sizeof(current_filepos));
|
||||
|
||||
{ A force reload }
|
||||
if do_reload then
|
||||
@ -1528,7 +1528,7 @@ uses
|
||||
current_scanner.gettokenpos
|
||||
end
|
||||
else
|
||||
fillchar(aktfilepos,sizeof(aktfilepos),0);
|
||||
fillchar(current_filepos,sizeof(current_filepos),0);
|
||||
end;
|
||||
|
||||
{ we are back, restore current_module }
|
||||
|
@ -219,7 +219,7 @@ interface
|
||||
LinkTypeSetExplicitly : boolean;
|
||||
|
||||
akttokenpos, { position of the last token }
|
||||
aktfilepos : tfileposinfo; { current position }
|
||||
current_filepos : tfileposinfo; { current position }
|
||||
|
||||
nwscreenname : string;
|
||||
nwthreadname : string;
|
||||
|
@ -408,7 +408,7 @@ interface
|
||||
if not(hp.typ in SkipLineInfo) then
|
||||
begin
|
||||
hp1:=hp as tailineinfo;
|
||||
aktfilepos:=hp1.fileinfo;
|
||||
current_filepos:=hp1.fileinfo;
|
||||
if do_line then
|
||||
begin
|
||||
{ load infile }
|
||||
|
@ -680,7 +680,7 @@ type
|
||||
not(is_open_string(parasym.vardef)) and
|
||||
not(equal_defs(left.resultdef,parasym.vardef)) then
|
||||
begin
|
||||
aktfilepos:=left.fileinfo;
|
||||
current_filepos:=left.fileinfo;
|
||||
CGMessage(type_e_strict_var_string_violation);
|
||||
end;
|
||||
|
||||
@ -1641,7 +1641,7 @@ type
|
||||
not assigned(tparavarsym(procdefinition.paras[paraidx]).defaultconstsym)) then
|
||||
begin
|
||||
if assigned(pt) then
|
||||
aktfilepos:=pt.fileinfo;
|
||||
current_filepos:=pt.fileinfo;
|
||||
CGMessage(parser_e_wrong_parameter_size);
|
||||
goto errorexit;
|
||||
end;
|
||||
@ -1694,7 +1694,7 @@ type
|
||||
else
|
||||
begin
|
||||
if assigned(left) then
|
||||
aktfilepos:=left.fileinfo;
|
||||
current_filepos:=left.fileinfo;
|
||||
CGMessage(parser_e_wrong_parameter_size);
|
||||
symtableprocentry.write_parameter_lists(nil);
|
||||
end;
|
||||
|
@ -284,10 +284,10 @@ implementation
|
||||
(*
|
||||
if not(cs_opt_regvar in current_settings.optimizerswitches) then
|
||||
*)
|
||||
aktfilepos:=current_asmdata.CurrAsmList.getlasttaifilepos^
|
||||
current_filepos:=current_asmdata.CurrAsmList.getlasttaifilepos^
|
||||
(*
|
||||
else
|
||||
aktfilepos:=then_list.getlasttaifilepos^
|
||||
current_filepos:=then_list.getlasttaifilepos^
|
||||
*)
|
||||
;
|
||||
cg.a_jmp_always(current_asmdata.CurrAsmList,hl);
|
||||
|
@ -188,7 +188,7 @@ implementation
|
||||
{ First call secondpass() before we can push the parameters, otherwise
|
||||
parameters allocated in the registers can be destroyed }
|
||||
{ generate filename string parameter }
|
||||
hp2:=ctypeconvnode.create(cstringconstnode.createstr(current_module.sourcefiles.get_file_name(aktfilepos.fileindex)),cshortstringtype);
|
||||
hp2:=ctypeconvnode.create(cstringconstnode.createstr(current_module.sourcefiles.get_file_name(current_filepos.fileindex)),cshortstringtype);
|
||||
firstpass(hp2);
|
||||
secondpass(hp2);
|
||||
if codegenerror then
|
||||
@ -203,7 +203,7 @@ implementation
|
||||
cg.a_param_reg(current_asmdata.CurrAsmList,OS_ADDR,NR_FRAME_POINTER_REG,paraloc4);
|
||||
{ push lineno }
|
||||
paramanager.allocparaloc(current_asmdata.CurrAsmList,paraloc3);
|
||||
cg.a_param_const(current_asmdata.CurrAsmList,OS_INT,aktfilepos.line,paraloc3);
|
||||
cg.a_param_const(current_asmdata.CurrAsmList,OS_INT,current_filepos.line,paraloc3);
|
||||
{ push filename }
|
||||
paramanager.allocparaloc(current_asmdata.CurrAsmList,paraloc2);
|
||||
cg.a_paramaddr_ref(current_asmdata.CurrAsmList,hp2.location.reference,paraloc2);
|
||||
|
@ -845,7 +845,7 @@ implementation
|
||||
cg.a_label(current_asmdata.CurrAsmList,pcaseblock(blocks[i])^.blocklabel);
|
||||
secondpass(pcaseblock(blocks[i])^.statement);
|
||||
{ don't come back to case line }
|
||||
aktfilepos:=current_asmdata.CurrAsmList.getlasttaifilepos^;
|
||||
current_filepos:=current_asmdata.CurrAsmList.getlasttaifilepos^;
|
||||
{$ifdef OLDREGVARS}
|
||||
load_all_regvars(current_asmdata.CurrAsmList);
|
||||
{$endif OLDREGVARS}
|
||||
|
@ -273,8 +273,8 @@ implementation
|
||||
begin
|
||||
if nf_error in p.flags then
|
||||
exit;
|
||||
storepos:=aktfilepos;
|
||||
aktfilepos:=p.fileinfo;
|
||||
storepos:=current_filepos;
|
||||
current_filepos:=p.fileinfo;
|
||||
if is_boolean(p.resultdef) then
|
||||
begin
|
||||
{$ifdef OLDREGVARS}
|
||||
@ -324,7 +324,7 @@ implementation
|
||||
end
|
||||
else
|
||||
internalerror(200112305);
|
||||
aktfilepos:=storepos;
|
||||
current_filepos:=storepos;
|
||||
end;
|
||||
|
||||
|
||||
@ -2159,8 +2159,8 @@ implementation
|
||||
list : TAsmList;
|
||||
sectype : TAsmSectiontype;
|
||||
begin
|
||||
storefilepos:=aktfilepos;
|
||||
aktfilepos:=sym.fileinfo;
|
||||
storefilepos:=current_filepos;
|
||||
current_filepos:=sym.fileinfo;
|
||||
l:=sym.getsize;
|
||||
if tf_section_threadvars in target_info.flags then
|
||||
begin
|
||||
@ -2195,7 +2195,7 @@ implementation
|
||||
list.concat(Tai_datablock.create_global(sym.mangledname,l))
|
||||
else
|
||||
list.concat(Tai_datablock.create(sym.mangledname,l));
|
||||
aktfilepos:=storefilepos;
|
||||
current_filepos:=storefilepos;
|
||||
end;
|
||||
|
||||
|
||||
|
@ -402,7 +402,7 @@ implementation
|
||||
}
|
||||
if assigned(hdef) and not(equal_defs(hdef,p3.resultdef)) then
|
||||
begin
|
||||
aktfilepos:=p3.fileinfo;
|
||||
current_filepos:=p3.fileinfo;
|
||||
CGMessage(type_e_typeconflict_in_set);
|
||||
end
|
||||
else
|
||||
|
@ -352,7 +352,7 @@ implementation
|
||||
(left.nodetype in [stringconstn])
|
||||
) then
|
||||
begin
|
||||
aktfilepos:=left.fileinfo;
|
||||
current_filepos:=left.fileinfo;
|
||||
CGMessage(type_e_no_addr_of_constant);
|
||||
exit;
|
||||
end;
|
||||
|
@ -652,7 +652,7 @@ implementation
|
||||
{ updated by secondpass }
|
||||
location.loc:=LOC_INVALID;
|
||||
{ save local info }
|
||||
fileinfo:=aktfilepos;
|
||||
fileinfo:=current_filepos;
|
||||
localswitches:=current_settings.localswitches;
|
||||
resultdef:=nil;
|
||||
registersint:=0;
|
||||
|
@ -273,7 +273,7 @@ implementation
|
||||
{ cg }
|
||||
oldparse_only : boolean;
|
||||
{ akt.. things }
|
||||
oldaktfilepos : tfileposinfo;
|
||||
oldcurrent_filepos : tfileposinfo;
|
||||
old_compiled_module : tmodule;
|
||||
oldcurrent_procinfo : tprocinfo;
|
||||
old_settings : tsettings;
|
||||
@ -313,7 +313,7 @@ implementation
|
||||
current_settings.localswitches:=nextlocalswitches;
|
||||
localswitcheschanged:=false;
|
||||
end;
|
||||
oldaktfilepos:=aktfilepos;
|
||||
oldcurrent_filepos:=current_filepos;
|
||||
old_settings:=current_settings;
|
||||
end;
|
||||
{ reset parser, a previous fatal error could have left these variables in an unreliable state, this is
|
||||
@ -352,7 +352,7 @@ implementation
|
||||
{ Set the module to use for verbose }
|
||||
compiled_module:=current_module;
|
||||
SetCompileModule(current_module);
|
||||
Fillchar(aktfilepos,0,sizeof(aktfilepos));
|
||||
Fillchar(current_filepos,0,sizeof(current_filepos));
|
||||
|
||||
{ Load current state from the init values }
|
||||
current_settings:=init_settings;
|
||||
@ -465,7 +465,7 @@ implementation
|
||||
symtablestack:=oldsymtablestack;
|
||||
macrosymtablestack:=oldmacrosymtablestack;
|
||||
current_procinfo:=oldcurrent_procinfo;
|
||||
aktfilepos:=oldaktfilepos;
|
||||
current_filepos:=oldcurrent_filepos;
|
||||
current_settings:=old_settings;
|
||||
aktexceptblock:=0;
|
||||
exceptblockcounter:=0;
|
||||
|
@ -67,10 +67,10 @@ implementation
|
||||
if (p.resultdef=nil) then
|
||||
begin
|
||||
oldcodegenerror:=codegenerror;
|
||||
oldpos:=aktfilepos;
|
||||
oldpos:=current_filepos;
|
||||
oldlocalswitches:=current_settings.localswitches;
|
||||
codegenerror:=false;
|
||||
aktfilepos:=p.fileinfo;
|
||||
current_filepos:=p.fileinfo;
|
||||
current_settings.localswitches:=p.localswitches;
|
||||
hp:=p.pass_typecheck;
|
||||
{ should the node be replaced? }
|
||||
@ -83,7 +83,7 @@ implementation
|
||||
p:=hp;
|
||||
end;
|
||||
current_settings.localswitches:=oldlocalswitches;
|
||||
aktfilepos:=oldpos;
|
||||
current_filepos:=oldpos;
|
||||
if codegenerror then
|
||||
begin
|
||||
include(p.flags,nf_error);
|
||||
@ -122,10 +122,10 @@ implementation
|
||||
if not(nf_error in p.flags) then
|
||||
begin
|
||||
oldcodegenerror:=codegenerror;
|
||||
oldpos:=aktfilepos;
|
||||
oldpos:=current_filepos;
|
||||
oldlocalswitches:=current_settings.localswitches;
|
||||
codegenerror:=false;
|
||||
aktfilepos:=p.fileinfo;
|
||||
current_filepos:=p.fileinfo;
|
||||
current_settings.localswitches:=p.localswitches;
|
||||
{ checks make always a call }
|
||||
if ([cs_check_range,cs_check_overflow,cs_check_stack] * current_settings.localswitches <> []) then
|
||||
@ -133,7 +133,7 @@ implementation
|
||||
{ determine the resultdef if not done }
|
||||
if (p.resultdef=nil) then
|
||||
begin
|
||||
aktfilepos:=p.fileinfo;
|
||||
current_filepos:=p.fileinfo;
|
||||
current_settings.localswitches:=p.localswitches;
|
||||
hp:=p.pass_typecheck;
|
||||
{ should the node be replaced? }
|
||||
@ -153,13 +153,13 @@ implementation
|
||||
p.resultdef:=generrordef;
|
||||
end;
|
||||
current_settings.localswitches:=oldlocalswitches;
|
||||
aktfilepos:=oldpos;
|
||||
current_filepos:=oldpos;
|
||||
codegenerror:=codegenerror or oldcodegenerror;
|
||||
end;
|
||||
if not(nf_error in p.flags) then
|
||||
begin
|
||||
{ first pass }
|
||||
aktfilepos:=p.fileinfo;
|
||||
current_filepos:=p.fileinfo;
|
||||
current_settings.localswitches:=p.localswitches;
|
||||
hp:=p.pass_1;
|
||||
{ should the node be replaced? }
|
||||
@ -184,7 +184,7 @@ implementation
|
||||
include(p.flags,nf_pass1_done);
|
||||
codegenerror:=codegenerror or oldcodegenerror;
|
||||
current_settings.localswitches:=oldlocalswitches;
|
||||
aktfilepos:=oldpos;
|
||||
current_filepos:=oldpos;
|
||||
end
|
||||
else
|
||||
codegenerror:=true;
|
||||
|
@ -159,9 +159,9 @@ implementation
|
||||
begin
|
||||
oldcodegenerror:=codegenerror;
|
||||
oldlocalswitches:=current_settings.localswitches;
|
||||
oldpos:=aktfilepos;
|
||||
oldpos:=current_filepos;
|
||||
if not inlining_procedure then
|
||||
aktfilepos:=p.fileinfo;
|
||||
current_filepos:=p.fileinfo;
|
||||
current_settings.localswitches:=p.localswitches;
|
||||
codegenerror:=false;
|
||||
{$ifdef EXTDEBUG}
|
||||
@ -186,7 +186,7 @@ implementation
|
||||
include(p.flags,nf_error);
|
||||
codegenerror:=codegenerror or oldcodegenerror;
|
||||
current_settings.localswitches:=oldlocalswitches;
|
||||
aktfilepos:=oldpos;
|
||||
current_filepos:=oldpos;
|
||||
end
|
||||
else
|
||||
codegenerror:=true;
|
||||
|
@ -554,8 +554,8 @@ implementation
|
||||
if (hdef.typesym=newtype) then
|
||||
begin
|
||||
{ file position }
|
||||
oldfilepos:=aktfilepos;
|
||||
aktfilepos:=newtype.fileinfo;
|
||||
oldfilepos:=current_filepos;
|
||||
current_filepos:=newtype.fileinfo;
|
||||
|
||||
{ generate persistent init/final tables when it's declared in the interface so it can
|
||||
be reused in other used }
|
||||
@ -595,7 +595,7 @@ implementation
|
||||
generate_rtti(newtype);
|
||||
end;
|
||||
|
||||
aktfilepos:=oldfilepos;
|
||||
current_filepos:=oldfilepos;
|
||||
end;
|
||||
until token<>_ID;
|
||||
typecanbeforward:=false;
|
||||
|
@ -725,7 +725,7 @@ implementation
|
||||
Message(parser_e_methode_id_expected);
|
||||
{ rename the name to an unique name to avoid an
|
||||
error when inserting the symbol in the symtable }
|
||||
orgsp:=orgsp+'$'+tostr(aktfilepos.line);
|
||||
orgsp:=orgsp+'$'+tostr(current_filepos.line);
|
||||
aprocsym:=nil;
|
||||
end;
|
||||
end
|
||||
@ -784,7 +784,7 @@ implementation
|
||||
DuplicateSym(nil,srsym);
|
||||
{ rename the name to an unique name to avoid an
|
||||
error when inserting the symbol in the symtable }
|
||||
orgsp:=orgsp+'$'+tostr(aktfilepos.line);
|
||||
orgsp:=orgsp+'$'+tostr(current_filepos.line);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
@ -1380,12 +1380,12 @@ implementation
|
||||
objectsymtable :
|
||||
begin
|
||||
p1:=csubscriptnode.create(srsym,load_self_node);
|
||||
node_tree_set_filepos(p1,aktfilepos);
|
||||
node_tree_set_filepos(p1,current_filepos);
|
||||
end;
|
||||
withsymtable :
|
||||
begin
|
||||
p1:=csubscriptnode.create(srsym,tnode(twithsymtable(srsymtable).withrefnode).getcopy);
|
||||
node_tree_set_filepos(p1,aktfilepos);
|
||||
node_tree_set_filepos(p1,current_filepos);
|
||||
end;
|
||||
else
|
||||
p1:=cloadnode.create(srsym,srsymtable);
|
||||
|
@ -190,10 +190,10 @@ begin
|
||||
writeln('Error: Out of memory');
|
||||
end;
|
||||
end;
|
||||
{ we cannot use aktfilepos.file because all memory might have been
|
||||
{ we cannot use current_filepos.file because all memory might have been
|
||||
freed already !
|
||||
But we can use global parser_current_file var }
|
||||
Writeln('Compilation aborted ',parser_current_file,':',aktfilepos.line);
|
||||
Writeln('Compilation aborted ',parser_current_file,':',current_filepos.line);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -106,12 +106,12 @@ implementation
|
||||
begin
|
||||
with pextra_info(p)^ do
|
||||
begin
|
||||
line:=aktfilepos.line;
|
||||
col:=aktfilepos.column;
|
||||
line:=current_filepos.line;
|
||||
col:=current_filepos.column;
|
||||
if assigned(current_module) then
|
||||
fileindex:=current_module.unit_index*100000+aktfilepos.fileindex
|
||||
fileindex:=current_module.unit_index*100000+current_filepos.fileindex
|
||||
else
|
||||
fileindex:=aktfilepos.fileindex;
|
||||
fileindex:=current_filepos.fileindex;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -536,16 +536,16 @@ implementation
|
||||
newstatement : tstatementnode;
|
||||
oldfilepos : tfileposinfo;
|
||||
begin
|
||||
oldfilepos:=aktfilepos;
|
||||
oldfilepos:=current_filepos;
|
||||
{ Generate code/locations used at start of proc }
|
||||
aktfilepos:=entrypos;
|
||||
current_filepos:=entrypos;
|
||||
entry_asmnode:=casmnode.create_get_position;
|
||||
loadpara_asmnode:=casmnode.create_get_position;
|
||||
stackcheck_asmnode:=casmnode.create_get_position;
|
||||
init_asmnode:=casmnode.create_get_position;
|
||||
bodyentrycode:=generate_bodyentry_block;
|
||||
{ Generate code/locations used at end of proc }
|
||||
aktfilepos:=exitpos;
|
||||
current_filepos:=exitpos;
|
||||
exitlabel_asmnode:=casmnode.create_get_position;
|
||||
final_asmnode:=casmnode.create_get_position;
|
||||
bodyexitcode:=generate_bodyexit_block;
|
||||
@ -561,7 +561,7 @@ implementation
|
||||
begin
|
||||
{ Generate special exception block only needed when
|
||||
implicit finaly is used }
|
||||
aktfilepos:=exitpos;
|
||||
current_filepos:=exitpos;
|
||||
exceptcode:=generate_except_block;
|
||||
{ Generate code that will be in the try...finally }
|
||||
finalcode:=internalstatements(codestatement);
|
||||
@ -573,7 +573,7 @@ implementation
|
||||
addstatement(newstatement,entry_asmnode);
|
||||
addstatement(newstatement,init_asmnode);
|
||||
addstatement(newstatement,bodyentrycode);
|
||||
aktfilepos:=entrypos;
|
||||
current_filepos:=entrypos;
|
||||
addstatement(newstatement,ctryfinallynode.create_implicit(
|
||||
code,
|
||||
finalcode,
|
||||
@ -596,7 +596,7 @@ implementation
|
||||
end;
|
||||
do_firstpass(newblock);
|
||||
code:=newblock;
|
||||
aktfilepos:=oldfilepos;
|
||||
current_filepos:=oldfilepos;
|
||||
end;
|
||||
|
||||
|
||||
@ -691,11 +691,11 @@ implementation
|
||||
internalerror(200309201);
|
||||
|
||||
oldprocinfo:=current_procinfo;
|
||||
oldfilepos:=aktfilepos;
|
||||
oldfilepos:=current_filepos;
|
||||
oldmaxfpuregisters:=current_settings.maxfpuregisters;
|
||||
|
||||
current_procinfo:=self;
|
||||
aktfilepos:=entrypos;
|
||||
current_filepos:=entrypos;
|
||||
|
||||
templist:=TAsmList.create;
|
||||
|
||||
@ -784,7 +784,7 @@ implementation
|
||||
generate_parameter_info;
|
||||
|
||||
{ Allocate space in temp/registers for parast and localst }
|
||||
aktfilepos:=entrypos;
|
||||
current_filepos:=entrypos;
|
||||
gen_alloc_symtable(aktproccode,procdef.parast);
|
||||
gen_alloc_symtable(aktproccode,procdef.localst);
|
||||
|
||||
@ -799,7 +799,7 @@ implementation
|
||||
{$ifdef oldregvars}
|
||||
assign_regvars(code);
|
||||
{$endif oldreg}
|
||||
aktfilepos:=entrypos;
|
||||
current_filepos:=entrypos;
|
||||
{ record which registers are allocated here, since all code }
|
||||
{ allocating registers comes after it }
|
||||
cg.set_regalloc_extend_backwards(true);
|
||||
@ -826,7 +826,7 @@ implementation
|
||||
|
||||
{ first generate entry and initialize code with the correct
|
||||
position and switches }
|
||||
aktfilepos:=entrypos;
|
||||
current_filepos:=entrypos;
|
||||
current_settings.localswitches:=entryswitches;
|
||||
|
||||
cg.set_regalloc_extend_backwards(true);
|
||||
@ -838,7 +838,7 @@ implementation
|
||||
|
||||
{ now generate finalize and exit code with the correct position
|
||||
and switches }
|
||||
aktfilepos:=exitpos;
|
||||
current_filepos:=exitpos;
|
||||
current_settings.localswitches:=exitswitches;
|
||||
|
||||
cg.set_regalloc_extend_backwards(false);
|
||||
@ -875,7 +875,7 @@ implementation
|
||||
{$endif OLDREGVARS}
|
||||
|
||||
{ generate symbol and save end of header position }
|
||||
aktfilepos:=entrypos;
|
||||
current_filepos:=entrypos;
|
||||
gen_proc_symbol(templist);
|
||||
headertai:=tai(templist.last);
|
||||
{ insert symbol }
|
||||
@ -883,7 +883,7 @@ implementation
|
||||
|
||||
{ Free space in temp/registers for parast and localst, must be
|
||||
done after gen_entry_code }
|
||||
aktfilepos:=exitpos;
|
||||
current_filepos:=exitpos;
|
||||
gen_free_symtable(aktproccode,procdef.localst);
|
||||
gen_free_symtable(aktproccode,procdef.parast);
|
||||
|
||||
@ -899,14 +899,14 @@ implementation
|
||||
not(po_assembler in procdef.procoptions) and
|
||||
(procdef.proctypeoption<>potype_proginit) then
|
||||
begin
|
||||
aktfilepos:=entrypos;
|
||||
current_filepos:=entrypos;
|
||||
gen_stack_check_call(templist);
|
||||
aktproccode.insertlistafter(stackcheck_asmnode.currenttai,templist)
|
||||
end;
|
||||
|
||||
{ load got if necessary }
|
||||
cg.set_regalloc_extend_backwards(true);
|
||||
aktfilepos:=entrypos;
|
||||
current_filepos:=entrypos;
|
||||
gen_got_load(templist);
|
||||
aktproccode.insertlistafter(headertai,templist);
|
||||
|
||||
@ -924,10 +924,10 @@ implementation
|
||||
current_procinfo.procdef.localst.foreach_static(@translate_registers,templist);
|
||||
|
||||
{ Add save and restore of used registers }
|
||||
aktfilepos:=entrypos;
|
||||
current_filepos:=entrypos;
|
||||
gen_save_used_regs(templist);
|
||||
aktproccode.insertlistafter(headertai,templist);
|
||||
aktfilepos:=exitpos;
|
||||
current_filepos:=exitpos;
|
||||
gen_restore_used_regs(aktproccode);
|
||||
{ We know the size of the stack, now we can generate the
|
||||
parameter that is passed to the stack checking code }
|
||||
@ -935,16 +935,16 @@ implementation
|
||||
not(po_assembler in procdef.procoptions) and
|
||||
(procdef.proctypeoption<>potype_proginit) then
|
||||
begin
|
||||
aktfilepos:=entrypos;
|
||||
current_filepos:=entrypos;
|
||||
gen_stack_check_size_para(templist);
|
||||
aktproccode.insertlistafter(stackcheck_asmnode.currenttai,templist)
|
||||
end;
|
||||
{ Add entry code (stack allocation) after header }
|
||||
aktfilepos:=entrypos;
|
||||
current_filepos:=entrypos;
|
||||
gen_proc_entry_code(templist);
|
||||
aktproccode.insertlistafter(headertai,templist);
|
||||
{ Add exit code at the end }
|
||||
aktfilepos:=exitpos;
|
||||
current_filepos:=exitpos;
|
||||
gen_proc_exit_code(templist);
|
||||
aktproccode.concatlist(templist);
|
||||
|
||||
@ -977,7 +977,7 @@ implementation
|
||||
insertpcrelativedata will be wrong, further the pc indirect data is part of the procedure
|
||||
so it should be inserted before the end symbol (FK)
|
||||
}
|
||||
aktfilepos:=exitpos;
|
||||
current_filepos:=exitpos;
|
||||
gen_proc_symbol_end(templist);
|
||||
aktproccode.concatlist(templist);
|
||||
{$ifdef POWERPC}
|
||||
@ -1015,7 +1015,7 @@ implementation
|
||||
{ restore }
|
||||
templist.free;
|
||||
current_settings.maxfpuregisters:=oldmaxfpuregisters;
|
||||
aktfilepos:=oldfilepos;
|
||||
current_filepos:=oldfilepos;
|
||||
current_procinfo:=oldprocinfo;
|
||||
end;
|
||||
|
||||
@ -1153,7 +1153,7 @@ implementation
|
||||
add_to_symtablestack;
|
||||
|
||||
{ save entry info }
|
||||
entrypos:=aktfilepos;
|
||||
entrypos:=current_filepos;
|
||||
entryswitches:=current_settings.localswitches;
|
||||
|
||||
if (df_generic in procdef.defoptions) then
|
||||
@ -1679,7 +1679,7 @@ implementation
|
||||
procedure specialize_objectdefs(p:tnamedindexitem;arg:pointer);
|
||||
var
|
||||
hp : tdef;
|
||||
oldaktfilepos : tfileposinfo;
|
||||
oldcurrent_filepos : tfileposinfo;
|
||||
begin
|
||||
if not((tsym(p).typ=typesym) and
|
||||
(ttypesym(p).typedef.deftype=objectdef) and
|
||||
@ -1699,12 +1699,12 @@ implementation
|
||||
assigned(tprocdef(tprocdef(hp).genericdef).generictokenbuf)
|
||||
) then
|
||||
internalerror(200512111);
|
||||
oldaktfilepos:=aktfilepos;
|
||||
aktfilepos:=tprocdef(tprocdef(hp).genericdef).fileinfo;
|
||||
akttokenpos:=aktfilepos;
|
||||
oldcurrent_filepos:=current_filepos;
|
||||
current_filepos:=tprocdef(tprocdef(hp).genericdef).fileinfo;
|
||||
akttokenpos:=current_filepos;
|
||||
current_scanner.startreplaytokens(tprocdef(tprocdef(hp).genericdef).generictokenbuf);
|
||||
read_proc_body(nil,tprocdef(hp));
|
||||
aktfilepos:=oldaktfilepos;
|
||||
current_filepos:=oldcurrent_filepos;
|
||||
end;
|
||||
hp:=tdef(hp.indexnext);
|
||||
end;
|
||||
|
@ -1043,8 +1043,8 @@ implementation
|
||||
elements sym=nil and we should skip this }
|
||||
if assigned(sym) then
|
||||
begin
|
||||
storefilepos:=aktfilepos;
|
||||
aktfilepos:=sym.fileinfo;
|
||||
storefilepos:=current_filepos;
|
||||
current_filepos:=sym.fileinfo;
|
||||
{ insert cut for smartlinking or alignment }
|
||||
if writable then
|
||||
cursectype:=sec_data
|
||||
@ -1062,7 +1062,7 @@ implementation
|
||||
list.concat(Tai_symbol.Createname(sym.mangledname,AT_DATA,0));
|
||||
list.concatlist(datalist);
|
||||
list.concat(tai_symbol_end.Createname(sym.mangledname));
|
||||
aktfilepos:=storefilepos;
|
||||
current_filepos:=storefilepos;
|
||||
end
|
||||
else
|
||||
list.concatlist(datalist);
|
||||
|
@ -1641,7 +1641,7 @@ unit rgobj;
|
||||
ait_instruction:
|
||||
with Taicpu(p) do
|
||||
begin
|
||||
aktfilepos:=fileinfo;
|
||||
current_filepos:=fileinfo;
|
||||
for i:=0 to ops-1 do
|
||||
with oper[i]^ do
|
||||
case typ of
|
||||
@ -1686,7 +1686,7 @@ unit rgobj;
|
||||
end;
|
||||
p:=Tai(p.next);
|
||||
end;
|
||||
aktfilepos:=current_procinfo.exitpos;
|
||||
current_filepos:=current_procinfo.exitpos;
|
||||
end;
|
||||
|
||||
|
||||
@ -1763,14 +1763,14 @@ unit rgobj;
|
||||
ait_instruction:
|
||||
with Taicpu(p) do
|
||||
begin
|
||||
aktfilepos:=fileinfo;
|
||||
current_filepos:=fileinfo;
|
||||
if instr_spill_register(list,taicpu(p),regs_to_spill_set,spill_temps^) then
|
||||
spill_registers:=true;
|
||||
end;
|
||||
end;
|
||||
p:=Tai(p.next);
|
||||
end;
|
||||
aktfilepos:=current_procinfo.exitpos;
|
||||
current_filepos:=current_procinfo.exitpos;
|
||||
{Safe: this procedure is only called if there are spilled nodes.}
|
||||
with spillednodes do
|
||||
for i:=0 to length-1 do
|
||||
|
@ -1521,10 +1521,10 @@ In case not, the value returned can be arbitrary.
|
||||
hs:=getdatestr
|
||||
else
|
||||
if hs='FILE' then
|
||||
hs:=current_module.sourcefiles.get_file_name(aktfilepos.fileindex)
|
||||
hs:=current_module.sourcefiles.get_file_name(current_filepos.fileindex)
|
||||
else
|
||||
if hs='LINE' then
|
||||
hs:=tostr(aktfilepos.line)
|
||||
hs:=tostr(current_filepos.line)
|
||||
else
|
||||
if hs='FPCVERSION' then
|
||||
hs:=version_string
|
||||
@ -1980,7 +1980,7 @@ In case not, the value returned can be arbitrary.
|
||||
with inputfile do
|
||||
begin
|
||||
{ when nothing more to read then leave immediatly, so we
|
||||
don't change the aktfilepos and leave it point to the last
|
||||
don't change the current_filepos and leave it point to the last
|
||||
char }
|
||||
if (c=#26) and (not assigned(next)) then
|
||||
exit;
|
||||
@ -2024,7 +2024,7 @@ In case not, the value returned can be arbitrary.
|
||||
end
|
||||
else
|
||||
begin
|
||||
{ load eof position in tokenpos/aktfilepos }
|
||||
{ load eof position in tokenpos/current_filepos }
|
||||
gettokenpos;
|
||||
{ close file }
|
||||
closeinputfile;
|
||||
@ -2086,13 +2086,13 @@ In case not, the value returned can be arbitrary.
|
||||
akttokenpos.column:=lasttokenpos-lastlinepos;
|
||||
akttokenpos.fileindex:=inputfile.ref_index;
|
||||
akttokenpos.moduleindex:=current_module.unit_index;
|
||||
aktfilepos:=akttokenpos;
|
||||
current_filepos:=akttokenpos;
|
||||
end;
|
||||
|
||||
|
||||
procedure tscannerfile.inc_comment_level;
|
||||
var
|
||||
oldaktfilepos : tfileposinfo;
|
||||
oldcurrent_filepos : tfileposinfo;
|
||||
begin
|
||||
if (m_nested_comment in current_settings.modeswitches) then
|
||||
inc(comment_level)
|
||||
@ -2100,10 +2100,10 @@ In case not, the value returned can be arbitrary.
|
||||
comment_level:=1;
|
||||
if (comment_level>1) then
|
||||
begin
|
||||
oldaktfilepos:=aktfilepos;
|
||||
oldcurrent_filepos:=current_filepos;
|
||||
gettokenpos; { update for warning }
|
||||
Message1(scan_w_comment_level,tostr(comment_level));
|
||||
aktfilepos:=oldaktfilepos;
|
||||
current_filepos:=oldcurrent_filepos;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -2121,7 +2121,7 @@ In case not, the value returned can be arbitrary.
|
||||
var
|
||||
cur : char;
|
||||
oldtokenpos,
|
||||
oldaktfilepos : tfileposinfo;
|
||||
oldcurrent_filepos : tfileposinfo;
|
||||
begin
|
||||
with inputfile do
|
||||
begin
|
||||
@ -2147,13 +2147,13 @@ In case not, the value returned can be arbitrary.
|
||||
if cs_asm_source in current_settings.globalswitches then
|
||||
inputfile.setline(line_no,lastlinepos);
|
||||
{ update for status and call the show status routine,
|
||||
but don't touch aktfilepos ! }
|
||||
oldaktfilepos:=aktfilepos;
|
||||
but don't touch current_filepos ! }
|
||||
oldcurrent_filepos:=current_filepos;
|
||||
oldtokenpos:=akttokenpos;
|
||||
gettokenpos; { update for v_status }
|
||||
inc(status.compiledlines);
|
||||
ShowStatus;
|
||||
aktfilepos:=oldaktfilepos;
|
||||
current_filepos:=oldcurrent_filepos;
|
||||
akttokenpos:=oldtokenpos;
|
||||
end;
|
||||
end;
|
||||
@ -2290,9 +2290,9 @@ In case not, the value returned can be arbitrary.
|
||||
|
||||
procedure tscannerfile.handleconditional(p:tdirectiveitem);
|
||||
var
|
||||
oldaktfilepos : tfileposinfo;
|
||||
oldcurrent_filepos : tfileposinfo;
|
||||
begin
|
||||
oldaktfilepos:=aktfilepos;
|
||||
oldcurrent_filepos:=current_filepos;
|
||||
repeat
|
||||
current_scanner.gettokenpos;
|
||||
p.proc();
|
||||
@ -2314,7 +2314,7 @@ In case not, the value returned can be arbitrary.
|
||||
Message1(scan_d_handling_switch,'$'+p.name);
|
||||
end;
|
||||
until false;
|
||||
aktfilepos:=oldaktfilepos;
|
||||
current_filepos:=oldcurrent_filepos;
|
||||
end;
|
||||
|
||||
|
||||
|
@ -913,7 +913,7 @@ implementation
|
||||
inherited create(dt);
|
||||
savesize := 0;
|
||||
{$ifdef EXTDEBUG}
|
||||
fileinfo := aktfilepos;
|
||||
fileinfo := current_filepos;
|
||||
{$endif}
|
||||
fillchar(localrttilab,sizeof(localrttilab),0);
|
||||
generictokenbuf:=nil;
|
||||
@ -3253,7 +3253,7 @@ implementation
|
||||
begin
|
||||
inherited create(procdef,level);
|
||||
_mangledname:=nil;
|
||||
fileinfo:=aktfilepos;
|
||||
fileinfo:=current_filepos;
|
||||
extnumber:=$ffff;
|
||||
aliasnames:=tstringlist.create;
|
||||
funcretsym:=nil;
|
||||
|
@ -396,7 +396,7 @@ implementation
|
||||
templist:=tl;
|
||||
end;
|
||||
{$ifdef EXTDEBUG}
|
||||
tl^.posinfo:=aktfilepos;
|
||||
tl^.posinfo:=current_filepos;
|
||||
if assigned(tl^.def) then
|
||||
list.concat(tai_tempalloc.allocinfo(tl^.pos,tl^.size,'allocated with type '+TempTypeStr[tl^.temptype]+' for def '+tl^.def.typename))
|
||||
else
|
||||
|
@ -372,21 +372,22 @@ var
|
||||
module : tmodulebase;
|
||||
begin
|
||||
{ fix status }
|
||||
status.currentline:=aktfilepos.line;
|
||||
status.currentcolumn:=aktfilepos.column;
|
||||
module:=get_module(aktfilepos.moduleindex);
|
||||
status.currentline:=current_filepos.line;
|
||||
status.currentcolumn:=current_filepos.column;
|
||||
module:=get_module(current_filepos.moduleindex);
|
||||
if assigned(module) and
|
||||
assigned(module.sourcefiles) and
|
||||
((module.unit_index<>lastmoduleidx) or
|
||||
(aktfilepos.fileindex<>lastfileidx)) then
|
||||
(current_filepos.fileindex<>lastfileidx)) then
|
||||
begin
|
||||
{ update status record }
|
||||
status.currentmodule:=module.modulename^;
|
||||
status.currentsource:=module.sourcefiles.get_file_name(aktfilepos.fileindex);
|
||||
status.currentsourcepath:=module.sourcefiles.get_file_path(aktfilepos.fileindex);
|
||||
status.currentsource:=module.sourcefiles.get_file_name(current_filepos.fileindex);
|
||||
status.currentsourcepath:=module.sourcefiles.get_file_path(current_filepos.fileindex);
|
||||
|
||||
{ update lastfileidx only if name known PM }
|
||||
if status.currentsource<>'' then
|
||||
lastfileidx:=aktfilepos.fileindex
|
||||
lastfileidx:=current_filepos.fileindex
|
||||
else
|
||||
lastfileidx:=0;
|
||||
lastmoduleidx:=compiling_module.unit_index;
|
||||
@ -649,11 +650,11 @@ var
|
||||
var
|
||||
oldpos : tfileposinfo;
|
||||
begin
|
||||
oldpos:=aktfilepos;
|
||||
aktfilepos:=pos;
|
||||
oldpos:=current_filepos;
|
||||
current_filepos:=pos;
|
||||
MaybeLoadMessageFile;
|
||||
Msg2Comment(msg^.Get(w,[]),w,onqueue);
|
||||
aktfilepos:=oldpos;
|
||||
current_filepos:=oldpos;
|
||||
end;
|
||||
|
||||
|
||||
@ -661,11 +662,11 @@ var
|
||||
var
|
||||
oldpos : tfileposinfo;
|
||||
begin
|
||||
oldpos:=aktfilepos;
|
||||
aktfilepos:=pos;
|
||||
oldpos:=current_filepos;
|
||||
current_filepos:=pos;
|
||||
MaybeLoadMessageFile;
|
||||
Msg2Comment(msg^.Get(w,[s1]),w,onqueue);
|
||||
aktfilepos:=oldpos;
|
||||
current_filepos:=oldpos;
|
||||
end;
|
||||
|
||||
|
||||
@ -673,11 +674,11 @@ var
|
||||
var
|
||||
oldpos : tfileposinfo;
|
||||
begin
|
||||
oldpos:=aktfilepos;
|
||||
aktfilepos:=pos;
|
||||
oldpos:=current_filepos;
|
||||
current_filepos:=pos;
|
||||
MaybeLoadMessageFile;
|
||||
Msg2Comment(msg^.Get(w,[s1,s2]),w,onqueue);
|
||||
aktfilepos:=oldpos;
|
||||
current_filepos:=oldpos;
|
||||
end;
|
||||
|
||||
|
||||
@ -685,11 +686,11 @@ var
|
||||
var
|
||||
oldpos : tfileposinfo;
|
||||
begin
|
||||
oldpos:=aktfilepos;
|
||||
aktfilepos:=pos;
|
||||
oldpos:=current_filepos;
|
||||
current_filepos:=pos;
|
||||
MaybeLoadMessageFile;
|
||||
Msg2Comment(msg^.Get(w,[s1,s2,s3]),w,onqueue);
|
||||
aktfilepos:=oldpos;
|
||||
current_filepos:=oldpos;
|
||||
end;
|
||||
|
||||
|
||||
@ -697,11 +698,11 @@ var
|
||||
var
|
||||
oldpos : tfileposinfo;
|
||||
begin
|
||||
oldpos:=aktfilepos;
|
||||
aktfilepos:=pos;
|
||||
oldpos:=current_filepos;
|
||||
current_filepos:=pos;
|
||||
MaybeLoadMessageFile;
|
||||
Msg2Comment(msg^.Get(w,[s1,s2,s3,s4]),w,onqueue);
|
||||
aktfilepos:=oldpos;
|
||||
current_filepos:=oldpos;
|
||||
end;
|
||||
|
||||
|
||||
|
@ -1268,7 +1268,7 @@ implementation
|
||||
{ create the .ot fields }
|
||||
create_ot(objdata);
|
||||
{ set the file postion }
|
||||
aktfilepos:=fileinfo;
|
||||
current_filepos:=fileinfo;
|
||||
end
|
||||
else
|
||||
begin
|
||||
@ -1310,7 +1310,7 @@ implementation
|
||||
if (Insentry=nil) and (InsSize=-1) then
|
||||
exit;
|
||||
{ set the file postion }
|
||||
aktfilepos:=fileinfo;
|
||||
current_filepos:=fileinfo;
|
||||
{ Get InsEntry }
|
||||
if FindInsEntry(ObjData) then
|
||||
begin
|
||||
@ -1355,7 +1355,7 @@ implementation
|
||||
{ error in pass1 ? }
|
||||
if insentry=nil then
|
||||
exit;
|
||||
aktfilepos:=fileinfo;
|
||||
current_filepos:=fileinfo;
|
||||
{ Segment override }
|
||||
if (segprefix<>NR_NO) then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user