Skip to content

Instantly share code, notes, and snippets.

@jorendorff
Forked from dherman/gist:e68d6e8b0d8bc50168c2
Last active August 29, 2015 14:03
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 jorendorff/a0e952c197b9a18c8224 to your computer and use it in GitHub Desktop.
Save jorendorff/a0e952c197b9a18c8224 to your computer and use it in GitHub Desktop.
%COMPILE(`eval(%expr)`, %env)

==>

do {
  let $callee = %COMPILE(`eval`, %env);
  let $arg = %COMPILE(%expr, %env);
  if ($callee === $runtime.crockEval) {
    let eval = $runtime.es7Eval;
    eval($runtime.crockpile($arg, %REFLECT_ENV(%env)))
  } else {
    $callee($arg)
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment