decodeConsole()
Function in Console
Decode a console buffer the host copied back into the events the CPU sink would receive.
import { decodeConsole } from 'typeshade'
The signature, the description and the examples come from the compiler's own source at commit 26de7be8.
Syntax
function decodeConsole( buffer: Uint32Array, log: ConsoleLog,): { events: ConsoleEvent[]; dropped: number }Parameters
bufferUint32ArraylogConsoleLog
Return value
{ events: ConsoleEvent[]; dropped: number }
Description
buffer is the whole storage buffer as u32 words: the cursor, the dropped count, then the
entries. The events come back in the order the CPU tier runs a dispatch in, by invocation
(z, then y, then x) and, within one invocation, in the order the calls ran; each carries its
invocation. dropped counts the calls that did not fit the buffer.
Source
src/core/console.ts, line 166, at commit 26de7be8