minor code optimizations to reduce the number of times that the ast_frame