Mercurial > hg > truffle
comparison truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/utilities/PrimitiveValueProfile.java @ 22501:a63bda98cfdb
Extract profiles into separate package. Add isProfilingEnabled in TruffleRuntime to disable profiling in the default runtime; Add low overhead profiles for primitives; Add LoopConditionProfile; Profile footprint/threadsafety improvements; Make toString implementations more consistent; Greatly enhanced javadoc documentation for profiles; Deprecate old profiles
author | Christian Humer <christian.humer@oracle.com> |
---|---|
date | Wed, 16 Dec 2015 16:38:13 +0100 |
parents | dc83cc1f94f2 |
children |
comparison
equal
deleted
inserted
replaced
22500:fbe1eb7b4172 | 22501:a63bda98cfdb |
---|---|
24 */ | 24 */ |
25 package com.oracle.truffle.api.utilities; | 25 package com.oracle.truffle.api.utilities; |
26 | 26 |
27 import com.oracle.truffle.api.CompilerDirectives; | 27 import com.oracle.truffle.api.CompilerDirectives; |
28 import com.oracle.truffle.api.CompilerDirectives.CompilationFinal; | 28 import com.oracle.truffle.api.CompilerDirectives.CompilationFinal; |
29 | |
29 import java.util.Objects; | 30 import java.util.Objects; |
30 | 31 |
31 /** | 32 /** |
32 * Represents a {@link ValueProfile} that speculates on the primitive equality or object identity of | 33 * @deprecated use {@link com.oracle.truffle.api.profiles.PrimitiveValueProfile} instead |
33 * values. | |
34 * <p> | |
35 * Note that for {@code float} and {@code double} values we compare primitive equality via | |
36 * {@link Float#floatToRawIntBits} and {@link Double#doubleToRawLongBits}, so that for example | |
37 * {@code -0.0} is not considered the same as {@code 0.0}, even though primitive equality would | |
38 * normally say that it was. | |
39 */ | 34 */ |
35 @Deprecated | |
36 @SuppressWarnings("deprecation") | |
40 public class PrimitiveValueProfile extends ValueProfile { | 37 public class PrimitiveValueProfile extends ValueProfile { |
41 | 38 |
42 private static final Object UNINITIALIZED = new Object(); | 39 private static final Object UNINITIALIZED = new Object(); |
43 private static final Object GENERIC = new Object(); | 40 private static final Object GENERIC = new Object(); |
44 | 41 |