Use weakmap so edgeReg doesn't break through the ctx abstraction