22 lines
558 B
C
22 lines
558 B
C
|
|
#include "apfl.h"
|
||
|
|
|
||
|
|
#include "context.h"
|
||
|
|
|
||
|
|
void
|
||
|
|
apfl_build_native_and_bytecode_combined_module(
|
||
|
|
apfl_ctx ctx,
|
||
|
|
apfl_stackidx native,
|
||
|
|
struct apfl_string_view bytecode
|
||
|
|
) {
|
||
|
|
apfl_move_to_top_of_stack(ctx, native);
|
||
|
|
|
||
|
|
struct apfl_io_string_reader_data reader = apfl_io_string_reader_create(bytecode);
|
||
|
|
struct apfl_io_reader r = apfl_io_string_reader(&reader);
|
||
|
|
apfl_load_bytecode(ctx, r);
|
||
|
|
apfl_list_create(ctx, 0);
|
||
|
|
apfl_call(ctx, -2, -1);
|
||
|
|
apfl_list_create(ctx, 1);
|
||
|
|
apfl_list_append(ctx, -1, -3);
|
||
|
|
apfl_call(ctx, -2, -1);
|
||
|
|
}
|