removed unused sections in codegen (#20976)

This commit is contained in:
ringabout 2022-12-01 04:51:13 +08:00 • committed by GitHub
commit a7133e0594
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 12 deletions

View file

@ -19,13 +19,11 @@ import
const const
CFileSectionNames: array[TCFileSection, string] = [ CFileSectionNames: array[TCFileSection, string] = [
cfsMergeInfo: "",
cfsHeaders: "NIM_merge_HEADERS", cfsHeaders: "NIM_merge_HEADERS",
cfsFrameDefines: "NIM_merge_FRAME_DEFINES", cfsFrameDefines: "NIM_merge_FRAME_DEFINES",
cfsForwardTypes: "NIM_merge_FORWARD_TYPES", cfsForwardTypes: "NIM_merge_FORWARD_TYPES",
cfsTypes: "NIM_merge_TYPES", cfsTypes: "NIM_merge_TYPES",
cfsSeqTypes: "NIM_merge_SEQ_TYPES", cfsSeqTypes: "NIM_merge_SEQ_TYPES",
cfsFieldInfo: "NIM_merge_FIELD_INFO",
cfsTypeInfo: "NIM_merge_TYPE_INFO", cfsTypeInfo: "NIM_merge_TYPE_INFO",
cfsProcHeaders: "NIM_merge_PROC_HEADERS", cfsProcHeaders: "NIM_merge_PROC_HEADERS",
cfsData: "NIM_merge_DATA", cfsData: "NIM_merge_DATA",
@ -34,11 +32,8 @@ const
cfsInitProc: "NIM_merge_INIT_PROC", cfsInitProc: "NIM_merge_INIT_PROC",
cfsDatInitProc: "NIM_merge_DATINIT_PROC", cfsDatInitProc: "NIM_merge_DATINIT_PROC",
cfsTypeInit1: "NIM_merge_TYPE_INIT1", cfsTypeInit1: "NIM_merge_TYPE_INIT1",
cfsTypeInit2: "NIM_merge_TYPE_INIT2",
cfsTypeInit3: "NIM_merge_TYPE_INIT3", cfsTypeInit3: "NIM_merge_TYPE_INIT3",
cfsDebugInit: "NIM_merge_DEBUG_INIT", cfsDynLibInit: "NIM_merge_DYNLIB_INIT"
cfsDynLibInit: "NIM_merge_DYNLIB_INIT",
cfsDynLibDeinit: "NIM_merge_DYNLIB_DEINIT",
] ]
CProcSectionNames: array[TCProcSection, string] = [ CProcSectionNames: array[TCProcSection, string] = [
cpsLocals: "NIM_merge_PROC_LOCALS", cpsLocals: "NIM_merge_PROC_LOCALS",

View file

@ -16,7 +16,6 @@ import
type type
TLabel* = Rope # for the C generator a label is just a rope TLabel* = Rope # for the C generator a label is just a rope
TCFileSection* = enum # the sections a generated C file consists of TCFileSection* = enum # the sections a generated C file consists of
cfsMergeInfo, # section containing merge information
cfsHeaders, # section for C include file headers cfsHeaders, # section for C include file headers
cfsFrameDefines # section for nim frame macros cfsFrameDefines # section for nim frame macros
cfsForwardTypes, # section for C forward typedefs cfsForwardTypes, # section for C forward typedefs
@ -24,7 +23,6 @@ type
cfsSeqTypes, # section for sequence types only cfsSeqTypes, # section for sequence types only
# this is needed for strange type generation # this is needed for strange type generation
# reasons # reasons
cfsFieldInfo, # section for field information
cfsTypeInfo, # section for type information (ag ABI checks) cfsTypeInfo, # section for type information (ag ABI checks)
cfsProcHeaders, # section for C procs prototypes cfsProcHeaders, # section for C procs prototypes
cfsStrData, # section for constant string literals cfsStrData, # section for constant string literals
@ -34,12 +32,8 @@ type
cfsInitProc, # section for the C init proc cfsInitProc, # section for the C init proc
cfsDatInitProc, # section for the C datInit proc cfsDatInitProc, # section for the C datInit proc
cfsTypeInit1, # section 1 for declarations of type information cfsTypeInit1, # section 1 for declarations of type information
cfsTypeInit2, # section 2 for init of type information
cfsTypeInit3, # section 3 for init of type information cfsTypeInit3, # section 3 for init of type information
cfsDebugInit, # section for init of debug information
cfsDynLibInit, # section for init of dynamic library binding cfsDynLibInit, # section for init of dynamic library binding
cfsDynLibDeinit # section for deinitialization of dynamic
# libraries
TCTypeKind* = enum # describes the type kind of a C type TCTypeKind* = enum # describes the type kind of a C type
ctVoid, ctChar, ctBool, ctVoid, ctChar, ctBool,
ctInt, ctInt8, ctInt16, ctInt32, ctInt64, ctInt, ctInt8, ctInt16, ctInt32, ctInt64,