summary refs log tree commit diff stats
path: root/compiler/ic/cbackend.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2023-11-20 21:12:13 +0100
committerGitHub <noreply@github.com>2023-11-20 21:12:13 +0100
commit02be027e9b3c146c0a594c3ea4fae7152fd8b974 (patch)
treeb9a95b4b29df31be23dafda1dcdc1ab4e2762372 /compiler/ic/cbackend.nim
parentcecaf9c56b1240a44a4de837e03694a0c55ec379 (diff)
downloadNim-02be027e9b3c146c0a594c3ea4fae7152fd8b974.tar.gz
IC: progress and refactorings (#22961)
Diffstat (limited to 'compiler/ic/cbackend.nim')
-rw-r--r--compiler/ic/cbackend.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/ic/cbackend.nim b/compiler/ic/cbackend.nim
index 97462f095..c2e6b08fe 100644
--- a/compiler/ic/cbackend.nim
+++ b/compiler/ic/cbackend.nim
@@ -147,12 +147,12 @@ proc generateCode*(g: ModuleGraph) =
   var alive = computeAliveSyms(g.packed, g.config)
 
   when false:
-    for i in 0..high(g.packed):
+    for i in 0..<len(g.packed):
       echo i, " is of status ", g.packed[i].status, " ", toFullPath(g.config, FileIndex(i))
 
   # First pass: Setup all the backend modules for all the modules that have
   # changed:
-  for i in 0..high(g.packed):
+  for i in 0..<len(g.packed):
     # case statement here to enforce exhaustive checks.
     case g.packed[i].status
     of undefined:
@@ -174,7 +174,7 @@ proc generateCode*(g: ModuleGraph) =
   let mainModuleIdx = g.config.projectMainIdx2.int
   # We need to generate the main module last, because only then
   # all init procs have been registered:
-  for i in 0..high(g.packed):
+  for i in 0..<len(g.packed):
     if i != mainModuleIdx:
       genPackedModule(g, i, alive)
   if mainModuleIdx >= 0: