Commit 8d977981 authored by Yukihiro Matsumoto's avatar Yukihiro Matsumoto

no memory copy for call_iseq

parent 70abbb42
......@@ -9,6 +9,10 @@
#include "mruby/class.h"
#include "opcode.h"
static mrb_code call_iseq[] = {
MKOP_A(OP_CALL, 0),
};
struct RProc *
mrb_proc_new(mrb_state *mrb, mrb_irep *irep)
{
......@@ -144,14 +148,13 @@ void
mrb_init_proc(mrb_state *mrb)
{
struct RProc *m;
mrb_code *call_iseq = (mrb_code *)mrb_alloca(mrb, sizeof(mrb_code));
mrb_irep *call_irep = (mrb_irep *)mrb_alloca(mrb, sizeof(mrb_irep));
if ( call_iseq == NULL || call_irep == NULL )
return;
memset(call_irep, 0, sizeof(mrb_irep));
*call_iseq = MKOP_A(OP_CALL, 0);
call_irep->flags = MRB_ISEQ_NO_FREE;
call_irep->idx = -1;
call_irep->iseq = call_iseq;
call_irep->ilen = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment