Turn double_to_int into an AST class
Fix bug that would cause local variables with the same name as the global stack pointer to be generated