AvailObject

AvailObject is the fully realized, and mostly machine generated, implementation of an Avail object. An AvailObject must keep track of its descriptor, its integer data, and its references to other AvailObjects. It specifies the complete complement of messages that can be sent to an AvailObject, and delegates most of those to its descriptor, passing the AvailObject as an additional first argument. The redirected messages in AbstractDescriptor have the prefix "o_", both to make them stand out better and to indicate the additional first argument.

Author

Mark van Gulik

Todd L Smith

Parameters

descriptor

This object's {@link AbstractDescriptor}.

objectSlotsSize

The number of object slots to allocate.

intSlotsSize

The number of integer slots to allocate.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Return the set of all ancestor modules of this module. Exclude this module from the set.

Link copied to clipboard

Answer the bundle tree's map of all plans.

Link copied to clipboard

Answer all tokens belonging to the receiver or its subexpressions, lexically ordered, without positionless synthetic tokens.

Link copied to clipboard

Answer the A_Atom that this phrase is a send of. If this is a macro invocation, answer the A_Atom that the original expression, prior to macro transformation, was an apparent send of. If the phrase is neither a send nor a macro invocation, answer nil.

Link copied to clipboard

Answer the tuple type describing this function type's argument types.

Link copied to clipboard

Answer the list phrase that provides arguments to this send phrase. If this is a macro invocation, these are the arguments supplied to the macro's output, which must be a send phrase.

Link copied to clipboard

Answer the tuple of argument declaration phrases of this block phrase.

Link copied to clipboard
Link copied to clipboard

Construct a Java set from the receiver, a tuple.

Link copied to clipboard

Construct a tuple from the receiver, a set. Element ordering in the tuple will be arbitrary and unstable – two successive invocations on the same set may produce two differently ordered tuples.

Link copied to clipboard

Answer the descriptive string that was supplied when this atom was created. The string didn't have to be unique within the issuingModule, but certain operations might only work if it happens to be.

Link copied to clipboard

Answer the loader bound to the receiver, or null if the receiver is not a loader fiber.

Link copied to clipboard
Link copied to clipboard

Answer the approximate memory cost in bits per element of this tuple. This is used to decide the direction of indirections after determining two objects are equal.

Link copied to clipboard

Answer the message bundle that this definition parsing plan names.

Answer this send phrase's message bundle. If this is a macro invocation, answer the message bundle that is the one sent by the resulting send phrase.

Link copied to clipboard

Answer the method that this bundle names. Multiple bundles may refer to the same method to support renaming of imported names.

Link copied to clipboard

Answer the message bundle associated with this atom. If the atom does not yet have a message bundle associated with it, answer nil.

Link copied to clipboard

Answer the tuple of message that name this A_Method.

Link copied to clipboard

Extract the backing byte[] from this tuple. Only applicable if the tuple's descriptor answers true to A_Tuple.isByteArrayTuple.

Link copied to clipboard

The receiver must be a byte buffer tuple; answer its backing ByteBuffer.

Link copied to clipboard

Check if this fiber is allowed to be performing styling operations. For it to be allowed, the fiber must have been launched in the VM by newStylerFiber. Answer true if the fiber is permitted to style, otherwise false.

Link copied to clipboard

Answer the number of children this tree tuple contains.

Link copied to clipboard

Answer this character's Unicode code point.

Link copied to clipboard

Answer the starting line number for the block phrase that defines this raw function.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Answer the type of elements that this set type's sets may hold.

Link copied to clipboard

The fiber's current A_Continuation if suspended, otherwise nil.

Link copied to clipboard
Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Answer the declaration phrase referenced by this variable use phrase. If this phrase is a macro invocation, answer the declaration referenced by the variable use produced by the macro.

Link copied to clipboard

For this raw function, compute the tuple of its declaration names (arguments, locals, constants, 0..1 labels, outers). This is useful for decompilation, for giving meaningful names to registers in L2 translations, and for presenting reified continuations. Note that the outers are not part of the stack frame, and apply to the continuation's function instead.

Link copied to clipboard

For this raw function, compute the tuple of its declaration names (arguments, locals, constants, 0..1 labels). This is useful for decompilation, for giving meaningful names to registers in L2 translations, and for presenting reified continuations.

Link copied to clipboard

Answer the set of exception types that are declared by this block phrase.

Also declared in A_Phrase for block phrases and send phrases.

Link copied to clipboard

Answer the type of the variable, constant, or argument declared by this declaration phrase.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Answer the definition that this plan has been specialized for.

Link copied to clipboard

Answer the method that this definition is for.

Link copied to clipboard

Answer the module in which this lexer was defined. This is used for filtering – a module can only use this lexer if the module's ancestry includes the lexer's definitionModule.

Link copied to clipboard
Link copied to clipboard

Answer a tuple that comprises all definitions of this A_Method.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Answer the set of all names exported by this module.

Link copied to clipboard

If this phrase is an assignment, answer the expression that produces the value to assign. If this phrase is an expression-as-statement, answer the expression to treat as a statement. If this phrase is a super-cast, answer the expression that produces the actual value to send. If this phrase is a macro, use the above rules on the output of the macro.

Link copied to clipboard

Answer the number of expressions in this list phrase.

Link copied to clipboard

Answer the tuple of expressions in this list phrase.

Link copied to clipboard

Extract a Java boolean from this atom. The atom must be either the trueObject or the falseObject.

Link copied to clipboard

Extract a Kotlin Double from the receiver.

Link copied to clipboard

Extract a Java float from the receiver.

Link copied to clipboard

Extract a 32-bit signed Kotlin Int from the receiver.

Link copied to clipboard

Extract a 64-bit signed Java Long from the receiver.

Link copied to clipboard

Extract an unsigned nybble from the receiver. Return it as a Java Byte.

Link copied to clipboard

Extract a signed byte from the receiver.

Link copied to clipboard

Extract a signed short from the receiver.

Link copied to clipboard

Extract an unsigned byte from the receiver. Return it in a Java Short to avoid sign bit reinterpretation.

Link copied to clipboard

Extract an unsigned short from the receiver. Return it in a Kotlin Int to avoid sign bit reinterpretation.

Link copied to clipboard

Answer the continuation that accepts the Throwable responsible for abnormal termination of this fiber.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Given an object type, answer its map from fields to types.

Link copied to clipboard
Link copied to clipboard

Answer the A_Function that implements this styler's logic.

Link copied to clipboard
Link copied to clipboard

Extract from this literal token the A_Lexer responsible for its production, or nil if it was not created that way.

Link copied to clipboard

Extract from this literal token the phrase that was responsible for generating it.

Link copied to clipboard

Answer the set of grammatical restrictions that have been attached to this bundle.

Link copied to clipboard

Answer whether there are any parsing-plans-in-progress which are at a backward jump].

Link copied to clipboard
Link copied to clipboard

This is an expression acting as an argument, a recursive list phrase of arguments (perhaps permuted), or a super-cast. Answer whether it either is or contains within the recursive list structure a super-cast phrase.

Link copied to clipboard

The map from strings to atoms which act as true names. The true names are identity-based identifiers that prevent or at least clarify name conflicts. Answer only those names that have been imported from other modules.

Link copied to clipboard

Answer the phrase producing the value to be assigned during initialization of a variable declaration. If there is no initialization expression, answer nil.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Given an A_Type, determine which TypeTag its instances will comply with.

Link copied to clipboard
open override val isAbstract: Boolean

Dispatch to the descriptor.

Link copied to clipboard
open override val isAtom: Boolean

Is the receiver an Avail atom?

Link copied to clipboard

Answer whether this atom is specially known to the Avail virtual machine.

Link copied to clipboard

Answer whether this plan-in-progress is at a backward jump instruction.

Link copied to clipboard
open override val isBoolean: Boolean

Is the receiver an Avail boolean?

Link copied to clipboard
open override val isBottom: Boolean

Answer whether this type is ⊥ (BottomTypeDescriptor), the most specific type.

Link copied to clipboard
open override val isByteArrayTuple: Boolean
Link copied to clipboard
open override val isByteBufferTuple: Boolean
Link copied to clipboard
open override val isByteString: Boolean

Is the receiver an Avail byte string?

Link copied to clipboard
open override val isByteTuple: Boolean

Is the receiver an Avail byte tuple?

Link copied to clipboard

Is the receiver an Avail character?

Link copied to clipboard

Answer whether this value is a double-precision floating point number.

Link copied to clipboard
open override val isEnumeration: Boolean
Link copied to clipboard
open override val isExtendedInteger: Boolean

Is the receiver an Avail extended integer?

Link copied to clipboard
open override val isFinite: Boolean

Dispatch to the descriptor.

Link copied to clipboard

Answer whether this value is a single-precision floating point number.

Link copied to clipboard
open override val isFunction: Boolean

Is the receiver an Avail function?

Link copied to clipboard

Answer whether this map bin is hashed (versus linear).

Link copied to clipboard
Link copied to clipboard
open override val isInstanceMeta: Boolean
Link copied to clipboard

Answer whether this value is an integer in the i32 range.

Link copied to clipboard
open override val isIntegerIntervalTuple: Boolean
Link copied to clipboard
open override val isIntegerRangeType: Boolean

Dispatch to the descriptor.

Link copied to clipboard
open override val isIntTuple: Boolean

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.

Link copied to clipboard

Answer whether this variable use is the chronologically last time its variable will be used within this block.

Link copied to clipboard
open override val isLiteralTokenType: Boolean
Link copied to clipboard

Answer whether this value is an integer in the i64 range.

Link copied to clipboard
open override val isLongTuple: Boolean

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.

Link copied to clipboard

Answer whether this phrase is a macro substitution phrase.

Link copied to clipboard
open override val isMap: Boolean

Is the receiver an Avail map?

Link copied to clipboard
open override val isMapType: Boolean

Dispatch to the descriptor.

Link copied to clipboard

Is this A_Method empty? A method is empty if it comprises no definitions, no semantic restrictions, and no seals.

Link copied to clipboard
open val isNil: Boolean

Test if the receiver is the nil value.

Link copied to clipboard

Answer whether this number is numerically equal to some finite integer.

Link copied to clipboard
open override val isNybble: Boolean

Is the receiver an Avail nybble?

Link copied to clipboard
open override val isPojo: Boolean
Link copied to clipboard
open override val isPojoArrayType: Boolean
Link copied to clipboard
open override val isPojoFusedType: Boolean
Link copied to clipboard
open override val isPojoSelfType: Boolean
Link copied to clipboard
open override val isPojoType: Boolean
Link copied to clipboard

Answer whether this integral infinity is positive.

Link copied to clipboard
open override val isRawPojo: Boolean
Link copied to clipboard
open override val isRepeatedElementTuple: Boolean
Link copied to clipboard

Is the receiver an Avail set?

Link copied to clipboard
Link copied to clipboard
open override val isSetType: Boolean

Dispatch to the descriptor.

Link copied to clipboard

Answer whether this value is an integer in the range [-128..127].

Link copied to clipboard

Answer whether this value is an integer in the range [-32768..32767].

Link copied to clipboard
Link copied to clipboard

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.

Link copied to clipboard
open override val isString: Boolean

Is the receiver an Avail string?

Link copied to clipboard

Answer the module within which this atom was created.

Link copied to clipboard
open override val isTokenType: Boolean
Link copied to clipboard
open override val isTop: Boolean

Answer whether this type is ⊤ (PrimitiveTypeDescriptor.Types.TOP), the most general type.

Link copied to clipboard
open override val isTuple: Boolean

Is the receiver an Avail tuple?

Link copied to clipboard
open override val isTupleType: Boolean

Dispatch to the descriptor.

Link copied to clipboard
open override val isTwoByteString: Boolean

Is the receiver an Avail TwoByteStringDescriptor?

Link copied to clipboard
open override val isType: Boolean

Dispatch to the descriptor.

Link copied to clipboard
open override val isUnsignedByte: Boolean

Is the receiver an Avail unsigned byte?

Link copied to clipboard

Answer whether this value is an integer in the range [0..65535].

Link copied to clipboard
open override val isVacuousType: Boolean

Answer whether this type is known to have no instances. For example, the BottomTypeDescriptor (denoted ⊥) has no instances.

Link copied to clipboard

The A_Set of A_Fibers waiting for this one to end.

Link copied to clipboard
Link copied to clipboard

Answer the set of keys in this map. Since keys of maps and set elements cannot have duplicates, it follows that the size of the resulting set is the same as the size of this map.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Extract the last expression of this [listListPhraseDescriptor phrase. The client must ensure there is at least one, and that this is a list phrase.

Link copied to clipboard

Answer the nearest ancestor bundle tree that contained a JumpBackward. There may be closer ancestor A_BundleTrees with a backward jump, but that jump wasn't present in the bundle tree yet.

Link copied to clipboard

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 ParsePart do not get added to this map, and are instead added to other structures such as lazyIncomplete.

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

Answer a map used by the CheckArgument 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.

Link copied to clipboard

If this message bundle tree has a type filter tree, return it, otherwise null.

Link copied to clipboard

This method's lexer, or nil.

Link copied to clipboard

Answer the function to run (as the base call of a fiber) to generate some tokens from the source string and position. The function should produce a tuple of potential next tokens, which may or may not have additional tokens explicitly chained onto them via A_Token.setNextLexingStateFromPrior.

Link copied to clipboard

Answer the function to run (as the base call of a fiber), with the character at the current lexer position, to determine if the body function should be attempted.

Link copied to clipboard

Answer the A_Method in which this lexer is defined. Even though the internals of the method aren't needed by the lexer, it's convenient to associated the lexer with a method for controlling imports and renames.

Link copied to clipboard

Answer the tuple of line number deltas for this ram function. Each entry encodes a signed offset in an unsigned entry. There's an entry for each nybblecode (not for each nybble). The encoding uses the absolute value of the delta from the previous instruction's line number, shifted left once, adding one for negatives. This allows nybble tuples and byte tuples to be the usual representations for small functions.

Link copied to clipboard

Answer the list phrase contained within this permuted list phrase. The order of the elements is the order in which they occurred in the source.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

The receiver is a macro. Answer the send that was transformed by the macro body.

Link copied to clipboard

Answer a tuple that comprises all macros defined for this bundle.

Answer the tuple of macro for this method. Their order is irrelevant, but fixed for use by the macro testing tree.

Link copied to clipboard
Link copied to clipboard

Answer a combined hash of all the keys in this map bin.

Link copied to clipboard

Answer the union of the kinds of each key in this bin. A value's exact type is always an instance type (an enumeration type of size 1), and the value's kind is the nearest supertype of that instance type that isn't itself an enumeration type.

Link copied to clipboard

Answer how many key/value pairs are in this map bin.

Link copied to clipboard

Answer a combined hash of all the values in this map bin.

Link copied to clipboard

Answer the union of the kinds of each value in this bin. A value's exact type is always an instance type (an enumeration type of size 1), and the value's kind is the nearest supertype of that instance type that isn't itself an enumeration type.

Link copied to clipboard

Answer a suitable Iterable for iterating over this map's key/value pairs (made available in an Entry). This allows the Java (and Kotlin) for-each syntax hack to be used.

Link copied to clipboard

Answer the number of key/value pairs in the map.

Link copied to clipboard

Answer a marker phrase's marker value, which can be any AvailObject.

Link copied to clipboard

Answer the maximum depth of the stack needed by an A_Continuation representing the invocation of some A_Function that closes this A_RawFunction.

Link copied to clipboard

Answer the name of this bundle. It must be parsable as a method name according to the rules of the MessageSplitter.

Link copied to clipboard

Answer the message parts produced by the MessageSplitter when applied to this bundle's name. It's basically an A_Tuple of A_Strings in the order the tokens appear in the bundle's name.

Link copied to clipboard

Answer the MessageSplitter holding parse planning information for invocations of this message bundle.

Link copied to clipboard

The A_Definitions defined by this module.

Link copied to clipboard

Read or write the name of the method associated with this raw function, or some other descriptive A_String if it's not a method body.

Link copied to clipboard

This method's set of A_Stylers. A module must not define more than one styler on the same A_Method.

Link copied to clipboard

Answer the A_Module that contains the block phrase that defines this raw function.

Answer the module in which this styler was defined.

Link copied to clipboard

Answer the name of this module.

Link copied to clipboard

Answer the name of this module as a native Kotlin String.

Link copied to clipboard

Read the current state of the module, which indicates whether the module is loading, unloading, or in a stable state.

Link copied to clipboard

Answer a Java String representing this message name being parsed at its position within the plan's parsing instructions.

Link copied to clipboard

The tuple of declaration phrases accessed by this block phrase. This value is set during code generation, even if the block phrase is immutable. It should not be made visible to the Avail language.

Link copied to clipboard

Answer a map from strings to atoms. These atoms prevent or at least clarify name conflicts. These names are those introduced by the module's "Names" section or P_PublishName.

Link copied to clipboard
open val notNil: Boolean

Test if the receiver is not the nil value.

Link copied to clipboard

Answer the arity of this A_Bundle, which must be the same for all bundles of its A_Method.

Answer the arity of this A_Method.

Link copied to clipboard

Answer the number of local constants specified by this A_RawFunction.

Link copied to clipboard

Answer the number of literal values embedded into this A_RawFunction.

Link copied to clipboard

Answer the number of local variables specified by this A_RawFunction.

Link copied to clipboard

Answer how many nybbles are taken up by the nybblecodes of this raw function.

Link copied to clipboard

Answer the number of outer variables specified by this A_RawFunction.

Link copied to clipboard

Answer the number of lexically captured variables or constants held by this function.

Link copied to clipboard

Answer the number of slots to reserve in a A_Continuation based on this raw function. This is the arity, plus number of local variables and constants, plus number of stack slots.

Link copied to clipboard

Answer the tuple of nybblecodes that implements this raw function.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Answer the block phrase from which this raw function was constructed. Answer nil if this information is not available.

Link copied to clipboard

The index into the module's lazily-loaded tuple of phrases, or -1 if the phrase was not written to a module, in which case originatingPhrase must already contain the A_Phrase. If this code was generated (say from a pragma), this may be -1, and the originatingPhrase will be nil.

Link copied to clipboard

The phrase that this macro phrase generated to use as its replacement.

Link copied to clipboard

Answer an A_String containing the concatenated names of the originating block's declarations.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard
Link copied to clipboard

Answer the program counter that this plan-in-progress represents.

Link copied to clipboard

Answer the permutation from a permutation list phrase. The permutation is a tuple of integers between 1 and the number of elements, where each value occurs exactly once, and the tuple is not in ascending order.

Link copied to clipboard

If this is a list phrase, answer a List of its expressions. If this is a permuted list phrase, answer its expressions after permutation, in the order that the call site expects to receive them (not the order that they appear in the code).

Link copied to clipboard

Return the phrase's expression type, which is the type of object that will be produced by this phrase.

Link copied to clipboard

Answer this phrase's PhraseKind.

Also declared in A_Phrase for phrases, not just phrase types.

Link copied to clipboard

Return the phrase type's expression type, which is the type of object that will be produced by phrases of that type.

Link copied to clipboard

Answer either null or the Primitive from a block phrase.

Link copied to clipboard

Answer this fiber's current priority.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard
Link copied to clipboard

Answer the continuation that accepts the result produced by the receiver's successful completion.

Link copied to clipboard

Answer a Statistic for recording returns into this raw function.

Link copied to clipboard

Answer a Statistic for recording returns from this raw function.

Link copied to clipboard
Link copied to clipboard

Answer the type that this raw function will produce if there is no primitive, or if the primitive fails and the nybblecodes run.

Link copied to clipboard

Answer a tuple that comprises all tuple types below which new definitions may no longer be added.

Link copied to clipboard

Answer the set of semantic restrictions which restrict the applicability and return type of this A_Method at relevant call sites.

Link copied to clipboard

Answer the sequence of statements inside this sequence-as-expression phrase.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Answer the number of values in the set.

Link copied to clipboard

Produce an A_String describing the module. Leave off the module path.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Answer the L2Chunk that the interpreter will run to simulate execution of this A_RawFunction.

Link copied to clipboard

Answer this block phrase's starting line number in the source.

Link copied to clipboard

Answer the tuple of statement phrases in this sequence phrase.

Link copied to clipboard

Answer this block phrase's tuple of statement phrase.

Link copied to clipboard

Given a list phrase, a permuted list phrase, or a macro substitution phrase, find all macro substitution phrases at or recursively inside it (but only within the nested list structure), answering a duplicate like the original, but with the macro phrases replaced by their output phrases.

Link copied to clipboard

Answer the method that this styler is intended to style invocations of.

Link copied to clipboard

The A_Set of A_Stylers defined by this module.

Link copied to clipboard

Answer the type of the subexpressions tuple that instances (list phrases) of me (a list phrase type) must have.

Link copied to clipboard

If this is a super cast phrase, then answer the type by which this argument should be looked up. If it is not and does not contain a super cast phrase in its recursive list phrase structure, then answer bottom. Otherwise create a (recursive) tuple type where elements that are supercasts provide their lookup types and the rest provide bottom.

Link copied to clipboard

The primitive A_Function that's suspending the fiber.

Link copied to clipboard

The appropriate SystemStyle for the receiver, based on whether it's a metatype or just an ordinary type. Answer null if the type does not indicate any particular system style.

Link copied to clipboard

Answer this method's LookupTree, suitable for dispatching method invocations (i.e., finding out which A_Definition to actually invoke.

Link copied to clipboard

The TextInterface for routing I/O to and from this fiber.

Link copied to clipboard

Answer the token which was used in the construction of a variable use phrase, a declaration phrase, a literal, or a macro that resolves to one of those.

Link copied to clipboard

Answer the tuple of the one-based indices of the tokens that contributed to this phrase. The indices refer to the sent A_Bundle's tuple of parts produced by the MessageSplitter.

Link copied to clipboard

Answer the tuple of tokens that contributed to the phrase.

Link copied to clipboard
Link copied to clipboard

Answer the total number of invocations of this raw function.

Link copied to clipboard

Return the height of this tree tuple. Flat tuples and subranges have height 0, and tree tuples have heights from 1 to 10. All of a tree tuple's children have a height of one less than the parent tree tuple.

Link copied to clipboard

Answer the number of elements in this tuple.

Link copied to clipboard

Answer the phrase that produced the type of the declaration. Answer nil if there was no such phrase.

Link copied to clipboard
Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard
Link copied to clipboard

Answer the unique identifier of this A_Fiber fiber.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Answer a tuple of values from this map in arbitrary order. A tuple is used instead of a set, since the values are not necessarily unique. The order of elements in the tuple is arbitrary and meaningless.

Link copied to clipboard
Link copied to clipboard

Answer the variable use phrase that is used by this reference or assignment.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

The set of variables that were read before written. Only variables still live are included in this set; the trace mechanism retains variables only weakly.

Link copied to clipboard

Answer the set of variables that were written. Only variables still live are included in this set; the trace mechanism retains variables only weakly.

Link copied to clipboard

Answer the set of acceptable version strings for which this module claims compatibility. An empty set indicates universal compatibility.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard
Link copied to clipboard

Given an Avail integer, answer which power of two it is. 1->0, 2->1, 4->2, 8->3, etc. If the number is not a power of two, answer -1.

Link copied to clipboard

Functions

Link copied to clipboard

Answer whether the argument types supported by the specified function type are acceptable argument types for invoking a function whose type is the receiver.

Link copied to clipboard

Answer whether these are acceptable argument types for invoking a function whose type is the receiver.

Link copied to clipboard

Answer whether these are acceptable arguments for invoking a function whose type is the receiver.

Link copied to clipboard

Answer whether these are acceptable argument types for invoking a function that is an instance of the receiver. There may be more entries in the tuple than are required by the function type.

Link copied to clipboard

Answer whether these are acceptable arguments for invoking a function that is an instance of the receiver. There may be more entries in the tuple than are required by the function type.

Link copied to clipboard

Add the given A_Bundle to this module. It will be removed from its connected A_Method when this module is unloaded.

Link copied to clipboard
fun A_Module.addConstantBinding(name: A_String, constantBinding: A_Variable)

TODO MvG Comment Me!

Link copied to clipboard

Add a definition parsing plan to this bundle, to bring it into agreement with the method's definitions and macro definitions.

Link copied to clipboard
open override fun addDependentChunk(chunk: L2Chunk)

Add the chunk with the given index to the receiver's list of chunks that depend on it. The receiver is a method. A change in the method's membership (e.g., adding a new method definition) will cause the chunk to be invalidated.

Link copied to clipboard

Add a grammatical to the receiver.

Link copied to clipboard

TODO MvG Comment Me!

Link copied to clipboard

TODO MvG Comment Me!

Link copied to clipboard

TODO MvG Comment Me!

Link copied to clipboard

Add a definition parsing plan to this bundle tree. The corresponding bundle must already be present.

Link copied to clipboard
fun A_Module.addPostLoadFunction(postLoadFunction: A_Function)

Add the specified function to the tuple of functions that should be applied when the module has been fully compiled.

Link copied to clipboard

TODO MvG Comment Me!

Link copied to clipboard

TODO MvG Comment Me!

Link copied to clipboard
fun A_Module.addSeal(methodName: A_Atom, sealSignature: A_Tuple)

TODO MvG Comment Me!

Link copied to clipboard

Add a seal to this A_Method. Behaves idempotently.

Link copied to clipboard

Add a semantic restriction to this A_Method. Behaves idempotently.

Link copied to clipboard
fun A_Number.addToDoubleCanDestroy(doubleObject: A_Number, canDestroy: Boolean): A_Number

Add the receiver to the given double, destroying one or the other if it's mutable and canDestroy is true. Because of the requirement that the argument be a double rather than an arbitrary A_Number, this is usually only used for double-dispatching.

Link copied to clipboard
fun A_Number.addToFloatCanDestroy(floatObject: A_Number, canDestroy: Boolean): A_Number

Add the receiver to the given float, destroying one or the other if it's mutable and canDestroy is true. Because of the requirement that the argument be a float rather than an arbitrary A_Number, this is usually only used for double-dispatching.

Link copied to clipboard

Add the receiver to the integral infinity with the given Sign, destroying one or the other if it's mutable and canDestroy is true. Because of the requirement that the argument be an integral infinity rather than an arbitrary A_Number, this is usually only used for double-dispatching.

Link copied to clipboard

Add the receiver to the given finite integer, destroying one or the other if it's mutable and canDestroy is true. Because of the requirement that the argument be an integer rather than an arbitrary A_Number, this is usually only used for double-dispatching.

Link copied to clipboard

Add the specified function to the tuple of functions that should be applied when the module is unloaded.

Link copied to clipboard
fun A_Module.addVariableBinding(name: A_String, variableBinding: A_Variable)

Add a module variable binding to this module.

Link copied to clipboard

Add a write reactor to the VariableDescriptor and associate it with the specified key (for subsequent removal).

Link copied to clipboard

Set both the pc and the stack pointer of this continuation, which must be mutable.

Link copied to clipboard
fun A_Tuple.appendCanDestroy(newElement: A_BasicObject, canDestroy: Boolean): A_Tuple

Create a tuple with the same elements as the receiver, but with the specified newElement appended.

Link copied to clipboard

Update this module with information that has been accumulated in the given ModuleHeader.

Link copied to clipboard
fun A_Phrase.applyStylesThen(context: CompilationContext, visitedSet: MutableSet<A_Phrase>, then: () -> Unit)

Apply styles for this phrase in the context. Apply the styles for interesting subcomponents first. After these styles have been applied, invoke the then continuation action.

Link copied to clipboard
open override fun argumentRestrictionSets(): A_Tuple

Answer the tuple of sets of MessageBundleDescriptor that are forbidden from occurring in the corresponding underscore positions of this GrammaticalRestrictionDescriptor's message bundle.

Link copied to clipboard

Convert the receiver, which must be an integer, into a Java BigInteger.

Link copied to clipboard

Construct a Java string from the receiver, an Avail string.

Link copied to clipboard

Set up the object to report nice obvious errors if anyone ever accesses it again.

Link copied to clipboard
open override fun atomicAddToMap(key: A_BasicObject, value: A_BasicObject)

Extract the map from this variable, add the key → value binding to it, and write it back into the variable.

Link copied to clipboard
open override fun atomicRemoveFromMap(key: A_BasicObject)

Extract the map from this variable, remove the key if present, and write it back into the variable.

Link copied to clipboard
fun atomicUpdateSlot(field: IntegerSlotsEnum, subscript: Int = 1, updater: Long.() -> Long): Long

Extract the current value of the indexable Long slot, pass it to the supplied inline Kotlin function, and write the result back to the slot with a compare-and-set, retrying from the beginning if it fails.

fun atomicUpdateSlot(field: ObjectSlotsEnum, subscript: Int = 1, updater: AvailObject.() -> A_BasicObject): AvailObject

Extract the current value of the indexable object slot, pass it to the supplied Kotlin function, and write the result back to the slot with a compare-and-set, retrying from the beginning if it fails.

Link copied to clipboard
open override fun becomeIndirectionTo(anotherObject: A_BasicObject)

Turn the receiver into an indirection to the specified object.

Link copied to clipboard
Link copied to clipboard

Asked of the top bin of a set. If the set is large enough to be hashed then compute/cache the union's nearest kind, otherwise just answer nil.

Link copied to clipboard
fun A_SetBin.binHasElementWithHash(elementObject: A_BasicObject, elementObjectHash: Int): Boolean
Link copied to clipboard
fun A_SetBin.binRemoveElementHashLevelCanDestroy(elementObject: A_BasicObject, elementObjectHash: Int, myLevel: Int, canDestroy: Boolean): A_SetBin
Link copied to clipboard
fun A_Number.bitSet(bitPosition: Int, value: Boolean, canDestroy: Boolean): A_Number

Produce an integer like the receiver, but with the bit corresponding to 2^bitPosition either set or cleared, depending on value. The receiver may be recycled or destroyed if canDestroy is true.

Link copied to clipboard
fun A_Number.bitShift(shiftFactor: A_Number, canDestroy: Boolean): A_Number

Shift this integer left by the specified number of bits. If the shift amount is negative, perform a right shift instead (of the negation of the specified amount). In the case that the receiver is negative, shift in zeroes on the right or ones on the left.

Link copied to clipboard
fun A_Number.bitShiftLeftTruncatingToBits(shiftFactor: A_Number, truncationBits: A_Number, canDestroy: Boolean): A_Number

Shift the non-negative integer to the left by the specified number of bits, then truncate the representation to force bits above the specified position to be zeroed. The shift factor may be negative, indicating a right shift by the corresponding positive amount, in which case truncation will still happen.

Link copied to clipboard
fun A_Number.bitTest(bitPosition: Int): Boolean

Extract the bit with value 2^bitPosition from the integer, as a Boolean.

Link copied to clipboard
fun A_Number.bitwiseAnd(anInteger: A_Number, canDestroy: Boolean): A_Number

Compute the boolean and operation for the corresponding bits of the receiver and anInteger. Both values are signed 2's complement integers.

Link copied to clipboard
fun A_Number.bitwiseOr(anInteger: A_Number, canDestroy: Boolean): A_Number

Compute the boolean or operation for the corresponding bits of the receiver and anInteger. Both values are signed 2's complement integers.

Link copied to clipboard
fun A_Number.bitwiseXor(anInteger: A_Number, canDestroy: Boolean): A_Number

Compute the boolean exclusive-or operation for the corresponding bits of the receiver and anInteger. Both values are signed 2's complement integers.

Link copied to clipboard

If this is a method definition then answer the actual function. If this is a macro definition, answer the macro body function. Fail otherwise.

Link copied to clipboard

Answer a function type that identifies where this definition occurs in the method's directed acyclic graph of definitions.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard
fun A_Bundle.bundleAddMacro(macro: A_Macro, ignoreSeals: Boolean)

Add the A_Macro definition to this bundle, respecting seals if requested. Throw a SignatureException (without making changes), if the macro body's signature is incompatible with the bundle's name. See MessageSplitter and its related classes for information about how the message name is related to argument structure.

Link copied to clipboard

Answer the message bundle associated with this atom. If the atom does not yet have a message bundle associated with it, create one for that purpose and install it. The creation of the bundle is atomic, ensuring multiple fibers attempting to create the atom's bundle will agree about which bundle was created and installed in the atom.

Link copied to clipboard
fun byteSlot(field: IntegerSlotsEnum, byteSubscript: Int): Short

Extract the byte at the given one-based byte subscript within the specified field. Always use little-endian encoding.

Link copied to clipboard

The continuation to which control will pass when this continuation returns. May be nil, indicating this is the outermost stack frame of its fiber and will produce a value from the fiber itself.

Link copied to clipboard

Attach the given debugger to this fiber. Do nothing if the fiber is already attached to another debugger.

Link copied to clipboard

Sanity check: ensure that the specified field is writable.

Link copied to clipboard
fun A_Tuple.childAt(childIndex: Int): A_Tuple

Answer the Nth child of this tree tuple.

Link copied to clipboard
fun A_Phrase.childrenDo(action: (A_Phrase) -> Unit)

Perform the given action for each child phrase of this phrase.

Link copied to clipboard
fun A_Phrase.childrenMap(transformer: (A_Phrase) -> A_Phrase)

Perform the given transformation for each child phrase of this phrase, writing the result of the transformation back into this phrase. This phrase must be mutable.

Link copied to clipboard
fun A_Method.chooseBundle(currentModule: A_Module): A_Bundle

Of this method's bundles, choose one that is visible in the current module. The current module is determined by the current fiber's AvailLoader. If none are visible, choose one at random.

Link copied to clipboard
open override fun clearLexingState()

Disconnect this token from its internal cache of what comes next.

Link copied to clipboard
Link copied to clipboard
open override fun clearValue()

Clear the variable. This causes the variable to have no value, and subsequent attempts to get the value of this variable will fail.

Link copied to clipboard
open fun code(): A_RawFunction

Answer the raw function (also known as compiled code) on which this function is based. The raw function holds the information that is common to all functions, and each function additionally holds zero or more captured variables and values from its lexical context.

Link copied to clipboard

Answer this raw function's Primitive or null.

Link copied to clipboard

Perform an atomic compare-and-set on a slot of the given array. If the value in the slot is the same Kotlin object (under ===) as the reference, replace it with the newValue and answer true. Otherwise answer false.

Link copied to clipboard
open override fun compareAndSwapValues(reference: A_BasicObject, newValue: A_BasicObject): Boolean

Read the variable's value, compare it to a reference value via semantic equality, and if they're equal, store a provided new value into the variable and answer true. Otherwise answer false. If the variable is potentially shared, then ensure suitable locks bracket this entire sequence of operations.

Link copied to clipboard
open override fun compareAndSwapValuesNoCheck(reference: A_BasicObject, newValue: A_BasicObject): Boolean

Read the variable's value, compare it to a reference value via semantic equality, and if they're equal, store a provided new value into the variable and answer true. Otherwise answer false. If the variable is potentially shared, then ensure suitable locks bracket this entire sequence of operations.

Link copied to clipboard
fun A_Tuple.compareFromToWithAnyTupleStartingAt(startIndex1: Int, endIndex1: Int, aTuple: A_Tuple, startIndex2: Int): Boolean

Compare a subrange of the receiver with a subrange of the given tuple. The size of the subrange of both objects is determined by the index range supplied for the receiver.

fun A_Tuple.compareFromToWithByteArrayTupleStartingAt(startIndex1: Int, endIndex1: Int, aByteArrayTuple: A_Tuple, startIndex2: Int): Boolean

Compare a subrange of the receiver with a subrange of the given byte array tuple. The size of the subrange of both objects is determined by the index range supplied for the receiver.

fun A_Tuple.compareFromToWithByteBufferTupleStartingAt(startIndex1: Int, endIndex1: Int, aByteBufferTuple: A_Tuple, startIndex2: Int): Boolean

Test whether the subtuple of the receiver from startIndex1 to endIndex1 equals the subtuple of the byte buffer tuple of the same length starting at startIndex2.

Link copied to clipboard
fun A_Tuple.compareFromToWithByteStringStartingAt(startIndex1: Int, endIndex1: Int, aByteString: A_String, startIndex2: Int): Boolean

Compare a subrange of the receiver with a subrange of the given byte string. The size of the subrange of both objects is determined by the index range supplied for the receiver.

Link copied to clipboard
fun A_Tuple.compareFromToWithByteTupleStartingAt(startIndex1: Int, endIndex1: Int, aByteTuple: A_Tuple, startIndex2: Int): Boolean

Compare a subrange of the receiver with a subrange of the given byte tuple. The size of the subrange of both objects is determined by the index range supplied for the receiver.

fun A_Tuple.compareFromToWithIntegerIntervalTupleStartingAt(startIndex1: Int, endIndex1: Int, anIntegerIntervalTuple: A_Tuple, startIndex2: Int): Boolean

Compare a subrange of the receiver with a subrange of the given integer interval tuple. The size of the subrange of both objects is determined by the index range supplied for the receiver.

Link copied to clipboard
fun A_Tuple.compareFromToWithIntTupleStartingAt(startIndex1: Int, endIndex1: Int, anIntTuple: A_Tuple, startIndex2: Int): Boolean

Compare a subrange of the receiver with a subrange of the given int tuple. The size of the subrange of both objects is determined by the index range supplied for the receiver.

Link copied to clipboard
fun A_Tuple.compareFromToWithNybbleTupleStartingAt(startIndex1: Int, endIndex1: Int, aNybbleTuple: A_Tuple, startIndex2: Int): Boolean

Compare a subrange of the receiver with a subrange of the given nybble tuple. The size of the subrange of both objects is determined by the index range supplied for the receiver.

Link copied to clipboard
fun A_Tuple.compareFromToWithObjectTupleStartingAt(startIndex1: Int, endIndex1: Int, anObjectTuple: A_Tuple, startIndex2: Int): Boolean

Compare a subrange of the receiver with a subrange of the given object tuple. The size of the subrange of both objects is determined by the index range supplied for the receiver.

fun A_Tuple.compareFromToWithRepeatedElementTupleStartingAt(startIndex1: Int, endIndex1: Int, aRepeatedElementTuple: A_Tuple, startIndex2: Int): Boolean

Compare a subrange of the receiver with a subrange of the given repeated element tuple. The size of the subrange of both objects is determined by the index range supplied for the receiver.

fun A_Tuple.compareFromToWithSmallIntegerIntervalTupleStartingAt(startIndex1: Int, endIndex1: Int, aSmallIntegerIntervalTuple: A_Tuple, startIndex2: Int): Boolean

Compare a subrange of the receiver with a subrange of the given small integer interval tuple. The size of the subrange of both objects is determined by the index range supplied for the receiver.

Link copied to clipboard
fun A_Tuple.compareFromToWithStartingAt(startIndex1: Int, endIndex1: Int, anotherObject: A_Tuple, startIndex2: Int): Boolean

Compare a subrange of the receiver with a subrange of another object. The size of the subrange of both objects is determined by the index range supplied for the receiver.

fun A_Tuple.compareFromToWithTwentyOneBitStringStartingAt(startIndex1: Int, endIndex1: Int, aTwentyOneBitString: A_String, startIndex2: Int): Boolean

Compare a subrange of the receiver with a subrange of the given twenty-one-bit string. The size of the subrange of both objects is determined by the index range supplied for the receiver.

Link copied to clipboard
fun A_Tuple.compareFromToWithTwoByteStringStartingAt(startIndex1: Int, endIndex1: Int, aTwoByteString: A_String, startIndex2: Int): Boolean

Compare a subrange of the receiver with a subrange of the given two-byte string. The size of the subrange of both objects is determined by the index range supplied for the receiver.

Link copied to clipboard

As a convenience in Kotlin, allow deconstruction of short tuples.

Link copied to clipboard

As a convenience in Kotlin, allow deconstruction of short tuples.

Link copied to clipboard

As a convenience in Kotlin, allow deconstruction of short tuples.

Link copied to clipboard

As a convenience in Kotlin, allow deconstruction of short tuples.

Link copied to clipboard

As a convenience in Kotlin, allow deconstruction of short tuples.

Link copied to clipboard

As a convenience in Kotlin, allow deconstruction of short tuples.

Link copied to clipboard

As a convenience in Kotlin, allow deconstruction of short tuples.

Link copied to clipboard

As a convenience in Kotlin, allow deconstruction of short tuples.

Link copied to clipboard

As a convenience in Kotlin, allow deconstruction of short tuples.

Link copied to clipboard
fun A_Tuple.computeHashFromTo(start: Int, end: Int): Int

Compute the hash of the specified subrange of this tuple.

Link copied to clipboard

Given an A_Type, compute the most specific TypeTag that is ensured for instances of that type.

Link copied to clipboard

Compute a type that is an ancestor of the receiver, but is not an enumeration. Choose the most specific such type. Fail if the receiver is not itself an enumeration. Also fail if the receiver is bottom.

Link copied to clipboard

Given a tuple of tuples, concatenate all the inner tuples to construct one new tuple. May destroy the original tuple of tuples if so indicated.

Link copied to clipboard
fun A_Tuple.concatenateWith(otherTuple: A_Tuple, canDestroy: Boolean): A_Tuple

Concatenate the receiver and the argument otherTuple to form a new tuple. Assume that the two input tuples may be destroyed or recycled if they're mutable.

Link copied to clipboard

Answer the type of the index-th local constant.

Link copied to clipboard

Make a mutable copy of the tuple but in a form that accepts Ints.

Link copied to clipboard

Make a mutable copy of the tuple but in a form that accepts Longs.

Link copied to clipboard

Make a mutable copy of the tuple but in a form that accepts any objects.

Link copied to clipboard

Create a new list phrase with the elements of the given list phrase appended to the ones in the receiver.

Link copied to clipboard

If the receiver is mutable, make its subobjects immutable and return it. Otherwise, make a mutable copy of the receiver and return it.

Link copied to clipboard
fun A_String.copyStringFromToCanDestroy(start: Int, end: Int, canDestroy: Boolean): A_String

Even though A_Tuple.copyTupleFromToCanDestroy would perform the same activity, this method returns the stronger A_String type as a convenience, when the code knows it's working on strings.

Link copied to clipboard
fun A_Tuple.copyTupleFromToCanDestroy(start: Int, end: Int, canDestroy: Boolean): A_Tuple

Make a tuple that only contains the given range of elements of the given tuple. Subclasses have different strategies for how to accomplish this efficiently.

Link copied to clipboard

Create a new list phrase like the receiver, but with one more phrase added to the end of the list.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Set the countdown until reoptimization by the Level Two translator.

Link copied to clipboard

Create and answer a LexicalScanner containing all lexers that are in scope for this module.

Link copied to clipboard

Answer the line number associated with this continuation's current pc.

Link copied to clipboard
Link copied to clipboard

This raw function was found to be running in an interpreter during a periodic poll. Decrease its countdown to reoptimization by the indicated amount, being careful not to drop below one (1).

Link copied to clipboard

Atomically decrement the countdown to reoptimization by the L2Generator. If the count reaches zero (0), then lock this raw function, thereby blocking concurrent applications of A_Functions derived from this raw function, and then evaluate the argument in order to effect reoptimization.

Link copied to clipboard
open override fun definitionBundle(): A_Bundle

Answer the A_Bundle that this macro is for.

Link copied to clipboard
open override fun definitionMethod(): A_Method

Answer the method that this definition is for.

Link copied to clipboard
open override fun definitionModule(): A_Module

Answer the ModuleDescriptor in which this grammatical restriction was defined.

Link copied to clipboard

Answer the module in which this definition occurred.

Link copied to clipboard

Answer the A_String that names the module in which this definition occurred. If the definition is built-in (i.e., not created in any module), reply with a suitable string to indicate this.

Link copied to clipboard

Answer all definitions of this A_Method that could match arguments conforming to the given types, i.e., the definitions that could be invoked at runtime for a call site with the given static types.

Link copied to clipboard

Alter this continuation to be suitable for use by a debugger. This must be performed inside a safe point.

Link copied to clipboard

Utility method for decomposing this object in the debugger. See AvailObjectFieldHelper for instructions to enable this functionality in IntelliJ.

Link copied to clipboard

Retrieve this object's current descriptor.

Link copied to clipboard
fun destroy()

Replace the descriptor with a filler. This blows up for most messages, catching further uses of this object. Note that all further uses are incorrect by definition.

Link copied to clipboard

Dispatcher helper function for routing messages to the descriptor.

Link copied to clipboard
fun A_Number.divideCanDestroy(aNumber: A_Number, canDestroy: Boolean): A_Number

Divide the receiver by the argument aNumber and answer the result.

Link copied to clipboard

Divide the double argument by the receiver, destroying one or the other if it's mutable and canDestroy is true. Because of the requirement that the argument be a double rather than an arbitrary A_Number, this is usually only used for double-dispatching.

Link copied to clipboard

Divide the float argument by the receiver, destroying one or the other if it's mutable and canDestroy is true. Because of the requirement that the argument be a float rather than an arbitrary A_Number, this is usually only used for double-dispatching.

Link copied to clipboard

Divide the infinity having the specified Sign by the receiver, destroying one or the other if it's mutable and canDestroy is true. Because of the requirement that the argument be an infinity rather than an arbitrary A_Number, this is usually only used for double-dispatching.

Link copied to clipboard

Divide the Avail integer argument by the receiver, destroying one or the other if it's mutable and canDestroy is true. Because of the requirement that the argument be an integer rather than an arbitrary A_Number, this is usually only used for double-dispatching.

Link copied to clipboard

Emit code to push each value produced by the expressions of a list phrase or permuted list phrase.

Link copied to clipboard

Emit code to perform the effect of this phrase, leaving the operand stack the same as before these instructions.

Link copied to clipboard

Emit code to perform this phrase, leaving its result on the stack.

Link copied to clipboard
fun A_Token.end(): Int

Answer the token's final character position in the source file.

Link copied to clipboard

If this continuation is already mutable just answer it; otherwise answer a mutable copy of it.

Link copied to clipboard
open override fun enumerationIncludesInstance(potentialInstance: AvailObject): Boolean
Link copied to clipboard
open override fun equals(another: A_BasicObject): Boolean

Answer whether the receiver and the argument, both AvailObjects, are equal in value.

open operator override fun equals(other: Any?): Boolean

{@inheritDoc}

Link copied to clipboard
open override fun equalsAnyTuple(aTuple: A_Tuple): Boolean

Answer whether the receiver, an AvailObject, and the argument, a tuple, are equal in value.

Link copied to clipboard
open override fun equalsByteArrayTuple(aByteArrayTuple: A_Tuple): Boolean
Link copied to clipboard
open override fun equalsByteBufferTuple(aByteBufferTuple: A_Tuple): Boolean
Link copied to clipboard
open override fun equalsByteString(aByteString: A_String): Boolean

Answer whether the receiver, an AvailObject, and the argument, a byte string, are equal in value.

Link copied to clipboard
open override fun equalsByteTuple(aByteTuple: A_Tuple): Boolean

Answer whether the receiver, an AvailObject, and the argument, a byte tuple, are equal in value.

Link copied to clipboard

Answer whether the receiver, an object, is a character with a code point equal to the integer argument.

Link copied to clipboard
open override fun equalsCompiledCode(aCompiledCode: A_RawFunction): Boolean

Answer whether the receiver, an AvailObject, and a compiled code, are equal.

Link copied to clipboard
open override fun equalsCompiledCodeType(aCompiledCodeType: A_Type): Boolean
Link copied to clipboard
open override fun equalsContinuation(aContinuation: A_Continuation): Boolean

Answer whether the receiver equals the argument.

Link copied to clipboard
open override fun equalsContinuationType(aContinuationType: A_Type): Boolean

Answer whether the receiver equals the argument.

Link copied to clipboard
Link copied to clipboard
open override fun equalsEnumerationType(anEnumerationType: A_BasicObject): Boolean
Link copied to clipboard
open override fun equalsEnumerationWithSet(aSet: A_Set): Boolean

Determine whether the receiver is an enumeration with the given set of instances.

Link copied to clipboard
open override fun equalsEqualityRawPojoFor(otherEqualityRawPojo: AvailObject, otherJavaObject: Any?): Boolean
Link copied to clipboard
open override fun equalsFiberType(aFiberType: A_Type): Boolean

Answer whether the receiver, an object, and the argument, a FiberTypeDescriptor, are equal in value.

Link copied to clipboard
Link copied to clipboard
open override fun equalsFunction(aFunction: A_Function): Boolean

Answer whether the receiver, an object, and the argument, a FunctionDescriptor, are equal in value.

Link copied to clipboard
open override fun equalsFunctionType(aFunctionType: A_Type): Boolean

Answer whether the receiver, an AvailObject, and the argument, a function type, are equal.

Link copied to clipboard

Answer whether the receiver is an infinity with the specified Sign.

Link copied to clipboard
open override fun equalsInstanceTypeFor(anInstanceType: AvailObject): Boolean
Link copied to clipboard

Determine if the receiver is an Avail integer equivalent to the specified Kotlin Int. Note that a non-integer should simply answer false, not fail. This operation was placed in A_Number for organizational reasons, not type restriction.

Link copied to clipboard
Link copied to clipboard
open override fun equalsIntegerIntervalTuple(anIntegerIntervalTuple: A_Tuple): Boolean

Answer whether the receiver, an AvailObject, and the argument, an integer interval, are equal in value.

Link copied to clipboard
open override fun equalsIntegerRangeType(anIntegerRangeType: A_Type): Boolean

Answer whether the receiver equals the argument.

Link copied to clipboard
open override fun equalsIntTuple(anIntTuple: A_Tuple): Boolean

Answer whether the receiver, an AvailObject, and the argument, an int tuple, are equal in value.

Link copied to clipboard
open override fun equalsListNodeType(listNodeType: A_Type): Boolean

Answer whether this value equals the given ListPhraseTypeDescriptor.

Link copied to clipboard
open override fun equalsLiteralTokenType(aLiteralTokenType: A_Type): Boolean
Link copied to clipboard
open override fun equalsLongTuple(aLongTuple: A_Tuple): Boolean

Answer whether the receiver, an AvailObject, and the argument, a long tuple, are equal in value.

Link copied to clipboard
open override fun equalsMap(aMap: A_Map): Boolean

Answer whether the receiver equals the argument.

Link copied to clipboard
open override fun equalsMapType(aMapType: A_Type): Boolean

Answer whether the receiver equals the argument.

Link copied to clipboard
open override fun equalsNybbleTuple(aNybbleTuple: A_Tuple): Boolean

Dispatch to the descriptor.

Link copied to clipboard
open override fun equalsObject(anObject: AvailObject): Boolean

Dispatch to the descriptor.

Link copied to clipboard
open override fun equalsObjectTuple(anObjectTuple: A_Tuple): Boolean

Dispatch to the descriptor.

Link copied to clipboard
open override fun equalsObjectType(anObjectType: AvailObject): Boolean
Link copied to clipboard

Test whether the receiver and aPhrase are effectively equivalent, for the purpose of describing ambiguous parses. Note that this is not used to determine whether the two phrases are equal.

Link copied to clipboard
open override fun equalsPhraseType(aPhraseType: A_Type): Boolean
Link copied to clipboard
open override fun equalsPojo(aPojo: AvailObject): Boolean
Link copied to clipboard
open override fun equalsPojoBottomType(): Boolean
Link copied to clipboard
open override fun equalsPojoField(field: AvailObject, receiver: AvailObject): Boolean
Link copied to clipboard
open override fun equalsPojoType(aPojoType: AvailObject): Boolean
Link copied to clipboard
open override fun equalsPrimitiveType(aPrimitiveType: A_Type): Boolean

Dispatch to the descriptor.

Link copied to clipboard
open override fun equalsRawPojoFor(otherRawPojo: AvailObject, otherJavaObject: Any?): Boolean
Link copied to clipboard
open override fun equalsRepeatedElementTuple(aRepeatedElementTuple: A_Tuple): Boolean

Answer whether the receiver, an AvailObject, and the argument, a repeated element tuple, are equal in value.

Link copied to clipboard
open override fun equalsReverseTuple(aTuple: A_Tuple): Boolean

Answer whether the receiver and the argument tuple, both AvailObjects, are equal in value.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard
open override fun equalsSetType(aSetType: A_Type): Boolean

Dispatch to the descriptor.

Link copied to clipboard
open override fun equalsSmallIntegerIntervalTuple(aSmallIntegerIntervalTuple: A_Tuple): Boolean

Answer whether the receiver, an AvailObject, and the argument, a small integer interval tuple, are equal in value.

Link copied to clipboard
open override fun equalsToken(aToken: A_Token): Boolean
Link copied to clipboard
open override fun equalsTokenType(aTokenType: A_Type): Boolean
Link copied to clipboard
open override fun equalsTupleType(aTupleType: A_Type): Boolean

Dispatch to the descriptor.

Link copied to clipboard
open override fun equalsTwentyOneBitString(aTwentyOneBitString: A_String): Boolean

Dispatch to the descriptor.

Link copied to clipboard
open override fun equalsTwoByteString(aTwoByteString: A_String): Boolean

Dispatch to the descriptor.

Link copied to clipboard
open override fun equalsVariableType(aVariableType: A_Type): Boolean

Answer whether the receiver equals the argument.

Link copied to clipboard

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.

Link copied to clipboard

Extract the Nth expression of this list. If this is a permuted list phrase, do not transform the index.

Link copied to clipboard
open override fun extractDumpedLongAt(index: Int): Long

Given a continuation register dump, extract the Long at the given slot index.

Link copied to clipboard
open override fun extractDumpedObjectAt(index: Int): AvailObject

Given a continuation register dump, extract the object at the given slot index.

Link copied to clipboard

Extract the specified element from the tuple. The element must be an integer in the range 0..15, and is returned as a Java byte.

Link copied to clipboard
open override fun fetchAndAddValue(addend: A_Number): A_Number

Read the variable's value, add the addend to it, and store it back into the variable. This sequence of operations is protected by a lock if the variable is potentially shared among multiple Avail FiberDescriptor. Fail if the variable had no value, if the variable's content type is not a subtype of the IntegerRangeTypeDescriptor.extendedIntegers, if the addend is not an extended integer, if the sum of the old value and the addend is undefined (e.g., ∞ plus -∞), or if the sum does not satisfy the variable's VariableTypeDescriptor.o_WriteType. Return the previous value.

Link copied to clipboard
fun A_Fiber.fiberNameSupplier(supplier: () -> A_String)
Link copied to clipboard
open override fun fieldAt(field: A_Atom): AvailObject

Extract a field from an ObjectDescriptor.

Link copied to clipboard
open override fun fieldAtIndex(index: Int): AvailObject

Extract a field from an ObjectDescriptor, 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.

Link copied to clipboard
open override fun fieldAtOrNull(field: A_Atom): AvailObject?

Extract a field from an ObjectDescriptor, or answer null if it's not present.

Link copied to clipboard
open override fun fieldAtPuttingCanDestroy(field: A_Atom, value: A_BasicObject, canDestroy: Boolean): A_BasicObject

Add or replace a field of an ObjectDescriptor.

Link copied to clipboard
open override fun fieldMap(): A_Map

Dispatch to the descriptor.

Link copied to clipboard
open override fun fieldTuple(): A_Tuple
Link copied to clipboard
open override fun fieldTypeAt(field: A_Atom): A_Type

Extract a field type from an ObjectTypeDescriptor.

Link copied to clipboard
open override fun fieldTypeAtIndex(index: Int): A_Type

Extract a field type from an ObjectTypeDescriptor, using the given field index, which is specific to an ObjectLayoutVariant.

Link copied to clipboard
open override fun fieldTypeAtOrNull(field: A_Atom): A_Type?

Extract a field type from an ObjectTypeDescriptor, or null if it's not present.

Link copied to clipboard
fun fillSlots(field: ObjectSlotsEnum, startSubscript: Int, count: Int, anAvailObject: A_BasicObject)

Store the object in the specified slots of the receiver. The caller is responsible for ensuring the value has been marked Mutability.IMMUTABLE if necessary.

Link copied to clipboard

Answer all definitions of this A_Method that could match the given List of argument types.

Link copied to clipboard
fun A_Tuple.firstIndexOf(value: A_BasicObject, startIndex: Int, endIndex: Int): Int

Search for a particular value in the tuple, starting at the given index and working forward.

Link copied to clipboard
fun A_Tuple.firstIndexOfOr(value: A_BasicObject, otherValue: A_BasicObject, startIndex: Int, endIndex: Int): Int

Search for one of two particular values in the tuple, starting at the given index and working forward. The first match of either value or otherValue ends the search.

Link copied to clipboard
fun A_Phrase.flattenStatementsInto(accumulatedStatements: MutableList<A_Phrase>)

If this phrase is a sequence, take any statements within it that are also sequences, and flatten them all into one sequence, returning the List of statements. Handle first-of-sequence phrases correctly, allowing the resulting structure to be up to two layers deep.

Link copied to clipboard
open fun forEach(p0: Consumer<in AvailObject>)
Link copied to clipboard

Execute the given action with each key and value.

Link copied to clipboard

Execute the given action with each key and associated value in this map bin.

Link copied to clipboard

Answer the continuation frame slot at the given index. The frame slots are numbered starting at 1, and consist of the arguments, primitive failure variable (if defined), locals, and then an operand stack that grows from the top down.

Link copied to clipboard

Update the continuation frame slot at the given index. The continuation must be mutable. Frame slots are numbered starting at 1, and consist of the arguments, primitive failure variable (if defined), locals, and then an operand stack that grows from the top down.

Link copied to clipboard
open override fun function(): A_Function

Answer the function to execute to determine the effect of this semantic restriction on a list of argument static types at a call site.

Link copied to clipboard

Answer the function for which this continuation represents an evaluation.

Link copied to clipboard
open fun functionType(): A_Type

Answer the function type associated with this raw function's closures.

Link copied to clipboard
Link copied to clipboard

Compile this block phrase into a raw function, recording within it that it was compiled within the given module.

Link copied to clipboard
operator fun get(bitField: BitField): Int

Allow subscript notation to access a BitField.

operator fun get(field: IntegerSlotsEnum): Long

Allow subscript notation to access an IntegerSlotsEnum field.

operator fun get(field: ObjectSlotsEnum): AvailObject

Allow subscript notation to access an ObjectSlotsEnum field.

operator fun get(field: IntegerSlotsEnum, subscript: Int): Long

Allow subscript notation to access an indexed IntegerSlotsEnum field. The first subscript is the field, which must be the last declared integer field (and end with "_"), and the second is the one-based index.

operator fun get(field: ObjectSlotsEnum, subscript: Int): AvailObject

Allow subscript notation to access an indexed ObjectSlotsEnum field. The first subscript is the field, which must be the last declared object field (and end with "_"), and the second is the one-based index.

Link copied to clipboard

Extract the current A_Set of pojo-wrapped actions to perform when this fiber is next reified. Replace it with the empty set.

Link copied to clipboard

Extract the module's tuple of block phrases that it accumulated during compilation. Also set the field to nil.

Link copied to clipboard
open override fun getAndSetValue(newValue: A_BasicObject): AvailObject

Read the variable's value and set it to the new value. Answer the old value. Fail if the new value is not suitable for the variable, or if the variable had no value. Ensure that the entire operation runs atomically with respect to other reads and writes of the variable. Use information about whether the variable is potentially shared between Avail FiberDescriptor to determine whether locking operations are needed.

Link copied to clipboard

Store the AvailObject in the specified slot of the receiver, and answer the value that was previously in that slot. Use atomic write semantics that are compatible with volatile access. Note that this may answer nil if it's used on an unassigned variable's value slot.

Link copied to clipboard

Look up a property of this atom. Normal atoms have properties that can be set and read in this way, but specifically not enumerated by Avail code. You can see anything that you know how to look for, but everything else is thereby encapsulated.

Link copied to clipboard
open override fun getValue(): AvailObject

Extract the current value of the VariableDescriptor. Fail if the variable has no value.

Link copied to clipboard
open override fun getValueClearing(): AvailObject

Extract the current value of the VariableDescriptor. Fail if the variable has no value. Clear the variable afterward.

Link copied to clipboard
open override fun getValueForDebugger(): AvailObject

Read the current value of a variable without tripping any observerless mechanisms or checks. If the variable is unassigned, answer nil.

Link copied to clipboard
open override fun globalModule(): A_Module

Only applicable to VariableSharedGlobalDescriptor. Answer the module in which it's defined.

Link copied to clipboard
open override fun globalName(): A_String

Only applicable to VariableSharedGlobalDescriptor. Answer the name of this global variable or constant.

Link copied to clipboard

Answer whether the receiver is numerically greater than or equivalent to the argument.

Link copied to clipboard

Answer whether the receiver is numerically greater than the argument.

Link copied to clipboard
fun A_Module.hasAncestor(potentialAncestor: A_Module): Boolean

Determine if the given module is equal to or an ancestor of the receiver.

Link copied to clipboard
fun A_Set.hasElement(elementObject: A_BasicObject): Boolean

Answer whether this set contains the specified element.

Link copied to clipboard
open override fun hash(): Int

Compute the 32-bit hash of the receiver.

Link copied to clipboard
open override fun hashCode(): Int

Redirect Kotlin's hashCode to AbstractDescriptor.o_Hash.

Link copied to clipboard
fun A_Tuple.hashFromTo(startIndex: Int, endIndex: Int): Int

Calculate the hash of the subtuple spanning the two indices.

Link copied to clipboard
open override fun hashOrZero(): Int

Dispatch to the descriptor.

Link copied to clipboard

Answer whether the argument is one of the keys of this map.

Link copied to clipboard
fun A_Type.hasObjectInstance(potentialInstance: AvailObject): Boolean

Dispatch to the descriptor.

Link copied to clipboard
open override fun hasValue(): Boolean

Answer true if the variable currently has a value, otherwise answer false. No value is typically represented by the variable's value slot containing nil.

Link copied to clipboard

Determine which nybblecode index is "current" for this continuation. If this is not the top frame, use the instruction previous to the current pc.

Link copied to clipboard
open fun <T : A_BasicObject> ifNil(action: () -> T): T

If the receiver isNil, evaluate the action. Answer either the non-nil receiver, or the result of the action.

Link copied to clipboard
open fun <T : A_BasicObject> ifNotNil(action: (T) -> Unit)

If the receiver is notNil, evaluate the action with it.

Link copied to clipboard

Is the given definition present in this A_Method?

Link copied to clipboard

Initialize the phrase's hash value during construction.

Link copied to clipboard
fun intBinarySearch(slot: IntegerSlotsEnum, slotCount: Int, key: Int): Int

Search for the key in the 32-bit Ints encoded within the longSlots that occur within those slots identified with the specified IntegerSlotsEnum. The int slots must be in ascending sorted order, and must be distinct. If the exact int is found, answer its zero-based index within this repeated slot (i.e., ≥0). If the exact int is not found, answer (-n-1), where n is the zero-based position of the leftmost element of the repeated slot which is greater than the key (if it was equal, the "if found" case would have applied).

Link copied to clipboard
open override fun integerSlotsCount(): Int

Answer the number of Long slots.

Link copied to clipboard

Is the specified interrupt request flag set for the receiver?

Link copied to clipboard
fun intLinearSearch(slot: IntegerSlotsEnum, startIndex: Int, endIndex: Int, key: Int): Int

Search for the key in the 32-bit Ints encoded within the longSlots that occur within those slots identified with the specified IntegerSlotsEnum. Only search the given range of indices. If the given Int value is found within the given range, answer the index of the intSlot. Otherwise answer zero (0).

Link copied to clipboard

Introduce a new atom into this module.

Link copied to clipboard
fun intSlot(field: IntegerSlotsEnum, intIndex: Int): Int

Extract a (32-bit signed) Int at the given int-index of the receiver.

Link copied to clipboard

Compare corresponding consecutive long slots from the receiver and the otherObject, starting at the beginning at the variable-length section indicated by the integerField. Answer false if any differ, otherwise true.

Link copied to clipboard
Link copied to clipboard

Given two objects that are known to be equal, is the first one in a better form (more compact, more efficient, older generation) than the second one?

Link copied to clipboard
fun A_SetBin.isBinSubsetOf(potentialSuperset: A_Set): Boolean
Link copied to clipboard
open override fun isGlobal(): Boolean

Answer whether this variable is a module-scoped global.

Link copied to clipboard
open override fun isInCurrentModule(currentModule: A_Module): Boolean

Given a module in the process of being compiled, answer whether this token was constructed by the compiler from the module's source.

Link copied to clipboard
open override fun isInstanceOf(aType: A_Type): Boolean

Dispatch to the descriptor.

Link copied to clipboard
open override fun isInstanceOfKind(aType: A_Type): Boolean

Dispatch to the descriptor.

Link copied to clipboard
open override fun isLiteralToken(): Boolean

Answer whether this token is a LiteralTokenDescriptor, such as a string or number.

Link copied to clipboard
fun A_Set.isSubsetOf(another: A_Set): Boolean

Answer true if and only if every element of the receiver is also present in the provided set.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard
Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Answer whether the receiver, a type, is a supertype of the given list phrase type.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard
Link copied to clipboard

Dispatch to the descriptor

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard
open operator override fun iterator(): Iterator<AvailObject>

Answer an iterator suitable for traversing the elements of the receiver with a Java foreach construct.

Link copied to clipboard
open override fun javaAncestors(): AvailObject
Link copied to clipboard
open override fun javaClass(): AvailObject
Link copied to clipboard
open override fun <T : Any> javaObject(): T?
Link copied to clipboard
open override fun <T : Any> javaObjectNotNull(): T
Link copied to clipboard
open override fun kind(): A_Type

Dispatch to the descriptor.

Link copied to clipboard
fun A_Tuple.lastIndexOf(value: A_BasicObject, startIndex: Int, endIndex: Int): Int

Search for a particular value in the tuple, starting at the given one-based index and working backward.

Link copied to clipboard

Answer whether the receiver is numerically less than or equivalent to the argument.

Link copied to clipboard

Answer whether the receiver is numerically less than the argument.

Link copied to clipboard

Answer the current L2Chunk to run when resuming this continuation. Always check that the chunk is still valid, otherwise the unoptimizedChunk should be resumed instead.

Link copied to clipboard

The offset within the L2Chunk at which to resume level two execution when this continuation is to be resumed. Note that the chunk might have become invalidated, so check L2Chunk.isValid) before attempting to resume it.

Link copied to clipboard

If the filter function cas already run for this single-byte codePoint in the past, answer the boolean value that it produced. Otherwise answer null.

Link copied to clipboard
open override fun lineNumber(): Int

The line number of this token in the source file.

Link copied to clipboard
open override fun literal(): AvailObject

Extract the literal value from this token. It must be a literal token.

Link copied to clipboard

Answer the index-th literal value of this A_RawFunction.

Link copied to clipboard

Answer the type of the index-th local variable.

Link copied to clipboard
open override fun <T> lock(body: () -> T): T

Lock the fiber during evaluation of the Supplier, and return the produced value.

Link copied to clipboard

Answer the definition of this A_Method that should be invoked for the given tuple of argument types. Use the testing tree to select a definition.

Link copied to clipboard

Answer the definition of this A_Method that should be invoked for the given values. Use the testing tree to select a definition. If lookup fails, then write an appropriate error code into errorCode and answer nil.

Link copied to clipboard

Look up the A_Macro definition to invoke, given an A_Tuple of argument phrases. Use the A_Bundle's macro testing tree to find the macro definition to invoke. Answer the A_Tuple of applicable macro definitions.

Link copied to clipboard
open override fun lowerCaseString(): A_String

Answer this token's string representation converted to lower case.

Link copied to clipboard
open override fun makeImmutable(): AvailObject

Dispatch to the descriptor.

Link copied to clipboard
open override fun makeImmutableInternal(queueToProcess: MutableList<AvailObject>, fixups: MutableList<() -> Unit>)

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.

Link copied to clipboard
open override fun makeShared(): AvailObject

Dispatch to the descriptor.

Link copied to clipboard
open override fun makeSharedInternal(queueToProcess: MutableList<AvailObject>, fixups: MutableList<() -> Unit>)

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.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard
open override fun makeSubobjectsShared(): AvailObject

Dispatch to the descriptor.

Link copied to clipboard

Get the module's List of manifest entries. This may involve fetching and decoding data from the repository.

Link copied to clipboard

Find the key/value pair in this map which has the specified key and answer the value. Fail if the specified key is not present in the map. The result is not forced to be immutable, as it's up to the caller whether the new reference would leak beyond a usage that conserves its reference count.

Link copied to clipboard

Find the key/value pair in this map which has the specified key and answer the value. Answer null if the specified key is not present in the map. The result is not forced to be immutable, as it's up to the caller whether the new reference would leak beyond a usage that conserves its reference count.

Link copied to clipboard
fun A_Map.mapAtPuttingCanDestroy(keyObject: A_BasicObject, newValueObject: A_BasicObject, canDestroy: Boolean): A_Map

Create a new map like this map, but with a new key/value pair as specified. If there was an existing key/oldValue pair, then it is replaced by the new key/value pair. The original map can be modified in place (and then returned) if canDestroy is true and the map is mutable.

Link copied to clipboard
fun A_Map.mapAtReplacingCanDestroy(key: A_BasicObject, notFoundValue: A_BasicObject = nil, canDestroy: Boolean, transformer: (AvailObject, AvailObject) -> A_BasicObject): A_Map

Look up the key in the map. If present, use the key and the looked up value as arguments to a call to the transformer. Otherwise, use the key and the notFoundValue (nil is default for this) as arguments to the transformer. Store the transformer's result in the map under the key, destroying the original if canDestroy is true. Answer the resulting map.

Link copied to clipboard

Look up the key in this map bin. If not found, answer null. Use the provided hash of the key.

Link copied to clipboard
fun A_MapBin.mapBinAtHashPutLevelCanDestroy(key: A_BasicObject, keyHash: Int, value: A_BasicObject, myLevel: Int, canDestroy: Boolean): A_MapBin

Create a map bin like the receiver, but with the given key associated with the given value. If canDestroy is true and the receiver is mutable, the receiver may be modified, and possibly act as the return value of this method.

Link copied to clipboard
fun A_MapBin.mapBinAtHashReplacingLevelCanDestroy(key: AvailObject, keyHash: Int, notFoundValue: AvailObject, myLevel: Int, canDestroy: Boolean, transformer: (AvailObject, AvailObject) -> A_BasicObject): A_MapBin

Transform an element of this map bin. If there is an entry for the key, use the corresponding value as the second argument to the transformer, otherwise pass the notFoundValue. Write the result back to the bin, potentially recycling it if canDestroy is true.

Link copied to clipboard

Answer a map bin like the receiver, but with the given key excluded. If the key does not occur in the receiver, answer the same map bin, or an equivalent. If canDestroy is true and the receiver is mutable, the receiver can be modified and/or returned as the result.

Link copied to clipboard
open fun <T : A_BasicObject, O : A_BasicObject> mapNotNil(action: (T) -> O): O

If the receiver is notNil, evaluate the action with it, answering the value produced by the action. If the receiver was nil, answer nil cast to the action's output type.

Link copied to clipboard
inline fun <T, R> Iterable<T>.mapToSet(destination: MutableSet<R> = mutableSetOf(), transform: (T) -> R): MutableSet<R>

Transform the receiver via the supplied function and collect the results into an optionally provided set. Answer the result set.

Link copied to clipboard

Create a new map like this map, but without the key/value pair having the specified key. If the key was not present, then answer the original map. The original map can be modified in place (and then returned) if canDestroy is true and the map is mutable.

Link copied to clipboard
open override fun marshalToJava(classHint: Class<*>?): Any?
Link copied to clipboard

The membership of this method has changed. Invalidate anything that depended on the previous membership, including any LookupTrees or dependent L2Chunks.

Link copied to clipboard

Answer a message part produced by the MessageSplitter when applied to this bundle's name. The part is a substring of the bundle name. The index is one-based.

Link copied to clipboard

Specify that the given message bundle names this A_Method.

Link copied to clipboard

Add the definition to this A_Method. Causes dependent chunks to be invalidated. Answer the A_DefinitionParsingPlans that were created for the new definition.

Link copied to clipboard

As part of unloading a module, remove the bundle from this A_Method.

Link copied to clipboard
fun A_Number.minusCanDestroy(aNumber: A_Number, canDestroy: Boolean): A_Number

Subtract the argument aNumber from a receiver and answer the result.

Link copied to clipboard

Add a definition to this module.

Link copied to clipboard

Add a grammatical restriction to this module.

Link copied to clipboard

Add an A_Macro to this module.

Link copied to clipboard

Add a semantic restriction to this module.

Link copied to clipboard

Add the given styler to the module's A_Set.

Link copied to clipboard

Multiply the receiver by the given double, destroying one or the other if it's mutable and canDestroy is true. Because of the requirement that the argument be a double rather than an arbitrary A_Number, this is usually only used for double-dispatching.

Link copied to clipboard

Multiply the receiver by the given float, destroying one or the other if it's mutable and canDestroy is true. Because of the requirement that the argument be a float rather than an arbitrary A_Number, this is usually only used for double-dispatching.

Link copied to clipboard

Multiply the receiver by the infinity with the given sign, potentially destroying the receiver if it's mutable and canDestroy is true.

Link copied to clipboard

Multiply the receiver by the given integer, destroying one or the other if it's mutable and canDestroy is true. Because of the requirement that the argument be an integer rather than an arbitrary A_Number, this is usually only used for double-dispatching.

Link copied to clipboard
fun mutableSlot(bitField: BitField): Int

Extract an integer (at most 32 bits) from the given BitField. If the receiver is shared, then acquire its monitor.

Extract the (signed 64-bit) integer for the given field enum value, using volatile-read semantics if the receiver is shared.

Extract the object at the specified slot of the receiver. If the receiver is shared, then acquire its monitor.

fun mutableSlot(field: IntegerSlotsEnum, subscript: Int): Long

Extract the (signed 64-bit) integer at the given field enum value. If the receiver is shared, then use VolatileSlotHelper.volatileRead to acquire the value.

fun mutableSlot(field: ObjectSlotsEnum, subscript: Int): AvailObject

Extract the AvailObject at the specified slot of the receiver, using volatile-read semantics if the receiver is shared.

Link copied to clipboard
open override fun nameForDebugger(): String

Answer a name suitable for labeling a field containing this object.

Link copied to clipboard

Get this loaded module's NamesIndex record, reading it from the repository file if necessary.

Link copied to clipboard
open override fun nextLexingState(): LexingState

Answer the LexingState that follows this token, or null if it hasn't been set yet.

Link copied to clipboard
open override fun nextLexingStatePojo(): AvailObject

Answer the pojo AvailObject containing the ]LexingState that follows this token, or nil if it hasn't been set yet.

Link copied to clipboard

Divide the receiver by the argument aNumber and answer the result. The operation is not allowed to fail, so the caller must ensure that the arguments are valid, i.e. the divisor is not zero.

Link copied to clipboard

Difference the receiver and the argument aNumber and answer the result. The operation is not allowed to fail, so the caller must ensure that the arguments are valid, i.e. not infinities of like sign.

Link copied to clipboard

Add the receiver and the argument aNumber and answer the result. The operation is not allowed to fail, so the caller must ensure that the arguments are valid, i.e. not infinities of unlike sign.

Link copied to clipboard

Multiply the receiver and the argument aNumber and answer the result. The operation is not allowed to fail, so the caller must ensure that the arguments are valid, i.e. not zero and infinity.

Link copied to clipboard

Answer the number of arguments expected by this raw function.

Link copied to clipboard

Answer an ordering between the receiver and the argument. This compares the underlying real numeric values of the two A_Numbers, which does not necessarily agree with the equals semantics. In particular, under numerical ordering, 5 = 5.0 = 5.0f, and 0.0/0.0 is incomparable to every number, even itself. Under ordinary equality (the equals method), an integer never equals a float, and neither ever equals a double. However, 0.0/0.0 is equal to 0.0/0.0, since they have the same kind (double) and the same bit pattern. Note that hash agrees with general equality, not the numeric ordering.

Link copied to clipboard

This produces the same value as numericCompare, but the argument is an unboxed double value.

Link copied to clipboard

This produces the same value as numericCompare, but the argument is known to be an integral infinity whose Sign is provided.

Link copied to clipboard

This produces the same value as numericCompare, but the argument is known to be an integer.

Link copied to clipboard

Also defined in A_RawFunction. The total number of "frame" slots in the receiver. These slots are used to hold the arguments, local variables and constants, and the local operand stack on which the level one instruction set depends.

Link copied to clipboard
open override fun objectSlotsCount(): Int

Answer the number of AvailObject slots.

Link copied to clipboard

An outer variable or constant of this function has been used for the last time. Replace it with nil if the function is mutable, and answer true. If the function is immutable then something besides the Interpreter or a fiber's chain of A_Continuations might be referring to it, so answer false.

Link copied to clipboard

Look up a one-based index in this module's tuple of block phrases. If the tuple is nil, first fetch it from the repository and overwrite the field.

Link copied to clipboard

Answer the type of the index-th outer variable.

Link copied to clipboard
open fun outerVarAt(index: Int): AvailObject

Answer this function's lexically captured variable or constant value that has the specified index.

Link copied to clipboard
open fun outerVarAtPut(index: Int, value: AvailObject)

Set the specified captured variable/constant slot to the given variable or constant value.

Link copied to clipboard

Returns a possibly parallel Stream with this tuple as its source. It is allowable for this method to return a sequential stream.

Link copied to clipboard

Answer the list phrase type for this definition. The parser uses this type to produce a customized parsing plan, specialized to a particular A_Sendable.

Link copied to clipboard

Answer this position in the source file just beyond the final character of this token.

Link copied to clipboard

Answer the level one program counter. This is a one-based subscript that indicates the next instruction that will execute in this continuation's function's level one code.

Link copied to clipboard

Test whether this phrase has a PhraseKind that is equal to or a subkind of the given PhraseKind.

Also declared in A_Phrase, so the same operation applies both to phrases and to phrase types.

Link copied to clipboard

Get the module's StylingRecord, which is used for syntax coloring the module source. This may involve reading the repository.

Link copied to clipboard
fun A_Number.plusCanDestroy(aNumber: A_Number, canDestroy: Boolean): A_Number

Add the receiver and the argument aNumber and answer the result.

Link copied to clipboard
open override fun pojoSelfType(): A_Type
Link copied to clipboard
open override fun prefixFunctions(): A_Tuple

Answer the tuple of macro prefix functions for this MacroDescriptor. Fail if this is not a macro definition.

Link copied to clipboard
open override fun printOnAvoidingIndent(builder: StringBuilder, recursionMap: IdentityHashMap<A_BasicObject, Void>, indent: Int)

Recursively print the receiver to the StringBuilder, unless it is already present in the recursion Map. Printing will begin at the specified indent level, measured in horizontal tab characters.

Link copied to clipboard
Link copied to clipboard

The receiver is a byte string; extract the code point of the character at the given index as an unsigned byte.

Link copied to clipboard
open override fun rawPojo(): AvailObject
Link copied to clipboard

Extract a (signed) base 2^32 digit from the integer. The index must be in range for the integer's representation.

Link copied to clipboard

Replace a (signed) base 2^32 digit of the integer. The index must be in range for the integer's representation, and the receiver must be mutable.

Link copied to clipboard

Extract an unsigned base 2^32 digit from the integer. The index must be in range for the integer's representation.

Link copied to clipboard

Replace an unsigned base 2^32 digit of the integer. The index must be in range for the integer's representation, and the receiver must be mutable.

Link copied to clipboard

Record a block phrase in this module, answering the unique one-based Avail integer index at which it can later be retrieved.

Link copied to clipboard

Record access of the specified variable by this fiber.

Link copied to clipboard

Answer the ContinuationRegisterDumpDescriptor object that was secretly stashed inside this continuation for an L2Chunk's use.

Link copied to clipboard

This fiber was captured by a debugger. Release it from that debugger, allowing it to continue running freely when/if its state indicates it should.

Link copied to clipboard

Remove the specified definition from this A_Method. Behaves idempotently.

Link copied to clipboard
open override fun removeDependentChunk(chunk: L2Chunk)

Remove the specified chunk from the receiver's set of dependent chunks.

Link copied to clipboard
fun A_Module.removeFrom(loader: AvailLoader, afterRemoval: () -> Unit)

Dispatch to the descriptor.

Link copied to clipboard

Remove a grammatical from the receiver.

Link copied to clipboard

Remove a macro from the receiver. The macro will be removed from the bundle's tuple of macros, from its current parsing plans, and from its macro type-lookup tree.

Link copied to clipboard

Remove information about this definition or macro from this bundle.

Link copied to clipboard

Remove information about this definition from this bundle tree.

Link copied to clipboard

Remove a seal from this A_Method. Behaves idempotently.

Link copied to clipboard

Remove an extant semantic from this method. Behaves idempotently.

Link copied to clipboard
open override fun removeWriteReactor(key: A_Atom)

Remove the write reactor associated with the specified AtomDescriptor from the VariableDescriptor.

Link copied to clipboard

Replace the first child of this tree tuple. Make a copy to modify if the receiver is immutable. Answer the modified original or copy.

Link copied to clipboard

Create a copy of the receiver if it's not already mutable, then clobber the caller slot with the passed value.

Link copied to clipboard
open override fun representationCostOfTupleType(): Int

Dispatch to the descriptor.

Link copied to clipboard
fun A_Module.resolveForward(forwardDefinition: A_BasicObject)

Dispatch to the descriptor.

Link copied to clipboard
open override fun restrictedBundle(): A_Bundle

Answer the MessageBundleDescriptor that is restricted by this grammatical restriction.

Link copied to clipboard
open override fun resultType(): A_Type
Link copied to clipboard
fun sameAddressAs(anotherObject: A_BasicObject): Boolean

Answer whether the objects occupy the same memory addresses.

Link copied to clipboard
override fun scanSubobjects(visitor: (AvailObject) -> AvailObject)

Visit all of the object's object slots, passing the parent and child objects to the provided visitor.

Link copied to clipboard
fun A_Module.serializedObjects(serializedObjects: A_Tuple)

Deserialization has completed, and this is the A_Tuple of objects that were deserialized. This tuple can be used for pumping serializers and deserializers of subsequent modules, as well as the separate repository record for block phrases, stacks comments, and any styling, navigation, or indexing information stored separately from the body record of the module.

Link copied to clipboard
Link copied to clipboard
operator fun set(bitField: BitField, value: Int)

Allow subscript notation to write to a BitField.

operator fun set(field: IntegerSlotsEnum, value: Long)

Allow subscript notation to write to an IntegerSlotsEnum field.

operator fun set(field: ObjectSlotsEnum, value: A_BasicObject)

Allow subscript notation to write to an ObjectSlotsEnum field.

operator fun set(field: IntegerSlotsEnum, subscript: Int, value: Long)

Allow subscript notation to write to an indexed IntegerSlotsEnum field. The first subscript is the field, which must be the last declared integer field (and end with "_"), and the second is the one-based index.

operator fun set(field: ObjectSlotsEnum, subscript: Int, value: A_BasicObject)

Allow subscript notation to write to an indexed ObjectSlotsEnum field. The first subscript is the field, which must be the last declared object field (and end with "_"), and the second is the one-based index.

Link copied to clipboard
Link copied to clipboard

Set the specified property of this atom to the specified value. Normal atoms have properties that can be set and read in this way, but specifically not enumerated by Avail code. You can see anything that you know how to look for, but everything else is thereby encapsulated.

Link copied to clipboard
fun A_SetBin.setBinAddingElementHashLevelCanDestroy(elementObject: A_BasicObject, elementObjectHash: Int, myLevel: Int, canDestroy: Boolean): A_SetBin
Link copied to clipboard
fun A_SetBin.setBinUnion(otherBin: A_SetBin, level: Int): A_SetBin

Construct a bin containing the union of the receiver and otherBin, recycling or destroying either or both if they're mutable.

Link copied to clipboard

Construct a bin containing the union of the receiver and hashedBin, which is known to be a hashed set bin.

Link copied to clipboard

Construct a bin containing the union of the receiver and linearBin, which is known to be a linear set bin.

Link copied to clipboard
fun setByteSlot(field: IntegerSlotsEnum, byteSubscript: Int, aByte: Short)

Replace the byte at the given one-based byte subscript within the specified field. Always use little endian encoding.

Link copied to clipboard

Store the specified continuation in the receiver, which must be a fiber. This is the only circumstance in all of Avail in which a field of a (potentially) shared object may hold a non-shared object.

Link copied to clipboard
open override fun setCurrentModule(currentModule: A_Module)

Given a module in the process of being compiled, alter this token to indicate that it was created directly from that module's source.

Link copied to clipboard
fun setDescriptor(newDescriptor: AbstractDescriptor)

Replace this object's current currentDescriptorAbstractDescriptor].

Link copied to clipboard

Check if all elements of the set are instances of the specified kind (any type that isn't an instance type).

Link copied to clipboard
open override fun setHashOrZero(value: Int)

Dispatch to the descriptor.

Link copied to clipboard
fun A_Set.setIntersectionCanDestroy(otherSet: A_Set, canDestroy: Boolean): A_Set

Answer a set containing all values that are present simultaneously in both the receiver and the otherSet.

Link copied to clipboard

Answer whether the receiver and otherSet have any elements in common.

Link copied to clipboard
fun setIntSlot(field: IntegerSlotsEnum, intIndex: Int, anInt: Int)

Store the (32-bit signed) Int at the given int-index of the receiver.

Link copied to clipboard
fun A_Lexer.setLexerApplicability(codePoint: Int, applicability: Boolean)

Record the fact that the filter ran for this single-byte codePoint, and produced the provided applicability boolean.

Link copied to clipboard

Set the repository record number for this module's manifest entries.

Link copied to clipboard
fun A_Set.setMinusCanDestroy(otherSet: A_Set, canDestroy: Boolean): A_Set

Answer a set containing all values that are present in the receiver but not in otherSet.

Link copied to clipboard
fun setMutableSlot(bitField: BitField, anInteger: Int)

Store the signed 32-bit Int into the specified BitField, trimming upper bits beyond the BitField's size. If the receiver is shared, then use VolatileSlotHelper.compareAndSet to ensure only the intended bits are affected.

fun setMutableSlot(field: IntegerSlotsEnum, anInteger: Long)

Store the (signed 64-bit) integer in the eight bytes starting at the given field enum value. If the receiver is Mutability.SHARED, then acquire its monitor.

fun setMutableSlot(field: ObjectSlotsEnum, anAvailObject: A_BasicObject)

Store the AvailObject in the specified slot of the receiver, using volatile-write semantics if the receiver is shared.

fun setMutableSlot(field: IntegerSlotsEnum, subscript: Int, anInteger: Long)

Store the (signed 64-bit) integer in the eight bytes starting at the given field enum value. If the receiver is shared, then use VolatileSlotHelper.volatileWrite to write the value.

Link copied to clipboard

Set the index of the NamesIndex record. That record is the way that declarations, definitions, and usages of names are tracked for this module.

Link copied to clipboard
open override fun setNextLexingStateFromPrior(priorLexingState: LexingState)

Set this token's next LexingState.

Link copied to clipboard

Set the record number under which this module's PhrasePathRecord has been recorded.

Link copied to clipboard
fun setShortSlot(field: IntegerSlotsEnum, shortIndex: Int, aShort: Int)

Store the (16-bit unsigned) short at the given short-index of the receiver.

Link copied to clipboard
fun setSlot(bitField: BitField, anInteger: Int)

Replace the value of the BitField within this object.

fun setSlot(field: IntegerSlotsEnum, anInteger: Long)
fun setSlot(field: IntegerSlotsEnum, subscript: Int, anInteger: Long)

Store the (signed 64-bit) integer in the eight bytes starting at the given field enum value.

fun setSlot(field: ObjectSlotsEnum, newValue: A_BasicObject)

Store the A_BasicObject in the specified object slot of the receiver.

fun setSlot(field: ObjectSlotsEnum, subscript: Int, anAvailObject: A_BasicObject)

Store the AvailObject in the specified slot of the receiver.

Link copied to clipboard
fun setSlotsFromArray(targetField: IntegerSlotsEnum, startTargetSubscript: Int, sourceArray: LongArray, zeroBasedStartSourceSubscript: Int, count: Int)

Read elements from consecutive slots of a LongArray, writing them to consecutive long slots of the receiver.

fun <T : A_BasicObject> setSlotsFromArray(targetField: ObjectSlotsEnum, startTargetSubscript: Int, sourceArray: Array<T>, zeroBasedStartSourceSubscript: Int, count: Int)

Read elements from consecutive slots of an array, writing them to consecutive slots of the receiver. It's the client's responsibility to ensure the values are suitably immutable or shared.

Link copied to clipboard
fun setSlotsFromList(field: ObjectSlotsEnum, startSubscript: Int, sourceList: List<A_BasicObject?>, zeroBasedStartSourceSubscript: Int, count: Int)

Write elements from the given List into consecutively numbered object slots. If the receiver is Mutability.SHARED, then the new value must also become shared (by the client) before it can be stored.

Link copied to clipboard
fun setSlotsFromLongSlots(targetField: IntegerSlotsEnum, startTargetSubscript: Int, sourceObject: A_BasicObject, sourceField: IntegerSlotsEnum, startSourceSubscript: Int, count: Int)

Read elements from consecutive integer slots of the sourceObject, writing them to consecutive slots of the receiver. It's the client's responsibility to ensure the values are suitably immutable or shared.

Link copied to clipboard
fun setSlotsFromObjectSlots(targetField: ObjectSlotsEnum, startTargetSubscript: Int, sourceObject: A_BasicObject, sourceField: ObjectSlotsEnum, startSourceSubscript: Int, count: Int)

Read elements from consecutive slots of the sourceObject, writing them to consecutive slots of the receiver. It's the client's responsibility to ensure the values are suitably immutable or shared.

Link copied to clipboard
fun setSlotsFromTuple(targetField: ObjectSlotsEnum, startTargetSubscript: Int, sourceTuple: A_Tuple, startSourceSubscript: Int, count: Int)

Read elements from consecutive slots of a tuple, writing them to consecutive slots of the receiver. It's the client's responsibility to ensure the values are suitably immutable or shared.

Set the chunk that implements this A_RawFunction, and the countdown to reoptimization by the L2Generator.

Link copied to clipboard

Set the record number under which this module's StylingRecord has been recorded.

Link copied to clipboard
fun A_Fiber.setSuccessAndFailure(onSuccess: (AvailObject) -> Unit, onFailure: (Throwable) -> Unit)

Set the success and failure actions of this fiber. The former runs if the fiber succeeds, passing the resulting AvailObject, and also stashing it in the fiber. The latter runs if the fiber fails, passing the Throwable that caused the failure.

Link copied to clipboard
open override fun setToInvalidDescriptor()

Replace my descriptor field with a FillerDescriptor. This blows up for most messages, catching incorrect (all, by definition) further accidental uses of this object.

Link copied to clipboard
Link copied to clipboard
fun A_Set.setUnionCanDestroy(otherSet: A_Set, canDestroy: Boolean): A_Set

Answer a set containing all the elements of this set and all the elements of the otherSet.

Link copied to clipboard

Helper method for transferring this object's longSlots into an L1InstructionDecoder. The receiver's descriptor must be a CompiledCodeDescriptor.

Link copied to clipboard
open override fun setValue(newValue: A_BasicObject)

Assign the given value to the VariableDescriptor. Fail if the value does not have a type suitable for the variable.

Link copied to clipboard
open override fun setValueNoCheck(newValue: A_BasicObject)

Assign the given value to the VariableDescriptor. The client should ensure that the value is acceptable for the variable.

Link copied to clipboard
open override fun setValueWasStablyComputed(wasStablyComputed: Boolean)

Set whether this write-once variable was initialized from an expression which is stable – always produces the same value (modulo loading of modules) and has no side-effects.

Link copied to clipboard
fun setVolatileSlot(field: ObjectSlotsEnum, anAvailObject: A_BasicObject)
fun setVolatileSlot(field: ObjectSlotsEnum, subscript: Int, anAvailObject: A_BasicObject)

Store the AvailObject in the specified slot of the receiver. Use volatile write semantics.

Link copied to clipboard
fun A_Set.setWithElementCanDestroy(newElementObject: A_BasicObject, canDestroy: Boolean): A_Set

Answer a set like this one but with newElementObject present. If it was already present in the original set then answer that. The set might be modified in place (and then returned) if canDestroy is true and the set is mutable.

Link copied to clipboard
fun A_Set.setWithoutElementCanDestroy(elementObjectToExclude: A_BasicObject, canDestroy: Boolean): A_Set

Answer a set like this one but with elementObjectToExclude absent. If it was already absent in the original set then answer that. The set might be modified in place (and then returned) if canDestroy is true and the set is mutable.

Link copied to clipboard
fun shortSlot(field: IntegerSlotsEnum, shortIndex: Int): Int

Extract a (16-bit unsigned) short at the given short-index of the receiver.

Link copied to clipboard
open override fun showValueInNameForDebugger(): Boolean

Answer whether to show value-specific content in the field name in the debugger.

Link copied to clipboard
fun slot(bitField: BitField): Int

Extract the value of the BitField of the receiver. Note that it's an Int even though the underlying longSlots array contains longs.

Extract the (signed 64-bit) integer for the given field enum value.

Extract the AvailObject from the specified object slot of the receiver.

fun slot(field: IntegerSlotsEnum, subscript: Int): Long

Extract the (signed 64-bit) integer at the given field enum value.

fun slot(field: ObjectSlotsEnum, subscript: Int): AvailObject

Extract the AvailObject at the specified slot of the receiver.

Link copied to clipboard
fun slotsIntoArray(sourceField: IntegerSlotsEnum, startSourceSubscript: Int, targetArray: LongArray, zeroBasedStartTargetSubscript: Int, count: Int)

Read consecutive long slots from the receiver, writing them into slots of a long array.

Link copied to clipboard
open override fun spliterator(): Spliterator<AvailObject>
Link copied to clipboard

Retrieve the stack element with the given offset. Do not adjust the mutability of the returned value.

Link copied to clipboard

Answer the current depth of the argument stack within this continuation. This is a one-based index into the continuation's frame. The stack pointer indexes the most recently pushed value. The stack grows downwards, and the empty stack is indicated by a pointer just beyond the frame data.

Link copied to clipboard
open override fun start(): Int

Answer this token's initial character position in the source file.

Link copied to clipboard
fun A_Phrase.statementsDo(continuation: (A_Phrase) -> Unit)

Iterate through each sequence recursively within the receiver, applying the action to each contained statement phrase.

Link copied to clipboard

Returns a sequential Stream with this tuple as its source.

Link copied to clipboard
open override fun string(): A_String

Answer this token's exact string representation as it appeared in the source code.

Link copied to clipboard

Get the module's StylingRecord, which is used for syntax coloring the module source. This may involve reading the repository.

Link copied to clipboard

Subtract the receiver from the given double, destroying one or the other if it's mutable and canDestroy is true. Because of the requirement that the argument be a double rather than an arbitrary A_Number, this is usually only used for double-dispatching.

Link copied to clipboard

Subtract the receiver from the given float, destroying one or the other if it's mutable and canDestroy is true. Because of the requirement that the argument be a float rather than an arbitrary A_Number, this is usually only used for double-dispatching.

Link copied to clipboard

Subtract the receiver from the infinity with the specified sign, destroying one or the other if it's mutable and canDestroy is true.

Link copied to clipboard

Subtract the receiver from the given integer, destroying one or the other if it's mutable and canDestroy is true.

Link copied to clipboard
inline fun <R> A_BasicObject.synchronizeIf(syncCondition: Boolean, body: A_BasicObject.() -> R): R

If the provided condition is true, synchronize with the receiver's monitor around the execution of the body function. Otherwise, run the body function without synchronization.

Link copied to clipboard

Create and answer a LexingState corresponding to the start of this token. It should not be used for subsequent parsing/lexing.

Link copied to clipboard

Remove the A_Tuple of post-load A_Function from this module, returning them. Replace the tuple with nil.

Link copied to clipboard

Atomically increment the total number of invocations of A_Functions based on this A_RawFunction.

Link copied to clipboard
fun A_Number.timesCanDestroy(aNumber: A_Number, canDestroy: Boolean): A_Number

Multiply the receiver and the argument aNumber and answer the result.

Link copied to clipboard

Answer the TokenDescriptor.TokenType of this token.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
Link copied to clipboard
fun A_Tuple.transferIntoByteBuffer(startIndex: Int, endIndex: Int, outputByteBuffer: ByteBuffer)

Transfer the specified subrange of this tuple of bytes into the provided ByteBuffer. There should be sufficient room to write the bytes.

Link copied to clipboard
open override fun traversed(): AvailObject

Follow indirections until a non-indirection is reached. Replace each indirection's target with the ultimate target.

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

Normalize the integer to have the minimum number of base 2^32 digits.

Link copied to clipboard
fun A_Type.trimType(typeToRemove: A_Type): A_Type

Answer a type that includes at least all values from the receiver that aren't also in the typeToRemove. Note that the answer can be conservatively large, and is typically just the receiver, even if the types overlap.

Link copied to clipboard

Dispatch to the descriptor.

open override fun truncateWithFillerForNewIntegerSlotsCount(newIntegerSlotsCount: Int)

Reduce the number of long slots occupied by this object. In a raw memory model we would split the object representation into two objects, one at the original address, and a separate filler object occupying the long slots that were chopped off.

Link copied to clipboard
open override fun truncateWithFillerForNewObjectSlotsCount(newObjectSlotsCount: Int)

Slice the current AvailObject into two objects, the left one (at the same starting address as the input), and the right one (a filler object that nobody should ever create a pointer to). The new Filler can have zero post-header slots (i.e., just the header), but the left object must not, since it may turn into an indirection some day and will require at least one slot for the target pointer.

Link copied to clipboard

Answer the specified element of the tuple.

Link copied to clipboard
fun A_Tuple.tupleAtPuttingCanDestroy(index: Int, newValueObject: A_BasicObject, canDestroy: Boolean): A_Tuple

Answer a new tuple like the receiver but with a single element replaced at the specified index. If the receiver is mutable and canDestroy is true, then the receiver may be modified or destroyed.

Link copied to clipboard

Answer the code point of the character at the given one-based index in this tuple. The tuple doesn't have to be a string, but the requested element must be a character.

Link copied to clipboard
fun A_Tuple.tupleElementsInRangeAreInstancesOf(startIndex: Int, endIndex: Int, type: A_Type): Boolean

Determine whether the specified elements of this tuple each conform to the specified type.

Link copied to clipboard
fun A_Tuple.tupleIntAt(index: Int): Int

Answer the specified element of the tuple. It must be an integer in the range [-2^31..2^31), and is returned as a Java int.

Link copied to clipboard

Answer the specified element of the tuple. It must be a Long in the range [-2^63..2^63), and is returned as a Kotlin Long.

Link copied to clipboard
fun A_Type.tupleOfTypesFromTo(startIndex: Int, endIndex: Int): A_Tuple

Dispatch to the descriptor.

Link copied to clipboard

Answer a tuple that has the receiver's elements but in reverse order.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard
Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard
fun A_Type.typeUnion(another: A_Type): A_Type

Dispatch to the descriptor.

Link copied to clipboard
Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard
Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard
Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard

Dispatch to the descriptor.

Link copied to clipboard
fun A_Type.unionOfTypesAtThrough(startIndex: Int, endIndex: Int): A_Type

Dispatch to the descriptor.

Link copied to clipboard

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.

Link copied to clipboard
fun updateSlot(bitField: BitField, updater: Int.() -> Int)

Extract the current Int value of the BitField, pass it to the supplied inline Kotlin function, and write the result back to the BitField. Note that this is not atomic, so other fields encoded in the same Long field may get clobbered if simultaneously updated by multiple threads.

fun updateSlot(field: IntegerSlotsEnum, updater: Long.() -> Long)

Extract the current value of the Long slot, pass it to the supplied inline Kotlin function, and write the resulting Long back to the slot.

Extract the current value of the slot, pass it to the supplied inline Kotlin function, and write the result back to the slot.

Link copied to clipboard

Extract the current value of the slot, pass it to the supplied inline Kotlin function, make it shared, and write the result back to the slot.

Link copied to clipboard
fun A_Method.updateStylers(updater: A_Set.() -> A_Set)

Atomically update this definition's set of stylers.

Link copied to clipboard

Validate this phrase without also visiting its subphrases.

Link copied to clipboard
open override fun validWriteReactorFunctions(): A_Set

Answer the set of write reactor FunctionDescriptor that have not previously activated.

Link copied to clipboard
open override fun value(): AvailObject

Extract the current value of the VariableDescriptor. Answer nil if the variable has no value.

Link copied to clipboard
open override fun valueWasStablyComputed(): Boolean

Answer whether this variable is both a write-once variable and initialized from an expression which is stable – always produces the same value (modulo loading of modules) and has no side-effects.

Link copied to clipboard

Answer the number of variable integer slots in this object. This does not include the fixed integer slots.

Link copied to clipboard
open override fun variableMapHasKey(key: A_BasicObject): Boolean

Test whether the map in this variable has the specified key.

Link copied to clipboard

Answer the number of variable object slots in this AvailObject. This does not include the fixed object slots.

Link copied to clipboard
fun volatileSlot(field: ObjectSlotsEnum, subscript: Int): AvailObject

Extract the AvailObject at the specified slot of the receiver. Use volatile semantics for the read.

Link copied to clipboard

Ensure the specified action is invoked with this fiber's reified continuation as soon as it's available. Note that this triggers an interrupt on the fiber to ensure a timely capture of the stack.

Link copied to clipboard
fun writeBackSlot(field: ObjectSlotsEnum, subscript: Int, anAvailObject: AvailObject)

Write an equivalent replacement object into an object field of this object. Since the replacement is semantically equivalent to the previous content, don't acquire a lock. Any necessary write barriers and other memory synchronizations are the responsibility of the caller.

Link copied to clipboard
open override fun writeSummaryTo(writer: JSONWriter)
Link copied to clipboard
open override fun writeTo(writer: JSONWriter)