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