Skip to content

Commit 43bed1d

Browse files
committed
Merge pull request #1746 from pguyot/w28/remove-verify-is-matchstate-bs-utf
OP_BS_*UTF*: replace VERIFY_IS_MATCH_STATE with asserts These changes are made under both the "Apache 2.0" and the "GNU Lesser General Public License 2.1 or later" license terms (dual license). SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
2 parents 4a25435 + 040f33d commit 43bed1d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/libAtomVM/opcodesswitch.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4091,7 +4091,7 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
40914091
#ifdef IMPL_EXECUTE_LOOP
40924092
TRACE("bs_get_utf8/5, fail=%i src=0x%lx arg2=0x%lx arg3=0x%lx dreg=%c%i\n", fail, src, arg2, arg3, T_DEST_REG(dreg));
40934093

4094-
VERIFY_IS_MATCH_STATE(src, "bs_get_utf8", 0);
4094+
assert(term_is_match_state(src));
40954095

40964096
term src_bin = term_get_match_state_binary(src);
40974097
avm_int_t offset_bits = term_get_match_state_offset(src);
@@ -4128,7 +4128,7 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
41284128
#ifdef IMPL_EXECUTE_LOOP
41294129
TRACE("bs_skip_utf8/4, fail=%i src=0x%lx arg2=0x%lx arg3=0x%lx\n", fail, src, arg2, arg3);
41304130

4131-
VERIFY_IS_MATCH_STATE(src, "bs_get_utf8", 0);
4131+
assert(term_is_match_state(src));
41324132

41334133
term src_bin = term_get_match_state_binary(src);
41344134
avm_int_t offset_bits = term_get_match_state_offset(src);
@@ -4228,7 +4228,7 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
42284228
#ifdef IMPL_EXECUTE_LOOP
42294229
TRACE("bs_get_utf16/5, fail=%i src=0x%lx arg2=0x%lx flags=0x%"PRIu32" dreg=%c%i\n", fail, src, arg2, flags_value, T_DEST_REG(dreg));
42304230

4231-
VERIFY_IS_MATCH_STATE(src, "bs_get_utf16", 0);
4231+
assert(term_is_match_state(src));
42324232

42334233
term src_bin = term_get_match_state_binary(src);
42344234
avm_int_t offset_bits = term_get_match_state_offset(src);
@@ -4265,7 +4265,7 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
42654265
#ifdef IMPL_EXECUTE_LOOP
42664266
TRACE("bs_skip_utf16/5, fail=%i src=0x%lx arg2=0x%lx flags=0x%lx\n", fail, src, arg2, flags);
42674267

4268-
VERIFY_IS_MATCH_STATE(src, "bs_skip_utf16", 0);
4268+
assert(term_is_match_state(src));
42694269

42704270
term src_bin = term_get_match_state_binary(src);
42714271
avm_int_t offset_bits = term_get_match_state_offset(src);
@@ -4341,7 +4341,7 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
43414341
#ifdef IMPL_EXECUTE_LOOP
43424342
TRACE("bs_get_utf32/5, fail=%i src=0x%lx arg2=0x%lx flags=0x%"PRIu32" dreg=%c%i\n", fail, src, arg2, flags_value, T_DEST_REG(dreg));
43434343

4344-
VERIFY_IS_MATCH_STATE(src, "bs_get_utf32", 0);
4344+
assert(term_is_match_state(src));
43454345

43464346
term src_bin = term_get_match_state_binary(src);
43474347
avm_int_t offset_bits = term_get_match_state_offset(src);
@@ -4377,7 +4377,7 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
43774377
#ifdef IMPL_EXECUTE_LOOP
43784378
TRACE("bs_skip_utf32/5, fail=%i src=0x%lx arg2=0x%lx flags=0x%lx\n", fail, src, arg2, flags);
43794379

4380-
VERIFY_IS_MATCH_STATE(src, "bs_skip_utf32", 0);
4380+
assert(term_is_match_state(src));
43814381

43824382
term src_bin = term_get_match_state_binary(src);
43834383
avm_int_t offset_bits = term_get_match_state_offset(src);

0 commit comments

Comments
 (0)