bugfix: pegs.nim compiles again
This commit is contained in:
parent
e25384db89
commit
aa14667ca1
4 changed files with 7 additions and 6 deletions
|
|
@ -499,7 +499,10 @@ proc unaryArith(p: BProc, e: PNode, d: var TLoc, op: TMagic) =
|
||||||
|
|
||||||
proc genDeref(p: BProc, e: PNode, d: var TLoc) =
|
proc genDeref(p: BProc, e: PNode, d: var TLoc) =
|
||||||
var a: TLoc
|
var a: TLoc
|
||||||
if mapType(e.sons[0].typ) == ctArray:
|
if mapType(e.sons[0].typ) == ctArray and
|
||||||
|
skipTypes(e.sons[0].typ.sons[0], abstractInst).kind != tySet:
|
||||||
|
# XXX the amount of hacks for C's arrays is incredible, maybe we should
|
||||||
|
# simply wrap them in a struct? --> Losing auto vectorization then?
|
||||||
expr(p, e.sons[0], d)
|
expr(p, e.sons[0], d)
|
||||||
else:
|
else:
|
||||||
initLocExpr(p, e.sons[0], a)
|
initLocExpr(p, e.sons[0], a)
|
||||||
|
|
|
||||||
|
|
@ -182,8 +182,7 @@ proc getParamTypeDesc(m: BModule, t: PType, check: var TIntSet): PRope =
|
||||||
if t.Kind in {tyRef, tyPtr, tyVar}:
|
if t.Kind in {tyRef, tyPtr, tyVar}:
|
||||||
var b = skipTypes(t.sons[0], abstractInst)
|
var b = skipTypes(t.sons[0], abstractInst)
|
||||||
if b.kind == tySet and mapSetType(b) == ctArray:
|
if b.kind == tySet and mapSetType(b) == ctArray:
|
||||||
return toRope("NU8*")
|
return getTypeDescAux(m, b, check)
|
||||||
# getTypeDescAux(m, b, check)
|
|
||||||
result = getTypeDescAux(m, t, check)
|
result = getTypeDescAux(m, t, check)
|
||||||
|
|
||||||
proc genProcParams(m: BModule, t: PType, rettype, params: var PRope,
|
proc genProcParams(m: BModule, t: PType, rettype, params: var PRope,
|
||||||
|
|
|
||||||
|
|
@ -196,7 +196,6 @@ proc raiseException(e: ref E_Base, ename: CString) {.compilerRtl.} =
|
||||||
e.name = ename
|
e.name = ename
|
||||||
if raiseHook != nil:
|
if raiseHook != nil:
|
||||||
if not raiseHook(e): return
|
if not raiseHook(e): return
|
||||||
GC_disable() # a bad thing is an error in the GC while raising an exception
|
|
||||||
if excHandler != nil:
|
if excHandler != nil:
|
||||||
pushCurrentException(e)
|
pushCurrentException(e)
|
||||||
c_longjmp(excHandler.context, 1)
|
c_longjmp(excHandler.context, 1)
|
||||||
|
|
@ -233,7 +232,6 @@ proc raiseException(e: ref E_Base, ename: CString) {.compilerRtl.} =
|
||||||
add(buf, "]\n")
|
add(buf, "]\n")
|
||||||
writeToStdErr(buf)
|
writeToStdErr(buf)
|
||||||
quitOrDebug()
|
quitOrDebug()
|
||||||
GC_enable()
|
|
||||||
|
|
||||||
proc reraiseException() {.compilerRtl.} =
|
proc reraiseException() {.compilerRtl.} =
|
||||||
if currException == nil:
|
if currException == nil:
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,8 @@ Version 0.8.x
|
||||||
Version 0.9.0
|
Version 0.9.0
|
||||||
* closures and anonymous procs
|
* closures and anonymous procs
|
||||||
* recursive iterators/coroutines
|
* recursive iterators/coroutines
|
||||||
|
* 2-phase type system for better interaction between macros, templates
|
||||||
|
and overloading
|
||||||
|
|
||||||
Planned features beyond 1.0
|
Planned features beyond 1.0
|
||||||
===========================
|
===========================
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue