Browse Source

* synchronized with trunk

git-svn-id: branches/wasm@48141 -
nickysn 4 years ago
parent
commit
21a33f22e9

+ 1 - 1
compiler/dbgstabs.pas

@@ -571,7 +571,7 @@ implementation
           just associated to pointer types }
         use_tag_prefix:=(def.typ in tagtypes) and
                       ((def.typ<>stringdef) or
-                       (tstringdef(tdef).stringtype in [st_shortstring,st_longstring]));
+                       (tstringdef(def).stringtype in [st_shortstring,st_longstring]));
       end;
 
 

+ 6 - 3
compiler/x86_64/cpupara.pas

@@ -178,10 +178,13 @@ unit cpupara;
                cl.typ:=X86_64_INTEGERSI_CLASS;
                { gcc/clang sign/zero-extend all values to 32 bits, except for
                  _Bool (= Pascal boolean), which is only zero-extended to 8 bits
-                 as per the x86-64 ABI -> do the same }
+                 as per the x86-64 ABI -> do the same
+
+                 some testing showed, that this is not true for 8 bit values:
+                 in case of an 8 bit value, it is not zero/sign extended }
                if not assigned(cl.def) or
-                  not is_pasbool(cl.def) or
-                  (torddef(cl.def).ordtype<>pasbool1) then
+                  not(cl.def.typ=orddef) or
+                  not(torddef(cl.def).ordtype in [uchar,u8bit,s8bit,pasbool1]) then
                  cl.def:=u32inttype;
              end
            else

+ 2 - 1
packages/fcl-passrc/src/pasresolver.pp

@@ -9205,7 +9205,7 @@ begin
 
   // check index and name
   CheckConstExpr(El.ExportIndex,[revkInt,revkUInt],'integer');
-  CheckConstExpr(El.ExportName,[revkString,revkUnicodeString],'string');
+  CheckConstExpr(El.ExportName,revkAllStrings,'string');
 end;
 
 procedure TPasResolver.FinishProcParamAccess(ProcType: TPasProcedureType;
@@ -12257,6 +12257,7 @@ begin
   writeln('TPasResolver.AddExportSymbol ',GetObjName(El));
   {$ENDIF}
   // Note: export symbol is not added to scope
+  if El=nil then ;
 end;
 
 procedure TPasResolver.AddEnumType(El: TPasEnumType);

+ 3 - 3
packages/fcl-passrc/src/pparser.pp

@@ -3142,10 +3142,10 @@ begin
       FinishedModule;
   finally
     if HasFinished then
-      begin
-      Module.Release{$IFDEF CheckPasTreeRefCount}('TPasPackage.Modules'){$ENDIF};
+      //begin
+      //Module.Release{$IFDEF CheckPasTreeRefCount}('TPasPackage.Modules'){$ENDIF};
       FCurModule:=nil; // clear module if there is an error or finished parsing
-      end;
+      //end;
   end;
 end;
 

+ 0 - 6
packages/pastojs/src/fppas2js.pp

@@ -26459,13 +26459,7 @@ begin
            or (C=TPasClassDestructor) then
           AddGlobalClassMethod(FuncContext,TPasProcedure(P))
         else
-          begin
           Methods.Add(P);
-          if (C=TPasConstructor)
-              or ((aResolver<>nil) and aResolver.IsClassMethod(P)
-                and not aResolver.MethodIsStatic(TPasProcedure(P))) then
-            ; //IsComplex:=true; // needs $record
-          end;
         end
       else if C=TPasAttributes then
       else