Skip to content

Instantly share code, notes, and snippets.

@rightfold
Created April 3, 2015 23:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rightfold/0e99480d409fc18efdbe to your computer and use it in GitHub Desktop.
Save rightfold/0e99480d409fc18efdbe to your computer and use it in GitHub Desktop.
template<typename CodeIt, typename ArgumentsIt, typename GetGlobal, typename GetString>
handle interpret(
CodeIt code_begin, CodeIt code_end, // begin and end of bytecode
ArgumentsIt arguments_begin, ArgumentsIt arguments_end, // begin and end of arguments
GetGlobal&& get_global, // functor that returns a global given its name
GetString&& get_string // functor that returns a string given its index in the constant pool
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment