diff graal/com.oracle.truffle.api/src/com/oracle/truffle/api/utilities/BranchProfile.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
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/utilities/BranchProfile.java	Tue Nov 25 13:21:50 2014 +0100
+++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/utilities/BranchProfile.java	Wed Nov 26 01:06:38 2014 +0100
@@ -37,7 +37,7 @@
  * All {@code BranchProfile} instances must be held in {@code final} fields for compiler
  * optimizations to take effect.
  */
-public final class BranchProfile implements NodeCloneable {
+public final class BranchProfile extends NodeCloneable {
 
     @CompilationFinal private boolean visited;
 
@@ -63,13 +63,4 @@
     public String toString() {
         return String.format("%s(%s)@%x", getClass().getSimpleName(), visited ? "visited" : "not-visited", hashCode());
     }
-
-    @Override
-    public Object clone() {
-        try {
-            return super.clone();
-        } catch (CloneNotSupportedException e) {
-            throw new AssertionError(e);
-        }
-    }
 }