[interp] Move label outside of main loop (#35778)

Wasm has control flow limitations which don't go well with gotos. Move label outside of main loop because it translates to very poor wasm code. Other gotos don't seem to negatively impact instruction dispatch code, so leave them alone, for now ..
This commit is contained in:
Vlad Brezae 2020-05-04 12:23:59 +03:00 committed by GitHub
parent 8527a991b9
commit 626819d31d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -3438,13 +3438,13 @@ interp_exec_method (InterpFrame *frame, ThreadContext *context, FrameClauseArgs
#if defined(ENABLE_HYBRID_SUSPEND) || defined(ENABLE_COOP_SUSPEND)
mono_threads_safepoint ();
#endif
main_loop:
/*
* using while (ip < end) may result in a 15% performance drop,
* but it may be useful for debug
*/
while (1) {
MintOpcode opcode;
main_loop:
/* g_assert (sp >= frame->stack); */
/* g_assert(vt_sp - vtalloc <= frame->imethod->vt_stack_size); */
DUMP_INSTR();