summaryrefslogtreecommitdiffhomepage
path: root/src/vm.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2014-06-25 23:36:04 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2014-06-25 23:36:04 +0900
commit729a760f911955591fed6d8bd2d19f8d3db2b048 (patch)
tree9e8eed3bc9e18e8f383e5cf53f8dc73ccd56a743 /src/vm.c
parent9dab02224d5ad271ee89e6d7dba4d9cd6a3ce7c5 (diff)
parentc19f5efaaf1b8b8156d2fb6f1daafbcc1270ebc9 (diff)
downloadmruby-729a760f911955591fed6d8bd2d19f8d3db2b048.tar.gz
mruby-729a760f911955591fed6d8bd2d19f8d3db2b048.zip
Merge branch 'master' of github.com:mruby/mruby
Diffstat (limited to 'src/vm.c')
-rw-r--r--src/vm.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/vm.c b/src/vm.c
index 9a0f03aba..d1d4b7bd4 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -1364,14 +1364,14 @@ RETRY_TRY_BLOCK:
/* Ax arg setup according to flags (23=5:5:1:5:5:1:1) */
/* number of optional arguments times OP_JMP should follow */
mrb_aspec ax = GETARG_Ax(i);
- int m1 = (ax>>18)&0x1f;
- int o = (ax>>13)&0x1f;
- int r = (ax>>12)&0x1;
- int m2 = (ax>>7)&0x1f;
+ int m1 = MRB_ASPEC_REQ(ax);
+ int o = MRB_ASPEC_OPT(ax);
+ int r = MRB_ASPEC_REST(ax);
+ int m2 = MRB_ASPEC_POST(ax);
/* unused
- int k = (ax>>2)&0x1f;
- int kd = (ax>>1)&0x1;
- int b = (ax>>0)& 0x1;
+ int k = MRB_ASPEC_KEY(ax);
+ int kd = MRB_ASPEC_KDICT(ax);
+ int b = MRB_ASPEC_BLOCK(ax);
*/
int argc = mrb->c->ci->argc;
mrb_value *argv = regs+1;