Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
d4e49c9f
Commit
d4e49c9f
authored
Jun 25, 2014
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2422 from ksss/aspec-macro
OP_ENTER use MBR_ASPEC_* macros
parents
8548aebc
f092ef6b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
include/mruby/proc.h
include/mruby/proc.h
+1
-1
src/vm.c
src/vm.c
+7
-7
No files found.
include/mruby/proc.h
View file @
d4e49c9f
...
...
@@ -37,7 +37,7 @@ struct RProc {
/* aspec access */
#define MRB_ASPEC_REQ(a) (((a) >> 18) & 0x1f)
#define MRB_ASPEC_OPT(a) (((a) >> 13) & 0x1f)
#define MRB_ASPEC_REST(a) ((
a) & (1<<12)
)
#define MRB_ASPEC_REST(a) ((
(a) >> 12) & 0x1
)
#define MRB_ASPEC_POST(a) (((a) >> 7) & 0x1f)
#define MRB_ASPEC_KEY(a) (((a) >> 2) & 0x1f)
#define MRB_ASPEC_KDICT(a) ((a) & (1<<1))
...
...
src/vm.c
View file @
d4e49c9f
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment