< prev index next > test/hotspot/jtreg/compiler/interpreter/TestVerifyStackWithUnreachableBytecode.java
Print this page
/*
! * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
/*
! * Copyright (c) 2025, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
public class TestVerifyStackWithUnreachableBytecode {
public static void main(String[] args) {
TestCase t = testCaseFromString(args[0]);
! // The following is designed to cause a deopt with the reason `null_assert_or_unreached0`
// when accessing A.val using getstatic due to the class B not being loaded and the consequent
// assumption of A.val == null.
TestVerifyStackWithUnreachableBytecodeA.val = null;
dispatchTest(t);
TestVerifyStackWithUnreachableBytecodeA.val = new TestVerifyStackWithUnreachableBytecodeB(42);
public class TestVerifyStackWithUnreachableBytecode {
public static void main(String[] args) {
TestCase t = testCaseFromString(args[0]);
! // The following is designed to cause a deopt with the reason `null_assert`
// when accessing A.val using getstatic due to the class B not being loaded and the consequent
// assumption of A.val == null.
TestVerifyStackWithUnreachableBytecodeA.val = null;
dispatchTest(t);
TestVerifyStackWithUnreachableBytecodeA.val = new TestVerifyStackWithUnreachableBytecodeB(42);
< prev index next >