Переглянути джерело

- reverted accidentally committed code with r32463

git-svn-id: trunk@32476 -
Jonas Maebe 9 роки тому
батько
коміт
ea0c8e6f38
2 змінених файлів з 3 додано та 13 видалено
  1. 1 12
      compiler/ncgcal.pas
  2. 2 1
      compiler/ncnv.pas

+ 1 - 12
compiler/ncgcal.pas

@@ -154,21 +154,10 @@ implementation
 
 
     procedure tcgcallparanode.push_addr_para;
-      var
-        valuedef: tdef;
       begin
         if not(left.location.loc in [LOC_CREFERENCE,LOC_REFERENCE]) then
           internalerror(200304235);
-        { see the call to keep_para_array_range in ncal: if that call returned
-          true, we overwrite the resultdef of left with its original resultdef
-          (to keep track of the range of the original arrat); we inserted a type
-          conversion to parasym.vardef, so that is the type this value actually
-          has }
-        if paramanager.keep_para_array_range(parasym.varspez,parasym.vardef,aktcallnode.procdefinition.proccalloption) then
-          valuedef:=parasym.vardef
-        else
-          valuedef:=left.resultdef;
-        hlcg.a_loadaddr_ref_cgpara(current_asmdata.CurrAsmList,valuedef,left.location.reference,tempcgpara);
+        hlcg.a_loadaddr_ref_cgpara(current_asmdata.CurrAsmList,left.resultdef,left.location.reference,tempcgpara);
       end;
 
 

+ 2 - 1
compiler/ncnv.pas

@@ -1606,12 +1606,13 @@ implementation
       begin
         { a dynamic array is a pointer to an array, so to convert it to }
         { an open array, we have to dereference it (JM)                 }
-        result := ctypeconvnode.create_internal(left,cpointerdef.getreusable(resultdef));
+        result := ctypeconvnode.create_internal(left,voidpointertype);
         typecheckpass(result);
         { left is reused }
         left := nil;
         result := cderefnode.create(result);
         include(result.flags,nf_no_checkpointer);
+        result.resultdef := resultdef;
       end;