svn: /phpdoc/en/trunk/internals2/ opcodes/cont.xml opcodes/jmp.xml opcodes.xml

From: Date: Sun, 26 Feb 2012 23:48:31 +0000
Subject: svn: /phpdoc/en/trunk/internals2/ opcodes/cont.xml opcodes/jmp.xml opcodes.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-9686@lists.php.net to get a copy of this message
frozenfire Sun, 26 Feb 2012 23:48:31 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=323570 Log: Added examples for ZEND_JMP and ZEND_CONT. Changed paths: U phpdoc/en/trunk/internals2/opcodes/cont.xml U phpdoc/en/trunk/internals2/opcodes/jmp.xml U phpdoc/en/trunk/internals2/opcodes.xml Modified: phpdoc/en/trunk/internals2/opcodes/cont.xml =================================================================== --- phpdoc/en/trunk/internals2/opcodes/cont.xml 2012-02-26 21:14:31 UTC (rev 323569) +++ phpdoc/en/trunk/internals2/opcodes/cont.xml 2012-02-26 23:48:31 UTC (rev 323570) @@ -15,4 +15,64 @@ ]]> </programlisting> </section> -</section> \ No newline at end of file + <section xml:id="internals2.opcodes.cont.listing"> + <title>PHP opcodes</title> + <simpara>Function name: (null)</simpara> + <simpara>compiled vars: !0 = $foo </simpara> + <informaltable> + <tgroup cols="7"> + <thead> + <row> + <entry>line</entry><entry>#</entry><entry>op</entry> + <entry>fetch</entry><entry>ext</entry><entry>return</entry> + <entry>operands</entry> + </row> + </thead> + <tbody> + <row> + <entry>6</entry><entry>0</entry> + <entry>ASSIGN</entry><entry></entry> + <entry></entry><entry></entry> + <entry>!0, false</entry> + </row> + <row> + <entry>7</entry><entry>1</entry> + <entry>BOOL_NOT</entry><entry></entry> + <entry></entry><entry>~1</entry> + <entry>!0</entry> + </row> + <row> + <entry></entry><entry>2</entry> + <entry>JMPZ</entry><entry></entry> + <entry></entry><entry></entry> + <entry>~1, ->5</entry> + </row> + <row> + <entry>8</entry><entry>3</entry> + <entry>ASSIGN</entry><entry></entry> + <entry></entry><entry></entry> + <entry>!0, true</entry> + </row> + <row> + <entry>9</entry><entry>4</entry> + <entry>CONT</entry><entry></entry> + <entry></entry><entry></entry> + <entry>1</entry> + </row> + <row> + <entry>10</entry><entry>5</entry> + <entry>JMP</entry><entry></entry> + <entry></entry><entry></entry> + <entry>->1</entry> + </row> + <row> + <entry>12</entry><entry>6</entry> + <entry>RETURN</entry><entry></entry> + <entry></entry><entry></entry> + <entry>1</entry> + </row> + </tbody> + </tgroup> + </informaltable> + </section> +</section> Modified: phpdoc/en/trunk/internals2/opcodes/jmp.xml =================================================================== --- phpdoc/en/trunk/internals2/opcodes/jmp.xml 2012-02-26 21:14:31 UTC (rev 323569) +++ phpdoc/en/trunk/internals2/opcodes/jmp.xml 2012-02-26 23:48:31 UTC (rev 323570) @@ -8,11 +8,69 @@ <![CDATA[ <?php /* - * + * Unconditonally jump to the address * opcode number: 42 - * No sample PHP yet */ + */ +$foo = false; +while(!$foo) { + $foo = true; +} ?> ]]> </programlisting> </section> -</section> \ No newline at end of file + <section xml:id="internals2.opcodes.jmp.listing"> + <title>PHP opcodes</title> + <simpara>Function name: (null)</simpara> + <simpara>compiled vars: !0 = $foo </simpara> + <informaltable> + <tgroup cols="7"> + <thead> + <row> + <entry>line</entry><entry>#</entry><entry>op</entry> + <entry>fetch</entry><entry>ext</entry><entry>return</entry> + <entry>operands</entry> + </row> + </thead> + <tbody> + <row> + <entry>6</entry><entry>0</entry> + <entry>ASSIGN</entry><entry></entry> + <entry></entry><entry></entry> + <entry>!0, false</entry> + </row> + <row> + <entry>7</entry><entry>1</entry> + <entry>BOOL_NOT</entry><entry></entry> + <entry></entry><entry>~1</entry> + <entry>!0</entry> + </row> + <row> + <entry></entry><entry>2</entry> + <entry>JMPZ</entry><entry></entry> + <entry></entry><entry></entry> + <entry>~1, ->5</entry> + </row> + <row> + <entry>8</entry><entry>3</entry> + <entry>ASSIGN</entry><entry></entry> + <entry></entry><entry></entry> + <entry>!0, true</entry> + </row> + <row> + <entry>9</entry><entry>4</entry> + <entry>JMP</entry><entry></entry> + <entry></entry><entry></entry> + <entry>->1</entry> + </row> + <row> + <entry>11</entry><entry>5</entry> + <entry>RETURN</entry><entry></entry> + <entry></entry><entry></entry> + <entry>1</entry> + </row> + </tbody> + </tgroup> + </informaltable> + </section> +</section> Modified: phpdoc/en/trunk/internals2/opcodes.xml =================================================================== --- phpdoc/en/trunk/internals2/opcodes.xml 2012-02-26 21:14:31 UTC (rev 323569) +++ phpdoc/en/trunk/internals2/opcodes.xml 2012-02-26 23:48:31 UTC (rev 323570) @@ -66,7 +66,7 @@ <row><entry>39</entry><entry><xref linkend="internals2.opcodes.assign-ref"/></entry><entry>yes</entry></row> <row><entry>40</entry><entry><xref linkend="internals2.opcodes.echo"/></entry><entry>yes</entry></row> <row><entry>41</entry><entry><xref linkend="internals2.opcodes.print"/></entry><entry>yes</entry></row> - <row><entry>42</entry><entry><xref linkend="internals2.opcodes.jmp"/></entry><entry>no</entry></row> + <row><entry>42</entry><entry><xref linkend="internals2.opcodes.jmp"/></entry><entry>yes</entry></row> <row><entry>43</entry><entry><xref linkend="internals2.opcodes.jmpz"/></entry><entry>yes</entry></row> <row><entry>44</entry><entry><xref linkend="internals2.opcodes.jmpnz"/></entry><entry>yes</entry></row> <row><entry>45</entry><entry><xref linkend="internals2.opcodes.jmpznz"/></entry><entry>yes</entry></row> @@ -75,7 +75,7 @@ <row><entry>48</entry><entry><xref linkend="internals2.opcodes.case"/></entry><entry>yes</entry></row> <row><entry>49</entry><entry><xref linkend="internals2.opcodes.switch-free"/></entry><entry>yes</entry></row> <row><entry>50</entry><entry><xref linkend="internals2.opcodes.brk"/></entry><entry>yes</entry></row> - <row><entry>51</entry><entry><xref linkend="internals2.opcodes.cont"/></entry><entry>no</entry></row> + <row><entry>51</entry><entry><xref linkend="internals2.opcodes.cont"/></entry><entry>yes</entry></row> <row><entry>52</entry><entry><xref linkend="internals2.opcodes.bool"/></entry><entry>yes</entry></row> <row><entry>53</entry><entry><xref linkend="internals2.opcodes.init-string"/></entry><entry>yes</entry></row> <row><entry>54</entry><entry><xref linkend="internals2.opcodes.add-char"/></entry><entry>yes</entry></row>

« previous php.doc.cvs (#9686) next »