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
eb14c15e
Commit
eb14c15e
authored
Feb 18, 2013
by
Yukihiro Matz Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename hook and macro
parent
66a7b04b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
include/mruby.h
include/mruby.h
+1
-1
src/vm.c
src/vm.c
+5
-5
No files found.
include/mruby.h
View file @
eb14c15e
...
...
@@ -134,7 +134,7 @@ typedef struct mrb_state {
#endif
#ifdef ENABLE_DEBUG
void
(
*
hook_vm_fetch_code
)(
struct
mrb_state
*
mrb
,
struct
mrb_irep
*
irep
,
mrb_code
*
pc
,
mrb_value
*
regs
);
void
(
*
code_fetch_hook
)(
struct
mrb_state
*
mrb
,
struct
mrb_irep
*
irep
,
mrb_code
*
pc
,
mrb_value
*
regs
);
#endif
struct
RClass
*
eException_class
;
...
...
src/vm.c
View file @
eb14c15e
...
...
@@ -481,9 +481,9 @@ argnum_error(mrb_state *mrb, int num)
}
#ifdef ENABLE_DEBUG
#define
HOOK_MRB_VM_FETCH_CODE(mrb, irep, pc, regs) ((mrb)->hook_vm_fetch_code ? (mrb)->hook_vm_fetch_code
((mrb), (irep), (pc), (regs)) : NULL)
#define
CODE_FETCH_HOOK(mrb, irep, pc, regs) ((mrb)->code_fetch_hook ? (mrb)->code_fetch_hook
((mrb), (irep), (pc), (regs)) : NULL)
#else
#define
HOOK_MRB_VM_FETCH_CODE
(mrb, irep, pc, regs)
#define
CODE_FETCH_HOOK
(mrb, irep, pc, regs)
#endif
#ifdef __GNUC__
...
...
@@ -492,7 +492,7 @@ argnum_error(mrb_state *mrb, int num)
#ifndef DIRECT_THREADED
#define INIT_DISPATCH for (;;) { i = *pc;
HOOK_MRB_VM_FETCH_CODE
(mrb, irep, pc, regs); switch (GET_OPCODE(i)) {
#define INIT_DISPATCH for (;;) { i = *pc;
CODE_FETCH_HOOK
(mrb, irep, pc, regs); switch (GET_OPCODE(i)) {
#define CASE(op) case op:
#define NEXT pc++; break
#define JUMP break
...
...
@@ -502,8 +502,8 @@ argnum_error(mrb_state *mrb, int num)
#define INIT_DISPATCH JUMP; return mrb_nil_value();
#define CASE(op) L_ ## op:
#define NEXT i=*++pc;
HOOK_MRB_VM_FETCH_CODE
(mrb, irep, pc, regs); goto *optable[GET_OPCODE(i)]
#define JUMP i=*pc;
HOOK_MRB_VM_FETCH_CODE
(mrb, irep, pc, regs); goto *optable[GET_OPCODE(i)]
#define NEXT i=*++pc;
CODE_FETCH_HOOK
(mrb, irep, pc, regs); goto *optable[GET_OPCODE(i)]
#define JUMP i=*pc;
CODE_FETCH_HOOK
(mrb, irep, pc, regs); goto *optable[GET_OPCODE(i)]
#define END_DISPATCH
...
...
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