Persistance of method ASTs.

Review by @xeno-by @joriscode