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