✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Operand Stack Tracking is performed at class loading to check the validity of the byte-code, by tracking all possible control flows and assessing whether the operand stack always keeps a valid configuration.
Consider the following excerpt representing the byte-code of a method:
1: iload_1
2: iload_2
3: if_icmplt 6
4: iconst_0
5: goto 7
6: iconst_1
7: iadd
8: ireturn
Determine and briefly explain whether this byte-code would pass or fail the check during operand stack tracking.
If you consider it would pass, state PASS, and briefly explain why.
If you consider it would fail, state FAIL, identify the byte-code line where that check would fail and briefly explain why.
(No penalty for wrong answer.)
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!