Difference between revisions of "Yhc/RTS/Bytecodes"
Jump to navigation
Jump to search
David Wahler (talk | contribs) m (fixed broken link) |
Tomjaguarpaw (talk | contribs) (Deleting page that hasn't been updated for over 10 years) |
||
Line 1: | Line 1: | ||
− | {{Yhc}} |
||
− | |||
− | The Yhc runtime is a stack-based spineless G-Machine (See [[Yhc/RTS/Machine]]). This page details the instruction set that the machine uses. |
||
− | |||
− | A more up to date page is at http://www-users.cs.york.ac.uk/~ndm/yhc/bytecodes.html, which is automatially generated from the bytecode.xml file. |
||
− | |||
− | Instructions have 'variants', which are different specializations of the instruction: For example if the general instruction is PUSH n then |
||
− | |||
− | * PUSH_n is a specialized 1 byte instruction of PUSH n |
||
− | * PUSH_P1 n is a 2 byte instruction of PUSH n |
||
− | * PUSH_P2 n is a 3 byte instruction of PUSH n |
||
− | |||
− | Some instructions don't have three byte versions. Here 'PUSH n' refers to the two byte version, or the general 'PUSH n' instruction, depending on context. |
||
− | |||
− | The compiler will choose the smallest available bytecodes to encode any particular instruction. |