Mercurial > hg > truffle
diff test/compiler/whitebox/CompilerWhiteBoxTest.java @ 11015:7ee0d5c53c78
Merge
author | chegar |
---|---|
date | Wed, 08 May 2013 15:25:08 +0100 |
parents | d1c9384eecb4 |
children | 11237ee74aae |
line wrap: on
line diff
--- a/test/compiler/whitebox/CompilerWhiteBoxTest.java Wed May 01 14:11:01 2013 +0100 +++ b/test/compiler/whitebox/CompilerWhiteBoxTest.java Wed May 08 15:25:08 2013 +0100 @@ -42,6 +42,11 @@ protected static int COMP_LEVEL_NONE = 0; /** {@code CompLevel::CompLevel_any}, {@code CompLevel::CompLevel_all} */ protected static int COMP_LEVEL_ANY = -1; + /** {@code CompLevel::CompLevel_simple} -- C1 */ + protected static int COMP_LEVEL_SIMPLE = 1; + /** {@code CompLevel::CompLevel_full_optimization} -- C2 or Shark */ + protected static int COMP_LEVEL_FULL_OPTIMIZATION = 4; + /** Instance of WhiteBox */ protected static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox(); /** Value of {@code -XX:CompileThreshold} */ @@ -91,6 +96,17 @@ return result == null ? defaultValue : result; } + /** copy of is_c1_compile(int) from utilities/globalDefinitions.hpp */ + protected static boolean isC1Compile(int compLevel) { + return (compLevel > COMP_LEVEL_NONE) + && (compLevel < COMP_LEVEL_FULL_OPTIMIZATION); + } + + /** copy of is_c2_compile(int) from utilities/globalDefinitions.hpp */ + protected static boolean isC2Compile(int compLevel) { + return compLevel == COMP_LEVEL_FULL_OPTIMIZATION; + } + /** tested method */ protected final Executable method; private final Callable<Integer> callable;