alias analysis as required for the code gen and the HLO
This commit is contained in:
parent
c6213c9774
commit
2962ca7890
12 changed files with 262 additions and 80 deletions
|
|
@ -1132,14 +1132,6 @@ proc genMagic(p: var TProc, n: PNode, r: var TCompRes) =
|
|||
of mLtStr: binaryExpr(p, n, r, "cmpStrings", "(cmpStrings($1, $2) < 0)")
|
||||
of mIsNil: unaryExpr(p, n, r, "", "$1 == null")
|
||||
of mEnumToStr: genRepr(p, n, r)
|
||||
of mAssert:
|
||||
if (optAssert in p.Options):
|
||||
useMagic(p, "internalAssert")
|
||||
gen(p, n.sons[1], a)
|
||||
line = toRope(toLinenumber(n.info))
|
||||
filen = makeCString(ToFilename(n.info))
|
||||
appf(r.com, "if (!($3)) internalAssert($1, $2)",
|
||||
[filen, line, mergeExpr(a)])
|
||||
of mNew, mNewFinalize: genNew(p, n, r)
|
||||
of mSizeOf: r.res = toRope(getSize(n.sons[1].typ))
|
||||
of mChr, mArrToSeq: gen(p, n.sons[1], r) # nothing to do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue