summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorYuriy Glukhov <yglukhov@users.noreply.github.com>2017-05-10 10:29:30 +0300
committerAndreas Rumpf <rumpf_a@web.de>2017-05-10 09:29:30 +0200
commit6e0e3b75cf419f9f2e61aeccaa59f91160e29628 (patch)
tree1137d1ea3677bfaace30a67c2fe8d7816b64fc9b
parentfa3436fb657141127038d88431b4aad113c27cf6 (diff)
downloadNim-6e0e3b75cf419f9f2e61aeccaa59f91160e29628.tar.gz
Fixed const sets in JS (#5790)
-rw-r--r--compiler/jsgen.nim1
-rw-r--r--compiler/jstypes.nim2
2 files changed, 1 insertions, 2 deletions
diff --git a/compiler/jsgen.nim b/compiler/jsgen.nim
index eb3fb9f47..ee35356c9 100644
--- a/compiler/jsgen.nim
+++ b/compiler/jsgen.nim
@@ -2272,7 +2272,6 @@ proc myProcess(b: PPassContext, n: PNode): PNode =
   genModule(p, n)
   add(p.g.code, p.locals)
   add(p.g.code, p.body)
-  globals.unique = p.unique
 
 proc wholeCode(graph: ModuleGraph; m: BModule): Rope =
   for prc in globals.forwarded:
diff --git a/compiler/jstypes.nim b/compiler/jstypes.nim
index f49bd7668..ae30861e7 100644
--- a/compiler/jstypes.nim
+++ b/compiler/jstypes.nim
@@ -59,7 +59,7 @@ proc genObjectFields(p: PProc, typ: PType, n: PNode): Rope =
         u = rope(lengthOrd(field.typ))
       else: internalError(n.info, "genObjectFields(nkRecCase)")
       if result != nil: add(result, ", " & tnl)
-      addf(result, "[SetConstr($1), $2]",
+      addf(result, "[setConstr($1), $2]",
            [u, genObjectFields(p, typ, lastSon(b))])
     result = ("{kind: 3, offset: \"$1\", len: $3, " &
         "typ: $2, name: $4, sons: [$5]}") % [