Add an INTERP_OPT for the jiterpreter (#83363)
authorKatelyn Gadd <kg@luminance.org>
Wed, 15 Mar 2023 07:52:47 +0000 (00:52 -0700)
committerGitHub <noreply@github.com>
Wed, 15 Mar 2023 07:52:47 +0000 (00:52 -0700)
This ensures that it will be disabled when debugging

src/mono/mono/mini/interp/interp.c
src/mono/mono/mini/interp/interp.h
src/mono/mono/mini/interp/transform.c

index f6dec64..659e05b 100644 (file)
@@ -7929,8 +7929,12 @@ interp_parse_options (const char *options)
                                opt = INTERP_OPT_BBLOCKS;
                        else if (strncmp (arg, "tiering", 7) == 0)
                                opt = INTERP_OPT_TIERING;
-                       else if (strncmp (arg, "simd", 7) == 0)
+                       else if (strncmp (arg, "simd", 4) == 0)
                                opt = INTERP_OPT_SIMD;
+#if HOST_BROWSER
+                       else if (strncmp (arg, "jiterp", 6) == 0)
+                               opt = INTERP_OPT_JITERPRETER;
+#endif
                        else if (strncmp (arg, "all", 3) == 0)
                                opt = ~INTERP_OPT_NONE;
 
index 6e39f7d..e4dcae3 100644 (file)
@@ -36,7 +36,13 @@ enum {
        INTERP_OPT_BBLOCKS = 8,
        INTERP_OPT_TIERING = 16,
        INTERP_OPT_SIMD = 32,
+#if HOST_BROWSER
+       INTERP_OPT_JITERPRETER = 64,
+#endif
        INTERP_OPT_DEFAULT = INTERP_OPT_INLINE | INTERP_OPT_CPROP | INTERP_OPT_SUPER_INSTRUCTIONS | INTERP_OPT_BBLOCKS | INTERP_OPT_TIERING | INTERP_OPT_SIMD
+#if HOST_BROWSER
+               | INTERP_OPT_JITERPRETER
+#endif
 };
 
 typedef struct _InterpMethodArguments InterpMethodArguments;
index a7a400c..db02d71 100644 (file)
@@ -10732,7 +10732,8 @@ retry:
                interp_optimize_code (td);
                interp_alloc_offsets (td);
 #if HOST_BROWSER
-               jiterp_insert_entry_points (rtm, td);
+               if (mono_interp_opt & INTERP_OPT_JITERPRETER)
+                       jiterp_insert_entry_points (rtm, td);
 #endif
        }