allow 'cast' for the JS target

This commit is contained in:
Araq
2013-01-09 00:49:19 +01:00
parent 3b52a0a9f5
commit 86b19c44eb
2 changed files with 2 additions and 1 deletions

View File

@@ -1529,6 +1529,7 @@ proc gen(p: var TProc, n: PNode, r: var TCompRes) =
of nkCheckedFieldExpr: genCheckedFieldAccess(p, n, r)
of nkObjDownConv: gen(p, n.sons[0], r)
of nkObjUpConv: upConv(p, n, r)
of nkCast: gen(p, n.sons[1], r)
of nkChckRangeF: genRangeChck(p, n, r, "chckRangeF")
of nkChckRange64: genRangeChck(p, n, r, "chckRange64")
of nkChckRange: genRangeChck(p, n, r, "chckRange")

View File

@@ -142,7 +142,7 @@ when has_LLVM_Backend:
compileProject()
proc CommandCompileToEcmaScript =
incl(gGlobalOptions, optSafeCode)
#incl(gGlobalOptions, optSafeCode)
setTarget(osEcmaScript, cpuEcmaScript)
#initDefines()
DefineSymbol("nimrod") # 'nimrod' is always defined