|
@@ -70,19 +70,16 @@ implementation
|
|
|
|
|
|
class procedure twasmnodeutils.InsertObjectInfo;
|
|
class procedure twasmnodeutils.InsertObjectInfo;
|
|
|
|
|
|
- var
|
|
|
|
- modules: TFPList;
|
|
|
|
-
|
|
|
|
- function ModuleExists(m: tmodule): Boolean;
|
|
|
|
|
|
+ procedure resetfunctypechecked;
|
|
var
|
|
var
|
|
- q: tmodule;
|
|
|
|
- begin
|
|
|
|
- result:=modules.IndexOf(Pointer(m))>=0;
|
|
|
|
- end;
|
|
|
|
-
|
|
|
|
- procedure AddModule(m: tmodule);
|
|
|
|
|
|
+ module : tmodule;
|
|
begin
|
|
begin
|
|
- modules.Add(Pointer(m));
|
|
|
|
|
|
+ module:=tmodule(loaded_units.first);
|
|
|
|
+ while assigned(module) do
|
|
|
|
+ begin
|
|
|
|
+ module.functypechecked:=false;
|
|
|
|
+ module:=tmodule(module.next);
|
|
|
|
+ end;
|
|
end;
|
|
end;
|
|
|
|
|
|
procedure WriteImportDll(list: TAsmList; proc: tprocdef);
|
|
procedure WriteImportDll(list: TAsmList; proc: tprocdef);
|
|
@@ -99,9 +96,9 @@ implementation
|
|
proc : tprocdef;
|
|
proc : tprocdef;
|
|
cur_unit : tused_unit;
|
|
cur_unit : tused_unit;
|
|
begin
|
|
begin
|
|
- if ModuleExists(u) then
|
|
|
|
|
|
+ if u.functypechecked then
|
|
exit;
|
|
exit;
|
|
- AddModule(u);
|
|
|
|
|
|
+ u.functypechecked:=true;
|
|
|
|
|
|
cur_unit:=tused_unit(u.used_units.First);
|
|
cur_unit:=tused_unit(u.used_units.First);
|
|
while assigned(cur_unit) do
|
|
while assigned(cur_unit) do
|
|
@@ -142,7 +139,7 @@ implementation
|
|
begin
|
|
begin
|
|
inherited;
|
|
inherited;
|
|
|
|
|
|
- modules:=TFPList.Create;
|
|
|
|
|
|
+ resetfunctypechecked;
|
|
|
|
|
|
list:=current_asmdata.asmlists[al_start];
|
|
list:=current_asmdata.asmlists[al_start];
|
|
|
|
|
|
@@ -185,7 +182,6 @@ implementation
|
|
end;
|
|
end;
|
|
destroy_hlcodegen;
|
|
destroy_hlcodegen;
|
|
|
|
|
|
- modules.Free;
|
|
|
|
end;
|
|
end;
|
|
|
|
|
|
begin
|
|
begin
|