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
2249551c
Commit
2249551c
authored
Aug 10, 2017
by
Christopher Aue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed calling missing method through super with 126 args
parent
ac42ccc1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
30 deletions
+25
-30
src/vm.c
src/vm.c
+25
-30
No files found.
src/vm.c
View file @
2249551c
...
...
@@ -1379,9 +1379,7 @@ RETRY_TRY_BLOCK:
c
=
mrb_class
(
mrb
,
recv
);
m
=
mrb_method_search_vm
(
mrb
,
&
c
,
mid
);
if
(
!
m
)
{
mrb_value
sym
=
mrb_symbol_value
(
mid
);
mrb_sym
missing
=
mrb_intern_lit
(
mrb
,
"method_missing"
);
m
=
mrb_method_search_vm
(
mrb
,
&
c
,
missing
);
if
(
!
m
)
{
mrb_value
args
;
...
...
@@ -1404,7 +1402,7 @@ RETRY_TRY_BLOCK:
regs
[
a
+
2
]
=
blk
;
n
=
CALL_MAXARGS
;
}
mrb_ary_unshift
(
mrb
,
regs
[
a
+
1
],
sym
);
mrb_ary_unshift
(
mrb
,
regs
[
a
+
1
],
mrb_symbol_value
(
mid
)
);
}
/* push callinfo */
...
...
@@ -1579,6 +1577,23 @@ RETRY_TRY_BLOCK:
goto
L_RAISE
;
}
recv
=
regs
[
0
];
if
(
n
==
CALL_MAXARGS
)
{
bidx
=
a
+
2
;
}
else
{
bidx
=
a
+
n
+
1
;
}
blk
=
regs
[
bidx
];
if
(
!
mrb_nil_p
(
blk
)
&&
mrb_type
(
blk
)
!=
MRB_TT_PROC
)
{
mrb_value
result
;
if
(
bidx
>=
ci
->
nregs
)
{
stack_extend
(
mrb
,
bidx
+
1
);
ci
->
nregs
=
bidx
+
1
;
}
result
=
mrb_convert_type
(
mrb
,
blk
,
MRB_TT_PROC
,
"Proc"
,
"to_proc"
);
regs
[
bidx
]
=
result
;
}
c
=
mrb
->
c
->
ci
->
target_class
->
super
;
m
=
mrb_method_search_vm
(
mrb
,
&
c
,
mid
);
if
(
!
m
)
{
...
...
@@ -1597,35 +1612,15 @@ RETRY_TRY_BLOCK:
mrb_method_missing
(
mrb
,
mid
,
recv
,
args
);
}
mid
=
missing
;
if
(
n
==
CALL_MAXARGS
-
1
)
{
if
(
n
!=
CALL_MAXARGS
)
{
if
(
a
+
2
>=
ci
->
nregs
)
{
stack_extend
(
mrb
,
a
+
3
);
}
regs
[
a
+
1
]
=
mrb_ary_new_from_values
(
mrb
,
n
,
regs
+
a
+
1
);
n
++
;
}
if
(
n
==
CALL_MAXARGS
)
{
mrb_ary_unshift
(
mrb
,
regs
[
a
+
1
],
mrb_symbol_value
(
ci
->
mid
));
}
else
{
value_move
(
regs
+
a
+
2
,
regs
+
a
+
1
,
++
n
);
SET_SYM_VALUE
(
regs
[
a
+
1
],
ci
->
mid
);
}
}
if
(
n
==
CALL_MAXARGS
)
{
bidx
=
a
+
2
;
}
else
{
bidx
=
a
+
n
+
1
;
}
blk
=
regs
[
bidx
];
if
(
!
mrb_nil_p
(
blk
)
&&
mrb_type
(
blk
)
!=
MRB_TT_PROC
)
{
mrb_value
result
;
if
(
bidx
>=
ci
->
nregs
)
{
stack_extend
(
mrb
,
bidx
+
1
);
ci
->
nregs
=
bidx
+
1
;
regs
[
a
+
2
]
=
blk
;
n
=
CALL_MAXARGS
;
}
result
=
mrb_convert_type
(
mrb
,
blk
,
MRB_TT_PROC
,
"Proc"
,
"to_proc"
);
regs
[
bidx
]
=
result
;
mrb_ary_unshift
(
mrb
,
regs
[
a
+
1
],
mrb_symbol_value
(
ci
->
mid
));
}
/* push callinfo */
...
...
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