l1a/l1b PASS, l2 FAIL (unimplemented)#549
Open
opencode-agent[bot] wants to merge 1 commit into
Open
Conversation
Co-authored-by: LSantha <LSantha@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Spec compliance report
Details
l1a Implementation
core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java:1352-1450,core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java:706-819(instanceOf/instanceOfClass helpers)Analysis:
classRef.resolve(loader)andclassRef.getResolvedVmClass()at lines 1354-1355instanceOfhelper with full superclass/interface traversalinstanceOfClasshelper with direct superclass array index checkTEST refr, refr/JZ okLabel— if null, jumps to success label, leaving operand stack unchanged per JVM spec: "If objectref is null ... the operand stack is unchanged"instanceOf/instanceOfClasswithskipNullTest=true(lines 1386, 1424) since null already handledokLabel, pushes originalRefItemback on virtual stack (line 1402/1447) — stack effect..., objectref → ..., objectrefmatches specinvokeJavaMethod(context.getClassCastFailedMethod())(lines 1396, 1441) which throwsClassCastException— matches spec runtime exceptionclassRef.resolve(loader)at line 1354 will throw resolution exceptions per §5.4.3.1 — matches spec linking exceptionshelper.writeClassInitializeat lines 1378, 1424 ensures target class is initialized before check — correct per JVM specl1b Implementation
core/src/core/org/jnode/vm/x86/compiler/l1b/X86BytecodeVisitor.java:1545-1647,core/src/core/org/jnode/vm/x86/compiler/l1b/X86BytecodeVisitor.java:700-814(instanceOf/instanceOfClass helpers)Analysis:
skipNullTest=trueat lines 1583, 1621l2 Implementation
core/src/core/org/jnode/vm/x86/compiler/l2/L2ByteCodeSupportChecker.java:227-229— explicitly marks checkcast as unsupportedcore/src/core/org/jnode/vm/x86/compiler/l2/GenericX86CodeGenerator.java:4393-4396— generateCodeFor(CheckcastQuad) is a TODO stubcore/src/core/org/jnode/vm/compiler/ir/IRGenerator.java:1279-1283— correctly generates CheckcastQuad with proper stack offset (pop 1, push 1)core/src/core/org/jnode/vm/compiler/ir/quad/CheckcastQuad.java— IR node exists but has no code generationUnsupportedOperationException(line 228) — any method containing checkcast will be rejected from L2 compilationJVM Spec References (Java SE 6)
checkcast Instruction (§6.5.checkcast):
..., objectref → ..., objectrefKey Casting Rules (§5.5, referenced by checkcast):
Closes #226
opencode session | github run