Merge pull request #3762 from yglukhov/isnil-fix
Fixed isNil codegen in JS
This commit is contained in:
commit
fa12a2188d
1 changed files with 1 additions and 1 deletions
|
|
@ -1333,7 +1333,7 @@ proc genMagic(p: PProc, n: PNode, r: var TCompRes) =
|
||||||
of mEqStr: binaryExpr(p, n, r, "eqStrings", "eqStrings($1, $2)")
|
of mEqStr: binaryExpr(p, n, r, "eqStrings", "eqStrings($1, $2)")
|
||||||
of mLeStr: binaryExpr(p, n, r, "cmpStrings", "(cmpStrings($1, $2) <= 0)")
|
of mLeStr: binaryExpr(p, n, r, "cmpStrings", "(cmpStrings($1, $2) <= 0)")
|
||||||
of mLtStr: binaryExpr(p, n, r, "cmpStrings", "(cmpStrings($1, $2) < 0)")
|
of mLtStr: binaryExpr(p, n, r, "cmpStrings", "(cmpStrings($1, $2) < 0)")
|
||||||
of mIsNil: unaryExpr(p, n, r, "", "$1 == null")
|
of mIsNil: unaryExpr(p, n, r, "", "($1 === null)")
|
||||||
of mEnumToStr: genRepr(p, n, r)
|
of mEnumToStr: genRepr(p, n, r)
|
||||||
of mNew, mNewFinalize: genNew(p, n)
|
of mNew, mNewFinalize: genNew(p, n)
|
||||||
of mSizeOf: r.res = rope(getSize(n.sons[1].typ))
|
of mSizeOf: r.res = rope(getSize(n.sons[1].typ))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue