wasm_c_api.c: improve unimplemented cases (#1355)

ASSERT_NOT_IMPLEMENTED is bh_assert, which might be no-op.
in that case, it's better to fall back to the "default" case,
which reports an error properly.
This commit is contained in:
YAMAMOTO Takashi 2022-08-08 17:46:54 +09:00 committed by GitHub
parent 1fff8d5cbc
commit 425efb875f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3955,9 +3955,8 @@ interp_link(const wasm_instance_t *inst, const WASMModule *module_interp,
}
case IMPORT_KIND_MEMORY:
case IMPORT_KIND_TABLE:
ASSERT_NOT_IMPLEMENTED();
break;
default:
ASSERT_NOT_IMPLEMENTED();
LOG_WARNING("%s meets unsupported kind: %d", __FUNCTION__,
import_rt->kind);
goto failed;
@ -4175,9 +4174,8 @@ aot_link(const wasm_instance_t *inst, const AOTModule *module_aot,
break;
case WASM_EXTERN_MEMORY:
case WASM_EXTERN_TABLE:
ASSERT_NOT_IMPLEMENTED();
break;
default:
ASSERT_NOT_IMPLEMENTED();
goto failed;
}
}