Make topenv() static inlined
Merge pull request #1066 from xxuejie/static_inline_top_env

Make topenv() static inlined to avoid compiling error when using clang and -O0 mode