Browse Source

* set reused left node to nil for JVM loadvmtaddrnodes that need to call a
helper
* never call a helper for classrefdefs (in that case we have to load the
classrefdef itself, not the classrefdef for the class representing
classrefdefs)

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

Jonas Maebe 14 years ago
parent
commit
1dca48bce5
1 changed files with 4 additions and 1 deletions
  1. 4 1
      compiler/nmem.pas

+ 4 - 1
compiler/nmem.pas

@@ -236,7 +236,8 @@ implementation
                  left:=nil;
                end
              else if is_javaclass(left.resultdef) and
-                (left.nodetype<>typen) then
+                (left.nodetype<>typen) and
+                (left.resultdef.typ<>classrefdef) then
                begin
                  { call java.lang.Object.getClass() }
                  vs:=search_struct_member(tobjectdef(left.resultdef),'GETCLASS');
@@ -245,6 +246,8 @@ implementation
                    internalerror(2011041901);
                  result:=ccallnode.create(nil,tprocsym(vs),vs.owner,left,[]);
                  inserttypeconv_explicit(result,resultdef);
+                 { reused }
+                 left:=nil;
                end
              else
                firstpass(left)