mirror of https://github.com/dotnet/runtime
[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:
parent
8527a991b9
commit
626819d31d
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue