Metaprogrammed R->JS stubs