next steps for exception tracking
This commit is contained in:
parent
224f42bbd7
commit
9f38ff0c65
7 changed files with 73 additions and 34 deletions
|
|
@ -10,7 +10,8 @@
|
|||
## This module implements code generation for multi methods.
|
||||
|
||||
import
|
||||
intsets, options, ast, astalgo, msgs, idents, renderer, types, magicsys
|
||||
intsets, options, ast, astalgo, msgs, idents, renderer, types, magicsys,
|
||||
sempass2
|
||||
|
||||
proc genConv(n: PNode, d: PType, downcast: bool): PNode =
|
||||
var dest = skipTypes(d, abstractPtrs)
|
||||
|
|
@ -81,10 +82,12 @@ proc attachDispatcher(s: PSym, dispatcher: PNode) =
|
|||
|
||||
proc methodDef*(s: PSym, fromCache: bool) =
|
||||
var L = len(gMethods)
|
||||
for i in countup(0, L - 1):
|
||||
if sameMethodBucket(gMethods[i][0], s):
|
||||
for i in countup(0, L - 1):
|
||||
let disp = gMethods[i][0]
|
||||
if sameMethodBucket(disp, s):
|
||||
add(gMethods[i], s)
|
||||
attachDispatcher(s, lastSon(gMethods[i][0].ast))
|
||||
attachDispatcher(s, lastSon(disp.ast))
|
||||
when useEffectSystem: checkMethodEffects(disp, s)
|
||||
return
|
||||
add(gMethods, @[s])
|
||||
# create a new dispatcher:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue