cvsuser     03/10/28 08:22:33

  Modified:    lib/Parrot/OpTrans CGP.pm
  Log:
  dont check ops_addr twice for NULL
  
  Revision  Changes    Path
  1.7       +5 -6      parrot/lib/Parrot/OpTrans/CGP.pm
  
  Index: CGP.pm
  ===================================================================
  RCS file: /cvs/public/parrot/lib/Parrot/OpTrans/CGP.pm,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -w -r1.6 -r1.7
  --- CGP.pm    16 Oct 2003 10:43:16 -0000      1.6
  +++ CGP.pm    28 Oct 2003 16:22:33 -0000      1.7
  @@ -6,7 +6,7 @@
   #
   # Author: leo
   #
  -# $Id: CGP.pm,v 1.6 2003/10/16 10:43:16 leo Exp $
  +# $Id: CGP.pm,v 1.7 2003/10/28 16:22:33 leo Exp $
   #
   
   use strict;
  @@ -45,13 +45,12 @@
   #define CUR_OPCODE (interpreter->code->byte_code + REL_PC)
   
   
  -static void** opcode_to_prederef(struct Parrot_Interp* interpreter,
  +PARROT_INLINE static void**
  +opcode_to_prederef(struct Parrot_Interp* interpreter,
                                           opcode_t* opcode_addr)
   {
  -    INTVAL offset_in_ops;
  -    if (opcode_addr == NULL) return NULL;
  -    offset_in_ops = opcode_addr - (opcode_t*) interpreter->code->byte_code;
  -    return interpreter->prederef_code + offset_in_ops;
  +    return interpreter->prederef_code +
  +        (opcode_addr - (opcode_t*) interpreter->code->byte_code);
   }
   
   END
  
  
  

Reply via email to