632 /**
633 * Verifies that {@code m} was deoptimized after being C1 compiled.
634 *
635 * @param m the method to be checked.
636 * @throws TestRunException if {@code m} is was not deoptimized after being C1 compiled.
637 */
638 public static void assertDeoptimizedByC1(Method m) {
639 TestVM.assertDeoptimizedByC1(m);
640 }
641
642 /**
643 * Verifies that {@code m} was deoptimized after being C2 compiled.
644 *
645 * @param m the method to be checked.
646 * @throws TestRunException if {@code m} is was not deoptimized after being C2 compiled.
647 */
648 public static void assertDeoptimizedByC2(Method m) {
649 TestVM.assertDeoptimizedByC2(m);
650 }
651
652 /**
653 * Returns a different boolean each time this method is invoked (switching between {@code false} and {@code true}).
654 * The very first invocation returns {@code false}. Note that this method could be used by different tests and
655 * thus the first invocation for a test could be {@code true} or {@code false} depending on how many times
656 * other tests have already invoked this method.
657 *
658 * @return an inverted boolean of the result of the last invocation of this method.
659 */
660 public static boolean toggleBoolean() {
661 toggleBool = !toggleBool;
662 return toggleBool;
663 }
664
665 /*
666 * End of public interface methods
667 */
668
669 /**
670 * Used to move Whitebox class to the right folder in the JTreg test
671 */
|
632 /**
633 * Verifies that {@code m} was deoptimized after being C1 compiled.
634 *
635 * @param m the method to be checked.
636 * @throws TestRunException if {@code m} is was not deoptimized after being C1 compiled.
637 */
638 public static void assertDeoptimizedByC1(Method m) {
639 TestVM.assertDeoptimizedByC1(m);
640 }
641
642 /**
643 * Verifies that {@code m} was deoptimized after being C2 compiled.
644 *
645 * @param m the method to be checked.
646 * @throws TestRunException if {@code m} is was not deoptimized after being C2 compiled.
647 */
648 public static void assertDeoptimizedByC2(Method m) {
649 TestVM.assertDeoptimizedByC2(m);
650 }
651
652 /**
653 * Checks if deopt of {@code m} is stable at the specified {@code compLevel}.
654 *
655 * @param m the method to be checked.
656 * @param compLevel the compilation level.
657 * @return {@code true} if deopt of {@code m} is stable at {@code compLevel};
658 * {@code false} otherwise.
659 */
660 public static boolean isStableDeopt(Method m, CompLevel compLevel) {
661 return TestVM.isStableDeopt(m, compLevel);
662 }
663
664 /**
665 * Returns a different boolean each time this method is invoked (switching between {@code false} and {@code true}).
666 * The very first invocation returns {@code false}. Note that this method could be used by different tests and
667 * thus the first invocation for a test could be {@code true} or {@code false} depending on how many times
668 * other tests have already invoked this method.
669 *
670 * @return an inverted boolean of the result of the last invocation of this method.
671 */
672 public static boolean toggleBoolean() {
673 toggleBool = !toggleBool;
674 return toggleBool;
675 }
676
677 /*
678 * End of public interface methods
679 */
680
681 /**
682 * Used to move Whitebox class to the right folder in the JTreg test
683 */
|