558 /**
559 * Verifies that {@code m} was deoptimized after being C1 compiled.
560 *
561 * @param m the method to be checked.
562 * @throws TestRunException if {@code m} is was not deoptimized after being C1 compiled.
563 */
564 public static void assertDeoptimizedByC1(Method m) {
565 TestVM.assertDeoptimizedByC1(m);
566 }
567
568 /**
569 * Verifies that {@code m} was deoptimized after being C2 compiled.
570 *
571 * @param m the method to be checked.
572 * @throws TestRunException if {@code m} is was not deoptimized after being C2 compiled.
573 */
574 public static void assertDeoptimizedByC2(Method m) {
575 TestVM.assertDeoptimizedByC2(m);
576 }
577
578 /**
579 * Returns a different boolean each time this method is invoked (switching between {@code false} and {@code true}).
580 * The very first invocation returns {@code false}. Note that this method could be used by different tests and
581 * thus the first invocation for a test could be {@code true} or {@code false} depending on how many times
582 * other tests have already invoked this method.
583 *
584 * @return an inverted boolean of the result of the last invocation of this method.
585 */
586 public static boolean toggleBoolean() {
587 toggleBool = !toggleBool;
588 return toggleBool;
589 }
590
591 /*
592 * End of public interface methods
593 */
594
595 /**
596 * Used to move Whitebox class to the right folder in the JTreg test
597 */
|
558 /**
559 * Verifies that {@code m} was deoptimized after being C1 compiled.
560 *
561 * @param m the method to be checked.
562 * @throws TestRunException if {@code m} is was not deoptimized after being C1 compiled.
563 */
564 public static void assertDeoptimizedByC1(Method m) {
565 TestVM.assertDeoptimizedByC1(m);
566 }
567
568 /**
569 * Verifies that {@code m} was deoptimized after being C2 compiled.
570 *
571 * @param m the method to be checked.
572 * @throws TestRunException if {@code m} is was not deoptimized after being C2 compiled.
573 */
574 public static void assertDeoptimizedByC2(Method m) {
575 TestVM.assertDeoptimizedByC2(m);
576 }
577
578 /**
579 * Checks if deopt of {@code m} is stable at the specified {@code compLevel}.
580 *
581 * @param m the method to be checked.
582 * @param compLevel the compilation level.
583 * @return {@code true} if deopt of {@code m} is stable at {@code compLevel};
584 * {@code false} otherwise.
585 */
586 public static boolean isStableDeopt(Method m, CompLevel compLevel) {
587 return TestVM.isStableDeopt(m, compLevel);
588 }
589
590 /**
591 * Returns a different boolean each time this method is invoked (switching between {@code false} and {@code true}).
592 * The very first invocation returns {@code false}. Note that this method could be used by different tests and
593 * thus the first invocation for a test could be {@code true} or {@code false} depending on how many times
594 * other tests have already invoked this method.
595 *
596 * @return an inverted boolean of the result of the last invocation of this method.
597 */
598 public static boolean toggleBoolean() {
599 toggleBool = !toggleBool;
600 return toggleBool;
601 }
602
603 /*
604 * End of public interface methods
605 */
606
607 /**
608 * Used to move Whitebox class to the right folder in the JTreg test
609 */
|