diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-06-25 15:05:37 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-06-25 15:05:37 +0900 |
| commit | d4e49c9f8fe752e8f7d3d6b9dc10a55307654dfd (patch) | |
| tree | f24db700416f2390fe3804742760d3c7dbb12abf /src | |
| parent | 8548aebcfafa01001f99b591bc3454188b78ca96 (diff) | |
| parent | f092ef6b141d0817bd76af9d9187e73029d3001b (diff) | |
| download | mruby-d4e49c9f8fe752e8f7d3d6b9dc10a55307654dfd.tar.gz mruby-d4e49c9f8fe752e8f7d3d6b9dc10a55307654dfd.zip | |
Merge pull request #2422 from ksss/aspec-macro
OP_ENTER use MBR_ASPEC_* macros
Diffstat (limited to 'src')
| -rw-r--r-- | src/vm.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -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; |
