Add XS implementation of get_code_location()