mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 14:00:35 +00:00
Revert "make --gc:arc --exceptions:quirky work again [backport:1.4] (#16583)"
This reverts commit 822c7acd3c.
This commit is contained in:
@@ -513,8 +513,6 @@ proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo;
|
||||
if pass in {passCmd2, passPP}:
|
||||
defineSymbol(conf.symbols, "nimSeqsV2")
|
||||
defineSymbol(conf.symbols, "nimV2")
|
||||
if conf.exc == excNone and conf.backend != backendCpp:
|
||||
conf.exc = excGoto
|
||||
of "orc":
|
||||
conf.selectedGC = gcOrc
|
||||
defineSymbol(conf.symbols, "gcdestructors")
|
||||
@@ -524,8 +522,6 @@ proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo;
|
||||
if pass in {passCmd2, passPP}:
|
||||
defineSymbol(conf.symbols, "nimSeqsV2")
|
||||
defineSymbol(conf.symbols, "nimV2")
|
||||
if conf.exc == excNone and conf.backend != backendCpp:
|
||||
conf.exc = excGoto
|
||||
of "hooks":
|
||||
conf.selectedGC = gcHooks
|
||||
defineSymbol(conf.symbols, "gchooks")
|
||||
|
||||
@@ -197,6 +197,8 @@ proc mainCommand*(graph: ModuleGraph) =
|
||||
# A better solution might be to fix system.nim
|
||||
undefSymbol(conf.symbols, "useNimRtl")
|
||||
of backendInvalid: doAssert false
|
||||
if conf.selectedGC in {gcArc, gcOrc} and conf.backend != backendCpp:
|
||||
conf.exc = excGoto
|
||||
|
||||
var commandAlreadyProcessed = false
|
||||
|
||||
|
||||
@@ -44,13 +44,3 @@ proc setControlCHook(hook: proc () {.noconv.}) = discard
|
||||
|
||||
proc closureIterSetupExc(e: ref Exception) {.compilerproc, inline.} =
|
||||
sysFatal(ReraiseDefect, "exception handling is not available")
|
||||
|
||||
when gotoBasedExceptions:
|
||||
var nimInErrorMode {.threadvar.}: bool
|
||||
|
||||
proc nimErrorFlag(): ptr bool {.compilerRtl, inl.} =
|
||||
result = addr(nimInErrorMode)
|
||||
|
||||
proc nimTestErrorFlag() {.compilerRtl.} =
|
||||
if nimInErrorMode:
|
||||
sysFatal(ReraiseDefect, "exception handling is not available")
|
||||
|
||||
@@ -11,4 +11,9 @@ proc panic(s: string) {.noreturn.} =
|
||||
rawoutput(s)
|
||||
exit(1)
|
||||
|
||||
# Alternatively we also could implement these 2 here:
|
||||
#
|
||||
# proc sysFatal(exceptn: typeDesc, message: string) {.noReturn.}
|
||||
# proc sysFatal(exceptn: typeDesc, message, arg: string) {.noReturn.}
|
||||
|
||||
{.pop.}
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
|
||||
proc printf(frmt: cstring) {.varargs, importc, header: "<stdio.h>", cdecl.}
|
||||
proc exit(code: int) {.importc, header: "<stdlib.h>", cdecl.}
|
||||
|
||||
{.push stack_trace: off, profiler:off.}
|
||||
|
||||
proc rawoutput(s: string) =
|
||||
printf("%s\n", s)
|
||||
|
||||
proc panic(s: string) {.noreturn.} =
|
||||
rawoutput(s)
|
||||
exit(1)
|
||||
|
||||
{.pop.}
|
||||
@@ -1,7 +0,0 @@
|
||||
# bug #16404
|
||||
|
||||
proc printf(frmt: cstring) {.varargs, header: "<stdio.h>", cdecl.}
|
||||
|
||||
var x = 0
|
||||
inc x
|
||||
printf("hi %ld\n", x+4777)
|
||||
@@ -1,4 +0,0 @@
|
||||
--gc:arc
|
||||
--cpu:avr
|
||||
--os:standalone
|
||||
--compileOnly
|
||||
Reference in New Issue
Block a user