< prev index next >

test/hotspot/jtreg/compiler/eliminateAutobox/TestIdentityWithEliminateBoxInDebugInfo.java

Print this page
*** 1,6 ***
--- 1,7 ---
  /*
+  * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
   * Copyright (c) 2021, Huawei Technologies Co., Ltd. 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

*** 23,11 ***
  
  /*
   * @test
   * @bug 8261137
   * @requires vm.flavor == "server"
!  * @summary Verify that box object identity matches after deoptimization when it is eliminated.
   * @library /test/lib
   *
   * @run main/othervm -Xbatch compiler.eliminateAutobox.TestIdentityWithEliminateBoxInDebugInfo
   */
  
--- 24,12 ---
  
  /*
   * @test
   * @bug 8261137
   * @requires vm.flavor == "server"
!  * @enablePreview
+  * @summary Verify that box object content matches after deoptimization when it is eliminated.
   * @library /test/lib
   *
   * @run main/othervm -Xbatch compiler.eliminateAutobox.TestIdentityWithEliminateBoxInDebugInfo
   */
  

*** 65,11 ***
              Long b = Long.valueOf(-42L);
              Long h = Long.valueOf(highBitsOnly);
              if (!c) {
                  Asserts.assertTrue(a == Long.valueOf(42L));
                  Asserts.assertTrue(b == Long.valueOf(-42L));
!                 Asserts.assertFalse(h == Long.valueOf(highBitsOnly));
              }
          });
  
          helper((c) -> {
              Character a = Character.valueOf('a');
--- 67,11 ---
              Long b = Long.valueOf(-42L);
              Long h = Long.valueOf(highBitsOnly);
              if (!c) {
                  Asserts.assertTrue(a == Long.valueOf(42L));
                  Asserts.assertTrue(b == Long.valueOf(-42L));
!                 Asserts.assertTrue(h == Long.valueOf(highBitsOnly));
              }
          });
  
          helper((c) -> {
              Character a = Character.valueOf('a');
< prev index next >