py/vm: Shorten error message for not-implemented opcode.

It's really an opcode that's not implemented, so use "opcode" instead of
"byte code".  And remove the redundant "not implemented" text because that
is already implied by the exception type.  There's no need to have a long
error message for an exception that is almost never encountered.  Saves
about 20 bytes of code size on most ports.
pull/1/head
Damien George 2019-08-22 16:13:05 +10:00
parent 53527138a9
commit 2fca0d7f18
1 changed files with 2 additions and 1 deletions

View File

@ -1262,7 +1262,8 @@ yield:
} else
#endif
{
mp_obj_t obj = mp_obj_new_exception_msg(&mp_type_NotImplementedError, "byte code not implemented");
mp_obj_t obj = mp_obj_new_exception_msg(&mp_type_NotImplementedError, "opcode");
nlr_pop();
code_state->state[0] = obj;
return MP_VM_RETURN_EXCEPTION;