diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2024-09-17 20:01:21 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-17 14:01:21 +0200 |
commit | 21a161a535d915d34cb5bd6c340b8acc8c64ed90 (patch) | |
tree | 3da540c2968fb8ef5d25cdf46e82f584e15cb94c | |
parent | 1fbb67ffe9d3ec71fb1424609831eaca648c96d3 (diff) | |
download | Nim-21a161a535d915d34cb5bd6c340b8acc8c64ed90.tar.gz |
remove nimfrs and varslot (#24126)
was introduced for debugger https://github.com/nim-lang/Nim/commit/b63f322a466351bc57f8a4593009f0520c348527#diff-abd3a10386cf1ae32bfd3ffae82335a1938cc6c6d92be0ee492fcb44b9f2b552 https://github.com/nim-lang/Nim/blob/b63f322a466351bc57f8a4593009f0520c348527/lib/system/debugger.nim
-rw-r--r-- | compiler/cgen.nim | 12 | ||||
-rw-r--r-- | lib/core/typeinfo.nim | 10 |
2 files changed, 4 insertions, 18 deletions
diff --git a/compiler/cgen.nim b/compiler/cgen.nim index 2fde0e9ff..8a6bd96ec 100644 --- a/compiler/cgen.nim +++ b/compiler/cgen.nim @@ -783,15 +783,11 @@ $1define nimfr_(proc, file) \ TFrame FR_; \ FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; #nimFrame(&FR_); - $1define nimfrs_(proc, file, slots, length) \ - struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename;NI len;VarSlot s[slots];} FR_; \ - FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; #nimFrame((TFrame*)&FR_); +$1define nimln_(n) \ + FR_.line = n; - $1define nimln_(n) \ - FR_.line = n; - - $1define nimlf_(n, file) \ - FR_.line = n; FR_.filename = file; +$1define nimlf_(n, file) \ + FR_.line = n; FR_.filename = file; """ if p.module.s[cfsFrameDefines].len == 0: diff --git a/lib/core/typeinfo.nim b/lib/core/typeinfo.nim index 3c5433836..f2fee91c4 100644 --- a/lib/core/typeinfo.nim +++ b/lib/core/typeinfo.nim @@ -161,16 +161,6 @@ proc newAny(value: pointer, rawType: PNimType): Any {.inline.} = result.value = value result.rawType = rawType -when declared(system.VarSlot): - proc toAny*(x: VarSlot): Any {.inline.} = - ## Constructs an `Any` object from a variable slot `x`. - ## This captures `x`'s address, so `x` can be modified with its - ## `Any` wrapper! The caller needs to ensure that the wrapper - ## **does not** live longer than `x`! - ## This is provided for easier reflection capabilities of a debugger. - result.value = x.address - result.rawType = x.typ - proc toAny*[T](x: var T): Any {.inline.} = ## Constructs an `Any` object from `x`. This captures `x`'s address, so ## `x` can be modified with its `Any` wrapper! The caller needs to ensure |