diff --git a/src/PikaPlatform.c b/src/PikaPlatform.c index 4dd6a578e..5cad9eb2b 100644 --- a/src/PikaPlatform.c +++ b/src/PikaPlatform.c @@ -38,6 +38,9 @@ PIKA_WEAK void __platform_enable_irq_handle(void) { PIKA_WEAK void* __platform_malloc(size_t size) { return malloc(size); } +PIKA_WEAK void __platform_error_handle(void){ + return; +} PIKA_WEAK void __platform_free(void* ptr) { free(ptr); } diff --git a/src/PikaPlatform.h b/src/PikaPlatform.h index 8c1454801..b505bc496 100644 --- a/src/PikaPlatform.h +++ b/src/PikaPlatform.h @@ -104,3 +104,6 @@ char __platform_getchar(void); FILE* __platform_fopen(const char* filename, const char* modes); int __platform_fclose(FILE* stream); size_t __platform_fwrite(const void* ptr, size_t size, size_t n, FILE* stream); + +/* error */ +void __platform_error_handle(void); diff --git a/src/PikaVM.c b/src/PikaVM.c index a1561fb85..e893f2eb4 100644 --- a/src/PikaVM.c +++ b/src/PikaVM.c @@ -1157,6 +1157,7 @@ VMParameters* pikaVM_runByteCodeWithState(PikaObj* self, __platform_printf("[info] input commond: \r\n"); instructUnit_printWithConst(this_ins_unit, &(bytecode_frame->const_pool)); + __platform_error_handle(); } } __clearInvokeQueues(locals);