C++ support: codegen generates C++'s references and avoids copies
This commit is contained in:
parent
a400e8f7f3
commit
e75e421912
7 changed files with 156 additions and 101 deletions
|
|
@ -655,7 +655,6 @@ type
|
|||
locGlobalVar, # location is a global variable
|
||||
locParam, # location is a parameter
|
||||
locField, # location is a record field
|
||||
locArrayElem, # location is an array element
|
||||
locExpr, # "location" is really an expression
|
||||
locProc, # location is a proc (an address of a procedure)
|
||||
locData, # location is a constant
|
||||
|
|
@ -669,14 +668,15 @@ type
|
|||
lfDynamicLib, # link symbol to dynamic library
|
||||
lfExportLib, # export symbol for dynamic library generation
|
||||
lfHeader, # include header file for symbol
|
||||
lfImportCompilerProc # ``importc`` of a compilerproc
|
||||
lfImportCompilerProc, # ``importc`` of a compilerproc
|
||||
lfSingleUse # no location yet and will only be used once
|
||||
TStorageLoc* = enum
|
||||
OnUnknown, # location is unknown (stack, heap or static)
|
||||
OnStack, # location is on hardware stack
|
||||
OnHeap # location is on heap or global
|
||||
# (reference counting needed)
|
||||
TLocFlags* = set[TLocFlag]
|
||||
TLoc*{.final.} = object
|
||||
TLoc* = object
|
||||
k*: TLocKind # kind of location
|
||||
s*: TStorageLoc
|
||||
flags*: TLocFlags # location's flags
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue