From: David P G. <gr...@us...> - 2001-11-17 04:41:00
|
The method VM_DynamicTypeCheck.instanceof was not prepared for the lhs type to be a primitive (I got a similar stackdump just now on a little test case). (We'd forgotten that VM_DynamicTypeCheck.instanceof could be called via reflective code with arbitrary left hand side types). I just checked in a one line change to VM_DynamicTypeCheck that fixes my test case; hopefully it will fix your problem too. The change is the addition of the test for LHSDimension being less than 0. --dave /** * RHSType is resolved. * Can we store an object of type RHSType in a variable of type LHSType? * * @param LHSType the left-hand-side type * @param RHSType the right-hand-size type * @return <code>true</code> if we can store an object of * RHSType into a variable of type LSType * or <code>false</code> if we cannot. */ static boolean instanceOf (VM_Type LHSType, VM_Type RHSType) throws VM_ResolutionException { if (LHSType == RHSType) return true; if (!LHSType.isResolved()) { synchronized(VM_ClassLoader.lock) { LHSType.load(); LHSType.resolve(); } } int LHSDimension = LHSType.getDimensionality(); if (LHSDimension == 0) return instanceOfResolved(LHSType.asClass(), RHSType.getTypeInformationBlock()); if (LHSDimension < 0) return false; VM_Type LHSInnermostElementType = LHSType.asArray ().getInnermostElementType(); if (LHSInnermostElementType == VM_Type.JavaLangObjectType){ return instanceOfObjectArray(LHSDimension, RHSType); } else if (!LHSInnermostElementType.isPrimitiveType()) { return instanceOfArray(LHSInnermostElementType.asClass(), LHSDimension, RHSType); } else { return false; } } |---------+-------------------------------------------------> | | je...@pi... | | | Sent by: | | | jik...@ww...uthbury.| | | usf.ibm.com | | | | | | | | | 11/15/2001 01:26 PM | | | Please respond to jikesrvm-core | | | | |---------+-------------------------------------------------> >-----------------------------------------------------------------------------------------| | | | To: jik...@ww... | | cc: | | Subject: [Jikesrvm-core] kawa and rhino | | | | | >-----------------------------------------------------------------------------------------| I modified the rvmrt.jar library to use the pure-java BigInteger classes that are in Classpath. With that I managed to run simple tests of the kawa scheme interpreter and the rhino ecmascript (javascript) interpreter. I couldn't run beanshell, I don't know if this stacktrace is useful: (This is just the top of the stack trace, I can investigate further if necessary). I'm using v2.0.0, i686-linux-gnu, with a BaseBaseSemispace build. bapli% /mnt/20gig/home/jleuner/dev/jrvm2/build/JikesRVM -X:h=25 -cp ~/downloads/bsh-1.2b1.jar bsh.Interpreter vm: booting vm internal error at: -- Stack -- LVM; sysFail(Ljava/lang/String;)V at line 372 LVM; _assertionFailure(Ljava/lang/String;)V at line 264 LVM; assert(ZLjava/lang/String;)V at line 257 LVM; assert(Z)V at line 240 LVM_Type; asArray()LVM_Array; at line 88 LVM_DynamicTypeCheck; instanceOf(LVM_Type;LVM_Type;)Z at line 454 LVM_Runtime; isAssignableWith(LVM_Type;LVM_Type;)Z at line 169 Ljava/lang/Class; isAssignableFrom(Ljava/lang/Class;)Z at line 953 Lbsh/Reflect; isAssignableFrom(Ljava/lang/Class;Ljava/lang/Class;)Z at line 847 Lbsh/Reflect; isAssignable([Ljava/lang/Class;[Ljava/lang/Class;)Z at line 797 Lbsh/Reflect; findMostSpecificSignature([Ljava/lang/Class;[[Ljava/lang/Class;)I at line 742 Lbsh/Reflect; findMostSpecificMethod(Ljava/lang/String;[Ljava/lang/Class;[Ljava/lang/reflect/Method;)Ljava/lang/reflect/Method; at line 623 Lbsh/Reflect; invokeMethod(Ljava/lang/Class;Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;Z)Ljava/lang/Object; at line 331 Lbsh/Reflect; invokeStaticMethod(Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object; at line 92 Lbsh/Name; invokeMethod(Lbsh/Interpreter;[Ljava/lang/Object;Lbsh/CallStack;Lbsh/SimpleNode;)Ljava/lang/Object; at line 696 --------------------------------------------- This message was sent using M-Web Airmail. http://airmail.mweb.co.za/ _______________________________________________ Jikesrvm-core mailing list Jik...@ww... http://www-124.ibm.com/developerworks/oss/mailman/listinfo/jikesrvm-core |