blob: cbb3640dea4eb29e9bea8ed28c074950fad3ea41 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#ifndef YJIT_CODEGEN_H
#define YJIT_CODEGEN_H 1
#include "stddef.h"
#include "yjit_core.h"
// Code blocks we generate code into
extern codeblock_t *cb;
extern codeblock_t *ocb;
extern uint32_t yjit_codepage_frozen_bytes;
typedef enum codegen_status {
YJIT_END_BLOCK,
YJIT_KEEP_COMPILING,
YJIT_CANT_COMPILE
} codegen_status_t;
// Code generation function signature
typedef codegen_status_t (*codegen_fn)(jitstate_t *jit, ctx_t *ctx, codeblock_t *cb);
uint8_t *yjit_entry_prologue(codeblock_t *cb, const rb_iseq_t *iseq);
void yjit_gen_block(block_t *block, rb_execution_context_t *ec);
void yjit_init_codegen(void);
#endif // #ifndef YJIT_CODEGEN_H
|