diff --git a/compiler/aasmtai.pas b/compiler/aasmtai.pas index 4dd82214df..7a62457985 100644 --- a/compiler/aasmtai.pas +++ b/compiler/aasmtai.pas @@ -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; diff --git a/compiler/aggas.pas b/compiler/aggas.pas index 297f454fc5..9aa1ecad8c 100644 --- a/compiler/aggas.pas +++ b/compiler/aggas.pas @@ -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 diff --git a/compiler/arm/aasmcpu.pas b/compiler/arm/aasmcpu.pas index 4c69f8cc4a..c84eb77667 100644 --- a/compiler/arm/aasmcpu.pas +++ b/compiler/arm/aasmcpu.pas @@ -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 diff --git a/compiler/dbgdwarf.pas b/compiler/dbgdwarf.pas index 111536ab90..8351f3a45f 100644 --- a/compiler/dbgdwarf.pas +++ b/compiler/dbgdwarf.pas @@ -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; diff --git a/compiler/dbgstabs.pas b/compiler/dbgstabs.pas index d440c79578..ec3d9c34a7 100644 --- a/compiler/dbgstabs.pas +++ b/compiler/dbgstabs.pas @@ -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; diff --git a/compiler/fppu.pas b/compiler/fppu.pas index 8d9cd1cda1..831e266bec 100644 --- a/compiler/fppu.pas +++ b/compiler/fppu.pas @@ -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 } diff --git a/compiler/globals.pas b/compiler/globals.pas index 4064ccfd0a..0eaaec8301 100644 --- a/compiler/globals.pas +++ b/compiler/globals.pas @@ -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; diff --git a/compiler/i386/ag386nsm.pas b/compiler/i386/ag386nsm.pas index 8664aae56b..10560a24d6 100644 --- a/compiler/i386/ag386nsm.pas +++ b/compiler/i386/ag386nsm.pas @@ -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 } diff --git a/compiler/ncal.pas b/compiler/ncal.pas index 37bdcc4f79..350a4ca33e 100644 --- a/compiler/ncal.pas +++ b/compiler/ncal.pas @@ -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; diff --git a/compiler/ncgflw.pas b/compiler/ncgflw.pas index c37177a677..f44ff6bf8f 100644 --- a/compiler/ncgflw.pas +++ b/compiler/ncgflw.pas @@ -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); diff --git a/compiler/ncginl.pas b/compiler/ncginl.pas index 002d794ced..a0257e7159 100644 --- a/compiler/ncginl.pas +++ b/compiler/ncginl.pas @@ -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); diff --git a/compiler/ncgset.pas b/compiler/ncgset.pas index c89a0a3018..a6da7d3d23 100644 --- a/compiler/ncgset.pas +++ b/compiler/ncgset.pas @@ -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} diff --git a/compiler/ncgutil.pas b/compiler/ncgutil.pas index e4d7c2b040..84d1082fc6 100644 --- a/compiler/ncgutil.pas +++ b/compiler/ncgutil.pas @@ -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; diff --git a/compiler/ncnv.pas b/compiler/ncnv.pas index 464b0ecc85..640ea201e5 100644 --- a/compiler/ncnv.pas +++ b/compiler/ncnv.pas @@ -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 diff --git a/compiler/nmem.pas b/compiler/nmem.pas index 5815e1d61a..d891251366 100644 --- a/compiler/nmem.pas +++ b/compiler/nmem.pas @@ -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; diff --git a/compiler/node.pas b/compiler/node.pas index 32797edc6f..6b9ace91d7 100644 --- a/compiler/node.pas +++ b/compiler/node.pas @@ -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; diff --git a/compiler/parser.pas b/compiler/parser.pas index 01b7e38eaf..5701072568 100644 --- a/compiler/parser.pas +++ b/compiler/parser.pas @@ -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; diff --git a/compiler/pass_1.pas b/compiler/pass_1.pas index d6b929454c..4faa88c5c7 100644 --- a/compiler/pass_1.pas +++ b/compiler/pass_1.pas @@ -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; diff --git a/compiler/pass_2.pas b/compiler/pass_2.pas index 72bcb2ea4f..d2049b2bd8 100644 --- a/compiler/pass_2.pas +++ b/compiler/pass_2.pas @@ -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; diff --git a/compiler/pdecl.pas b/compiler/pdecl.pas index d7daa790ac..48feda4cb7 100644 --- a/compiler/pdecl.pas +++ b/compiler/pdecl.pas @@ -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; diff --git a/compiler/pdecsub.pas b/compiler/pdecsub.pas index 1eff07c756..192d261ae8 100644 --- a/compiler/pdecsub.pas +++ b/compiler/pdecsub.pas @@ -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; diff --git a/compiler/pexpr.pas b/compiler/pexpr.pas index 8b983e22ee..52f4c32ee2 100644 --- a/compiler/pexpr.pas +++ b/compiler/pexpr.pas @@ -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); diff --git a/compiler/pp.pas b/compiler/pp.pas index fb11ec1f9e..7b1c44216c 100644 --- a/compiler/pp.pas +++ b/compiler/pp.pas @@ -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; diff --git a/compiler/ppheap.pas b/compiler/ppheap.pas index 11ca168799..6dfe60066c 100644 --- a/compiler/ppheap.pas +++ b/compiler/ppheap.pas @@ -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; diff --git a/compiler/psub.pas b/compiler/psub.pas index b8df8bbaf4..d8772b162c 100644 --- a/compiler/psub.pas +++ b/compiler/psub.pas @@ -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; diff --git a/compiler/ptconst.pas b/compiler/ptconst.pas index 2b4d0bed48..8b98b5b291 100644 --- a/compiler/ptconst.pas +++ b/compiler/ptconst.pas @@ -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); diff --git a/compiler/rgobj.pas b/compiler/rgobj.pas index 8d7a37d87c..422f65b0eb 100644 --- a/compiler/rgobj.pas +++ b/compiler/rgobj.pas @@ -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 diff --git a/compiler/scanner.pas b/compiler/scanner.pas index 6445fc07b9..f95a02a29c 100644 --- a/compiler/scanner.pas +++ b/compiler/scanner.pas @@ -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; diff --git a/compiler/symdef.pas b/compiler/symdef.pas index b7c16940bc..2dd7e1eca3 100644 --- a/compiler/symdef.pas +++ b/compiler/symdef.pas @@ -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; diff --git a/compiler/tgobj.pas b/compiler/tgobj.pas index 488ba43a24..261f382f15 100644 --- a/compiler/tgobj.pas +++ b/compiler/tgobj.pas @@ -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 diff --git a/compiler/verbose.pas b/compiler/verbose.pas index e409ec87ab..61a4bce4c7 100644 --- a/compiler/verbose.pas +++ b/compiler/verbose.pas @@ -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; diff --git a/compiler/x86/aasmcpu.pas b/compiler/x86/aasmcpu.pas index ddd91a6617..0295c0928d 100644 --- a/compiler/x86/aasmcpu.pas +++ b/compiler/x86/aasmcpu.pas @@ -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