always compile with at least O1; bugfix set initialization for interactive mode
This commit is contained in:
parent
6fdb0f034e
commit
0fee9f9924
3 changed files with 18 additions and 5 deletions
|
|
@ -74,9 +74,17 @@ icc.options.linker = "-cxxlib"
|
||||||
@end
|
@end
|
||||||
gcc.options.debug = "-g"
|
gcc.options.debug = "-g"
|
||||||
@if macosx:
|
@if macosx:
|
||||||
gcc.options.always = "-w -fasm-blocks"
|
@if not release:
|
||||||
|
gcc.options.always = "-w -fasm-blocks -O1"
|
||||||
|
@else:
|
||||||
|
gcc.options.always = "-w -fasm-blocks"
|
||||||
|
@end
|
||||||
@else:
|
@else:
|
||||||
gcc.options.always = "-w"
|
@if not release:
|
||||||
|
gcc.options.always = "-w -O1"
|
||||||
|
@else:
|
||||||
|
gcc.options.always = "-w"
|
||||||
|
@end
|
||||||
@end
|
@end
|
||||||
gcc.options.speed = "-O3 -fno-strict-aliasing"
|
gcc.options.speed = "-O3 -fno-strict-aliasing"
|
||||||
gcc.options.size = "-Os"
|
gcc.options.size = "-Os"
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,8 @@
|
||||||
# than the old one. It also generates better code.
|
# than the old one. It also generates better code.
|
||||||
|
|
||||||
import
|
import
|
||||||
ast, astalgo, strutils, nhashes, trees, platform, magicsys, extccomp, options,
|
ast, astalgo, strutils, nhashes, trees, platform, magicsys, extccomp,
|
||||||
|
options,
|
||||||
nversion, nimsets, msgs, crc, bitsets, idents, lists, types, ccgutils, os,
|
nversion, nimsets, msgs, crc, bitsets, idents, lists, types, ccgutils, os,
|
||||||
times, ropes, math, passes, rodread, wordrecg, rnimsyn, treetab, cgmeth,
|
times, ropes, math, passes, rodread, wordrecg, rnimsyn, treetab, cgmeth,
|
||||||
rodutils
|
rodutils
|
||||||
|
|
@ -42,7 +43,8 @@ type
|
||||||
cfsTypeInit3, # section 3 for init of type information
|
cfsTypeInit3, # section 3 for init of type information
|
||||||
cfsDebugInit, # section for init of debug 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
|
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, ctUInt, ctUInt8, ctUInt16, ctUInt32, ctUInt64,
|
ctVoid, ctChar, ctBool, ctUInt, ctUInt8, ctUInt16, ctUInt32, ctUInt64,
|
||||||
ctInt, ctInt8, ctInt16, ctInt32, ctInt64, ctFloat, ctFloat32, ctFloat64,
|
ctInt, ctInt8, ctInt16, ctInt32, ctInt64, ctFloat, ctFloat32, ctFloat64,
|
||||||
|
|
@ -225,7 +227,8 @@ proc ropecg(m: BModule, frmt: TFormatStr, args: openarray[PRope]): PRope =
|
||||||
if i - 1 >= start:
|
if i - 1 >= start:
|
||||||
app(result, copy(frmt, start, i - 1))
|
app(result, copy(frmt, start, i - 1))
|
||||||
|
|
||||||
proc appcg(m: BModule, c: var PRope, frmt: TFormatStr, args: openarray[PRope]) =
|
proc appcg(m: BModule, c: var PRope, frmt: TFormatStr,
|
||||||
|
args: openarray[PRope]) =
|
||||||
app(c, ropecg(m, frmt, args))
|
app(c, ropecg(m, frmt, args))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -244,6 +244,8 @@ proc getNullValue(typ: PType, info: TLineInfo): PNode =
|
||||||
addSon(p, newSymNode(field, info))
|
addSon(p, newSymNode(field, info))
|
||||||
addSon(p, getNullValue(t.sons[i], info))
|
addSon(p, getNullValue(t.sons[i], info))
|
||||||
addSon(result, p)
|
addSon(result, p)
|
||||||
|
of tySet:
|
||||||
|
result = newNodeIT(nkCurly, info, t)
|
||||||
else: InternalError("getNullValue")
|
else: InternalError("getNullValue")
|
||||||
|
|
||||||
proc evalVar(c: PEvalContext, n: PNode): PNode =
|
proc evalVar(c: PEvalContext, n: PNode): PNode =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue