A_Bundle Tree
A_BundleTree is an interface that specifies the operations specific to a message bundle tree that an AvailObject must implement. It's a sub-interface of A_BasicObject, the interface that defines the behavior that all AvailObjects are required to support.
Author
Mark van Gulik
Types
Functions
Turn the receiver into an indirection to the specified object.
Utility method for decomposing this object in the debugger.
Retrieve the object's {@linkplain AbstractDescriptor descriptor}.
Answer whether the receiver and the argument, both A_BasicObjects, are equal in value.
{@inheritDoc}
Answer whether the receiver, an object, and the argument, a byte string, are equal in value.
Answer whether the receiver, an object, and the argument, a byte tuple, are equal in value.
Answer whether the arguments, an object and a compiled code, are equal.
Answer whether the receiver equals the argument.
Answer whether the receiver equals the argument.
Determine whether the receiver is an enumeration with the given set of instances.
Answer whether the receiver, an object, and the argument, a fiber type, are equal in value.
Answer whether the receiver, an object, and the argument, a function type, are equal.
Answer whether the receiver equals the argument.
Answer whether this value equals the given list phrase type.
Answer whether the receiver equals the argument.
Dispatch to the descriptor.
Dispatch to the descriptor.
Dispatch to the descriptor.
Dispatch to the descriptor.
Dispatch to the descriptor.
Dispatch to the descriptor.
Dispatch to the descriptor.
Answer whether the receiver equals the argument.
Extract a field from an object.
Extract a field from an object, using a one-based index into the field slots. This requires knowledge of the ObjectLayoutVariant, since the same field is at different indices in different variants.
Extract a field from an object, or answer null if it's not present.
Add or replace a field of an object.
Extract a field type from an object type.
Extract a field type from an object type, using the given field index, which is specific to an ObjectLayoutVariant.
Extract a field type from an object type, or null if it's not present.
Dispatch to the descriptor.
Answer the number of integer slots. All variable integer slots occur following the last fixed integer slot.
Dispatch to the descriptor.
Dispatch to the descriptor.
Dispatch to the descriptor.
The receiver is marked with an IMMUTABLE descriptor, but its subobjects have not yet been made immutable. Scan them now, and do any additional fix-ups necessary for the kind of object.
Dispatch to the descriptor.
The receiver is marked with a SHARED descriptor, but its subobjects have not yet been made shared. Scan them now, and do any additional fix-ups necessary for the kind of object.
Dispatch to the descriptor.
Dispatch to the descriptor.
Answer a name suitable for labeling a field containing this object.
Answer the number of object slots in this AvailObject. All variable object slots occur following the last fixed object slot.
Recursively print the receiver to the builder unless it is already present in the recursionMap. Printing will begin at the specified indent level, measured in horizontal tab characters.
Dispatch to the descriptor.
Answer whether the objects occupy the same memory addresses.
Dispatch to the descriptor.
Replace the object's {@linkplain AbstractDescriptor descriptor}.
Dispatch to the descriptor.
Replace my descriptor field with a FillerDescriptor. This blows up for most messages, catching incorrect (all, by definition) further accidental uses of this object.
Answer whether to show value-specific content in the file name for the debugger.
Follow indirections until a non-indirection is reached. Replace each indirection's target with the ultimate target.
Follow indirections until a non-indirection is reached. Replace each indirection's target with the ultimate target, even if it would cause the otherwise-forbidden immutable->mutable references. Only used during makeImmutable.
Follow indirections until a non-indirection is reached. Replace each indirection's target with the ultimate target, even if it would cause the otherwise-forbidden shared->unshared references. Only used during makeShared.
Answer the number of variable integer slots in this object. This does not include the fixed integer slots.
Answer the number of variable object slots in this AvailObject. This does not include the fixed object slots.
Properties
Is the receiver an Avail extended integer?
Is the receiver an Avail IntTupleDescriptor? This is conservative, in that some object tuples may only contain ints but not be reported as being int tuples.
Is the receiver an Avail LongTupleDescriptor? This is conservative, in that some object tuples may only contain longs but not be reported as being long tuples.
Is the receiver an Avail two-byte string?
Is the receiver an Avail unsigned byte?
Inheritors
Extensions
Add a definition parsing plan to this bundle tree. The corresponding bundle must already be present.
Answer the bundle tree's map of all plans.
Expand the bundle tree if there's anything currently unclassified in it. By postponing this until necessary, construction of the parsing rules for the grammar is postponed until actually necessary.
Answer whether there are any parsing-plans-in-progress which are at a backward jump].
Answer whether this bundle tree has been marked as the source of a cycle. If so, the latestBackwardJump is the bundle tree at which to continue processing.
Answer the nearest ancestor bundle tree that contained a ParsingOperation.JUMP_BACKWARD. There may be closer ancestor A_BundleTrees with a backward jump, but that jump wasn't present in the bundle tree yet.
Answer the bundle trees that will be reached when specific parse instructions run. During normal processing, all such instructions are attempted in parallel. Certain instructions like ParsingOperation.PARSE_PART do not get added to this map, and are instead added to other structures such as lazyIncomplete.
Answer the A_Map from bundles to A_Set of A_Sendable macros and method definitions, an invocation of which has been completely parsed when this bundle tree has been reached.
Answer the bundle trees that are waiting for a specific token to be parsed. These are organized as a two-layer map. The outer map is keyed by the A_String form of an expected token, and each corresponding inner map is from the keyword index to the successor A_BundleTree representing the situation where a token matching the key was consumed, and it had the keyword index that led to this new bundle tree.
Answer the bundle trees that are waiting for a specific case-insensitive token to be parsed. These are organized as a two-layer map. The outer map is keyed by the lower-case A_String form of an expected token, and each corresponding inner map is from the keyword index to the successor A_BundleTree representing the situation where a token matching the key was consumed, and it had the keyword index that led to this new bundle tree.
Answer a map used by the ParsingOperation.CHECK_ARGUMENT instruction to quickly eliminate arguments that are forbidden by grammatical restrictions. The map is from each restricted argument bundle to the successor bundle tree that includes every bundle that is allowed when an argument is an invocation of a restricted argument bundle. Each argument bundle that is restricted by at least one parent bundle at this point (just after having parsed an argument) has an entry in this map. Argument bundles that are not restricted do not occur in this map, and are instead dealt with by an entry in the lazyActions map.
If this message bundle tree has a type filter tree, return it, otherwise null.
Remove information about this definition from this bundle tree.
A grammatical restriction has been added. Update this bundle tree to conform to the new restriction along any already-expanded paths for the given plan. Updated the treesToVisit collection to include any new trees to visit as a consequence of visiting this tree.