[svn:parrot] r39704 - trunk/include/parrot

petdance at svn.parrot.org petdance at svn.parrot.org
Mon Jun 22 05:07:16 UTC 2009


Author: petdance
Date: Mon Jun 22 05:07:15 2009
New Revision: 39704
URL: https://trac.parrot.org/parrot/changeset/39704

Log:
hoisting a variable reference in a macro

Modified:
   trunk/include/parrot/sub.h

Modified: trunk/include/parrot/sub.h
==============================================================================
--- trunk/include/parrot/sub.h	Mon Jun 22 05:01:40 2009	(r39703)
+++ trunk/include/parrot/sub.h	Mon Jun 22 05:07:15 2009	(r39704)
@@ -169,9 +169,10 @@
 
 #define PMC_get_sub(interp, pmc, sub) \
     do { \
-        if ((pmc)->vtable->base_type == enum_class_Sub || \
-            (pmc)->vtable->base_type == enum_class_Coroutine || \
-            (pmc)->vtable->base_type == enum_class_Eval)  \
+        const INTVAL type = (pmc)->vtable->base_type; \
+        if (type == enum_class_Sub || \
+            type == enum_class_Coroutine || \
+            type == enum_class_Eval)  \
         {\
             GETATTR_Sub_sub((interp), (pmc), (sub)); \
         } \


More information about the parrot-commits mailing list