attempt to fix DLL generation
This commit is contained in:
parent
832da8a303
commit
83deb233ee
6 changed files with 21 additions and 22 deletions
|
|
@ -819,9 +819,9 @@ proc getFileHeader(cfilenoext: string): PRope =
|
||||||
proc genMainProc(m: BModule) =
|
proc genMainProc(m: BModule) =
|
||||||
const
|
const
|
||||||
CommonMainBody =
|
CommonMainBody =
|
||||||
"$1" &
|
|
||||||
"\tnim__datInit();$n" &
|
"\tnim__datInit();$n" &
|
||||||
"\tsystemInit();$n" &
|
"\tsystemInit();$n" &
|
||||||
|
"$1" &
|
||||||
"$2" &
|
"$2" &
|
||||||
"$3"
|
"$3"
|
||||||
PosixNimMain =
|
PosixNimMain =
|
||||||
|
|
@ -873,7 +873,8 @@ proc genMainProc(m: BModule) =
|
||||||
otherMain = PosixCMain
|
otherMain = PosixCMain
|
||||||
if gBreakpoints != nil: discard cgsym(m, "dbgRegisterBreakpoint")
|
if gBreakpoints != nil: discard cgsym(m, "dbgRegisterBreakpoint")
|
||||||
|
|
||||||
let initStackBottomCall = if emulatedThreadVars(): "".toRope
|
let initStackBottomCall = if emulatedThreadVars() or
|
||||||
|
platform.targetOS == osStandalone: "".toRope
|
||||||
else: ropecg(m, "\t#initStackBottom();$n")
|
else: ropecg(m, "\t#initStackBottom();$n")
|
||||||
inc(m.labels)
|
inc(m.labels)
|
||||||
appcg(m, m.s[cfsProcs], nimMain, [initStackBottomCall,
|
appcg(m, m.s[cfsProcs], nimMain, [initStackBottomCall,
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,4 @@ path="$projectPath/.."
|
||||||
|
|
||||||
path="$nimrod/packages/docutils"
|
path="$nimrod/packages/docutils"
|
||||||
|
|
||||||
@if llvm_gcc or gcc:
|
--define:booting
|
||||||
# GCC, LLVM and Visual C++ have a problem to optimize some modules.
|
|
||||||
# This is really strange.
|
|
||||||
# cgen.speed = "-O0"
|
|
||||||
@elif vcc:
|
|
||||||
# cgen.speed = ""
|
|
||||||
@end
|
|
||||||
|
|
|
||||||
|
|
@ -67,12 +67,13 @@ proc hash*(x: Pointer): THash {.inline.} =
|
||||||
else:
|
else:
|
||||||
result = (cast[THash](x)) shr 3 # skip the alignment
|
result = (cast[THash](x)) shr 3 # skip the alignment
|
||||||
|
|
||||||
proc hash*[T: proc](x: T): THash {.inline.} =
|
when not defined(booting):
|
||||||
## efficient hashing of proc vars; closures are supported too.
|
proc hash*[T: proc](x: T): THash {.inline.} =
|
||||||
when T is "closure":
|
## efficient hashing of proc vars; closures are supported too.
|
||||||
result = hash(rawProc(x)) !& hash(rawEnv(x))
|
when T is "closure":
|
||||||
else:
|
result = hash(rawProc(x)) !& hash(rawEnv(x))
|
||||||
result = hash(pointer(x))
|
else:
|
||||||
|
result = hash(pointer(x))
|
||||||
|
|
||||||
proc hash*(x: int): THash {.inline.} =
|
proc hash*(x: int): THash {.inline.} =
|
||||||
## efficient hashing of integers
|
## efficient hashing of integers
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
var funcs: seq[proc (): int] = @[]
|
var funcs: seq[proc (): int {.nimcall.}] = @[]
|
||||||
for i in 0..10:
|
for i in 0..10:
|
||||||
funcs.add((proc (): int = return i * i))
|
funcs.add((proc (): int = return i * i))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
discard """
|
discard """
|
||||||
file: "system.nim"
|
file: "system.nim"
|
||||||
line: 637
|
line: 638
|
||||||
errormsg: "type mismatch"
|
errormsg: "type mismatch"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
|
||||||
7
todo.txt
7
todo.txt
|
|
@ -1,6 +1,8 @@
|
||||||
version 0.9.0
|
version 0.9.0
|
||||||
=============
|
=============
|
||||||
|
|
||||||
|
- fix DLLs
|
||||||
|
- fix 'bind' for templates
|
||||||
- implicit deref for parameter matching
|
- implicit deref for parameter matching
|
||||||
- deprecate ``var x, y = 0`` as it's confusing for tuple consistency
|
- deprecate ``var x, y = 0`` as it's confusing for tuple consistency
|
||||||
|
|
||||||
|
|
@ -44,6 +46,9 @@ version 0.9.XX
|
||||||
|
|
||||||
- make templates hygienic by default: try to gensym() everything in the 'block'
|
- make templates hygienic by default: try to gensym() everything in the 'block'
|
||||||
of a template; find a better solution for gensym instead of `*ident`
|
of a template; find a better solution for gensym instead of `*ident`
|
||||||
|
- introduce 'callsite' magic and make macros and templates the same
|
||||||
|
- better support for macros that rewrite procs
|
||||||
|
- macros need access to types and symbols
|
||||||
- document nimdoc properly finally
|
- document nimdoc properly finally
|
||||||
- make 'clamp' a magic for the range stuff
|
- make 'clamp' a magic for the range stuff
|
||||||
- implement a warning message for shadowed 'result' variable
|
- implement a warning message for shadowed 'result' variable
|
||||||
|
|
@ -86,8 +91,6 @@ Library
|
||||||
- locale support; i18n module
|
- locale support; i18n module
|
||||||
- bignums
|
- bignums
|
||||||
|
|
||||||
- pdcurses bindings
|
|
||||||
|
|
||||||
|
|
||||||
Low priority
|
Low priority
|
||||||
------------
|
------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue