The document discusses asynchronous programming using generators and fibers. It shows how to define generators that yield values, consume and produce items in a queue asynchronously, and execute asynchronous tasks using the await keyword. Fibers are lightweight threads that can suspend execution and are scheduled concurrently using a scheduler. Exceptions must be caught and propagated properly when using fibers.
22. public final void pushMethod(int entry, int numSlots) {
pushed = true;
int idx = sp - FRAME_RECORD_SIZE;
long record = dataLong[idx];
record = setEntry(record, entry);
record = setNumSlots(record, numSlots);
dataLong[idx] = record;
int nextMethodIdx = sp + numSlots;
int nextMethodSP = nextMethodIdx + FRAME_RECORD_SIZE;
if (nextMethodSP > dataObject.length)
growStack(nextMethodSP);
// clear next method's frame record
dataLong[nextMethodIdx] = 0L;
}