summary refs log tree commit diff stats
path: root/compiler/jsgen.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-10-24 19:20:02 +0200
committerGitHub <noreply@github.com>2016-10-24 19:20:02 +0200
commit6fd27a8a0849e2c1150b5f15b7b61d43b63642b2 (patch)
tree442c06665f3320b78a66b847095386aa67c823fe /compiler/jsgen.nim
parent3715a5ac91ede3002a3d94dbab2926d96d5ff257 (diff)
parentf5c3eb6a254e9e9f8c6389cb9f707a6ff878bd5c (diff)
downloadNim-6fd27a8a0849e2c1150b5f15b7b61d43b63642b2.tar.gz
Merge pull request #4945 from arnetheduck/cleanup-tyXxx
Cleanup ty xxx
Diffstat (limited to 'compiler/jsgen.nim')
-rw-r--r--compiler/jsgen.nim10
1 files changed, 4 insertions, 6 deletions
diff --git a/compiler/jsgen.nim b/compiler/jsgen.nim
index 6b95014f1..891e68f77 100644
--- a/compiler/jsgen.nim
+++ b/compiler/jsgen.nim
@@ -138,7 +138,7 @@ proc declareGlobal(p: PProc; id: int; r: Rope) =
 
 const
   MappedToObject = {tyObject, tyArray, tyArrayConstr, tyTuple, tyOpenArray,
-    tySet, tyBigNum, tyVarargs}
+    tySet, tyVarargs}
 
 proc mapType(typ: PType): TJSTypeKind =
   let t = skipTypes(typ, abstractInst)
@@ -151,15 +151,13 @@ proc mapType(typ: PType): TJSTypeKind =
   of tyPointer:
     # treat a tyPointer like a typed pointer to an array of bytes
     result = etyBaseIndex
-  of tyRange, tyDistinct, tyOrdinal, tyConst, tyMutable, tyProxy:
-    result = mapType(t.sons[0])
+  of tyRange, tyDistinct, tyOrdinal, tyProxy: result = mapType(t.sons[0])
   of tyInt..tyInt64, tyUInt..tyUInt64, tyEnum, tyChar: result = etyInt
   of tyBool: result = etyBool
   of tyFloat..tyFloat128: result = etyFloat
   of tySet: result = etyObject # map a set to a table
   of tyString, tySequence: result = etySeq
-  of tyObject, tyArray, tyArrayConstr, tyTuple, tyOpenArray, tyBigNum,
-     tyVarargs:
+  of tyObject, tyArray, tyArrayConstr, tyTuple, tyOpenArray, tyVarargs:
     result = etyObject
   of tyNil: result = etyNull
   of tyGenericInst, tyGenericParam, tyGenericBody, tyGenericInvocation,
@@ -171,7 +169,7 @@ proc mapType(typ: PType): TJSTypeKind =
     else: result = etyNone
   of tyProc: result = etyProc
   of tyCString: result = etyString
-  of tyUnused: internalError("mapType")
+  of tyUnused, tyUnused0, tyUnused1, tyUnused2: internalError("mapType")
 
 proc mapType(p: PProc; typ: PType): TJSTypeKind =
   if p.target == targetPHP: result = etyObject