wasm_loader_common.h 767 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright (C) 2024 Amazon Inc. All rights reserved.
  3. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. */
  5. #ifndef _WASM_LOADER_COMMON_H
  6. #define _WASM_LOADER_COMMON_H
  7. #include "platform_common.h"
  8. #include "../interpreter/wasm.h"
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. bool
  13. wasm_memory_check_flags(const uint8 mem_flag, char *error_buf,
  14. uint32 error_buf_size, bool is_aot);
  15. bool
  16. is_valid_value_type(uint8 value_tpye);
  17. bool
  18. is_valid_value_type_for_interpreter(uint8 value_tpye);
  19. bool
  20. is_valid_func_type(const WASMFuncType *func_type);
  21. bool
  22. is_indices_overflow(uint32 import, uint32 other, char *error_buf,
  23. uint32 error_buf_size);
  24. #ifdef __cplusplus
  25. }
  26. #endif
  27. #endif /* end of _WASM_LOADER_COMMON_H */