summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/codedump.c9
-rw-r--r--src/vm.c18
2 files changed, 26 insertions, 1 deletions
diff --git a/src/codedump.c b/src/codedump.c
index 3a7b34354..f382bb7eb 100644
--- a/src/codedump.c
+++ b/src/codedump.c
@@ -371,6 +371,15 @@ codedump(mrb_state *mrb, const mrb_irep *irep)
CASE(OP_METHOD, BB);
printf("OP_METHOD\tR%d\tI(%d:%p)\n", a, b, (void*)irep->reps[b]);
break;
+ CASE(OP_LAMBDA16, BS);
+ printf("OP_LAMBDA\tR%d\tI(%d:%p)\n", a, b, (void*)irep->reps[b]);
+ break;
+ CASE(OP_BLOCK16, BS);
+ printf("OP_BLOCK\tR%d\tI(%d:%p)\n", a, b, (void*)irep->reps[b]);
+ break;
+ CASE(OP_METHOD16, BS);
+ printf("OP_METHOD\tR%d\tI(%d:%p)\n", a, b, (void*)irep->reps[b]);
+ break;
CASE(OP_RANGE_INC, B);
printf("OP_RANGE_INC\tR%d\n", a);
break;
diff --git a/src/vm.c b/src/vm.c
index b2fc075c8..f8b74034e 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -2644,6 +2644,18 @@ RETRY_TRY_BLOCK:
c = OP_L_METHOD;
goto L_MAKE_LAMBDA;
}
+ CASE(OP_LAMBDA16, BS) {
+ c = OP_L_LAMBDA;
+ goto L_MAKE_LAMBDA;
+ }
+ CASE(OP_BLOCK16, BS) {
+ c = OP_L_BLOCK;
+ goto L_MAKE_LAMBDA;
+ }
+ CASE(OP_METHOD16, BS) {
+ c = OP_L_METHOD;
+ goto L_MAKE_LAMBDA;
+ }
CASE(OP_RANGE_INC, B) {
mrb_value val = mrb_range_new(mrb, regs[a], regs[a+1], FALSE);
@@ -2699,7 +2711,11 @@ RETRY_TRY_BLOCK:
NEXT;
}
- CASE(OP_EXEC, BB) {
+ CASE(OP_EXEC16, BS)
+ goto L_EXEC;
+ CASE(OP_EXEC, BB)
+ L_EXEC:
+ {
mrb_value recv = regs[a];
struct RProc *p;
const mrb_irep *nirep = irep->reps[b];