diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2015-12-28 23:40:39 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2015-12-28 23:40:39 +0100 |
commit | c12c41c7adde1a7d8426ebe5b7744289e9a4668e (patch) | |
tree | 87badd1bbf25d44fcea4f66fad51734baea5ddc3 | |
parent | b3600a04c2389de2205479d6fbd17397589bc0b8 (diff) | |
download | Nim-c12c41c7adde1a7d8426ebe5b7744289e9a4668e.tar.gz |
made indirectAccess slightly more efficient
-rw-r--r-- | compiler/lowerings.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/lowerings.nim b/compiler/lowerings.nim index 6b60faba2..7a5c7f44b 100644 --- a/compiler/lowerings.nim +++ b/compiler/lowerings.nim @@ -165,9 +165,10 @@ proc indirectAccess*(a: PNode, b: string, info: TLineInfo): PNode = deref.typ = a.typ.skipTypes(abstractInst).sons[0] var t = deref.typ.skipTypes(abstractInst) var field: PSym + let bb = getIdent(b) while true: assert t.kind == tyObject - field = getSymFromList(t.n, getIdent(b)) + field = getSymFromList(t.n, bb) if field != nil: break t = t.sons[0] if t == nil: break |