summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-06-26 23:55:47 +0200
committerAraq <rumpf_a@web.de>2011-06-26 23:55:47 +0200
commit3e91b456e5418471417d6651bdfe8c8f195e1a53 (patch)
treef1f57798fbf4b2607a31812e22f66ad5696c1a31 /compiler
parentaa14667ca161049bba66b3096aafbc6e4badadbb (diff)
downloadNim-3e91b456e5418471417d6651bdfe8c8f195e1a53.tar.gz
second attempt to fix code gen for pegs.nim
Diffstat (limited to 'compiler')
-rwxr-xr-xcompiler/ccgexprs.nim3
-rwxr-xr-xcompiler/ccgtypes.nim3
2 files changed, 1 insertions, 5 deletions
diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim
index 2b84226d3..38cfafcfa 100755
--- a/compiler/ccgexprs.nim
+++ b/compiler/ccgexprs.nim
@@ -499,8 +499,7 @@ proc unaryArith(p: BProc, e: PNode, d: var TLoc, op: TMagic) =
 
 proc genDeref(p: BProc, e: PNode, d: var TLoc) =
   var a: TLoc
-  if mapType(e.sons[0].typ) == ctArray and
-      skipTypes(e.sons[0].typ.sons[0], abstractInst).kind != tySet:
+  if mapType(e.sons[0].typ) == ctArray:
     # XXX the amount of hacks for C's arrays is incredible, maybe we should
     # simply wrap them in a struct? --> Losing auto vectorization then?
     expr(p, e.sons[0], d)
diff --git a/compiler/ccgtypes.nim b/compiler/ccgtypes.nim
index 47828514e..cb4589bca 100755
--- a/compiler/ccgtypes.nim
+++ b/compiler/ccgtypes.nim
@@ -94,9 +94,6 @@ proc mapType(typ: PType): TCTypeKind =
     var base = skipTypes(typ.sons[0], abstractInst)
     case base.kind
     of tyOpenArray, tyArrayConstr, tyArray: result = ctArray
-    of tySet:
-      result = mapSetType(base)
-      if result != ctArray: result = ctPtr
     else: result = ctPtr
   of tyPointer: result = ctPtr
   of tySequence: result = ctNimSeq