浏览代码

* fixed fake ansistring length() support

git-svn-id: branches/jvmbackend@18514 -
Jonas Maebe 14 年之前
父节点
当前提交
77707a447e
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      compiler/jvm/njvminl.pas

+ 4 - 1
compiler/jvm/njvminl.pas

@@ -557,6 +557,7 @@ implementation
 {$ifndef nounsupported}
 {$ifndef nounsupported}
         else if left.resultdef.typ=stringdef then
         else if left.resultdef.typ=stringdef then
           begin
           begin
+            result:=nil;
           end
           end
 {$endif}
 {$endif}
        else
        else
@@ -578,7 +579,9 @@ implementation
 {$ifndef nounsupported}
 {$ifndef nounsupported}
         else if left.resultdef.typ=stringdef then
         else if left.resultdef.typ=stringdef then
           begin
           begin
-            thlcgjvm(hlcg).a_load_const_stack(current_asmdata.CurrAsmList,java_jlobject,0,R_ADDRESSREGISTER);
+            location_reset(location,LOC_REGISTER,OS_S32);
+            location.register:=hlcg.getintregister(current_asmdata.CurrAsmList,s32inttype);
+            thlcgjvm(hlcg).a_load_const_reg(current_asmdata.CurrAsmList,s32inttype,0,location.register);
           end
           end
 {$endif}
 {$endif}
         else
         else