Repository: dotnet/runtime
File: src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs (C#)

Code before:
                            if (compilationModuleGroup.VersionsWithMethodBody(method))
#endif
                            {
                                newData = new[] { new TypeSystemEntityOrUnknown(method) };
                            }
                        }

                        if (newData != null)
                        {
                            PgoSchemaElem likelyClassElem = default(PgoSchemaElem);
                            likelyClassElem.InstrumentationKind = isType ? PgoInstrumentationKind.GetLikelyClass : PgoInstrumentationKind.GetLikelyMethod;
                            likelyClassElem.ILOffset = nativeSchema[index].ILOffset;
                            likelyClassElem.Count = 1;
                            likelyClassElem.Other = (int)(likelyClassMethods->likelihood | (numberOfRecords << 8));
                            likelyClassElem.DataObject = newData;
                            return likelyClassElem;
                        }
                    }
                }
            }

            return null;
        }


        private CorJitResult CompileWasmStub(out IntPtr exception, ref CORINFO_METHOD_INFO methodInfo, out uint codeSize)
        {
            byte[] stub = new byte[] {
                0x00, // local variable count
                0x41, // i32.const
                0x0,  // uleb128 0
                0x0f, // return
                0x0b,  // end
            };
            AllocMemArgs args = new AllocMemArgs
            {
                hotCodeSize = (uint)stub.Length,
                coldCodeSize = (uint)0,
                roDataSize = (uint)0,
                xcptnsCount = _ehClauses != null ? (uint)_ehClauses.Length : 0,
                flag = CorJitAllocMemFlag.CORJIT_ALLOCMEM_DEFAULT_CODE_ALIGN,
            };
            allocMem(ref args);

            _code = stub;

            codeSize = (uint)stub.Length;
            exception = IntPtr.Zero;

            _codeRelocs = new();


Review comment (suggestion):
```suggestion
        private CorJitResult CompileWasmStub(out IntPtr exception, ref CORINFO_METHOD_INFO methodInfo, out uint codeSize)
```

Code after:
                            if (compilationModuleGroup.VersionsWithMethodBody(method))
#endif
                            {
                                newData = new[] { new TypeSystemEntityOrUnknown(method) };
                            }
                        }

                        if (newData != null)
                        {
                            PgoSchemaElem likelyClassElem = default(PgoSchemaElem);
                            likelyClassElem.InstrumentationKind = isType ? PgoInstrumentationKind.GetLikelyClass : PgoInstrumentationKind.GetLikelyMethod;
                            likelyClassElem.ILOffset = nativeSchema[index].ILOffset;
                            likelyClassElem.Count = 1;
                            likelyClassElem.Other = (int)(likelyClassMethods->likelihood | (numberOfRecords << 8));
                            likelyClassElem.DataObject = newData;
                            return likelyClassElem;
                        }
                    }
                }
            }

            return null;
        }

        private CorJitResult CompileWasmStub(out IntPtr exception, ref CORINFO_METHOD_INFO methodInfo, out uint codeSize)
        {
            byte[] stub =
            [
                0x00, // local variable count
                0x41, // i32.const
                0x0,  // uleb128 0
                0x0F, // return
                0x0B,  // end
            ];
            AllocMemArgs args = new AllocMemArgs
            {
                hotCodeSize = (uint)stub.Length,
                coldCodeSize = (uint)0,
                roDataSize = (uint)0,
                xcptnsCount = _ehClauses != null ? (uint)_ehClauses.Length : 0,
                flag = CorJitAllocMemFlag.CORJIT_ALLOCMEM_DEFAULT_CODE_ALIGN,
            };
            allocMem(ref args);

            _code = stub;

            codeSize = (uint)stub.Length;
            exception = IntPtr.Zero;

            _codeRelocs = new();