diff options
author | Araq <rumpf_a@web.de> | 2014-04-09 00:33:51 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-04-09 00:33:51 +0200 |
commit | 4196757de768e5832d740e87164d0597e5f95363 (patch) | |
tree | dbc2494ad68c64c2781dfa2c5738274131aebdcf /compiler/jsgen.nim | |
parent | 3e25d5f24747c324a5a0f0deb555611166c96209 (diff) | |
download | Nim-4196757de768e5832d740e87164d0597e5f95363.tar.gz |
implemented region pointers
Diffstat (limited to 'compiler/jsgen.nim')
-rw-r--r-- | compiler/jsgen.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/jsgen.nim b/compiler/jsgen.nim index 0cbd4c364..a34d8f123 100644 --- a/compiler/jsgen.nim +++ b/compiler/jsgen.nim @@ -111,7 +111,7 @@ proc mapType(typ: PType): TJSTypeKind = let t = skipTypes(typ, abstractInst) case t.kind of tyVar, tyRef, tyPtr: - if skipTypes(t.sons[0], abstractInst).kind in MappedToObject: + if skipTypes(t.lastSon, abstractInst).kind in MappedToObject: result = etyObject else: result = etyBaseIndex @@ -912,7 +912,7 @@ proc genArrayAddr(p: PProc, n: PNode, r: var TCompRes) = proc genArrayAccess(p: PProc, n: PNode, r: var TCompRes) = var ty = skipTypes(n.sons[0].typ, abstractVarRange) - if ty.kind in {tyRef, tyPtr}: ty = skipTypes(ty.sons[0], abstractVarRange) + if ty.kind in {tyRef, tyPtr}: ty = skipTypes(ty.lastSon, abstractVarRange) case ty.kind of tyArray, tyArrayConstr, tyOpenArray, tySequence, tyString, tyCString, tyVarargs: @@ -957,7 +957,7 @@ proc genAddr(p: PProc, n: PNode, r: var TCompRes) = genFieldAddr(p, n, r) of nkBracketExpr: var ty = skipTypes(n.sons[0].typ, abstractVarRange) - if ty.kind in {tyRef, tyPtr}: ty = skipTypes(ty.sons[0], abstractVarRange) + if ty.kind in {tyRef, tyPtr}: ty = skipTypes(ty.lastSon, abstractVarRange) case ty.kind of tyArray, tyArrayConstr, tyOpenArray, tySequence, tyString, tyCString, tyVarargs: |