mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-22 19:39:29 +01:00
* keep track of the current specialization state of the current module
This commit is contained in:
parent
5d65194777
commit
db83f9c696
@ -232,6 +232,7 @@ interface
|
|||||||
waitingunits: tfpobjectlist;
|
waitingunits: tfpobjectlist;
|
||||||
|
|
||||||
finishstate: pointer;
|
finishstate: pointer;
|
||||||
|
specializestate : pointer;
|
||||||
|
|
||||||
namespace: pshortstring; { for JVM target: corresponds to Java package name }
|
namespace: pshortstring; { for JVM target: corresponds to Java package name }
|
||||||
|
|
||||||
|
|||||||
@ -34,10 +34,12 @@ const
|
|||||||
inline_specialization_block_types = [bt_type,bt_var_type,bt_const_type,bt_body,bt_except];
|
inline_specialization_block_types = [bt_type,bt_var_type,bt_const_type,bt_body,bt_except];
|
||||||
|
|
||||||
type
|
type
|
||||||
|
pspecializationstate = ^tspecializationstate;
|
||||||
tspecializationstate = record
|
tspecializationstate = record
|
||||||
oldsymtablestack : tsymtablestack;
|
oldsymtablestack : tsymtablestack;
|
||||||
oldextendeddefs : tfphashobjectlist;
|
oldextendeddefs : tfphashobjectlist;
|
||||||
oldgenericdummysyms: tfphashobjectlist;
|
oldgenericdummysyms : tfphashobjectlist;
|
||||||
|
oldspecializestate : pspecializationstate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
tspecializationcontext=class
|
tspecializationcontext=class
|
||||||
|
|||||||
@ -2740,6 +2740,8 @@ uses
|
|||||||
state.oldsymtablestack:=symtablestack;
|
state.oldsymtablestack:=symtablestack;
|
||||||
state.oldextendeddefs:=current_module.extendeddefs;
|
state.oldextendeddefs:=current_module.extendeddefs;
|
||||||
state.oldgenericdummysyms:=current_module.genericdummysyms;
|
state.oldgenericdummysyms:=current_module.genericdummysyms;
|
||||||
|
state.oldspecializestate:=pspecializationstate(current_module.specializestate);
|
||||||
|
current_module.specializestate:=@state;
|
||||||
current_module.extendeddefs:=TFPHashObjectList.create(true);
|
current_module.extendeddefs:=TFPHashObjectList.create(true);
|
||||||
current_module.genericdummysyms:=tfphashobjectlist.create(true);
|
current_module.genericdummysyms:=tfphashobjectlist.create(true);
|
||||||
symtablestack:=tdefawaresymtablestack.create;
|
symtablestack:=tdefawaresymtablestack.create;
|
||||||
@ -2819,6 +2821,7 @@ uses
|
|||||||
current_module.extendeddefs:=state.oldextendeddefs;
|
current_module.extendeddefs:=state.oldextendeddefs;
|
||||||
current_module.genericdummysyms.free;
|
current_module.genericdummysyms.free;
|
||||||
current_module.genericdummysyms:=state.oldgenericdummysyms;
|
current_module.genericdummysyms:=state.oldgenericdummysyms;
|
||||||
|
current_module.specializestate:=state.oldspecializestate;
|
||||||
symtablestack.free;
|
symtablestack.free;
|
||||||
symtablestack:=state.oldsymtablestack;
|
symtablestack:=state.oldsymtablestack;
|
||||||
{ clear the state record to be on the safe side }
|
{ clear the state record to be on the safe side }
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user