NAME

Parrot::OpTrans::CSwitch - C Switch Transform

DESCRIPTION

Parrot::OpTrans::CSwitch inherits from Parrot::OpTrans::CPrederef to provide a mixture of predereferenced register addressing and a switched run loop.

Instance Methods

core_type()

The core type is PARROT_SWITCH_CORE.

core_prefix()

The prefix is 'switch_'.

suffix()

The suffix is '_switch'.

defines()

Returns the C #define macros required by the ops.

goto_address($address)

Transforms the goto ADDRESS($address) macro in an ops file into the relevant C code.

goto_offset($offset)

Transforms the goto OFFSET($offset) macro in an ops file into the relevant C code.

goto_pop()

Transforms the goto POP() macro in an ops file into the relevant C code.

run_core_func_decl($core)

Returns the C code for the run core function declaration.

run_core_func_start()

Returns the C code prior to the run core function.

run_core_split($base)

If defined return code to split e.g. a switch.

run_core_finish($base)

Returns the C code following the run core function.

SEE ALSO

Parrot::OpTrans
Parrot::OpTrans::C
Parrot::OpTrans::CGP
Parrot::OpTrans::CGoto
Parrot::OpTrans::CPrederef
Parrot::OpTrans::Compiled