refactor stack_usage on method_compiler