Skip to content

Commit

Permalink
Temporary disables IC
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgomez committed Jan 30, 2024
1 parent 40735ba commit e8a8418
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion compiler/ccgtypes.nim
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ proc mangleProc(m: BModule; s: PSym, makeUnique: bool = false): string =
if s.typ[i].isNil: continue
result.add encodeType(m, s.typ[i])

if result in m.g.mangledPrcs:
if result in m.g.mangledPrcs and m.g.config.symbolFiles == disabledSf:
result = mangleProc(m, s, true)
else:
m.g.mangledPrcs.incl(result)
Expand Down
18 changes: 11 additions & 7 deletions compiler/ccgutils.nim
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import
ast, types, msgs, wordrecg,
platform, trees, options, cgendata

import std/[hashes, strutils]
import std/[hashes, strutils, formatFloat]

when defined(nimPreviewSlimSystem):
import std/assertions
Expand Down Expand Up @@ -201,14 +201,18 @@ proc encodeType*(m: BModule; t: PType): string =
name.add "E"
name
of tyRange:
let val =
if t.n[0].typ.kind == tyFloat: $t.n[0].floatVal.int & "_" & $t.n[1].floatVal.int
else: $t.n[0].intVal & "_" & $t.n[1].intVal
encodeName("range_" & val)
var val = "range_"
if t.n[0].typ.kind in {tyFloat..tyFloat128}:
val.addFloat t.n[0].floatVal
val.add "_"
val.addFloat t.n[1].floatVal
else:
val.add $t.n[0].intVal & "_" & $t.n[1].intVal
encodeName(val)
of tyString..tyUInt64, tyPointer, tyBool, tyChar, tyVoid, tyAnything, tyNil, tyEmpty:
encodeName(kindName)
of tyAlias, tyInferred:
encodeType(m, t[0])
of tyAlias, tyInferred, tyOwned:
encodeType(m, t.elementType)
else:
assert false, "encodeType " & $t.kind
""

0 comments on commit e8a8418

Please sign in to comment.