Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/utilities/ConditionProfile.java @ 18511:62aac33db669
Truffle: refactor NodeCloneable interface to abstract class
author | Andreas Woess <andreas.woess@jku.at> |
---|---|
date | Wed, 26 Nov 2014 01:06:38 +0100 |
parents | cb4d5cc2b52b |
children | f57d86eb036f |
comparison
equal
deleted
inserted
replaced
18510:cb4d5cc2b52b | 18511:62aac33db669 |
---|---|
49 * for compiler optimizations to take effect. | 49 * for compiler optimizations to take effect. |
50 * | 50 * |
51 * @see #createCountingProfile() | 51 * @see #createCountingProfile() |
52 * @see #createBinaryProfile() | 52 * @see #createBinaryProfile() |
53 */ | 53 */ |
54 public abstract class ConditionProfile implements NodeCloneable { | 54 public abstract class ConditionProfile extends NodeCloneable { |
55 | 55 |
56 public abstract boolean profile(boolean value); | 56 public abstract boolean profile(boolean value); |
57 | 57 |
58 /** | 58 /** |
59 * Returns a {@link ConditionProfile} that speculates on conditions to be never | 59 * Returns a {@link ConditionProfile} that speculates on conditions to be never |
78 * @see ConditionProfile#createCountingProfile() | 78 * @see ConditionProfile#createCountingProfile() |
79 */ | 79 */ |
80 public static ConditionProfile createBinaryProfile() { | 80 public static ConditionProfile createBinaryProfile() { |
81 return new BinaryConditionProfile(); | 81 return new BinaryConditionProfile(); |
82 } | 82 } |
83 | |
84 @Override | |
85 public final Object clone() { | |
86 try { | |
87 return super.clone(); | |
88 } catch (CloneNotSupportedException e) { | |
89 throw new AssertionError(e); | |
90 } | |
91 } | |
92 } | 83 } |