Package cs1302.tracer.trace
Class ValueTraversal
java.lang.Object
cs1302.tracer.trace.ValueTraversal
Iterative traversal of inline values; guest heap references remain leaves.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intMaximum inline value path length, including its root and leaf. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidvalidate(ExecutionSnapshot snapshot) Checks every value root before snapshot accounting or conversion.static voidvisit(TraceValue root, Consumer<TraceValue> visitor) Visits children before their parent, rejecting deep paths and identity cycles.
-
Field Details
-
MAX_DEPTH
public static final int MAX_DEPTHMaximum inline value path length, including its root and leaf.- See Also:
-
-
Method Details
-
validate
Checks every value root before snapshot accounting or conversion.- Parameters:
snapshot- Snapshot owned by the caller; must not be mutated during serialization.
-
visit
Visits children before their parent, rejecting deep paths and identity cycles. Shared values are visited once; cached heights check each incoming path. Record hashCode is never invoked.- Parameters:
root- Root value, possibly null.visitor- Postorder consumer.
-