浏览代码

* correctly add an extra [ to the type of call-by-reference parameters that
are translated into arrays by the compiler (for the debug information)

git-svn-id: branches/jvmbackend@18630 -

Jonas Maebe 14 年之前
父节点
当前提交
a3bd8cb0ba
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      compiler/jvmdef.pas

+ 6 - 0
compiler/jvmdef.pas

@@ -523,6 +523,12 @@ implementation
                 result:='''result'' '+result
               else
                 begin
+                  { add array indirection if required }
+                  if (vsym.typ=paravarsym) and
+                     (vsym.vardef.typ=formaldef) or
+                     ((vsym.varspez in [vs_var,vs_out,vs_constref]) and
+                      not jvmimplicitpointertype(vsym.vardef)) then
+                    result:='['+result;
                   { single quotes for definitions to prevent clashes with Java
                     opcodes }
                   if withsignature then