#include <iostream>
#include <cassert>
#include "chunk.h"
Go to the source code of this file.
|
unsigned | simpleInstruction (const char *name, unsigned index) |
|
unsigned | jumpInstruction (const char *name, int sign, unsigned index, uint8_t jumpa, uint8_t jumpb) |
|
unsigned | constantInstruction (const char *name, unsigned index, uint8_t constant, const uscript::Value &value) |
|
unsigned | byteInstruction (const char *name, unsigned index, uint8_t slot) |
|
unsigned byteInstruction |
( |
const char * |
name, |
|
|
unsigned |
index, |
|
|
uint8_t |
slot |
|
) |
| |
Definition at line 42 of file chunk.cc.
BEGIN_PROLOG could also be cout
unsigned constantInstruction |
( |
const char * |
name, |
|
|
unsigned |
index, |
|
|
uint8_t |
constant, |
|
|
const uscript::Value & |
value |
|
) |
| |
Definition at line 35 of file chunk.cc.
BEGIN_PROLOG could also be cout
unsigned jumpInstruction |
( |
const char * |
name, |
|
|
int |
sign, |
|
|
unsigned |
index, |
|
|
uint8_t |
jumpa, |
|
|
uint8_t |
jumpb |
|
) |
| |
Definition at line 27 of file chunk.cc.
28 uint16_t jump = ((uint16_t)jumpa) << 8;
31 std::cout <<
name <<
" " << index <<
" " << (index + 3 +
sign * jump) << std::endl;
BEGIN_PROLOG could also be cout
unsigned simpleInstruction |
( |
const char * |
name, |
|
|
unsigned |
index |
|
) |
| |
Definition at line 22 of file chunk.cc.
BEGIN_PROLOG could also be cout