[interp] break up MINT_LDSTR_TOKEN into two opcodes (#88738)
authorAleksey Kliger (λgeek) <alklig@microsoft.com>
Wed, 12 Jul 2023 17:22:55 +0000 (13:22 -0400)
committerGitHub <noreply@github.com>
Wed, 12 Jul 2023 17:22:55 +0000 (13:22 -0400)
commit5b4ffc07531c860d0cafb1d2cff95c9bc8c91664
treee4eb2f471c57f473adf89d35396c5e177981f6bd
parenta3c21b95c91012df3e2572a1331ed7cc1f2679e6
[interp] break up MINT_LDSTR_TOKEN into two opcodes (#88738)

MINT_LDSTR_DYNAMIC for dynamic methods.  the data item is an index
into the DynamicMethod:method.method_data which stores pointers to
MonoString objects that are held by the managed DynamicMethod.

MINT_LDSTR_CSTR for ilgen wrappers. the data item is a raw C string
that is global, or was allocated by malloc

Fixes https://github.com/dotnet/runtime/issues/88694 by allowing
MINT_LDSTR_CSTR in any method since we no longer depend on
mono_method_get_wrapper_data at execution time.  And at transform time
we have access to the actual wrapper method.
src/mono/mono/mini/interp/interp.c
src/mono/mono/mini/interp/mintops.def
src/mono/mono/mini/interp/transform.c