Skip to content

Commit

Permalink
[wasm] Jiterpreter field op refactorings; fixes #81558 (#81620)
Browse files Browse the repository at this point in the history
* Refactor jiterpreter field op implementation into separate static and nonstatic field implementations
* Add more diagnostic infrastructure
* fixes issue #81558 (dictionary.findvalue bug)
  • Loading branch information
kg authored Feb 4, 2023
1 parent 27341c2 commit ec9fb02
Show file tree
Hide file tree
Showing 3 changed files with 192 additions and 119 deletions.
6 changes: 6 additions & 0 deletions src/mono/mono/mini/interp/jiterpreter.c
Original file line number Diff line number Diff line change
Expand Up @@ -1033,6 +1033,12 @@ mono_jiterp_get_array_rank (gint32 *dest, MonoObject **src)
return 1;
}

EMSCRIPTEN_KEEPALIVE int
mono_jiterp_debug_count ()
{
return mono_debug_count();
}

// HACK: fix C4206
EMSCRIPTEN_KEEPALIVE
#endif
Expand Down
2 changes: 2 additions & 0 deletions src/mono/wasm/runtime/cwraps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ const fn_signatures: SigLine[] = [
[true, "mono_jiterp_type_to_ldind", "number", ["number"]],
[true, "mono_jiterp_type_to_stind", "number", ["number"]],
[true, "mono_jiterp_imethod_to_ftnptr", "number", ["number"]],
[true, "mono_jiterp_debug_count", "number", []],
];

export interface t_Cwraps {
Expand Down Expand Up @@ -262,6 +263,7 @@ export interface t_Cwraps {
mono_jiterp_type_to_ldind(type: MonoType): number;
mono_jiterp_type_to_stind(type: MonoType): number;
mono_jiterp_imethod_to_ftnptr(imethod: VoidPtr): VoidPtr;
mono_jiterp_debug_count(): number;
}

const wrapped_c_functions: t_Cwraps = <any>{};
Expand Down
Loading

0 comments on commit ec9fb02

Please sign in to comment.