use inline in ins_array_get_by_offset

This commit is contained in:
lyon1998 2022-03-14 10:52:13 +08:00
parent 6501e9e23e
commit 641e0334d4
2 changed files with 6 additions and 6 deletions

View File

@ -1098,10 +1098,6 @@ InstructUnit* instructArray_getNow(InstructArray* self) {
(uintptr_t)(self->content_offset_now));
}
InstructUnit* instructArray_getByOffset(InstructArray* self, int32_t offset) {
return (InstructUnit*)(arg_getContent(self->arg_buff) +
(uintptr_t)(offset));
}
InstructUnit* instructArray_getNext(InstructArray* self) {
self->content_offset_now += sizeof(InstructUnit);

View File

@ -164,7 +164,11 @@ void byteCodeFrame_print(ByteCodeFrame* self);
InstructUnit* instructArray_getByOffset(InstructArray* self, int32_t offset);
VMParameters* pikaVM_run_enableByteCode(PikaObj* self, char* multiLine);
VMParameters* pikaVM_runWithConfig(PikaObj* self,
char* multiLine,
VMConfig cfg);
char* multiLine,
VMConfig cfg);
#define instructArray_getByOffset(InstructArray_p_self, int32_t_offset) \
((InstructUnit*)(arg_getContent((InstructArray_p_self)->arg_buff) + \
(uintptr_t)(int32_t_offset)));
#endif