java.lang.Object
java.lang.Record
org.kink_lang.kink.internal.callstack.Trace
- Record Components:
symHandle
- the sym handle.location
- the location.isTail
- whether it is on the tail.
A trace of a call.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
isTail()
Returns the value of theisTail
record component.location()
Returns the value of thelocation
record component.static Trace
of
(int symHandle) Returns a trace frame with the sym handle.static Trace
Returns a trace frame with the sym handle and the location, not on the tail.static Trace
Returns a trace frame with the location.static Trace
ofTail
(int symHandle) Returns a trace of a taill call with the sym handle.onTail()
Returns a trace on tail, with the same symHandle and location.int
Returns the value of thesymHandle
record component.final String
toString()
Returns a string representation of this record class.toTraceVal
(Vm vm) Returns the val representing the trace.
-
Field Details
-
SNIP
The trace which represents snipping of traces; it has neither sym handle nor location.
-
-
Constructor Details
-
Trace
Constructs a trace.- Parameters:
symHandle
- the sym handle.location
- the location.isTail
- whether it is on the tail.
-
-
Method Details
-
of
Returns a trace frame with the sym handle.- Parameters:
symHandle
- the sym handle.- Returns:
- a trace frame with the sym handle.
-
ofTail
Returns a trace of a taill call with the sym handle.- Parameters:
symHandle
- the sym handle.- Returns:
- a trace of a taill call with the sym handle.
-
of
Returns a trace frame with the location.- Parameters:
location
- the location.- Returns:
- a trace frame with the location.
-
of
Returns a trace frame with the sym handle and the location, not on the tail.- Parameters:
symHandle
- the sym handle.location
- the location.- Returns:
- a trace frame with the sym handle and the location, not on the tail.
-
onTail
Returns a trace on tail, with the same symHandle and location.- Returns:
- a trace on tail, with the same symHandle and location.
-
toTraceVal
Returns the val representing the trace.- Parameters:
vm
- the vm.- Returns:
- the trace val.
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
symHandle
public int symHandle()Returns the value of thesymHandle
record component.- Returns:
- the value of the
symHandle
record component
-
location
Returns the value of thelocation
record component.- Returns:
- the value of the
location
record component
-
isTail
public boolean isTail()Returns the value of theisTail
record component.- Returns:
- the value of the
isTail
record component
-