[Python-checkins] python/dist/src/Python compile.c,2.333,2.334

arigo at users.sourceforge.net arigo at users.sourceforge.net
Sat Oct 30 23:09:03 CEST 2004


Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29422

Modified Files:
	compile.c 
Log Message:
Fixed a comment and added another one.


Index: compile.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v
retrieving revision 2.333
retrieving revision 2.334
diff -u -d -r2.333 -r2.334
--- compile.c	30 Oct 2004 08:55:08 -0000	2.333
+++ compile.c	30 Oct 2004 21:08:59 -0000	2.334
@@ -651,7 +651,7 @@
 		        "if a and b:"
 			"if a or b:"
 		        "a and b or c"
-			"a and b and c"
+			"(a and b) and c"
 		   x:JUMP_IF_FALSE y   y:JUMP_IF_FALSE z  -->  x:JUMP_IF_FALSE z
 		   x:JUMP_IF_FALSE y   y:JUMP_IF_TRUE z  -->  x:JUMP_IF_FALSE y+3
 			where y+3 is the instruction following the second test.
@@ -749,6 +749,9 @@
 		while (adj--)
 			codestr[h++] = codestr[i++];
 	}
+	/* The following assertion detects the presence of NOPs in the input
+	   bytecode.  The compiler never produces NOPs so far; if one day it
+	   does, the way 'nops' is counted above must be changed. */
 	assert(h + nops == codelen);
 
 	code = PyString_FromStringAndSize((char *)codestr, h);



More information about the Python-checkins mailing list