properly fix #10053 ; FieldDefect msg now shows discriminant value + lineinfo, in all backends (c,vm,js) (#11955)
* fix #10053 FieldError for vm * fixup * FieldError now also shows runtime value of discriminant * fix field error reporting in vm * also report culprit line info in err msg * fix errors for newruntime 2 * fix for js * fixup * PRTEMP4 * works * works * works perfect * refactor * std/private/repr_impl * suppport --gc:arc * cleanup * refactor * simplify * simplify * simplify * fixup * move out compiler.vmgen.genCustom * fixup * fixup * add tests * revert compiler/debugutils.nim * simplify reprDiscriminant * fixup * lib/std/private/repr_impl.nim -> lib/system/repr_impl.nim * try to fix D20210812T165220 * honor --declaredlocs * control toFileLineCol via --declaredlocs
This commit is contained in:
parent
3a1109a53b
commit
b24812df5f
18 changed files with 151 additions and 43 deletions
|
|
@ -171,8 +171,8 @@ proc raiseRangeError() {.compilerproc, noreturn.} =
|
|||
proc raiseIndexError(i, a, b: int) {.compilerproc, noreturn.} =
|
||||
raise newException(IndexDefect, formatErrorIndexBound(int(i), int(a), int(b)))
|
||||
|
||||
proc raiseFieldError(f: string) {.compilerproc, noreturn.} =
|
||||
raise newException(FieldDefect, f)
|
||||
proc raiseFieldError2(f: string, discVal: string) {.compilerproc, noreturn.} =
|
||||
raise newException(FieldDefect, formatFieldDefect(f, discVal))
|
||||
|
||||
proc setConstr() {.varargs, asmNoStackFrame, compilerproc.} =
|
||||
asm """
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue