summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/docgen.nim2
-rw-r--r--compiler/rodread.nim6
2 files changed, 4 insertions, 4 deletions
diff --git a/compiler/docgen.nim b/compiler/docgen.nim
index 4b52b1c92..8ae32492a 100644
--- a/compiler/docgen.nim
+++ b/compiler/docgen.nim
@@ -75,7 +75,7 @@ proc newDocumentor*(filename: string, config: StringTableRef): PDoc =
   ga('send', 'pageview');
 
 </script>
-    """ % [config["doc.googleAnalytics"]]
+    """ % [config.getOrDefault"doc.googleAnalytics"]
   else:
     result.analytics = ""
 
diff --git a/compiler/rodread.nim b/compiler/rodread.nim
index e4530c2cc..2a85c8975 100644
--- a/compiler/rodread.nim
+++ b/compiler/rodread.nim
@@ -372,7 +372,7 @@ proc decodeSym(r: PRodReader, info: TLineInfo): PSym =
   else:
     internalError(info, "decodeSym: no ident")
   #echo "decoding: {", ident.s
-  result = r.syms[id]
+  result = r.syms.getOrDefault(id)
   if result == nil:
     new(result)
     result.id = id
@@ -491,7 +491,7 @@ proc processCompilerProcs(r: PRodReader, module: PSym) =
     inc(r.pos)
     var key = decodeVInt(r.s, r.pos)
     inc(r.pos)                # #10
-    var s = r.syms[key]
+    var s = r.syms.getOrDefault(key)
     if s == nil:
       s = newStub(r, w, key)
       s.owner = module
@@ -737,7 +737,7 @@ proc getReader(moduleId: int): PRodReader =
   return nil
 
 proc rrGetSym(r: PRodReader, id: int, info: TLineInfo): PSym =
-  result = r.syms[id]
+  result = r.syms.getOrDefault(id)
   if result == nil:
     # load the symbol:
     var d = iiTableGet(r.index.tab, id)