Browse Source

pastojs: filer: read alias type, pcu: skip precompile typeinfo

git-svn-id: trunk@39335 -
Mattias Gaertner 7 years ago
parent
commit
c0fdf4103c
2 changed files with 5 additions and 5 deletions
  1. 4 4
      packages/pastojs/src/pas2jscompiler.pp
  2. 1 1
      packages/pastojs/src/pas2jsfiler.pp

+ 4 - 4
packages/pastojs/src/pas2jscompiler.pp

@@ -1036,10 +1036,10 @@ end;
 function TPas2jsCompilerFile.OnPCUConverterIsTypeInfoUsed(Sender: TObject;
 function TPas2jsCompilerFile.OnPCUConverterIsTypeInfoUsed(Sender: TObject;
   El: TPasElement): boolean;
   El: TPasElement): boolean;
 begin
 begin
-  if (coKeepNotUsedPrivates in Compiler.Options) then
-    Result:=true
-  else
-    Result:=UseAnalyzer.IsTypeInfoUsed(El);
+  if Sender=nil then ;
+  if El=nil then ;
+  // PCU does not need precompiled typeinfo
+  Result:=false;
 end;
 end;
 
 
 procedure TPas2jsCompilerFile.OnScannerLog(Sender: TObject; const Msg: String);
 procedure TPas2jsCompilerFile.OnScannerLog(Sender: TObject; const Msg: String);

+ 1 - 1
packages/pastojs/src/pas2jsfiler.pp

@@ -5544,7 +5544,7 @@ begin
       end;
       end;
     'TypeAlias':
     'TypeAlias':
       begin
       begin
-      Result:=TPasPointerType.Create(Name,Parent);
+      Result:=TPasTypeAliasType.Create(Name,Parent);
       ReadAliasType(Obj,TPasTypeAliasType(Result),aContext);
       ReadAliasType(Obj,TPasTypeAliasType(Result),aContext);
       end;
       end;
     'ClassOf':
     'ClassOf':