jscript: Keep a pointer to the bytecode in function_code_t.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com> Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a79bde8591
commit
c70c10564a
|
@ -2279,6 +2279,7 @@ static HRESULT compile_function(compiler_ctx_t *ctx, source_elements_t *source,
|
|||
|
||||
TRACE("\n");
|
||||
|
||||
func->bytecode = ctx->code;
|
||||
ctx->func_head = ctx->func_tail = NULL;
|
||||
ctx->from_eval = from_eval;
|
||||
ctx->func = func;
|
||||
|
|
|
@ -103,6 +103,8 @@ OP_LIST
|
|||
OP_LAST
|
||||
} jsop_t;
|
||||
|
||||
typedef struct _bytecode_t bytecode_t;
|
||||
|
||||
typedef union {
|
||||
BSTR bstr;
|
||||
LONG lng;
|
||||
|
@ -163,11 +165,13 @@ typedef struct _function_code_t {
|
|||
|
||||
unsigned locals_cnt;
|
||||
local_ref_t *locals;
|
||||
|
||||
bytecode_t *bytecode;
|
||||
} function_code_t;
|
||||
|
||||
local_ref_t *lookup_local(const function_code_t*,const WCHAR*) DECLSPEC_HIDDEN;
|
||||
|
||||
typedef struct _bytecode_t {
|
||||
struct _bytecode_t {
|
||||
LONG ref;
|
||||
BOOL is_persistent;
|
||||
|
||||
|
@ -187,7 +191,7 @@ typedef struct _bytecode_t {
|
|||
unsigned str_cnt;
|
||||
|
||||
struct list entry;
|
||||
} bytecode_t;
|
||||
};
|
||||
|
||||
HRESULT compile_script(script_ctx_t*,const WCHAR*,const WCHAR*,const WCHAR*,BOOL,BOOL,bytecode_t**) DECLSPEC_HIDDEN;
|
||||
void release_bytecode(bytecode_t*) DECLSPEC_HIDDEN;
|
||||
|
|
Loading…
Reference in New Issue