diff src/pt-eval.cc @ 15023:75d1bc2fd6d2

Compile top level while loops in JIT. * src/pt-eval.cc (tree_evaluator::visit_while_command): Try compile while loops. * src/pt-jit.cc (jit_convert::jit_convert): Add first terminator to worklist. (tree_jit::execute): New overload. * src/pt-jit.h (tree_jit::execute): New overload. * src/pt-loop.cc (tree_while_command::~tree_while_command): Delete compiled. (tree_simple_for_command::~tree_simple_for_command): Only delete compiled if JIT is enabled. * src/pt-loop.h (tree_while_command::get_info, tree_while_command::stash_info): New function.
author Max Brister <max@2bass.com>
date Thu, 26 Jul 2012 12:17:56 -0500
parents 1f914446157d
children 741d2dbcc117
line wrap: on
line diff
--- a/src/pt-eval.cc	Thu Jul 26 09:43:23 2012 -0700
+++ b/src/pt-eval.cc	Thu Jul 26 12:17:56 2012 -0500
@@ -1034,6 +1034,11 @@
   if (error_state)
     return;
 
+#if HAVE_LLVM
+  if (jiter.execute (cmd))
+    return;
+#endif
+
   unwind_protect frame;
 
   frame.protect_var (in_loop_command);