Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
9598f36a
Commit
9598f36a
authored
Feb 15, 2016
by
Damien George
Browse files
py/emitnative: Add check that RHS of viper store is of integral type.
parent
94e4bd45
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/emitnative.c
View file @
9598f36a
...
...
@@ -1698,6 +1698,10 @@ STATIC void emit_native_store_subscr(emit_t *emit) {
#else
emit_pre_pop_reg_flexible
(
emit
,
&
vtype_value
,
&
reg_value
,
reg_base
,
reg_index
);
#endif
if
(
vtype_value
!=
VTYPE_BOOL
&&
vtype_value
!=
VTYPE_INT
&&
vtype_value
!=
VTYPE_UINT
)
{
EMIT_NATIVE_VIPER_TYPE_ERROR
(
emit
,
"can't store '%q'"
,
vtype_to_qstr
(
vtype_value
));
}
switch
(
vtype_base
)
{
case
VTYPE_PTR8
:
{
// pointer to 8-bit memory
...
...
@@ -1784,6 +1788,10 @@ STATIC void emit_native_store_subscr(emit_t *emit) {
#else
emit_pre_pop_reg_flexible
(
emit
,
&
vtype_value
,
&
reg_value
,
REG_ARG_1
,
reg_index
);
#endif
if
(
vtype_value
!=
VTYPE_BOOL
&&
vtype_value
!=
VTYPE_INT
&&
vtype_value
!=
VTYPE_UINT
)
{
EMIT_NATIVE_VIPER_TYPE_ERROR
(
emit
,
"can't store '%q'"
,
vtype_to_qstr
(
vtype_value
));
}
switch
(
vtype_base
)
{
case
VTYPE_PTR8
:
{
// pointer to 8-bit memory
...
...
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