Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
f17e6634
Commit
f17e6634
authored
Jul 23, 2015
by
Damien George
Browse files
py: Issue an error when compiling Viper functions with more than 4 args.
Otherwise it can be very hard to track down bugs.
parent
e45c1dbd
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/emitnative.c
View file @
f17e6634
...
...
@@ -675,6 +675,12 @@ STATIC void emit_native_start_pass(emit_t *emit, pass_kind_t pass, scope_t *scop
if
(
emit
->
do_viper_types
)
{
// right now we have a restriction of maximum of 4 arguments
if
(
scope
->
num_pos_args
>=
5
)
{
EMIT_NATIVE_VIPER_TYPE_ERROR
(
emit
,
"Viper functions don't currently support more than 4 arguments (while compiling '%q')"
,
scope
->
simple_name
);
return
;
return
;
}
// entry to function
int
num_locals
=
0
;
if
(
pass
>
MP_PASS_SCOPE
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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