NAME ^

classes/scratchpad.pmc - Lexical Scratchpad

DESCRIPTION ^

These are the vtable functions for the Scratchpad PMC.

A ScratchPad PMC is a FixedPMCArray of OrderedHashes. It is used in the implementation of the opcodes in ops/var.ops.

Methods ^

PMC *get_pmc_keyed(PMC *key)

Get a lexical variable. The key types are expected to match one of the following:

[STRING]

A lexical name.

[INT]

A lexical position in the current scope.

[INT;STRING]

A scope, and a lexical name.

[INT;INT]

A scope, and a lexical position in that scope.

void set_pmc_keyed(PMC *key, PMC *value)

Store a value as a lexical variable. The same key types that get_pmc_keyed() supports are supported here.

void delete_keyed(PMC *key)

Deletes the lexical variable for *key.

SEE ALSO ^

ops/var.ops src/lexical.c


parrot