Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "_generated.*" suffix to some auto-generated files #77083

Merged
merged 12 commits into from
Oct 16, 2022
Merged
2 changes: 1 addition & 1 deletion docs/project/updating-jitinterface.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ There are several components that consume the JIT outside of the runtime. Since

The JitInterface is versioned by a GUID. Any change to JitInterface is required to update the JitInterface GUID located in jiteeversionguid.h (look for `JITEEVersionIdentifier`). Not doing so has consequences that are sometimes hard to debug.

If a method was added or modified in ICorStaticInfo or ICorDynamicInfo, port the change to src/coreclr/tools/Common/JitInterface/ThunkGenerator/ThunkInput.txt. Functions must be in the same order in ThunkInput.txt as they exist in corinfo.h and corjit.h. Run gen.bat or gen.sh to regenerate CorInfoBase.cs, jitinterface.h, ICorJitInfo_API_names.h, ICorJitInfo_API_wrapper.hpp, superpmi-shared\icorjitinfoimpl.h, superpmi-shim-counter\icorjitinfo.cpp, and superpmi-shim-simple\icorjitinfo.cpp from ThunkInput.txt. Provide a managed implementation of the method in CorInfoImpl.cs.
If a method was added or modified in ICorStaticInfo or ICorDynamicInfo, port the change to src/coreclr/tools/Common/JitInterface/ThunkGenerator/ThunkInput.txt. Functions must be in the same order in ThunkInput.txt as they exist in corinfo.h and corjit.h. Run gen.bat or gen.sh to regenerate CorInfoBase_generated.cs, jitinterface.h, ICorJitInfo_API_names_generated.h, ICorJitInfo_API_wrapper_generated.hpp, superpmi-shared\icorjitinfoimpl.h, superpmi-shim-counter\icorjitinfo.cpp, and superpmi-shim-simple\icorjitinfo.cpp from ThunkInput.txt. Provide a managed implementation of the method in CorInfoImpl.cs.
EgorBo marked this conversation as resolved.
Show resolved Hide resolved
EgorBo marked this conversation as resolved.
Show resolved Hide resolved

## Porting JitInterface changes to crossgen2

Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/jit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,8 @@ set( JIT_HEADERS
host.h
hostallocator.h
hwintrinsic.h
ICorJitInfo_API_names.h
ICorJitInfo_API_wrapper.hpp
ICorJitInfo_API_names_generated.h
ICorJitInfo_API_wrapper_generated.hpp
EgorBo marked this conversation as resolved.
Show resolved Hide resolved
inline.h
inlinepolicy.h
instr.h
Expand Down
6 changes: 3 additions & 3 deletions src/coreclr/jit/compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7140,7 +7140,7 @@ struct WrapICorJitInfo : public ICorJitInfo
{
// If you get a build error here due to 'WrapICorJitInfo' being
// an abstract class, it's very likely that the wrapper bodies
// in ICorJitInfo_API_wrapper.hpp are no longer in sync with
// in ICorJitInfo_API_wrapper_generated.hpp are no longer in sync with
// the EE interface; please be kind and update the header file.
wrap = new (inst, jitstd::placement_t()) WrapICorJitInfo();

Expand All @@ -7160,7 +7160,7 @@ struct WrapICorJitInfo : public ICorJitInfo
COMP_HANDLE wrapHnd; // the "real thing"

public:
#include "ICorJitInfo_API_wrapper.hpp"
#include "ICorJitInfo_API_wrapper_generated.hpp"
};

#endif // MEASURE_CLRAPI_CALLS
Expand Down Expand Up @@ -8164,7 +8164,7 @@ void CompTimeSummaryInfo::Print(FILE* f)

static const char* APInames[] = {
#define DEF_CLR_API(name) #name,
#include "ICorJitInfo_API_names.h"
#include "ICorJitInfo_API_names_generated.h"
};

unsigned shownCalls = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/jit/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -1420,7 +1420,7 @@ enum class PhaseDumps
enum API_ICorJitInfo_Names
{
#define DEF_CLR_API(name) API_##name,
#include "ICorJitInfo_API_names.h"
#include "ICorJitInfo_API_names_generated.h"
API_COUNT
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,7 @@ private static IntPtr GetUnmanagedCallbacks()
return (IntPtr)callbacks;
}
}
}
");
}");
}

static void WriteNativeWrapperInterface(TextWriter tw, IEnumerable<FunctionDecl> functionData)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pushd %~dp0
call ..\..\..\..\..\..\dotnet.cmd run -- ThunkInput.txt ..\CorInfoBase.cs ..\..\..\aot\jitinterface\jitinterface.h ..\..\..\..\jit\ICorJitInfo_API_names.h ..\..\..\..\jit\ICorJitInfo_API_wrapper.hpp ..\..\..\..\inc\icorjitinfoimpl_generated.h ..\..\..\..\tools\superpmi\superpmi-shim-counter\icorjitinfo.cpp ..\..\..\..\tools\superpmi\superpmi-shim-simple\icorjitinfo.cpp
call ..\..\..\..\..\..\dotnet.cmd run -- ThunkInput.txt ..\CorInfoBase_generated.cs ..\..\..\aot\jitinterface\jitinterface.h ..\..\..\..\jit\ICorJitInfo_API_names_generated.h ..\..\..\..\jit\ICorJitInfo_API_wrapper_generated.hpp ..\..\..\..\inc\icorjitinfoimpl_generated.h ..\..\..\..\tools\superpmi\superpmi-shim-counter\icorjitinfo.cpp ..\..\..\..\tools\superpmi\superpmi-shim-simple\icorjitinfo.cpp
call ..\..\..\..\..\..\dotnet.cmd run -- InstructionSetGenerator InstructionSetDesc.txt ..\..\Internal\Runtime\ReadyToRunInstructionSet.cs ..\..\Internal\Runtime\ReadyToRunInstructionSetHelper.cs ..\CorInfoInstructionSet.cs ..\..\..\..\inc\corinfoinstructionset.h ..\..\..\..\inc\readytoruninstructionset.h
popd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
cd "$(dirname ${BASH_SOURCE[0]})"
../../../../../../dotnet.sh run -- ThunkInput.txt ../CorInfoBase.cs ../../../aot/jitinterface/jitinterface.h ../../../../jit/ICorJitInfo_API_names.h ../../../../jit/ICorJitInfo_API_wrapper.hpp ../../../../inc/icorjitinfoimpl_generated.h ../../../../tools/superpmi/superpmi-shim-counter/icorjitinfo.cpp ../../../../tools/superpmi/superpmi-shim-simple/icorjitinfo.cpp
../../../../../../dotnet.sh run -- ThunkInput.txt ../CorInfoBase_generated.cs ../../../aot/jitinterface/jitinterface.h ../../../../jit/ICorJitInfo_API_names_generated.h ../../../../jit/ICorJitInfo_API_wrapper_generated.hpp ../../../../inc/icorjitinfoimpl_generated.h ../../../../tools/superpmi/superpmi-shim-counter/icorjitinfo.cpp ../../../../tools/superpmi/superpmi-shim-simple/icorjitinfo.cpp
../../../../../../dotnet.sh run -- InstructionSetGenerator InstructionSetDesc.txt ../../Internal/Runtime/ReadyToRunInstructionSet.cs ../../Internal/Runtime/ReadyToRunInstructionSetHelper.cs ../CorInfoInstructionSet.cs ../../../../inc/corinfoinstructionset.h ../../../../inc/readytoruninstructionset.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@
<Compile Include="..\..\Common\JitInterface\TypeString.cs">
<Link>JitInterface\TypeString.cs</Link>
</Compile>
<Compile Include="..\..\Common\JitInterface\CorInfoBase.cs">
<Link>JitInterface\CorInfoBase.cs</Link>
<Compile Include="..\..\Common\JitInterface\CorInfoBase_generated.cs">
<Link>JitInterface\CorInfoBase_generated.cs</Link>
</Compile>
<Compile Include="..\..\Common\JitInterface\CorInfoImpl.cs">
<Link>JitInterface\CorInfoImpl.cs</Link>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
<Compile Include="..\..\Common\JitInterface\TypeString.cs">
<Link>JitInterface\TypeString.cs</Link>
</Compile>
<Compile Include="..\..\Common\JitInterface\CorInfoBase.cs">
<Link>JitInterface\CorInfoBase.cs</Link>
<Compile Include="..\..\Common\JitInterface\CorInfoBase_generated.cs">
EgorBo marked this conversation as resolved.
Show resolved Hide resolved
<Link>JitInterface\CorInfoBase_generated.cs</Link>
</Compile>
<Compile Include="..\..\Common\JitInterface\CorInfoImpl.cs">
<Link>JitInterface\CorInfoImpl.cs</Link>
Expand Down