diff --git a/compiler/pragmas.nim b/compiler/pragmas.nim index dc618d9aa5..fffb69ca8d 100644 --- a/compiler/pragmas.nim +++ b/compiler/pragmas.nim @@ -63,7 +63,8 @@ const wImportCpp, wImportObjC, wError, wNoInit, wCompileTime, wGlobal, wGensym, wInject, wCodegenDecl, wGuard, wGoto, wExportNims} constPragmas* = {wImportc, wExportc, wHeader, wDeprecated, wMagic, wNodecl, - wExtern, wImportCpp, wImportObjC, wError, wGensym, wInject, wExportNims} + wExtern, wImportCpp, wImportObjC, wError, wGensym, wInject, wExportNims, + wIntDefine, wStrDefine} letPragmas* = varPragmas procTypePragmas* = {FirstCallConv..LastCallConv, wVarargs, wNosideeffect, wThread, wRaises, wLocks, wTags, wGcSafe} @@ -898,6 +899,10 @@ proc singlePragma(c: PContext, sym: PSym, n: PNode, i: int, of wBase: noVal(it) sym.flags.incl sfBase + of wIntDefine: + sym.magic = mIntDefine + of wStrDefine: + sym.magic = mIntDefine else: invalidPragma(it) else: invalidPragma(it) diff --git a/lib/system/osalloc.nim b/lib/system/osalloc.nim index cfa9ae18fb..e864253b66 100644 --- a/lib/system/osalloc.nim +++ b/lib/system/osalloc.nim @@ -150,7 +150,7 @@ elif defined(windows): #VirtualFree(p, size, MEM_DECOMMIT) elif hostOS == "standalone": - const StandaloneHeapSize {.magic: "IntDefine"}: int = 1024 * PageSize + const StandaloneHeapSize {.intdefine.}: int = 1024 * PageSize var theHeap: array[StandaloneHeapSize, float64] # 'float64' for alignment bumpPointer = cast[int](addr theHeap)