1//
2// Copyright (c) Microsoft. All rights reserved.
3// Licensed under the MIT license. See LICENSE file in the project root for full license information.
4//
5
6#include "standardpch.h"
7#include "icorjitcompiler.h"
8#include "icorjitinfo.h"
9
10interceptor_IEEMM* current_IEEMM = nullptr; // we want this to live beyond the scope of a single compileMethodCall
11
12CorJitResult __stdcall interceptor_ICJC::compileMethod(ICorJitInfo* comp, /* IN */
13 struct CORINFO_METHOD_INFO* info, /* IN */
14 unsigned /* code:CorJitFlag */ flags, /* IN */
15 BYTE** nativeEntry, /* OUT */
16 ULONG* nativeSizeOfCode /* OUT */
17 )
18{
19 interceptor_ICJI our_ICorJitInfo;
20 our_ICorJitInfo.original_ICorJitInfo = comp;
21
22 if (current_IEEMM == nullptr)
23 current_IEEMM = new interceptor_IEEMM();
24
25 CorJitResult temp =
26 original_ICorJitCompiler->compileMethod(&our_ICorJitInfo, info, flags, nativeEntry, nativeSizeOfCode);
27
28 return temp;
29}
30
31void interceptor_ICJC::clearCache()
32{
33 original_ICorJitCompiler->clearCache();
34}
35
36BOOL interceptor_ICJC::isCacheCleanupRequired()
37{
38 return original_ICorJitCompiler->isCacheCleanupRequired();
39}
40
41void interceptor_ICJC::ProcessShutdownWork(ICorStaticInfo* info)
42{
43 original_ICorJitCompiler->ProcessShutdownWork(info);
44}
45
46void interceptor_ICJC::getVersionIdentifier(GUID* versionIdentifier /* OUT */)
47{
48 original_ICorJitCompiler->getVersionIdentifier(versionIdentifier);
49}
50
51unsigned interceptor_ICJC::getMaxIntrinsicSIMDVectorLength(CORJIT_FLAGS cpuCompileFlags)
52{
53 return original_ICorJitCompiler->getMaxIntrinsicSIMDVectorLength(cpuCompileFlags);
54}
55
56void interceptor_ICJC::setRealJit(ICorJitCompiler* realJitCompiler)
57{
58 original_ICorJitCompiler->setRealJit(realJitCompiler);
59}
60