support toplevel compile

support toplevel compile