Mercurial > hg > truffle
diff graal/com.oracle.truffle.api/src/com/oracle/truffle/api/utilities/BranchProfile.java @ 16868:db090a8d3705
clarify documentation about assumption and profile storage in final fields
author | Michael Haupt <michael.haupt@oracle.com> |
---|---|
date | Wed, 20 Aug 2014 15:16:11 +0200 |
parents | d9d496d77d37 |
children | 87ea195b66ff |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/utilities/BranchProfile.java Tue Aug 19 19:25:44 2014 +0200 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/utilities/BranchProfile.java Wed Aug 20 15:16:11 2014 +0200 @@ -32,6 +32,9 @@ * invoked first the optimized code is invalidated and the branch where {@link #enter()} is invoked * is enabled for compilation. Otherwise if the {@link #enter()} method was never invoked the branch * will not get compiled. + * + * All {@code BranchProfile} instances must be held in {@code final} fields for compiler + * optimizations to take effect. */ public final class BranchProfile {