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
cb89e1f0
Unverified
Commit
cb89e1f0
authored
Aug 08, 2020
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust PR #5060 to the latest `mruby3` branch.
parent
6bc58571
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
4 deletions
+7
-4
src/array.c
src/array.c
+1
-0
src/class.c
src/class.c
+1
-1
src/dump.c
src/dump.c
+3
-2
src/proc.c
src/proc.c
+1
-0
src/vm.c
src/vm.c
+1
-1
No files found.
src/array.c
View file @
cb89e1f0
...
@@ -1315,6 +1315,7 @@ static const mrb_sym each_syms[] = {
...
@@ -1315,6 +1315,7 @@ static const mrb_sym each_syms[] = {
static
const
mrb_irep
each_irep
=
{
static
const
mrb_irep
each_irep
=
{
3
,
/* nlocals */
3
,
/* nlocals */
7
,
/* nregs */
7
,
/* nregs */
0
,
/* clen */
MRB_ISEQ_NO_FREE
|
MRB_IREP_NO_FREE
,
/* flags */
MRB_ISEQ_NO_FREE
|
MRB_IREP_NO_FREE
,
/* flags */
each_iseq
,
/* iseq */
each_iseq
,
/* iseq */
NULL
,
/* pool */
NULL
,
/* pool */
...
...
src/class.c
View file @
cb89e1f0
...
@@ -2287,7 +2287,7 @@ static const mrb_code new_iseq[] = {
...
@@ -2287,7 +2287,7 @@ static const mrb_code new_iseq[] = {
const
mrb_sym
new_syms
[]
=
{
MRB_SYM
(
allocate
),
MRB_SYM
(
initialize
)
};
const
mrb_sym
new_syms
[]
=
{
MRB_SYM
(
allocate
),
MRB_SYM
(
initialize
)
};
static
const
mrb_irep
new_irep
=
{
static
const
mrb_irep
new_irep
=
{
3
,
6
,
MRB_IREP_STATIC
,
3
,
6
,
0
,
MRB_IREP_STATIC
,
new_iseq
,
NULL
,
new_syms
,
NULL
,
NULL
,
NULL
,
new_iseq
,
NULL
,
new_syms
,
NULL
,
NULL
,
NULL
,
sizeof
(
new_iseq
),
0
,
2
,
0
,
0
,
sizeof
(
new_iseq
),
0
,
2
,
0
,
0
,
};
};
...
...
src/dump.c
View file @
cb89e1f0
...
@@ -291,6 +291,7 @@ write_catch_table_block(mrb_state *mrb, const mrb_irep *irep, uint8_t *buf)
...
@@ -291,6 +291,7 @@ write_catch_table_block(mrb_state *mrb, const mrb_irep *irep, uint8_t *buf)
const
struct
mrb_irep_catch_hander
*
e
=
mrb_irep_catch_handler_table
(
irep
);
const
struct
mrb_irep_catch_hander
*
e
=
mrb_irep_catch_handler_table
(
irep
);
mrb_static_assert1
(
sizeof
(
*
e
)
==
7
);
mrb_static_assert1
(
sizeof
(
*
e
)
==
7
);
if
(
e
==
NULL
)
return
0
;
/* irep->clen has already been written before iseq block */
/* irep->clen has already been written before iseq block */
memcpy
(
cur
,
(
const
void
*
)
e
,
sizeof
(
*
e
)
*
irep
->
clen
);
memcpy
(
cur
,
(
const
void
*
)
e
,
sizeof
(
*
e
)
*
irep
->
clen
);
cur
+=
sizeof
(
*
e
)
*
irep
->
clen
;
cur
+=
sizeof
(
*
e
)
*
irep
->
clen
;
...
@@ -1058,7 +1059,7 @@ dump_irep_struct(mrb_state *mrb, const mrb_irep *irep, uint8_t flags, FILE *fp,
...
@@ -1058,7 +1059,7 @@ dump_irep_struct(mrb_state *mrb, const mrb_irep *irep, uint8_t flags, FILE *fp,
fputs
(
"};
\n
"
,
fp
);
fputs
(
"};
\n
"
,
fp
);
}
}
/* dump iseq */
/* dump iseq */
len
=
irep
->
ilen
;
len
=
irep
->
ilen
+
sizeof
(
struct
mrb_irep_catch_handler
)
*
irep
->
clen
;
fprintf
(
fp
,
"static const mrb_code %s_iseq_%d[%d] = {"
,
name
,
n
,
len
);
fprintf
(
fp
,
"static const mrb_code %s_iseq_%d[%d] = {"
,
name
,
n
,
len
);
for
(
i
=
0
;
i
<
len
;
i
++
)
{
for
(
i
=
0
;
i
<
len
;
i
++
)
{
if
(
i
%
20
==
0
)
fputs
(
"
\n
"
,
fp
);
if
(
i
%
20
==
0
)
fputs
(
"
\n
"
,
fp
);
...
@@ -1076,7 +1077,7 @@ dump_irep_struct(mrb_state *mrb, const mrb_irep *irep, uint8_t flags, FILE *fp,
...
@@ -1076,7 +1077,7 @@ dump_irep_struct(mrb_state *mrb, const mrb_irep *irep, uint8_t flags, FILE *fp,
}
}
/* dump irep */
/* dump irep */
fprintf
(
fp
,
"static const mrb_irep %s_irep_%d = {
\n
"
,
name
,
n
);
fprintf
(
fp
,
"static const mrb_irep %s_irep_%d = {
\n
"
,
name
,
n
);
fprintf
(
fp
,
" %d,%d,
\n
"
,
irep
->
nlocals
,
irep
->
nregs
);
fprintf
(
fp
,
" %d,%d,
%d,
\n
"
,
irep
->
nlocals
,
irep
->
nregs
,
irep
->
clen
);
fprintf
(
fp
,
" MRB_IREP_STATIC,%s_iseq_%d,
\n
"
,
name
,
n
);
fprintf
(
fp
,
" MRB_IREP_STATIC,%s_iseq_%d,
\n
"
,
name
,
n
);
if
(
irep
->
pool
)
{
if
(
irep
->
pool
)
{
fprintf
(
fp
,
" %s_pool_%d,"
,
name
,
n
);
fprintf
(
fp
,
" %s_pool_%d,"
,
name
,
n
);
...
...
src/proc.c
View file @
cb89e1f0
...
@@ -17,6 +17,7 @@ static const mrb_code call_iseq[] = {
...
@@ -17,6 +17,7 @@ static const mrb_code call_iseq[] = {
static
const
mrb_irep
call_irep
=
{
static
const
mrb_irep
call_irep
=
{
0
,
/* nlocals */
0
,
/* nlocals */
2
,
/* nregs */
2
,
/* nregs */
0
,
/* clen */
MRB_ISEQ_NO_FREE
|
MRB_IREP_NO_FREE
,
/* flags */
MRB_ISEQ_NO_FREE
|
MRB_IREP_NO_FREE
,
/* flags */
call_iseq
,
/* iseq */
call_iseq
,
/* iseq */
NULL
,
/* pool */
NULL
,
/* pool */
...
...
src/vm.c
View file @
cb89e1f0
...
@@ -875,7 +875,7 @@ break_tag_p(struct RBreak *brk, uint32_t tag)
...
@@ -875,7 +875,7 @@ break_tag_p(struct RBreak *brk, uint32_t tag)
}
}
static
void
static
void
prepare_tagged_break
(
mrb_state
*
mrb
,
uint32_t
tag
,
struct
RProc
*
proc
,
mrb_value
val
)
prepare_tagged_break
(
mrb_state
*
mrb
,
uint32_t
tag
,
const
struct
RProc
*
proc
,
mrb_value
val
)
{
{
if
(
break_tag_p
((
struct
RBreak
*
)
mrb
->
exc
,
tag
))
{
if
(
break_tag_p
((
struct
RBreak
*
)
mrb
->
exc
,
tag
))
{
mrb_break_tag_set
((
struct
RBreak
*
)
mrb
->
exc
,
tag
);
mrb_break_tag_set
((
struct
RBreak
*
)
mrb
->
exc
,
tag
);
...
...
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