[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bytecodes and jumptables.



Dear Developers: 

    There has been discussions of bytecodes.
As I understand the term, by bytecode is the
"index" into a jumptable used during evaluation.

    From looking at the comments in  EVAL.C
of MzScheme source code, however, 
it seems that a jump table is not used (see 
below).  Rather, it seems that Eval.C has as
its main loop switch statement that dispatches on 
the type of object to be evaluated..

    So, am I right in thinking that "bytecode" in 
MzScheme does not refer to jumptable key or index,
but to labels in switch statement?

    I will appreciate any enlightenment. 
    
===========================================

In Eval.C, presumably Matthew Flatt wrote:

/* This is the main evaluator loop. It's roughly of the form:

   while (1) {
     if (now-applying) 
   {
       if (apply-type-1)
         ...
       else if (apply-type-2)
         ...
       else ...
     } 
   else 
   {
       switch (eval-type) 
   {
         case eval-type-1:
           ...
         case eval-type-2:
          ...
           ...
       }
     }
   }
*/