Skip to content

Commit 52f271a

Browse files
committed
Remove unnecessary check in OP_SELECT_TUPLE_ARITY
Compiler always emit a OP_IS_TUPLE before OP_SELECT_TUPLE_ARITY. Replace check with an assert that can be disabled on release builds. Signed-off-by: Paul Guyot <pguyot@kallisys.net>
1 parent 425e02a commit 52f271a

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/libAtomVM/opcodesswitch.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3260,7 +3260,7 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
32603260
#endif
32613261

32623262
#ifdef IMPL_EXECUTE_LOOP
3263-
if (LIKELY(term_is_tuple(src_value))) {
3263+
assert(term_is_tuple(src_value));
32643264
int arity = term_get_tuple_arity(src_value);
32653265
#endif
32663266

@@ -3280,9 +3280,6 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
32803280
}
32813281
#endif
32823282
}
3283-
#ifdef IMPL_EXECUTE_LOOP
3284-
}
3285-
#endif
32863283

32873284
#ifdef IMPL_EXECUTE_LOOP
32883285
if (!jump_to_address) {

0 commit comments

Comments
 (0)