15
15
extern "C" {
16
16
#endif
17
17
18
- typedef enum AOTExceptionID {
19
- EXCE_UNREACHABLE = 0 ,
20
- EXCE_OUT_OF_MEMORY ,
21
- EXCE_OUT_OF_BOUNDS_MEMORY_ACCESS ,
22
- EXCE_INTEGER_OVERFLOW ,
23
- EXCE_INTEGER_DIVIDE_BY_ZERO ,
24
- EXCE_INVALID_CONVERSION_TO_INTEGER ,
25
- EXCE_INVALID_FUNCTION_TYPE_INDEX ,
26
- EXCE_INVALID_FUNCTION_INDEX ,
27
- EXCE_UNDEFINED_ELEMENT ,
28
- EXCE_UNINITIALIZED_ELEMENT ,
29
- EXCE_CALL_UNLINKED_IMPORT_FUNC ,
30
- EXCE_NATIVE_STACK_OVERFLOW ,
31
- EXCE_UNALIGNED_ATOMIC ,
32
- EXCE_AUX_STACK_OVERFLOW ,
33
- EXCE_AUX_STACK_UNDERFLOW ,
34
- EXCE_OUT_OF_BOUNDS_TABLE_ACCESS ,
35
- EXCE_NUM ,
36
- } AOTExceptionID ;
37
-
38
18
typedef enum AOTSectionType {
39
19
AOT_SECTION_TYPE_TARGET_INFO = 0 ,
40
20
AOT_SECTION_TYPE_INIT_DATA = 1 ,
@@ -401,9 +381,6 @@ aot_create_exec_env_and_call_function(AOTModuleInstance *module_inst,
401
381
AOTFunctionInstance * function ,
402
382
unsigned argc , uint32 argv []);
403
383
404
- bool
405
- aot_create_exec_env_singleton (AOTModuleInstance * module_inst );
406
-
407
384
/**
408
385
* Set AOT module instance exception with exception string
409
386
*
@@ -427,14 +404,6 @@ aot_set_exception_with_id(AOTModuleInstance *module_inst, uint32 id);
427
404
const char *
428
405
aot_get_exception (AOTModuleInstance * module_inst );
429
406
430
- /**
431
- * Clear exception info of the AOT module instance.
432
- *
433
- * @param module_inst the AOT module instance
434
- */
435
- void
436
- aot_clear_exception (AOTModuleInstance * module_inst );
437
-
438
407
uint32
439
408
aot_module_malloc (AOTModuleInstance * module_inst , uint32 size ,
440
409
void * * p_native_addr );
@@ -450,29 +419,6 @@ uint32
450
419
aot_module_dup_data (AOTModuleInstance * module_inst , const char * src ,
451
420
uint32 size );
452
421
453
- bool
454
- aot_validate_app_addr (AOTModuleInstance * module_inst , uint32 app_offset ,
455
- uint32 size );
456
-
457
- bool
458
- aot_validate_native_addr (AOTModuleInstance * module_inst , void * native_ptr ,
459
- uint32 size );
460
-
461
- void *
462
- aot_addr_app_to_native (AOTModuleInstance * module_inst , uint32 app_offset );
463
-
464
- uint32
465
- aot_addr_native_to_app (AOTModuleInstance * module_inst , void * native_ptr );
466
-
467
- bool
468
- aot_get_app_addr_range (AOTModuleInstance * module_inst , uint32 app_offset ,
469
- uint32 * p_app_start_offset , uint32 * p_app_end_offset );
470
-
471
- bool
472
- aot_get_native_addr_range (AOTModuleInstance * module_inst , uint8 * native_ptr ,
473
- uint8 * * p_native_start_addr ,
474
- uint8 * * p_native_end_addr );
475
-
476
422
bool
477
423
aot_enlarge_memory (AOTModuleInstance * module_inst , uint32 inc_page_count );
478
424
@@ -487,6 +433,10 @@ bool
487
433
aot_call_indirect (WASMExecEnv * exec_env , uint32 tbl_idx , uint32 table_elem_idx ,
488
434
uint32 argc , uint32 * argv );
489
435
436
+ /**
437
+ * Check whether the app address and the buf is inside the linear memory,
438
+ * and convert the app address into native address
439
+ */
490
440
bool
491
441
aot_check_app_addr_and_convert (AOTModuleInstance * module_inst , bool is_str ,
492
442
uint32 app_buf_addr , uint32 app_buf_size ,
@@ -518,16 +468,6 @@ bool
518
468
aot_get_aux_stack (WASMExecEnv * exec_env , uint32 * start_offset , uint32 * size );
519
469
#endif
520
470
521
- #ifdef OS_ENABLE_HW_BOUND_CHECK
522
- #ifndef BH_PLATFORM_WINDOWS
523
- void
524
- aot_signal_handler (WASMSignalInfo * sig_info );
525
- #else
526
- LONG
527
- aot_exception_handler (WASMSignalInfo * sig_info );
528
- #endif
529
- #endif
530
-
531
471
void
532
472
aot_get_module_mem_consumption (const AOTModule * module ,
533
473
WASMModuleMemConsumption * mem_conspn );
0 commit comments