use old typeinfo generation for hot code reloading (#22518)

* use old typeinfo generation for hot code reloading

* at least test hello world compilation on orc
This commit is contained in:
metagn
2023-08-20 07:30:36 +03:00
committed by GitHub
parent c0ecdb01a9
commit a4781dc4bc
3 changed files with 7 additions and 3 deletions

View File

@@ -1772,7 +1772,7 @@ proc genTypeInfoV2(m: BModule; t: PType; info: TLineInfo): Rope =
return prefixTI.rope & result & ")".rope
m.g.typeInfoMarkerV2[sig] = (str: result, owner: owner)
if m.compileToCpp:
if m.compileToCpp or m.hcrOn:
genTypeInfoV2OldImpl(m, t, origType, result, info)
else:
genTypeInfoV2Impl(m, t, origType, result, info)

View File

@@ -81,10 +81,13 @@ proc runBasicDLLTest(c, r: var TResults, cat: Category, options: string, isOrc =
testSpec r, makeTest("tests/dll/nimhcr_unit.nim", options & " --threads:off" & rpath, cat)
testSpec r, makeTest("tests/dll/visibility.nim", options & " --threads:off" & rpath, cat)
if "boehm" notin options and not isOrc:
if "boehm" notin options:
# hcr tests
testSpec r, makeTest("tests/dll/nimhcr_basic.nim", options & " --threads:off --forceBuild --hotCodeReloading:on " & rpath, cat)
var basicHcrTest = makeTest("tests/dll/nimhcr_basic.nim", options & " --threads:off --forceBuild --hotCodeReloading:on " & rpath, cat)
# test segfaults for now but compiles:
if isOrc: basicHcrTest.spec.action = actionCompile
testSpec r, basicHcrTest
# force build required - see the comments in the .nim file for more details
var hcri = makeTest("tests/dll/nimhcr_integration.nim",

View File

@@ -3,5 +3,6 @@ discard """
Hello world
'''
"""
# for now orc only tests successful compilation
echo "Hello world"