C# Class FyreVM.Engine.Veneer

Provides hardcoded versions of some commonly used veneer routines (low-level functions that are automatically compiled into every Inform game).
Inform games rely heavily on these routines, and substituting our C# versions for the Glulx versions in the story file can increase performance significantly.
Show file Open project: ChicagoDave/Zifmia

Public Methods

Method Description
ImplementsFuncGlulx ( uint slot ) : bool

Tests whether a particular function is supported for acceleration, using the codes defined in the Glulx specification.

InterceptCall ( Engine e, uint address, uint args, uint &result ) : bool

Intercepts a routine call if its address has previously been registered.

SetSlotFyre ( uint slot, uint value ) : bool

Registers a routine address or constant value, using the traditional FyreVM slot codes.

SetSlotGlulx ( Engine e, bool isParam, uint slot, uint value ) : bool

Registers a routine address or constant value, using the acceleration codes defined in the Glulx specification.

Private Methods

Method Description
CP__Tab ( Engine e, uint obj, uint id ) : uint
Meta__class ( Engine e, uint obj ) : uint
OC__Cl ( Engine e, uint obj, uint cla ) : uint
OP__Pr ( Engine e, uint obj, uint id ) : uint
Parent ( Engine e, uint obj ) : uint
RA__Pr ( Engine e, uint obj, uint id ) : uint
RL__Pr ( Engine e, uint obj, uint id ) : uint
RT__ChLDB ( Engine e, uint array, uint offset ) : uint
RT__ChLDW ( Engine e, uint array, uint offset ) : uint
RT__ChSTW ( Engine e, uint array, uint offset, uint val ) : uint
RV__Pr ( Engine e, uint obj, uint id ) : uint
Veneer ( ) : System
Z__Region ( Engine e, uint address ) : uint

Method Details

ImplementsFuncGlulx() public method

Tests whether a particular function is supported for acceleration, using the codes defined in the Glulx specification.
public ImplementsFuncGlulx ( uint slot ) : bool
slot uint The routine index.
return bool

InterceptCall() public method

Intercepts a routine call if its address has previously been registered.
/// matches a registered veneer routine, but /// is too short for that routine. ///
public InterceptCall ( Engine e, uint address, uint args, uint &result ) : bool
e Engine The attempting to call the routine.
address uint The address of the routine.
args uint The routine's arguments.
result uint The routine's return value.
return bool

SetSlotFyre() public method

Registers a routine address or constant value, using the traditional FyreVM slot codes.
public SetSlotFyre ( uint slot, uint value ) : bool
slot uint Identifies the address or constant being registered.
value uint The address of the routine or value of the constant.
return bool

SetSlotGlulx() public method

Registers a routine address or constant value, using the acceleration codes defined in the Glulx specification.
public SetSlotGlulx ( Engine e, bool isParam, uint slot, uint value ) : bool
e Engine The for which the value is being set.
isParam bool to set a constant value; /// false to set a routine address.
slot uint The routine or constant index to set.
value uint The address of the routine or value of the constant.
return bool