mirror of
https://github.com/ruby/ruby.git
synced 2025-09-23 04:24:04 +02:00
Split out context object into jitstate_t and ctx_t
This commit is contained in:
parent
5e39d83fbd
commit
df16bf97ec
5 changed files with 111 additions and 114 deletions
|
@ -7,8 +7,25 @@
|
|||
codeblock_t* cb;
|
||||
codeblock_t* ocb;
|
||||
|
||||
// Code generation state
|
||||
typedef struct JITState
|
||||
{
|
||||
// Instruction sequence this is associated with
|
||||
const rb_iseq_t *iseq;
|
||||
|
||||
// Index in the iseq of the opcode we are replacing
|
||||
uint32_t start_idx;
|
||||
|
||||
// Index of the current instruction being compiled
|
||||
uint32_t insn_idx;
|
||||
|
||||
// Current PC
|
||||
VALUE *pc;
|
||||
|
||||
} jitstate_t;
|
||||
|
||||
// Code generation function signature
|
||||
typedef bool (*codegen_fn)(codeblock_t* cb, codeblock_t* ocb, ctx_t* ctx);
|
||||
typedef bool (*codegen_fn)(jitstate_t* jit, ctx_t* ctx);
|
||||
|
||||
uint8_t* ujit_compile_entry(const rb_iseq_t *iseq, uint32_t insn_idx);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue