21 | | diff -r parrot/docs/html/docs/book/pct/ch02_getting_started.pod.html parrot-trunk/docs/html/docs/book/pct/ch02_getting_started.pod.html |
| 24 | diff -r parrot-trunk/docs/html/docs/book/pct/ch02_getting_started.pod.html parrot/docs/html/docs/book/pct/ch02_getting_started.pod.html |
| 25 | 23c23 |
| 26 | < <a href="../../../../html/index.html">Home</a> » Getting Started |
| 27 | --- |
| 28 | > Getting Started |
| 29 | 154c154 |
| 30 | < Copyright © 2002-2009, Parrot Foundation. |
| 31 | --- |
| 32 | > Copyright © 2002-2010, Parrot Foundation. |
| 33 | diff -r parrot-trunk/docs/html/docs/book/pct/ch03_compiler_tools.pod.html parrot/docs/html/docs/book/pct/ch03_compiler_tools.pod.html |
| 34 | 23c23 |
| 35 | < <a href="../../../../html/index.html">Home</a> » Parrot Compiler Tools |
| 36 | --- |
| 37 | > Parrot Compiler Tools |
| 38 | 342c342 |
| 39 | < Copyright © 2002-2009, Parrot Foundation. |
| 40 | --- |
| 41 | > Copyright © 2002-2010, Parrot Foundation. |
| 42 | diff -r parrot-trunk/docs/html/docs/book/pct/ch04_pge.pod.html parrot/docs/html/docs/book/pct/ch04_pge.pod.html |
| 43 | 23c23 |
| 44 | < <a href="../../../../html/index.html">Home</a> » Grammar Engine |
| 45 | --- |
| 46 | > Grammar Engine |
| 47 | 631c631 |
| 48 | < Copyright © 2002-2009, Parrot Foundation. |
| 49 | --- |
| 50 | > Copyright © 2002-2010, Parrot Foundation. |
| 51 | diff -r parrot-trunk/docs/html/docs/book/pct/ch05_nqp.pod.html parrot/docs/html/docs/book/pct/ch05_nqp.pod.html |
| 52 | 23c23 |
| 53 | < <a href="../../../../html/index.html">Home</a> » Grammar Actions |
| 54 | --- |
| 55 | > Grammar Actions |
| 56 | 226c226 |
| 57 | < Copyright © 2002-2009, Parrot Foundation. |
| 58 | --- |
| 59 | > Copyright © 2002-2010, Parrot Foundation. |
| 60 | diff -r parrot-trunk/docs/html/docs/book/pir/ch01_introduction.pod.html parrot/docs/html/docs/book/pir/ch01_introduction.pod.html |
| 61 | 23c23 |
| 62 | < <a href="../../../../html/index.html">Home</a> » Introduction |
| 63 | --- |
| 64 | > Introduction |
| 65 | 162c162 |
| 66 | < Copyright © 2002-2009, Parrot Foundation. |
| 67 | --- |
| 68 | > Copyright © 2002-2010, Parrot Foundation. |
| 69 | diff -r parrot-trunk/docs/html/docs/book/pir/ch02_getting_started.pod.html parrot/docs/html/docs/book/pir/ch02_getting_started.pod.html |
| 70 | 23c23 |
| 71 | < <a href="../../../../html/index.html">Home</a> » Getting Started |
| 72 | --- |
| 73 | > Getting Started |
| 74 | 60c60 |
| 75 | < <p>To install Parrot in a different location, use the <code>--prefix</code> option to <em><a href="../../../Configure.pl.html">Configure.pl</a></em>:</p> |
| 76 | --- |
| 77 | > <p>To install Parrot in a different location, use the <code>--prefix</code> option to <em>Configure.pl</em>:</p> |
| 78 | 87c87 |
| 79 | < Copyright © 2002-2009, Parrot Foundation. |
| 80 | --- |
| 81 | > Copyright © 2002-2010, Parrot Foundation. |
| 82 | diff -r parrot-trunk/docs/html/docs/book/pir/ch03_basic_syntax.pod.html parrot/docs/html/docs/book/pir/ch03_basic_syntax.pod.html |
| 83 | 23c23 |
| 84 | < <a href="../../../../html/index.html">Home</a> » Basic Syntax |
| 85 | --- |
| 86 | > Basic Syntax |
| 87 | 216c216 |
| 88 | < Copyright © 2002-2009, Parrot Foundation. |
| 89 | --- |
| 90 | > Copyright © 2002-2010, Parrot Foundation. |
| 91 | diff -r parrot-trunk/docs/html/docs/book/pir/ch04_variables.pod.html parrot/docs/html/docs/book/pir/ch04_variables.pod.html |
| 92 | 23c23 |
| 93 | < <a href="../../../../html/index.html">Home</a> » Variables |
| 94 | --- |
| 95 | > Variables |
| 96 | 279,291c279,284 |
| 97 | < </pre> |
| 98 | < <p>Both <code>and</code> and <code>or</code> are short-circuiting ops. |
| 99 | < If they can determine what value to return from the first argument, |
| 100 | < they'll never evaluate the second. |
| 101 | < This is significant only for PMCs, |
| 102 | < as they might have side effects on evaluation.</p> |
| 103 | < |
| 104 | < <p>The <code>xor</code><!-- |
| 105 | < INDEX: xor opcode |
| 106 | < --> opcode returns the first argument if it is the only true value, |
| 107 | < returns the second argument if it is the only true value, |
| 108 | < and returns false if both values are true or both are false:</p> |
| 109 | < <pre> $I0 = xor 1, 0 # returns 1 |
| 110 | --- |
| 111 | > Both C<and> and C<or> are short-circuiting ops. If they can determine what |
| 112 | > value to return from the first argument, they'll never evaluate the second. |
| 113 | > This is significant only for PMCs, as they might have side effects on |
| 114 | > evaluation.The C<xor>X<xor opcode> opcode returns the first argument if it is the only |
| 115 | > true value, returns the second argument if it is the only true value, and |
| 116 | > returns false if both values are true or both are false:<pre> $I0 = xor 1, 0 # returns 1 |
| 117 | 296,298c289,290 |
| 118 | < <p>The <code>not</code><!-- |
| 119 | < INDEX: not opcode |
| 120 | < --> opcode returns a true value when the argument is false and a false value if the argument is true:</p> |
| 121 | --- |
| 122 | > The C<not>X<not opcode> opcode returns a true value when the argument is false |
| 123 | > and a false value if the argument is true: |
| 124 | 302,316c294,298 |
| 125 | < <p><!-- |
| 126 | < INDEX: bitwise opcodes |
| 127 | < --> The bitwise opcodes operate on their values a single bit at a time. |
| 128 | < <code>band</code><!-- |
| 129 | < INDEX: band opcode |
| 130 | < -->, |
| 131 | < <code>bor</code><!-- |
| 132 | < INDEX: bor opcode |
| 133 | < -->, |
| 134 | < and <code>bxor</code><!-- |
| 135 | < INDEX: bxor opcode |
| 136 | < --> return a value that is the logical AND, |
| 137 | < OR, |
| 138 | < or XOR of each bit in the source arguments. |
| 139 | < They each take two arguments.</p> |
| 140 | --- |
| 141 | > X<bitwise opcodes> |
| 142 | > The bitwise opcodes operate on their values a single bit at a time. |
| 143 | > C<band>X<band opcode>, C<bor>X<bor opcode>, and C<bxor>X<bxor opcode> return a |
| 144 | > value that is the logical AND, OR, or XOR of each bit in the source arguments. |
| 145 | > They each take two arguments. |
| 146 | 324,326c306,307 |
| 147 | < <p><code>band</code>, |
| 148 | < <code>bor</code>, |
| 149 | < and <code>bxor</code> also have variants that modify the result in place.</p> |
| 150 | --- |
| 151 | > C<band>, C<bor>, and C<bxor> also have variants that modify the result |
| 152 | > in place. |
| 153 | 334,336c315 |
| 154 | < <p><code>bnot</code><!-- |
| 155 | < INDEX: bnot opcode |
| 156 | < --> is the logical NOT of each bit in the source argument.</p> |
| 157 | --- |
| 158 | > C<bnot>X<bnot opcode> is the logical NOT of each bit in the source argument. |
| 159 | 343,349c322,326 |
| 160 | < <p><!-- |
| 161 | < INDEX: shl opcode |
| 162 | < --> <!-- |
| 163 | < INDEX: shr opcode |
| 164 | < --> <!-- |
| 165 | < INDEX: lsr opcode |
| 166 | < --> The logical and arithmetic shift operations shift their values by a specified number of bits:</p> |
| 167 | --- |
| 168 | > X<shl opcode> |
| 169 | > X<shr opcode> |
| 170 | > X<lsr opcode> |
| 171 | > The logical and arithmetic shift operations shift their values by a specified |
| 172 | > number of bits: |
| 173 | 361,372c338,344 |
| 174 | < <p><!-- |
| 175 | < INDEX: strings |
| 176 | < --> Parrot strings are buffers of variable-sized data. |
| 177 | < The most common use of strings is to store text data. |
| 178 | < Strings can also hold binary or other non-textual data, |
| 179 | < though this is rare.In general, |
| 180 | < a custom PMC is more useful. Parrot strings are flexible and powerful, |
| 181 | < to handle the complexity of human-readable (and computer-representable) text data. |
| 182 | < String operations work with string literals, |
| 183 | < variables, |
| 184 | < and constants, |
| 185 | < and with string-like PMCs.</p> |
| 186 | --- |
| 187 | > X<strings> |
| 188 | > Parrot strings are buffers of variable-sized data. The most common use of |
| 189 | > strings is to store text data. Strings can also hold binary or other |
| 190 | > non-textual data, though this is rare.N<In general, a custom PMC is more |
| 191 | > useful.> Parrot strings are flexible and powerful, to handle the complexity of |
| 192 | > human-readable (and computer-representable) text data. String operations work |
| 193 | > with string literals, variables, and constants, and with string-like PMCs. |
| 194 | 377,381c349,353 |
| 195 | < <p><!-- |
| 196 | < INDEX: string escapes |
| 197 | < --> <!-- |
| 198 | < INDEX: escape sequences |
| 199 | < --></p> |
| 200 | --- |
| 201 | > X<string escapes> |
| 202 | > X<escape sequences> |
| 203 | > |
| 204 | > Strings in double-quotes allow escape sequences using backslashes. Strings in |
| 205 | > single-quotes only allow escapes for nested quotes: |
| 206 | 383,384c355,356 |
| 207 | < <p>Strings in double-quotes allow escape sequences using backslashes. |
| 208 | < Strings in single-quotes only allow escapes for nested quotes:</p> |
| 209 | --- |
| 210 | > $S0 = "This string is \n on two lines" |
| 211 | > $S0 = 'This is a \n one-line string with a slash in it' |
| 212 | 386,387d357 |
| 213 | < <pre> $S0 = "This string is \n on two lines" |
| 214 | < $S0 = 'This is a \n one-line string with a slash in it'</pre> |
| 215 | 389c359,360 |
| 216 | < <p>Table 4.1 shows the escape sequences Parrot supports in double-quoted strings.</p> |
| 217 | --- |
| 218 | > Table 4.1 shows the escape sequences Parrot supports in double-quoted |
| 219 | > strings. |
| 220 | 394,396c365,375 |
| 221 | < <p><!-- |
| 222 | < INDEX: heredocs |
| 223 | < --> If you need more flexibility in defining a string, use a heredoc string literal. The <code><<</code> operator starts a heredoc. The string terminator immediately follows. All text until the terminator is part of the string. The terminator must appear on its own line, must appear at the beginning of the line, and may not have any trailing whitespace.</p> |
| 224 | --- |
| 225 | > X<heredocs> |
| 226 | > If you need more flexibility in defining a string, use a heredoc string |
| 227 | > literal. The C<E<lt>E<lt>> operator starts a heredoc. The string terminator |
| 228 | > immediately follows. All text until the terminator is part of the string. The |
| 229 | > terminator must appear on its own line, must appear at the beginning of the |
| 230 | > line, and may not have any trailing whitespace. |
| 231 | > |
| 232 | > $S2 = <<"End_Token" |
| 233 | > This is a multi-line string literal. Notice that |
| 234 | > it doesn't use quotation marks. |
| 235 | > End_Token |
| 236 | 398,401d376 |
| 237 | < <pre> $S2 = <<"End_Token" |
| 238 | < This is a multi-line string literal. Notice that |
| 239 | < it doesn't use quotation marks. |
| 240 | < End_Token</pre> |
| 241 | 406,410c381,382 |
| 242 | < <p><!-- |
| 243 | < INDEX: . operator |
| 244 | < --> <!-- |
| 245 | < INDEX: strings;concatenation |
| 246 | < --></p> |
| 247 | --- |
| 248 | > X<. operator> |
| 249 | > X<strings;concatenation> |
| 250 | 412c384,386 |
| 251 | < <p>Use the <code>.</code> operator to concatenate strings. The following example concatenates the string "cd" onto the string "ab" and stores the result in <code>$S1</code>.</p> |
| 252 | --- |
| 253 | > Use the C<.> operator to concatenate strings. The following example |
| 254 | > concatenates the string "cd" onto the string "ab" and stores the result in |
| 255 | > C<$S1>. |
| 256 | 417,419c391,394 |
| 257 | < <p><!-- |
| 258 | < INDEX: .= operator |
| 259 | < --> Concatenation has a <code>.=</code> variant to modify the result in place. In the next example, the <code>.=</code> operation appends "xy" onto the string "abcd" in <code>$S1</code>.</p> |
| 260 | --- |
| 261 | > X<.= operator> |
| 262 | > Concatenation has a C<.=> variant to modify the result in place. In the |
| 263 | > next example, the C<.=> operation appends "xy" onto the string "abcd" in |
| 264 | > C<$S1>. |
| 265 | 426,428c401,402 |
| 266 | < <p><!-- |
| 267 | < INDEX: repeat opcode |
| 268 | < --> The <code>repeat</code> opcode repeats a string a specified number of times:</p> |
| 269 | --- |
| 270 | > X<repeat opcode> |
| 271 | > The C<repeat> opcode repeats a string a specified number of times: |
| 272 | 433c407,408 |
| 273 | < <p>In this example, <code>repeat</code> generates a new string with "a" repeated five times and stores it in <code>$S1</code>.</p> |
| 274 | --- |
| 275 | > In this example, C<repeat> generates a new string with "a" repeated five |
| 276 | > times and stores it in C<$S1>. |
| 277 | 438,440c413,415 |
| 278 | < <p><!-- |
| 279 | < INDEX: length opcode |
| 280 | < --> The <code>length</code> opcode returns the length of a string in characters. This won't be the same as the length in <i>bytes</i> for multibyte encoded strings:</p> |
| 281 | --- |
| 282 | > X<length opcode> |
| 283 | > The C<length> opcode returns the length of a string in characters. This won't |
| 284 | > be the same as the length in I<bytes> for multibyte encoded strings: |
| 285 | 445c420 |
| 286 | < <p><code>length</code> has no equivalent for PMC strings.</p> |
| 287 | --- |
| 288 | > C<length> has no equivalent for PMC strings. |
| 289 | 450,452c425,428 |
| 290 | < <p>The simplest version of the <code>substr</code><!-- |
| 291 | < INDEX: substr opcode |
| 292 | < --> opcode takes three arguments: a source string, an offset position, and a length. It returns a substring of the original string, starting from the offset position (0 is the first character) and spanning the length:</p> |
| 293 | --- |
| 294 | > The simplest version of the C<substr>X<substr opcode> opcode takes three |
| 295 | > arguments: a source string, an offset position, and a length. It returns a |
| 296 | > substring of the original string, starting from the offset position (0 is the |
| 297 | > first character) and spanning the length: |
| 298 | 455,457c431,444 |
| 299 | < <p>This example extracts a two-character string from "abcde" at a one-character offset from the beginning of the string (starting with the second character). It generates a new string, "bc", in the destination register <code>$S0</code>.</p> |
| 300 | < |
| 301 | < <p>When the offset position is negative, it counts backward from the end of the string. Thus an offset of -1 starts at the last character of the string.</p> |
| 302 | --- |
| 303 | > This example extracts a two-character string from "abcde" at a one-character |
| 304 | > offset from the beginning of the string (starting with the second character). |
| 305 | > It generates a new string, "bc", in the destination register C<$S0>. |
| 306 | > |
| 307 | > When the offset position is negative, it counts backward from the end of the |
| 308 | > string. Thus an offset of -1 starts at the last character of the string. |
| 309 | > |
| 310 | > C<substr> no longer has a four-argument form, as in-place string operations |
| 311 | > have been removed. There is a C<replace> operator which will perform the |
| 312 | > replacement and return a new_string without modifying the old_string. |
| 313 | > The arguments are new_string, old_string, offset, count and |
| 314 | > replacement_string. The old_string is copied to the new_string with the |
| 315 | > replacement_string inserted from offset replacing the content for count |
| 316 | > characters. |
| 317 | 459,461c446,447 |
| 318 | < <p><code>substr</code> no longer has a four-argument form, as in-place string operations have been removed. There is a <code>replace</code> operator which will perform the replacement and return a new_string without modifying the old_string. The arguments are new_string, old_string, offset, count and replacement_string. The old_string is copied to the new_string with the replacement_string inserted from offset replacing the content for count characters.</p> |
| 319 | < |
| 320 | < <p>This example replaces the substring "bc" in <code>$S1</code> with the string "XYZ", and returns "aXYZde" in <code>$S0</code>, <code>$S1</code> is not changed:</p> |
| 321 | --- |
| 322 | > This example replaces the substring "bc" in C<$S1> with the string "XYZ", |
| 323 | > and returns "aXYZde" in C<$S0>, C<$S1> is not changed: |
| 324 | 467c453,456 |
| 325 | < <p>When the offset position in a <code>replace</code> is one character beyond the original string length, <code>replace</code> appends the replacement string just like the concatenation operator. If the replacement string is an empty string, the opcode removes the characters from the original string in the new string.</p> |
| 326 | --- |
| 327 | > When the offset position in a C<replace> is one character beyond the original |
| 328 | > string length, C<replace> appends the replacement string just like the |
| 329 | > concatenation operator. If the replacement string is an empty string, the |
| 330 | > opcode removes the characters from the original string in the new string. |
| 331 | 475,479c464,469 |
| 332 | < <p>The <code>chr</code><!-- |
| 333 | < INDEX: chr opcode |
| 334 | < --> opcode takes an integer value and returns the corresponding character in the ASCII character set as a one-character string. The <code>ord</code><!-- |
| 335 | < INDEX: ord opcode |
| 336 | < --> opcode takes a single character string and returns the integer value of the character at the first position in the string. The integer value of the character will differ depending on the current encoding of the string:</p> |
| 337 | --- |
| 338 | > The C<chr>X<chr opcode> opcode takes an integer value and returns the |
| 339 | > corresponding character in the ASCII character set as a one-character string. |
| 340 | > The C<ord>X<ord opcode> opcode takes a single character string and returns the |
| 341 | > integer value of the character at the first position in the string. The integer |
| 342 | > value of the character will differ depending on the current encoding of the |
| 343 | > string: |
| 344 | 483c473,475 |
| 345 | < <p><code>ord</code> has a two-argument variant that takes a character offset to select a single character from a multicharacter string. The offset must be within the length of the string:</p> |
| 346 | --- |
| 347 | > C<ord> has a two-argument variant that takes a character offset to select |
| 348 | > a single character from a multicharacter string. The offset must be within |
| 349 | > the length of the string: |
| 350 | 486c478,479 |
| 351 | < <p>A negative offset counts backward from the end of the string, so -1 is the last character.</p> |
| 352 | --- |
| 353 | > A negative offset counts backward from the end of the string, so -1 is |
| 354 | > the last character. |
| 355 | 492,494c485 |
| 356 | < <p><!-- |
| 357 | < INDEX: strings;formatting |
| 358 | < --></p> |
| 359 | --- |
| 360 | > X<strings;formatting> |
| 361 | 496,498c487,490 |
| 362 | < <p>The <code>sprintf</code><!-- |
| 363 | < INDEX: sprintf opcode |
| 364 | < --> opcode generates a formatted string from a series of values. It takes two arguments: a string specifying the format, and an array PMC containing the values to be formatted. The format string and the result can be either strings or PMCs:</p> |
| 365 | --- |
| 366 | > The C<sprintf>X<sprintf opcode> opcode generates a formatted string from a |
| 367 | > series of values. It takes two arguments: a string specifying the format, and |
| 368 | > an array PMC containing the values to be formatted. The format string and the |
| 369 | > result can be either strings or PMCs: |
| 370 | 502,508c494,510 |
| 371 | < <p>The format string is similar to C's <code>sprintf</code> function with extensions for Parrot data types. Each format field in the string starts with a <code>%</code> and ends with a character specifying the output format. Table 4.2 lists the available output format characters.</p> |
| 372 | < |
| 373 | < <p>Each format field supports several specifier options: flags, width, precision, and size. Table 4.3 lists the format flags.</p> |
| 374 | < |
| 375 | < <p>The width is a number defining the minimum width of the output from a field. The precision is the maximum width for strings or integers, and the number of decimal places for floating-point fields. If either width or precision is an asterisk (<code>*</code>), it takes its value from the next argument in the PMC.</p> |
| 376 | < |
| 377 | < <p>The size modifier defines the type of the argument the field takes. Table 4.4 lists the size flags. The values in the aggregate PMC must have a type compatible with the specified size.</p> |
| 378 | --- |
| 379 | > The format string is similar to C's C<sprintf> function with extensions for |
| 380 | > Parrot data types. Each format field in the string starts with a C<%> and ends |
| 381 | > with a character specifying the output format. Table 4.2 lists the available |
| 382 | > output format characters. |
| 383 | > |
| 384 | > Each format field supports several specifier options: R<flags>, R<width>, |
| 385 | > R<precision>, and R<size>. Table 4.3 lists the format flags. |
| 386 | > |
| 387 | > The R<width> is a number defining the minimum width of the output from |
| 388 | > a field. The R<precision> is the maximum width for strings or |
| 389 | > integers, and the number of decimal places for floating-point fields. |
| 390 | > If either R<width> or R<precision> is an asterisk (C<*>), it takes its |
| 391 | > value from the next argument in the PMC. |
| 392 | > |
| 393 | > The R<size> modifier defines the type of the argument the field takes. |
| 394 | > Table 4.4 lists the size flags. The values in the aggregate PMC must |
| 395 | > have a type compatible with the specified R<size>. |
| 396 | 512c514,519 |
| 397 | < <p>The format string of this <code>sprintf</code> example has two format fields. The first, <code>%#Px</code>, extracts a PMC argument (<code>P</code>) from the aggregate <code>$P2</code> and formats it as a hexadecimal integer (<code>x</code>) with a leading 0x (<code>#</code>). The second format field, <code>%+2.3Pf</code>, takes a PMC argument (<code>P</code>) and formats it as a floating-point number (<code>f</code>) with a minimum of two whole digits and a maximum of three decimal places (<code>2.3</code>) and a leading sign (<code>+</code>).</p> |
| 398 | --- |
| 399 | > The format string of this C<sprintf> example has two format fields. The first, |
| 400 | > C<%#Px>, extracts a PMC argument (C<P>) from the aggregate C<$P2> and formats |
| 401 | > it as a hexadecimal integer (C<x>) with a leading 0x (C<#>). The second format |
| 402 | > field, C<%+2.3Pf>, takes a PMC argument (C<P>) and formats it as a |
| 403 | > floating-point number (C<f>) with a minimum of two whole digits and a maximum |
| 404 | > of three decimal places (C<2.3>) and a leading sign (C<+>). |
| 405 | 514c521,522 |
| 406 | < <p>The test files <em><a href="../../../t/op/string.t.html">t/op/string.t</a></em> and <em><a href="../../../t/op/sprintf.t.html">t/op/sprintf.t</a></em> have many more examples of format strings.</p> |
| 407 | --- |
| 408 | > The test files F<t/op/string.t> and F<t/op/sprintf.t> have many more |
| 409 | > examples of format strings. |
| 410 | 519,521c527,529 |
| 411 | < <p>The <code>join</code><!-- |
| 412 | < INDEX: join opcode |
| 413 | < --> opcode joins the elements of an array PMC into a single string. The first argument separates the individual elements of the PMC in the final string result.</p> |
| 414 | --- |
| 415 | > The C<join>X<join opcode> opcode joins the elements of an array PMC into |
| 416 | > a single string. The first argument separates the individual elements of |
| 417 | > the PMC in the final string result. |
| 418 | 531c539,541 |
| 419 | < <p>This example builds a <code>Array</code> in <code>$P0</code> with the values <code>"hi"</code>, <code>0</code>, <code>1</code>, <code>0</code>, and <code>"parrot"</code>. It then joins those values (separated by the string <code>"__"</code>) into a single string stored in <code>$S0</code>.</p> |
| 420 | --- |
| 421 | > This example builds a C<Array> in C<$P0> with the values C<"hi">, C<0>, C<1>, |
| 422 | > C<0>, and C<"parrot">. It then joins those values (separated by the string |
| 423 | > C<"__">) into a single string stored in C<$S0>. |
| 424 | 536c546,547 |
| 425 | < <p>Splitting a string yields a new array containing the resulting substrings of the original string.</p> |
| 426 | --- |
| 427 | > Splitting a string yields a new array containing the resulting substrings of |
| 428 | > the original string. |
| 429 | 538c549,551 |
| 430 | < <p>This example splits the string "abc" into individual characters and stores them in an array in <code>$P0</code>. It then prints out the first and third elements of the array.</p> |
| 431 | --- |
| 432 | > This example splits the string "abc" into individual characters and stores them |
| 433 | > in an array in C<$P0>. It then prints out the first and third elements of the |
| 434 | > array. |
| 435 | 548,550c561,564 |
| 436 | < <p>The <code>index</code><!-- |
| 437 | < INDEX: index opcode |
| 438 | < --> opcode searches for a substring within a string. If it finds the substring, it returns the position where the substring was found as a character offset from the beginning of the string. If it fails to find the substring, it returns -1:</p> |
| 439 | --- |
| 440 | > The C<index>X<index opcode> opcode searches for a substring |
| 441 | > within a string. If it finds the substring, it returns the position |
| 442 | > where the substring was found as a character offset from the beginning |
| 443 | > of the string. If it fails to find the substring, it returns -1: |
| 444 | 556c570,571 |
| 445 | < <p><code>index</code> also has a three-argument version, where the final argument defines an offset position for starting the search.</p> |
| 446 | --- |
| 447 | > C<index> also has a three-argument version, where the final argument |
| 448 | > defines an offset position for starting the search. |
| 449 | 560c575,576 |
| 450 | < <p>This example finds the second "eb" in "Beeblebrox" instead of the first, because the search skips the first three characters in the string.</p> |
| 451 | --- |
| 452 | > This example finds the second "eb" in "Beeblebrox" instead of the first, |
| 453 | > because the search skips the first three characters in the string. |
| 454 | 565,571c581,585 |
| 455 | < <p>The numeric bitwise opcodes also have string variants for AND, OR, and XOR: <code>bors</code><!-- |
| 456 | < INDEX: bors opcode |
| 457 | < -->, <code>bands</code><!-- |
| 458 | < INDEX: bands opcode |
| 459 | < -->, and <code>bxors</code><!-- |
| 460 | < INDEX: bxors opcode |
| 461 | < -->. These take string or string-like PMC arguments and perform the logical operation on each byte of the strings to produce the result string. Remember that in-place string operations are no longer available.</p> |
| 462 | --- |
| 463 | > The numeric bitwise opcodes also have string variants for AND, OR, and XOR: |
| 464 | > C<bors>X<bors opcode>, C<bands>X<bands opcode>, and C<bxors>X<bxors opcode>. |
| 465 | > These take string or string-like PMC arguments and perform the logical |
| 466 | > operation on each byte of the strings to produce the result string. |
| 467 | > Remember that in-place string operations are no longer available. |
| 468 | 581c595,596 |
| 469 | < <p>The bitwise string opcodes produce meaningful results only when used with simple ASCII strings, because Parrot performs bitwise operations per byte.</p> |
| 470 | --- |
| 471 | > The bitwise string opcodes produce meaningful results only when used with |
| 472 | > simple ASCII strings, because Parrot performs bitwise operations per byte. |
| 473 | 586,590c601,604 |
| 474 | < <p>Strings use copy-on-write (COW)<!-- |
| 475 | < INDEX: copy-on-write |
| 476 | < --><!-- |
| 477 | < INDEX: COW (copy-on-write) |
| 478 | < --> optimizations. A call to <code>$S1 = $S0</code> doesn't immediately make a copy of <code>$S0</code>, it only makes both variables point to the same string. Parrot doesn't make a copy of the string until one of two strings is modified.</p> |
| 479 | --- |
| 480 | > Strings use copy-on-write (COW)X<copy-on-write>X<COW (copy-on-write)> |
| 481 | > optimizations. A call to C<$S1 = $S0> doesn't immediately make a copy of |
| 482 | > C<$S0>, it only makes both variables point to the same string. Parrot |
| 483 | > doesn't make a copy of the string until one of two strings is modified. |
| 484 | 597c611,614 |
| 485 | < <p>Modifying one of the two variables causes Parrot to create a new string. This example preserves the existing value in <code>$S0</code> and assigns the new value to the new string in <code>$S1</code>. The benefit of copy-on-write is avoiding the cost of copying strings until the copies are necessary.</p> |
| 486 | --- |
| 487 | > Modifying one of the two variables causes Parrot to create a new string. This |
| 488 | > example preserves the existing value in C<$S0> and assigns the new value to the |
| 489 | > new string in C<$S1>. The benefit of copy-on-write is avoiding the cost of |
| 490 | > copying strings until the copies are necessary. |
| 491 | 602,610c619,637 |
| 492 | < <p><!-- |
| 493 | < INDEX: charset |
| 494 | < --> <!-- |
| 495 | < INDEX: ASCII character set |
| 496 | < --> <!-- |
| 497 | < INDEX: encoding |
| 498 | < --> Years ago, strings only needed to support the ASCII character set (or charset), a mapping of 128 bit patterns to symbols and English-language characters. This worked as long as everyone using a computer read and wrote English and only used a small handful of punctuation symbols. In other words, it was woefully insufficient. A modern string system must manage charsets in order to make sense out of all the string data in the world. A modern string system must also handle different encodings -- ways to represent various charsets in memory and on disk.</p> |
| 499 | < |
| 500 | < <p>Every string in Parrot has an associated encoding and character set. The default charset is 8-bit ASCII, which is almost universally supported. Double-quoted string constants can have an optional prefix specifying the string's encoding and charset.As you might suspect, single-quoted strings do not support this. Parrot tracks information about encoding and charset internally, and automatically converts strings when necessary to preserve these characteristics. Strings constants may have prefixes of the form <code>encoding:charset:</code>.</p> |
| 501 | --- |
| 502 | > X<charset> |
| 503 | > X<ASCII character set> |
| 504 | > X<encoding> |
| 505 | > Years ago, strings only needed to support the ASCII character set (or |
| 506 | > charset), a mapping of 128 bit patterns to symbols and English-language |
| 507 | > characters. This worked as long as everyone using a computer read and |
| 508 | > wrote English and only used a small handful of punctuation symbols. In |
| 509 | > other words, it was woefully insufficient. A modern string system must |
| 510 | > manage charsets in order to make sense out of all the string data in the |
| 511 | > world. A modern string system must also handle different encodings -- |
| 512 | > ways to represent various charsets in memory and on disk. |
| 513 | > |
| 514 | > Every string in Parrot has an associated encoding and character set. The default |
| 515 | > charset is 8-bit ASCII, which is almost universally supported. Double-quoted |
| 516 | > string constants can have an optional prefix specifying the string's encoding |
| 517 | > and charset.N<As you might suspect, single-quoted strings do not support this.> |
| 518 | > Parrot tracks information about encoding and charset internally, and |
| 519 | > automatically converts strings when necessary to preserve these |
| 520 | > characteristics. Strings constants may have prefixes of the form C<encoding:charset:>. |
| 521 | 616,630c643,663 |
| 522 | < <p><!-- |
| 523 | < INDEX: ISO 8859-1 character set |
| 524 | < --> <!-- |
| 525 | < INDEX: Latin 1 character set |
| 526 | < --> <!-- |
| 527 | < INDEX: UCS-2 encoding |
| 528 | < --> <!-- |
| 529 | < INDEX: UTF-8 encoding |
| 530 | < --> <!-- |
| 531 | < INDEX: UTF-16 encoding |
| 532 | < --> Parrot supports the character sets <code>ascii</code>, <code>binary</code>, <code>iso-8859-1</code> (Latin 1), and <code>unicode</code> and the encodings <code>fixed_8</code>, <code>ucs2</code>, <code>utf8</code>, and <code>utf16</code>.</p> |
| 533 | < |
| 534 | < <p>The <code>binary</code> charset treats the string as a buffer of raw unformatted binary data. It isn't really a string per se, because binary data contains no readable characters. This exists to support libraries which manipulate binary data that doesn't easily fit into any other primitive data type.</p> |
| 535 | < |
| 536 | < <p>When Parrot operates on two strings (as in concatenation or comparison), they must both use the same character set and encoding. Parrot will automatically upgrade one or both of the strings to the next highest compatible format as necessary. ASCII strings will automatically upgrade to UTF-8 strings if needed, and UTF-8 will upgrade to UTF-16. All of these conversions happen inside Parrot, so the programmer doesn't need to worry about the details.</p> |
| 537 | --- |
| 538 | > X<ISO 8859-1 character set> |
| 539 | > X<Latin 1 character set> |
| 540 | > X<UCS-2 encoding> |
| 541 | > X<UTF-8 encoding> |
| 542 | > X<UTF-16 encoding> |
| 543 | > Parrot supports the character sets C<ascii>, C<binary>, C<iso-8859-1> |
| 544 | > (Latin 1), and C<unicode> and the encodings C<fixed_8>, C<ucs2>, |
| 545 | > C<utf8>, and C<utf16>. |
| 546 | > |
| 547 | > The C<binary> charset treats the string as a buffer of raw unformatted |
| 548 | > binary data. It isn't really a string per se, because binary data |
| 549 | > contains no readable characters. This exists to support libraries which |
| 550 | > manipulate binary data that doesn't easily fit into any other primitive |
| 551 | > data type. |
| 552 | > |
| 553 | > When Parrot operates on two strings (as in concatenation or comparison), they |
| 554 | > must both use the same character set and encoding. Parrot will automatically |
| 555 | > upgrade one or both of the strings to the next highest compatible format as |
| 556 | > necessary. ASCII strings will automatically upgrade to UTF-8 strings if needed, |
| 557 | > and UTF-8 will upgrade to UTF-16. All of these conversions happen inside |
| 558 | > Parrot, so the programmer doesn't need to worry about the details. |
| 559 | 635,639c668,675 |
| 560 | < <p><!-- |
| 561 | < INDEX: Polymorphic Containers (PMCs) |
| 562 | < --> <!-- |
| 563 | < INDEX: PMCs (Polymorphic Containers) |
| 564 | < --> Polymorphic Containers (PMCs) are the basis for complex data types and object-oriented behavior in Parrot. In PIR, any variable that isn't a low-level integer, number, or string is a PMC. PMC variables act much like the low-level variables, but you have to instantiate a new PMC object before you use it. The <code>new</code> opcode creates a new PMC object of the specified type.</p> |
| 565 | --- |
| 566 | > X<Polymorphic Containers (PMCs)> |
| 567 | > X<PMCs (Polymorphic Containers)> |
| 568 | > Polymorphic Containers (PMCs) are the basis for complex data types and |
| 569 | > object-oriented behavior in Parrot. In PIR, any variable that isn't a |
| 570 | > low-level integer, number, or string is a PMC. PMC variables act much |
| 571 | > like the low-level variables, but you have to instantiate a new PMC |
| 572 | > object before you use it. The C<new> opcode creates a new PMC object of |
| 573 | > the specified type. |
| 574 | 644,648c680,687 |
| 575 | < <p>This example creates a <code>String</code> object, stores it in the PMC register variable <code>$P0</code>, assigns it the value "That's a bollard and not a parrot", and prints it.</p> |
| 576 | < |
| 577 | < <p>Every PMC has a type that indicates what data it can store and what behavior it supports. The <code>typeof</code><!-- |
| 578 | < INDEX: typeof opcode |
| 579 | < --> opcode reports the type of a PMC. When the result is a string variable, <code>typeof</code> returns the name of the type:</p> |
| 580 | --- |
| 581 | > This example creates a C<String> object, stores it in the PMC register |
| 582 | > variable C<$P0>, assigns it the value "That's a bollard and not a |
| 583 | > parrot", and prints it. |
| 584 | > |
| 585 | > Every PMC has a type that indicates what data it can store and what |
| 586 | > behavior it supports. The C<typeof>X<typeof opcode> opcode reports the |
| 587 | > type of a PMC. When the result is a string variable, C<typeof> returns |
| 588 | > the name of the type: |
| 589 | 653c692,693 |
| 590 | < <p>When the result is a PMC variable, <code>typeof</code> returns the <code>Class</code> PMC for that object type.</p> |
| 591 | --- |
| 592 | > When the result is a PMC variable, C<typeof> returns the C<Class> PMC |
| 593 | > for that object type. |
| 594 | 658,664c698,707 |
| 595 | < <p><!-- |
| 596 | < INDEX: scalar PMCs |
| 597 | < --> <!-- |
| 598 | < INDEX: PMCs (Polymorphic Containers);scalar |
| 599 | < --> In most of the examples shown so far, PMCs duplicate the behavior of integers, numbers, and strings. Parrot provides a set of PMCs for this exact purpose. <code>Integer</code>, <code>Float</code>, and <code>String</code> are thin overlays on Parrot's low-level integers, numbers, and strings.</p> |
| 600 | < |
| 601 | < <p>A previous example showed a string literal assigned to a PMC variable of type <code>String</code>. Direct assignment of a literal to a PMC works for all the low-level types and their PMC equivalents:</p> |
| 602 | --- |
| 603 | > X<scalar PMCs> |
| 604 | > X<PMCs (Polymorphic Containers);scalar> |
| 605 | > In most of the examples shown so far, PMCs duplicate the behavior of integers, |
| 606 | > numbers, and strings. Parrot provides a set of PMCs for this exact purpose. |
| 607 | > C<Integer>, C<Float>, and C<String> are thin overlays on Parrot's low-level |
| 608 | > integers, numbers, and strings. |
| 609 | > |
| 610 | > A previous example showed a string literal assigned to a PMC variable of type |
| 611 | > C<String>. Direct assignment of a literal to a PMC works for all the low-level |
| 612 | > types and their PMC equivalents: |
| 613 | 674,676c717 |
| 614 | < <p><!-- |
| 615 | < INDEX: boxing |
| 616 | < --></p> |
| 617 | --- |
| 618 | > X<boxing> |
| 619 | 678c719,722 |
| 620 | < <p>You may also assign non-constant low-level integer, number, or string registers directly to a PMC. The PMC handles the conversion from the low-level type to its own internal storage.This conversion of a simpler type to a more complex type is "boxing".</p> |
| 621 | --- |
| 622 | > You may also assign non-constant low-level integer, number, or string registers |
| 623 | > directly to a PMC. The PMC handles the conversion from the low-level type to |
| 624 | > its own internal storage.N<This conversion of a simpler type to a more complex |
| 625 | > type is "boxing".> |
| 626 | 691c735,736 |
| 627 | < <p>The <code>box</code> opcode is a handy shortcut to create the appropriate PMC object from an integer, number, or string literal or variable.</p> |
| 628 | --- |
| 629 | > The C<box> opcode is a handy shortcut to create the appropriate PMC |
| 630 | > object from an integer, number, or string literal or variable. |
| 631 | 698,700c743,746 |
| 632 | < <p><!-- |
| 633 | < INDEX: unboxing |
| 634 | < --> In the reverse situation, when assigning a PMC to an integer, number, or string variable, the PMC also has the ability to convert its value to the low-level type.The reverse of "boxing" is "unboxing".</p> |
| 635 | --- |
| 636 | > X<unboxing> |
| 637 | > In the reverse situation, when assigning a PMC to an integer, number, or |
| 638 | > string variable, the PMC also has the ability to convert its value to |
| 639 | > the low-level type.N<The reverse of "boxing" is "unboxing".> |
| 640 | 716,724c762,768 |
| 641 | < <p>This example creates <code>Integer</code><!-- |
| 642 | < INDEX: Integer PMC |
| 643 | < -->, <code>Float</code><!-- |
| 644 | < INDEX: Float PMC |
| 645 | < -->, and <code>String</code><!-- |
| 646 | < INDEX: String PMC |
| 647 | < --> PMCs, and shows the effect of assigning each one back to a low-level type.</p> |
| 648 | < |
| 649 | < <p>Converting a string to an integer or number only makes sense when the contents of the string are a number. The <code>String</code> PMC will attempt to extract a number from the beginning of the string, but otherwise will return a false value.</p> |
| 650 | --- |
| 651 | > This example creates C<Integer>X<Integer PMC>, C<Float>X<Float PMC>, |
| 652 | > and C<String>X<String PMC> PMCs, and shows the effect of assigning each |
| 653 | > one back to a low-level type. |
| 654 | > |
| 655 | > Converting a string to an integer or number only makes sense when the contents |
| 656 | > of the string are a number. The C<String> PMC will attempt to extract a number |
| 657 | > from the beginning of the string, but otherwise will return a false value. |
| 658 | 729,733c773,778 |
| 659 | < <p><!-- |
| 660 | < INDEX: aggregate PMCs |
| 661 | < --> <!-- |
| 662 | < INDEX: PMCs (Polymorphic Containers);aggregate |
| 663 | < --> PMCs can define complex types that hold multiple values, commonly called aggregates. Two basic aggregate types are ordered arrays and associative arrays. The primary difference between these is that ordered arrays use integer keys for indexes and associative arrays use string keys.</p> |
| 664 | --- |
| 665 | > X<aggregate PMCs> |
| 666 | > X<PMCs (Polymorphic Containers);aggregate> |
| 667 | > PMCs can define complex types that hold multiple values, commonly called |
| 668 | > aggregates. Two basic aggregate types are ordered arrays and associative |
| 669 | > arrays. The primary difference between these is that ordered arrays use integer |
| 670 | > keys for indexes and associative arrays use string keys. |
| 671 | 735c780,781 |
| 672 | < <p>Aggregate PMCs support the use of numeric or string keys. PIR also offers a extensive set of operations for manipulating aggregate data types.</p> |
| 673 | --- |
| 674 | > Aggregate PMCs support the use of numeric or string keys. PIR also offers a |
| 675 | > extensive set of operations for manipulating aggregate data types. |
| 676 | 740,748c786,809 |
| 677 | < <p><!-- |
| 678 | < INDEX: arrays |
| 679 | < --> <!-- |
| 680 | < INDEX: ordered arrays |
| 681 | < --> Parrot provides several ordered array PMCs, differentiated by whether the array should store booleans, integers, numbers, strings, or other PMCs, and whether the array should maintain a fixed size or dynamically resize for the number of elements it stores.</p> |
| 682 | < |
| 683 | < <p>The core array types are <code>FixedPMCArray</code>, <code>ResizablePMCArray</code>, <code>FixedIntegerArray</code>, <code>ResizableIntegerArray</code>, <code>FixedFloatArray</code>, <code>ResizableFloatArray</code>, <code>FixedStringArray</code>, <code>ResizableStringArray</code>, <code>FixedBooleanArray</code>, and <code>ResizableBooleanArray</code>. The array types that start with "Fixed" have a fixed size and do not allow elements to be added outside their allocated size. The "Resizable" variants automatically extend themselves as more elements are added.With some additional overhead for checking array bounds and reallocating array memory. The array types that include "String", "Integer", or "Boolean" in the name use alternate packing methods for greater memory efficiency.</p> |
| 684 | < |
| 685 | < <p>Parrot's core ordered array PMCs all have zero-based integer keys. Extracting or inserting an element into the array uses PIR's standard key syntax, with the key in square brackets after the variable name. An lvalue key sets the value for that key. An rvalue key extracts the value for that key in the aggregate to use as the argument value:</p> |
| 686 | --- |
| 687 | > X<arrays> |
| 688 | > X<ordered arrays> |
| 689 | > Parrot provides several ordered array PMCs, differentiated by whether |
| 690 | > the array should store booleans, integers, numbers, strings, or other |
| 691 | > PMCs, and whether the array should maintain a fixed size or dynamically |
| 692 | > resize for the number of elements it stores. |
| 693 | > |
| 694 | > The core array types are C<FixedPMCArray>, C<ResizablePMCArray>, |
| 695 | > C<FixedIntegerArray>, C<ResizableIntegerArray>, C<FixedFloatArray>, |
| 696 | > C<ResizableFloatArray>, C<FixedStringArray>, C<ResizableStringArray>, |
| 697 | > C<FixedBooleanArray>, and C<ResizableBooleanArray>. The array |
| 698 | > types that start with "Fixed" have a fixed size and do not allow |
| 699 | > elements to be added outside their allocated size. The "Resizable" |
| 700 | > variants automatically extend themselves as more elements are |
| 701 | > added.N<With some additional overhead for checking array bounds and |
| 702 | > reallocating array memory.> The array types that include "String", |
| 703 | > "Integer", or "Boolean" in the name use alternate packing methods for |
| 704 | > greater memory efficiency. |
| 705 | > |
| 706 | > Parrot's core ordered array PMCs all have zero-based integer keys. Extracting |
| 707 | > or inserting an element into the array uses PIR's standard key syntax, with the |
| 708 | > key in square brackets after the variable name. An lvalue key sets the value |
| 709 | > for that key. An rvalue key extracts the value for that key in the aggregate |
| 710 | > to use as the argument value: |
| 711 | 754c815,817 |
| 712 | < <p>Setting the array to an integer value directly (without a key) sets the number of elements of the array. Assigning an array directly to an integer retrieves the number of elements of the array.</p> |
| 713 | --- |
| 714 | > Setting the array to an integer value directly (without a key) sets the number |
| 715 | > of elements of the array. Assigning an array directly to an integer retrieves |
| 716 | > the number of elements of the array. |
| 717 | 758c821,822 |
| 718 | < <p>This is equivalent to using the <code>elements</code> opcode to retrieve the number of items currently in an array:</p> |
| 719 | --- |
| 720 | > This is equivalent to using the C<elements> opcode to retrieve the number of |
| 721 | > items currently in an array: |
| 722 | 761c825,829 |
| 723 | < <p>Some other useful instructions for working with ordered arrays are <code>push</code>, <code>pop</code>, <code>shift</code>, and <code>unshift</code>, to add or remove elements. <code>push</code> and <code>pop</code> work on the end of the array, the highest numbered index. <code>shift</code> and <code>unshift</code> work on the start of the array, adding or removing the zeroth element, and renumbering all the following elements.</p> |
| 724 | --- |
| 725 | > Some other useful instructions for working with ordered arrays are |
| 726 | > C<push>, C<pop>, C<shift>, and C<unshift>, to add or remove elements. |
| 727 | > C<push> and C<pop> work on the end of the array, the highest numbered |
| 728 | > index. C<shift> and C<unshift> work on the start of the array, adding or |
| 729 | > removing the zeroth element, and renumbering all the following elements. |
| 730 | 771,777c839,847 |
| 731 | < <p><!-- |
| 732 | < INDEX: associative arrays |
| 733 | < --> <!-- |
| 734 | < INDEX: hashes |
| 735 | < --> <!-- |
| 736 | < INDEX: dictionaries |
| 737 | < --> An associative array is an unordered aggregate that uses string keys to identify elements. You may know them as "hash tables", "hashes", "maps", or "dictionaries". Parrot provides one core associative array PMC, called <code>Hash</code>. String keys work very much like integer keys. An lvalue key sets the value of an element, and an rvalue key extracts the value of an element. The string in the key must always be in single or double quotes.</p> |
| 738 | --- |
| 739 | > X<associative arrays> |
| 740 | > X<hashes> |
| 741 | > X<dictionaries> |
| 742 | > An associative array is an unordered aggregate that uses string keys to |
| 743 | > identify elements. You may know them as "hash tables", "hashes", "maps", or |
| 744 | > "dictionaries". Parrot provides one core associative array PMC, called C<Hash>. |
| 745 | > String keys work very much like integer keys. An lvalue key sets the value of |
| 746 | > an element, and an rvalue key extracts the value of an element. The string in |
| 747 | > the key must always be in single or double quotes. |
| 748 | 782,784c852,854 |
| 749 | < <p>Assigning a <code>Hash</code><!-- |
| 750 | < INDEX: Hash PMC |
| 751 | < --> PMC (without a key) to an integer result fetches the number of elements in the hash.You may not set a <code>Hash</code> PMC directly to an integer value.</p> |
| 752 | --- |
| 753 | > Assigning a C<Hash>X<Hash PMC> PMC (without a key) to an integer result |
| 754 | > fetches the number of elements in the hash.N<You may not set a C<Hash> |
| 755 | > PMC directly to an integer value.> |
| 756 | 787,789c857,860 |
| 757 | < <p>The <code>exists</code><!-- |
| 758 | < INDEX: exists opcode |
| 759 | < --> opcode tests whether a keyed value exists in an aggregate. It returns 1 if it finds the key in the aggregate and 0 otherwise. It doesn't care if the value itself is true or false, only that an entry exists for that key:</p> |
| 760 | --- |
| 761 | > The C<exists>X<exists opcode> opcode tests whether a keyed value exists in an |
| 762 | > aggregate. It returns 1 if it finds the key in the aggregate and 0 otherwise. |
| 763 | > It doesn't care if the value itself is true or false, only that an entry exists |
| 764 | > for that key: |
| 765 | 795,797c866,867 |
| 766 | < <p>The <code>delete</code><!-- |
| 767 | < INDEX: delete opcode |
| 768 | < --> opcode removes an element from an associative array:</p> |
| 769 | --- |
| 770 | > The C<delete>X<delete opcode> opcode removes an element from an associative |
| 771 | > array: |
| 772 | 803,807c873,878 |
| 773 | < <p><!-- |
| 774 | < INDEX: iterators |
| 775 | < --> <!-- |
| 776 | < INDEX: PMCs (Polymorphic Containers); iterators |
| 777 | < --> An iterator extracts values from an aggregate PMC one at a time. Iterators are most useful in loops which perform an action on every element in an aggregate. The <code>iter</code> opcode creates a new iterator from an aggregate PMC. It takes one argument, the PMC over which to iterate:</p> |
| 778 | --- |
| 779 | > X<iterators> |
| 780 | > X<PMCs (Polymorphic Containers); iterators> |
| 781 | > An iterator extracts values from an aggregate PMC one at a time. Iterators are |
| 782 | > most useful in loops which perform an action on every element in an aggregate. |
| 783 | > The C<iter> opcode creates a new iterator from an aggregate PMC. It takes one |
| 784 | > argument, the PMC over which to iterate: |
| 785 | 810,812c881 |
| 786 | < <p>The <code>shift</code><!-- |
| 787 | < INDEX: shift opcode |
| 788 | < --> opcode extracts the next value from the iterator.</p> |
| 789 | --- |
| 790 | > The C<shift>X<shift opcode> opcode extracts the next value from the iterator. |
| 791 | 815c884,885 |
| 792 | < <p>Evaluating the iterator PMC as a boolean returns whether the iterator has reached the end of the aggregate:</p> |
| 793 | --- |
| 794 | > Evaluating the iterator PMC as a boolean returns whether the iterator has |
| 795 | > reached the end of the aggregate: |
| 796 | 818,822c888,896 |
| 797 | < <p>Parrot provides predefined constants for working with iterators. <code>.ITERATE_FROM_START</code> and <code>.ITERATE_FROM_END</code> constants select whether an ordered array iterator starts from the beginning or end of the array. These two constants have no effect on associative array iterators, as their elements are unordered.</p> |
| 798 | < |
| 799 | < <p>Load the iterator constants with the <code>.include</code><!-- |
| 800 | < INDEX: .include directive |
| 801 | < --> directive to include the file <em>iterator.pasm</em>. To use them, set the iterator PMC to the value of the constant:</p> |
| 802 | --- |
| 803 | > Parrot provides predefined constants for working with iterators. |
| 804 | > C<.ITERATE_FROM_START> and C<.ITERATE_FROM_END> constants select whether an |
| 805 | > ordered array iterator starts from the beginning or end of the array. These |
| 806 | > two constants have no effect on associative array iterators, as their elements |
| 807 | > are unordered. |
| 808 | > |
| 809 | > Load the iterator constants with the C<.include>X<.include directive> |
| 810 | > directive to include the file F<iterator.pasm>. To use them, set the |
| 811 | > iterator PMC to the value of the constant: |
| 812 | 829c903,906 |
| 813 | < <p>With all of those separate pieces in one place, this example loads the iterator constants, creates an ordered array of "a", "b", "c", creates an iterator from that array, and then loops over the iterator using a conditional <code>goto</code> to checks the boolean value of the iterator and another unconditional <code>goto</code>:</p> |
| 814 | --- |
| 815 | > With all of those separate pieces in one place, this example loads the iterator |
| 816 | > constants, creates an ordered array of "a", "b", "c", creates an iterator from |
| 817 | > that array, and then loops over the iterator using a conditional C<goto> to |
| 818 | > checks the boolean value of the iterator and another unconditional C<goto>: |
| 819 | 846c923,925 |
| 820 | < <p>Associative array iterators work similarly to ordered array iterators. When iterating over associative arrays, the <code>shift</code> opcode extracts keys instead of values. The key looks up the value in the original hash PMC.</p> |
| 821 | --- |
| 822 | > Associative array iterators work similarly to ordered array iterators. When |
| 823 | > iterating over associative arrays, the C<shift> opcode extracts keys instead of |
| 824 | > values. The key looks up the value in the original hash PMC. |
| 825 | 862c941,951 |
| 826 | < <p>This example creates an associative array <code>$P2</code> that contains three keys "a", "b", and "c", assigning them the values 10, 20, and 30. It creates an iterator (<code>$P1</code>) from the associative array using the <code>iter</code> opcode, and then starts a loop over the iterator. At the start of each loop, the <code>unless</code> instruction checks whether the iterator has any more elements. If there are no more elements, <code>goto</code> jumps to the end of the loop, marked by the label <code>iter_end</code>. If there are more elements, the <code>shift</code> opcode extracts the next key. Keyed assignment stores the integer value of the element indexed by the key in <code>$I9</code>. After printing the integer value, <code>goto</code> jumps back to the start of the loop, marked by <code>iter_loop</code>.</p> |
| 827 | --- |
| 828 | > This example creates an associative array C<$P2> that contains three |
| 829 | > keys "a", "b", and "c", assigning them the values 10, 20, and 30. It |
| 830 | > creates an iterator (C<$P1>) from the associative array using the |
| 831 | > C<iter> opcode, and then starts a loop over the iterator. At the start |
| 832 | > of each loop, the C<unless> instruction checks whether the iterator has |
| 833 | > any more elements. If there are no more elements, C<goto> jumps to the |
| 834 | > end of the loop, marked by the label C<iter_end>. If there are more |
| 835 | > elements, the C<shift> opcode extracts the next key. Keyed assignment |
| 836 | > stores the integer value of the element indexed by the key in C<$I9>. |
| 837 | > After printing the integer value, C<goto> jumps back to the start of the |
| 838 | > loop, marked by C<iter_loop>. |
| 839 | 867,871c956,962 |
| 840 | < <p><!-- |
| 841 | < INDEX: keys |
| 842 | < --> <!-- |
| 843 | < INDEX: multi-level keys |
| 844 | < --> Aggregates can hold any data type, including other aggregates. Accessing elements deep within nested data structures is a common operation, so PIR provides a way to do it in a single instruction. Complex keys specify a series of nested data structures, with each individual key separated by a semicolon.</p> |
| 845 | --- |
| 846 | > X<keys> |
| 847 | > X<multi-level keys> |
| 848 | > Aggregates can hold any data type, including other aggregates. |
| 849 | > Accessing elements deep within nested data structures is a common |
| 850 | > operation, so PIR provides a way to do it in a single instruction. |
| 851 | > Complex keys specify a series of nested data structures, with each |
| 852 | > individual key separated by a semicolon. |
| 853 | 881c972,975 |
| 854 | < <p>This example builds up a data structure of an associative array containing an ordered array. The complex key <code>["answer"; $I1]</code> retrieves an element of the array within the hash. You can also set a value using a complex key:</p> |
| 855 | --- |
| 856 | > This example builds up a data structure of an associative array |
| 857 | > containing an ordered array. The complex key C<["answer"; $I1]> |
| 858 | > retrieves an element of the array within the hash. You can also set a |
| 859 | > value using a complex key: |
| 860 | 884c978,979 |
| 861 | < <p>The individual keys are integer or string literals, or variables with integer or string values.</p> |
| 862 | --- |
| 863 | > The individual keys are integer or string literals, or variables with |
| 864 | > integer or string values. |
| 865 | 889,891c984,989 |
| 866 | < <p><!-- |
| 867 | < INDEX: PMCs (Polymorphic Containers); copying vs. cloning |
| 868 | < --> PMC registers don't directly store the data for a PMC, they only store a pointer to the structure that stores the data. As a result, the <code>=</code> operator doesn't copy the entire PMC, it only copies the pointer to the PMC data. If you later modify the copy of the variable, it will also modify the original.</p> |
| 869 | --- |
| 870 | > X<PMCs (Polymorphic Containers); copying vs. cloning> |
| 871 | > PMC registers don't directly store the data for a PMC, they only store a |
| 872 | > pointer to the structure that stores the data. As a result, the C<=> |
| 873 | > operator doesn't copy the entire PMC, it only copies the pointer to the |
| 874 | > PMC data. If you later modify the copy of the variable, it will also |
| 875 | > modify the original. |
| 876 | 899c997,1000 |
| 877 | < <p>In this example, <code>$P0</code> and <code>$P1</code> are both pointers to the same internal data structure. Setting <code>$P1</code> to the string literal "Zaphod", it overwrites the previous value "Ford". Both <code>$P0</code> and <code>$P1</code> refer to the <code>String</code> PMC "Zaphod".</p> |
| 878 | --- |
| 879 | > In this example, C<$P0> and C<$P1> are both pointers to the same |
| 880 | > internal data structure. Setting C<$P1> to the string literal |
| 881 | > "Zaphod", it overwrites the previous value "Ford". Both C<$P0> and |
| 882 | > C<$P1> refer to the C<String> PMC "Zaphod". |
| 883 | 901,905c1002,1003 |
| 884 | < <p>The <code>clone</code> <!-- |
| 885 | < INDEX: clone opcode |
| 886 | < --> opcode makes a deep copy of a PMC, instead of copying the pointer like <code>=</code><!-- |
| 887 | < INDEX: = operator |
| 888 | < --> does.</p> |
| 889 | --- |
| 890 | > The C<clone> X<clone opcode> opcode makes a deep copy of a PMC, instead |
| 891 | > of copying the pointer like C<=>X<= operator> does. |
| 892 | 913,919c1011,1018 |
| 893 | < <p>This example creates an identical, independent clone of the PMC in <code>$P0</code> and puts it in <code>$P1</code>. Later changes to <code>$P0</code> have no effect on the PMC in <code>$P1</code>.With low-level strings, the copies created by <code>clone</code> are copy-on-write<!-- |
| 894 | < INDEX: copy-on-write |
| 895 | < --> exactly the same as the copy created by <code>=</code>.</p> |
| 896 | < |
| 897 | < <p>To assign the <i>value</i> of one PMC to another PMC that already exists, use the <code>assign</code><!-- |
| 898 | < INDEX: assign opcode |
| 899 | < --> opcode:</p> |
| 900 | --- |
| 901 | > This example creates an identical, independent clone of the PMC in |
| 902 | > C<$P0> and puts it in C<$P1>. Later changes to C<$P0> have no effect on |
| 903 | > the PMC in C<$P1>.N<With low-level strings, the copies created by |
| 904 | > C<clone> are copy-on-writeX<copy-on-write> exactly the same as the copy |
| 905 | > created by C<=>.> |
| 906 | > |
| 907 | > To assign the I<value> of one PMC to another PMC that already exists, use the |
| 908 | > C<assign>X<assign opcode> opcode: |
| 909 | 928c1027,1032 |
| 910 | < <p>This example creates two <code>Integer</code> PMCs, <code>$P1</code> and <code>$P2</code>, and gives the first one the value 42. It then uses <code>assign</code> to pass the same integer value on to <code>$P1</code>. Though <code>$P0</code> increments, <code>$P1</code> doesn't change. The result for <code>assign</code> must have an existing object of the right type in it, because <code>assign</code> neither creates a new duplicate object (as does <code>clone</code>) or reuses the source object (as does <code>=</code>).</p> |
| 911 | --- |
| 912 | > This example creates two C<Integer> PMCs, C<$P1> and C<$P2>, and gives the |
| 913 | > first one the value 42. It then uses C<assign> to pass the same integer value |
| 914 | > on to C<$P1>. Though C<$P0> increments, C<$P1> doesn't change. The result for |
| 915 | > C<assign> must have an existing object of the right type in it, because |
| 916 | > C<assign> neither creates a new duplicate object (as does C<clone>) or reuses |
| 917 | > the source object (as does C<=>). |
| 918 | 933,937c1037,1038 |
| 919 | < <p><!-- |
| 920 | < INDEX: properties |
| 921 | < --> <!-- |
| 922 | < INDEX: PMCs (Polymorphic Containers); properties |
| 923 | < --></p> |
| 924 | --- |
| 925 | > X<properties> |
| 926 | > X<PMCs (Polymorphic Containers); properties> |
| 927 | 939c1040,1041 |
| 928 | < <p>PMCs can have additional values attached to them as "properties" of the PMC. Most properties hold extra metadata about the PMC.</p> |
| 929 | --- |
| 930 | > PMCs can have additional values attached to them as "properties" of the |
| 931 | > PMC. Most properties hold extra metadata about the PMC. |
| 932 | 941,943c1043,1045 |
| 933 | < <p>The <code>setprop</code><!-- |
| 934 | < INDEX: setprop opcode |
| 935 | < --> opcode sets the value of a named property on a PMC. It takes three arguments: the PMC on which to set a property, the name of the property, and a PMC containing the value of the property.</p> |
| 936 | --- |
| 937 | > The C<setprop>X<setprop opcode> opcode sets the value of a named property on a |
| 938 | > PMC. It takes three arguments: the PMC on which to set a property, the name of |
| 939 | > the property, and a PMC containing the value of the property. |
| 940 | 946,948c1048,1050 |
| 941 | < <p>The <code>getprop</code><!-- |
| 942 | < INDEX: getprop opcode |
| 943 | < --> opcode returns the value of a property. It takes two arguments: the name of the property and the PMC from which to retrieve the property value.</p> |
| 944 | --- |
| 945 | > The C<getprop>X<getprop opcode> opcode returns the value of a property. It |
| 946 | > takes two arguments: the name of the property and the PMC from which to |
| 947 | > retrieve the property value. |
| 948 | 951c1053,1056 |
| 949 | < <p>This example creates a <code>String</code> object in <code>$P0</code> and an <code>Integer</code> object with the value 1 in <code>$P1</code>. <code>setprop</code> sets a property named "eric" on the object in <code>$P0</code> and gives the property the value of <code>$P1</code>. <code>getprop</code> retrieves the value of the property "eric" on <code>$P0</code> and stores it in <code>$P2</code>.</p> |
| 950 | --- |
| 951 | > This example creates a C<String> object in C<$P0> and an C<Integer> object with |
| 952 | > the value 1 in C<$P1>. C<setprop> sets a property named "eric" on the object in |
| 953 | > C<$P0> and gives the property the value of C<$P1>. C<getprop> retrieves the |
| 954 | > value of the property "eric" on C<$P0> and stores it in C<$P2>. |
| 955 | 962c1067,1068 |
| 956 | < <p>Parrot stores PMC properties in an associative array where the name of the property is the key.</p> |
| 957 | --- |
| 958 | > Parrot stores PMC properties in an associative array where the name of the |
| 959 | > property is the key. |
| 960 | 964,966c1070 |
| 961 | < <p><code>delprop</code><!-- |
| 962 | < INDEX: delprop opcode |
| 963 | < --> deletes a property from a PMC.</p> |
| 964 | --- |
| 965 | > C<delprop>X<delprop opcode> deletes a property from a PMC. |
| 966 | 969,971c1073,1074 |
| 967 | < <p>You can fetch a complete hash of all properties on a PMC with <code>prophash</code><!-- |
| 968 | < INDEX: prophash opcode |
| 969 | < -->:</p> |
| 970 | --- |
| 971 | > You can fetch a complete hash of all properties on a PMC with |
| 972 | > C<prophash>X<prophash opcode>: |
| 973 | 974c1077 |
| 974 | < <p>Fetching the value of a non-existent property returns an <code>Undef</code> PMC.</p> |
| 975 | --- |
| 976 | > Fetching the value of a non-existent property returns an C<Undef> PMC. |
| 977 | 979,991c1082,1104 |
| 978 | < <p><!-- |
| 979 | < INDEX: vtable functions |
| 980 | < --> You may have noticed that a simple operation sometimes has a different effect on different PMCs. Assigning a low-level integer value to a <code>Integer</code> PMC sets its integer value of the PMC, but assigning that same integer to an ordered array sets the size of the array.</p> |
| 981 | < |
| 982 | < <p>Every PMC defines a standard set of low-level operations called vtable functions. When you perform an assignment like:</p> |
| 983 | < |
| 984 | < <pre> $P0 = 5</pre> |
| 985 | < |
| 986 | < <p>... Parrot calls the <code>set_integer_native</code> vtable function on the PMC referred to by register <code>$P0</code>.</p> |
| 987 | < |
| 988 | < <p><!-- |
| 989 | < INDEX: polymorphic substitution |
| 990 | < --> Parrot has a fixed set of vtable functions, so that any PMC can stand in for any other PMC; they're polymorphic.Hence the name "Polymorphic Container". Every PMC defines some behavior for every vtable function. The default behavior is to throw an exception reporting that the PMC doesn't implement that vtable function. The full set of vtable functions for a PMC defines the PMC's basic interface, but PMCs may also define methods to extend their behavior beyond the vtable set.</p> |
| 991 | --- |
| 992 | > X<vtable functions> |
| 993 | > You may have noticed that a simple operation sometimes has a different effect |
| 994 | > on different PMCs. Assigning a low-level integer value to a C<Integer> PMC sets |
| 995 | > its integer value of the PMC, but assigning that same integer to an ordered |
| 996 | > array sets the size of the array. |
| 997 | > |
| 998 | > Every PMC defines a standard set of low-level operations called vtable |
| 999 | > functions. When you perform an assignment like: |
| 1000 | > |
| 1001 | > $P0 = 5 |
| 1002 | > |
| 1003 | > |
| 1004 | > ... Parrot calls the C<set_integer_native> vtable function on the PMC referred |
| 1005 | > to by register C<$P0>. |
| 1006 | > |
| 1007 | > X<polymorphic substitution> |
| 1008 | > Parrot has a fixed set of vtable functions, so that any PMC can stand in for |
| 1009 | > any other PMC; they're polymorphic.N<Hence the name "Polymorphic Container".> |
| 1010 | > Every PMC defines some behavior for every vtable function. The default behavior |
| 1011 | > is to throw an exception reporting that the PMC doesn't implement that vtable |
| 1012 | > function. The full set of vtable functions for a PMC defines the PMC's basic |
| 1013 | > interface, but PMCs may also define methods to extend their behavior beyond the |
| 1014 | > vtable set. |
| 1015 | 996,1006c1109,1120 |
| 1016 | < <p><!-- |
| 1017 | < INDEX: namespaces |
| 1018 | < --> <!-- |
| 1019 | < INDEX: global variables |
| 1020 | < --> Parrot performs operations on variables stored in small register sets local to each subroutine. For more complex tasks,...and for most high-level languages that Parrot supports. it's also useful to have variables that live beyond the scope of a single subroutine. These variables may be global to the entire program or restricted to a particular library. Parrot stores long-lived variables in a hierarchy of namespaces.</p> |
| 1021 | < |
| 1022 | < <p>The opcodes <code>set_global</code><!-- |
| 1023 | < INDEX: set_global opcode |
| 1024 | < --> and <code>get_global</code><!-- |
| 1025 | < INDEX: get_global opcode |
| 1026 | < --> store and fetch a variable in a namespace:</p> |
| 1027 | --- |
| 1028 | > X<namespaces> |
| 1029 | > X<global variables> |
| 1030 | > Parrot performs operations on variables stored in small register sets local to |
| 1031 | > each subroutine. For more complex tasks,N<...and for most high-level languages |
| 1032 | > that Parrot supports.> it's also useful to have variables that live beyond the |
| 1033 | > scope of a single subroutine. These variables may be global to the entire |
| 1034 | > program or restricted to a particular library. Parrot stores long-lived |
| 1035 | > variables in a hierarchy of namespaces. |
| 1036 | > |
| 1037 | > The opcodes C<set_global>X<set_global opcode> and |
| 1038 | > C<get_global>X<get_global opcode> store and fetch a variable in a |
| 1039 | > namespace: |
| 1040 | 1014,1018c1128,1144 |
| 1041 | < <p>The first two statements in this example create a <code>String</code> PMC in <code>$P0</code> and assign it a value. In the third statement, <code>set_global</code> stores that PMC as the named global variable <code>bee</code>. At some later point in the program, <code>get_global</code> retrieves the global variable by name, and stores it in <code>$P1</code> to print.</p> |
| 1042 | < |
| 1043 | < <p>Namespaces can only store PMC variables. Parrot boxes all primitive integer, number, or string values into the corresponding PMCs before storing them in a namespace.</p> |
| 1044 | < |
| 1045 | < <p>The name of every variable stored in a particular namespace must be unique. You can't have store both an <code>Integer</code> PMC and an array PMC both named "bee", stored in the same namespace.You may wonder why anyone would want to do this. We wonder the same thing, but Perl 5 does it all the time. The Perl 6 implementation on Parrot includes type sigils in the names of the variables it stores in namespaces so each name is unique, e.g. <code>$bee</code>, <code>@bee</code>....</p> |
| 1046 | --- |
| 1047 | > The first two statements in this example create a C<String> PMC in |
| 1048 | > C<$P0> and assign it a value. In the third statement, C<set_global> |
| 1049 | > stores that PMC as the named global variable C<bee>. At some later |
| 1050 | > point in the program, C<get_global> retrieves the global variable by |
| 1051 | > name, and stores it in C<$P1> to print. |
| 1052 | > |
| 1053 | > Namespaces can only store PMC variables. Parrot boxes all primitive integer, |
| 1054 | > number, or string values into the corresponding PMCs before storing them in a |
| 1055 | > namespace. |
| 1056 | > |
| 1057 | > The name of every variable stored in a particular namespace must be |
| 1058 | > unique. You can't have store both an C<Integer> PMC and an array PMC |
| 1059 | > both named "bee", stored in the same namespace.N<You may wonder why |
| 1060 | > anyone would want to do this. We wonder the same thing, but Perl 5 does |
| 1061 | > it all the time. The Perl 6 implementation on Parrot includes type |
| 1062 | > sigils in the names of the variables it stores in namespaces so each |
| 1063 | > name is unique, e.g. C<$bee>, C<@bee>....> |
| 1064 | 1023,1027c1149,1150 |
| 1065 | < <p><!-- |
| 1066 | < INDEX: hierarchical namespaces |
| 1067 | < --> <!-- |
| 1068 | < INDEX: namespaces; hierarchy |
| 1069 | < --></p> |
| 1070 | --- |
| 1071 | > X<hierarchical namespaces> |
| 1072 | > X<namespaces; hierarchy> |
| 1073 | 1029,1031c1152,1162 |
| 1074 | < <p>A single global namespace would be far too limiting for most languages or applications. The risk of accidental collisions -- where two libraries try to use the same name for some variable -- would be quite high for larger code bases. Parrot maintains a collection of namespaces arranged as a tree, with the <code>parrot</code> namespace as the root. Every namespace you declare is a child of the <code>parrot</code> namespace (or a child of a child....).</p> |
| 1075 | < |
| 1076 | < <p>The <code>set_global</code> and <code>get_global</code> opcodes both have alternate forms that take a key name to access a variable in a particular namespace within the tree. This code example stores a variable as <code>bill</code> in the Duck namespace and retrieves it again:</p> |
| 1077 | --- |
| 1078 | > A single global namespace would be far too limiting for most languages or |
| 1079 | > applications. The risk of accidental collisions -- where two libraries try to |
| 1080 | > use the same name for some variable -- would be quite high for larger code |
| 1081 | > bases. Parrot maintains a collection of namespaces arranged as a tree, with the |
| 1082 | > C<parrot> namespace as the root. Every namespace you declare is a child of the |
| 1083 | > C<parrot> namespace (or a child of a child....). |
| 1084 | > |
| 1085 | > The C<set_global> and C<get_global> opcodes both have alternate forms that take |
| 1086 | > a key name to access a variable in a particular namespace within the tree. This |
| 1087 | > code example stores a variable as C<bill> in the Duck namespace and retrieves |
| 1088 | > it again: |
| 1089 | 1035c1166,1168 |
| 1090 | < <p>The key name for the namespace can have multiple levels, which correspond to levels in the namespace hierarchy. This example stores a variable as <code>bill</code> in the Electric namespace under the General namespace in the hierarchy.</p> |
| 1091 | --- |
| 1092 | > The key name for the namespace can have multiple levels, which correspond to |
| 1093 | > levels in the namespace hierarchy. This example stores a variable as C<bill> in |
| 1094 | > the Electric namespace under the General namespace in the hierarchy. |
| 1095 | 1039,1043c1172,1173 |
| 1096 | < <p><!-- |
| 1097 | < INDEX: root namespace |
| 1098 | < --> <!-- |
| 1099 | < INDEX: namespaces; root |
| 1100 | < --></p> |
| 1101 | --- |
| 1102 | > X<root namespace> |
| 1103 | > X<namespaces; root> |
| 1104 | 1045,1047c1175,1181 |
| 1105 | < <p>The <code>set_global</code> and <code>get_global</code> opcode operate on the currently selected namespace. The default top-level namespace is the "root" namespace. The <code>.namespace</code><!-- |
| 1106 | < INDEX: .namespace directive |
| 1107 | < --> directive allows you to declare any namespace for subsequent code. If you select the General Electric namespace, then store or retrieve the <code>bill</code> variable without specifying a namespace, you will work with the General Electric bill, not the Duck bill.</p> |
| 1108 | --- |
| 1109 | > The C<set_global> and C<get_global> opcode operate on the currently selected |
| 1110 | > namespace. The default top-level namespace is the "root" namespace. The |
| 1111 | > C<.namespace>X<.namespace directive> directive allows you to declare any |
| 1112 | > namespace for subsequent code. If you select the General Electric |
| 1113 | > namespace, then store or retrieve the C<bill> variable without |
| 1114 | > specifying a namespace, you will work with the General Electric bill, |
| 1115 | > not the Duck bill. |
| 1116 | 1049c1183 |
| 1117 | < <pre> .namespace ["General";"Electric"] |
| 1118 | --- |
| 1119 | > .namespace ["General";"Electric"] |
| 1120 | 1051,1052c1185,1191 |
| 1121 | < set_global "bill", $P0 |
| 1122 | < $P1 = get_global "bill"</pre> |
| 1123 | --- |
| 1124 | > set_global "bill", $P0 |
| 1125 | > $P1 = get_global "bill" |
| 1126 | > |
| 1127 | > |
| 1128 | > Passing an empty key to the C<.namespace> directive resets the selected |
| 1129 | > namespace to the root namespace. The brackets are required even when the |
| 1130 | > key is empty. |
| 1131 | 1054c1193 |
| 1132 | < <p>Passing an empty key to the <code>.namespace</code> directive resets the selected namespace to the root namespace. The brackets are required even when the key is empty.</p> |
| 1133 | --- |
| 1134 | > .namespace [ ] |
| 1135 | 1056d1194 |
| 1136 | < <pre> .namespace [ ]</pre> |
| 1137 | 1058,1062c1196,1202 |
| 1138 | < <p>When you need to be absolutely sure you're working with the root namespace regardless of what namespace is currently active, use the <code>set_root_global</code><!-- |
| 1139 | < INDEX: set_root_global opcode |
| 1140 | < --> and <code>get_root_global</code><!-- |
| 1141 | < INDEX: get_root_global opcode |
| 1142 | < --> opcodes instead of <code>set_global</code> and <code>get_global</code>. This example sets and retrieves the variable <code>bill</code> in the Dollar namespace, which is directly under the root namespace:</p> |
| 1143 | --- |
| 1144 | > When you need to be absolutely sure you're working with the root namespace |
| 1145 | > regardless of what namespace is currently active, use the |
| 1146 | > C<set_root_global>X<set_root_global opcode> and |
| 1147 | > C<get_root_global>X<get_root_global opcode> opcodes instead of |
| 1148 | > C<set_global> and C<get_global>. This example sets and retrieves the |
| 1149 | > variable C<bill> in the Dollar namespace, which is directly under the |
| 1150 | > root namespace: |
| 1151 | 1066,1080c1206,1222 |
| 1152 | < <p><!-- |
| 1153 | < INDEX: HLL namespaces |
| 1154 | < --> <!-- |
| 1155 | < INDEX: namespaces; hll |
| 1156 | < --> To prevent further collisions, each high-level language running on Parrot operates within its own virtual namespace root. The default virtual root is <code>parrot</code>, and the <code>.HLL</code><!-- |
| 1157 | < INDEX: .HLL directive |
| 1158 | < --> directive (for <i>H</i>igh-<i>L</i>evel <i>L</i>anguage) selects an alternate virtual root for a particular high-level language:</p> |
| 1159 | < |
| 1160 | < <pre> .HLL 'ruby'</pre> |
| 1161 | < |
| 1162 | < <p>The <code>set_hll_global</code><!-- |
| 1163 | < INDEX: set_hll_global opcode |
| 1164 | < --> and <code>get_hll_global</code><!-- |
| 1165 | < INDEX: get_hll_global opcode |
| 1166 | < --> opcodes are like <code>set_root_global</code> and <code>get_root_global</code>, except they always operate on the virtual root for the currently selected HLL. This example stores and retrieves a <code>bill</code> variable in the Euro namespace, under the Dutch HLL namespace root:</p> |
| 1167 | --- |
| 1168 | > X<HLL namespaces> |
| 1169 | > X<namespaces; hll> |
| 1170 | > To prevent further collisions, each high-level language running on |
| 1171 | > Parrot operates within its own virtual namespace root. The default |
| 1172 | > virtual root is C<parrot>, and the C<.HLL>X<.HLL directive> directive |
| 1173 | > (for I<H>igh-I<L>evel I<L>anguage) selects an alternate virtual root for |
| 1174 | > a particular high-level language: |
| 1175 | > |
| 1176 | > .HLL 'ruby' |
| 1177 | > |
| 1178 | > |
| 1179 | > The C<set_hll_global>X<set_hll_global opcode> and |
| 1180 | > C<get_hll_global>X<get_hll_global opcode> opcodes are like |
| 1181 | > C<set_root_global> and C<get_root_global>, except they always operate on |
| 1182 | > the virtual root for the currently selected HLL. This example stores and |
| 1183 | > retrieves a C<bill> variable in the Euro namespace, under the Dutch HLL |
| 1184 | > namespace root: |
| 1185 | 1082c1224 |
| 1186 | < <pre> .HLL 'Dutch' |
| 1187 | --- |
| 1188 | > .HLL 'Dutch' |
| 1189 | 1084,1085c1226,1228 |
| 1190 | < set_hll_global ["Euro"], "bill", $P0 |
| 1191 | < $P1 = get_hll_global ["Euro"], "bill"</pre> |
| 1192 | --- |
| 1193 | > set_hll_global ["Euro"], "bill", $P0 |
| 1194 | > $P1 = get_hll_global ["Euro"], "bill" |
| 1195 | > |
| 1196 | 1090,1094c1233,1251 |
| 1197 | < <p><!-- |
| 1198 | < INDEX: NameSpace PMC |
| 1199 | < --> Namespaces are just PMCs. They implement the standard vtable functions and a few extra methods. The <code>get_namespace</code><!-- |
| 1200 | < INDEX: get_namespace opcode |
| 1201 | < --> opcode retrieves the currently selected namespace as a PMC object:</p> |
| 1202 | --- |
| 1203 | > X<NameSpace PMC> |
| 1204 | > Namespaces are just PMCs. They implement the standard vtable functions |
| 1205 | > and a few extra methods. The C<get_namespace>X<get_namespace opcode> |
| 1206 | > opcode retrieves the currently selected namespace as a PMC object: |
| 1207 | > |
| 1208 | > $P0 = get_namespace |
| 1209 | > |
| 1210 | > |
| 1211 | > The C<get_root_namespace>X<get_root_namespace opcode> opcode retrieves |
| 1212 | > the namespace object for the root namespace. The |
| 1213 | > C<get_hll_namespace>X<get_hll_namespace opcode> opcode retrieves the |
| 1214 | > virtual root for the currently selected HLL. |
| 1215 | > |
| 1216 | > $P0 = get_root_namespace |
| 1217 | > $P0 = get_hll_namespace |
| 1218 | > |
| 1219 | > |
| 1220 | > Each of these three opcodes can take a key argument to retrieve a namespace |
| 1221 | > under the currenly selected namespace, root namespace, or HLL root namespace: |
| 1222 | 1096c1253,1255 |
| 1223 | < <pre> $P0 = get_namespace</pre> |
| 1224 | --- |
| 1225 | > $P0 = get_namespace ["Duck"] |
| 1226 | > $P0 = get_root_namespace ["General";"Electric"] |
| 1227 | > $P0 = get_hll_namespace ["Euro"] |
| 1228 | 1098,1102d1256 |
| 1229 | < <p>The <code>get_root_namespace</code><!-- |
| 1230 | < INDEX: get_root_namespace opcode |
| 1231 | < --> opcode retrieves the namespace object for the root namespace. The <code>get_hll_namespace</code><!-- |
| 1232 | < INDEX: get_hll_namespace opcode |
| 1233 | < --> opcode retrieves the virtual root for the currently selected HLL.</p> |
| 1234 | 1104,1105c1258,1261 |
| 1235 | < <pre> $P0 = get_root_namespace |
| 1236 | < $P0 = get_hll_namespace</pre> |
| 1237 | --- |
| 1238 | > Once you have a namespace object you can use it to retrieve variables from the |
| 1239 | > namespace instead of using a keyed lookup. This example first looks up the Euro |
| 1240 | > namespace in the currently selected HLL, then retrieves the C<bill> variable |
| 1241 | > from that namespace: |
| 1242 | 1107c1263,1264 |
| 1243 | < <p>Each of these three opcodes can take a key argument to retrieve a namespace under the currenly selected namespace, root namespace, or HLL root namespace:</p> |
| 1244 | --- |
| 1245 | > $P0 = get_hll_namespace ["Euro"] |
| 1246 | > $P1 = get_global $P0, "bill" |
| 1247 | 1109,1111d1265 |
| 1248 | < <pre> $P0 = get_namespace ["Duck"] |
| 1249 | < $P0 = get_root_namespace ["General";"Electric"] |
| 1250 | < $P0 = get_hll_namespace ["Euro"]</pre> |
| 1251 | 1113c1267,1270 |
| 1252 | < <p>Once you have a namespace object you can use it to retrieve variables from the namespace instead of using a keyed lookup. This example first looks up the Euro namespace in the currently selected HLL, then retrieves the <code>bill</code> variable from that namespace:</p> |
| 1253 | --- |
| 1254 | > Namespaces also provide a set of methods to provide more complex |
| 1255 | > behavior than the standard vtable functions allow. The |
| 1256 | > C<get_name>X<get_name method> method returns the name of the namespace |
| 1257 | > as a C<ResizableStringArray>: |
| 1258 | 1115,1116c1272 |
| 1259 | < <pre> $P0 = get_hll_namespace ["Euro"] |
| 1260 | < $P1 = get_global $P0, "bill"</pre> |
| 1261 | --- |
| 1262 | > $P3 = $P0.'get_name'() |
| 1263 | 1118,1120d1273 |
| 1264 | < <p>Namespaces also provide a set of methods to provide more complex behavior than the standard vtable functions allow. The <code>get_name</code><!-- |
| 1265 | < INDEX: get_name method |
| 1266 | < --> method returns the name of the namespace as a <code>ResizableStringArray</code>:</p> |
| 1267 | 1122c1275,1276 |
| 1268 | < <pre> $P3 = $P0.'get_name'()</pre> |
| 1269 | --- |
| 1270 | > The C<get_parent>X<get_parent method> method retrieves a namespace |
| 1271 | > object for the parent namespace that contains this one: |
| 1272 | 1124,1126c1278 |
| 1273 | < <p>The <code>get_parent</code><!-- |
| 1274 | < INDEX: get_parent method |
| 1275 | < --> method retrieves a namespace object for the parent namespace that contains this one:</p> |
| 1276 | --- |
| 1277 | > $P5 = $P0.'get_parent'() |
| 1278 | 1128d1279 |
| 1279 | < <pre> $P5 = $P0.'get_parent'()</pre> |
| 1280 | 1130,1132c1281,1282 |
| 1281 | < <p>The <code>get_class</code><!-- |
| 1282 | < INDEX: get_class method |
| 1283 | < --> method retrieves any Class PMC associated with the namespace:</p> |
| 1284 | --- |
| 1285 | > The C<get_class>X<get_class method> method retrieves any Class PMC |
| 1286 | > associated with the namespace: |
| 1287 | 1134c1284 |
| 1288 | < <pre> $P6 = $P0.'get_class'()</pre> |
| 1289 | --- |
| 1290 | > $P6 = $P0.'get_class'() |
| 1291 | 1136,1140d1285 |
| 1292 | < <p>The <code>add_var</code><!-- |
| 1293 | < INDEX: add_var method |
| 1294 | < --> and <code>find_var</code><!-- |
| 1295 | < INDEX: find_var method |
| 1296 | < --> methods store and retrieve variables in a namespace in a language-neutral way:</p> |
| 1297 | 1142,1143c1287,1289 |
| 1298 | < <pre> $P0.'add_var'("bee", $P3) |
| 1299 | < $P1 = $P0.'find_var'("bee")</pre> |
| 1300 | --- |
| 1301 | > The C<add_var>X<add_var method> and C<find_var>X<find_var method> |
| 1302 | > methods store and retrieve variables in a namespace in a |
| 1303 | > language-neutral way: |
| 1304 | 1145,1147c1291,1292 |
| 1305 | < <p>The <code>find_namespace</code><!-- |
| 1306 | < INDEX: find_namespace method |
| 1307 | < --> method looks up a namespace, just like the <code>get_namespace</code> opcode:</p> |
| 1308 | --- |
| 1309 | > $P0.'add_var'("bee", $P3) |
| 1310 | > $P1 = $P0.'find_var'("bee") |
| 1311 | 1149d1293 |
| 1312 | < <pre> $P1 = $P0.'find_namespace'("Duck")</pre> |
| 1313 | 1151,1153c1295,1296 |
| 1314 | < <p>The <code>add_namespace</code><!-- |
| 1315 | < INDEX: add_namespace method |
| 1316 | < --> method adds a new namespace as a child of the namespace object:</p> |
| 1317 | --- |
| 1318 | > The C<find_namespace>X<find_namespace method> method looks up a |
| 1319 | > namespace, just like the C<get_namespace> opcode: |
| 1320 | 1155c1298 |
| 1321 | < <pre> $P0.'add_namespace'($P1)</pre> |
| 1322 | --- |
| 1323 | > $P1 = $P0.'find_namespace'("Duck") |
| 1324 | 1157,1159d1299 |
| 1325 | < <p>The <code>make_namespace</code><!-- |
| 1326 | < INDEX: make_namespace method |
| 1327 | < --> method looks up a namespace as a child of the namespace object and returns it. If the requested namespace doesn't exist, <code>make_namespace</code> creates a new one and adds it under that name:</p> |
| 1328 | 1161c1301,1313 |
| 1329 | < <pre> $P1 = $P0.'make_namespace'("Duck")</pre> |
| 1330 | --- |
| 1331 | > The C<add_namespace>X<add_namespace method> method adds a new namespace |
| 1332 | > as a child of the namespace object: |
| 1333 | > |
| 1334 | > $P0.'add_namespace'($P1) |
| 1335 | > |
| 1336 | > |
| 1337 | > The C<make_namespace>X<make_namespace method> method looks up a |
| 1338 | > namespace as a child of the namespace object and returns it. If the |
| 1339 | > requested namespace doesn't exist, C<make_namespace> creates a new one |
| 1340 | > and adds it under that name: |
| 1341 | > |
| 1342 | > $P1 = $P0.'make_namespace'("Duck") |
| 1343 | > |
| 1344 | 1166,1168c1318,1322 |
| 1345 | < <p><!-- |
| 1346 | < INDEX: aliasing |
| 1347 | < --> Just like regular assignment, the various operations to store a variable in a namespace only store a pointer to the PMC. If you modify the local PMC after storing in a namespace, those changes will also appear in the stored global. To store a true copy of the PMC, <code>clone</code> it before you store it.</p> |
| 1348 | --- |
| 1349 | > X<aliasing> |
| 1350 | > Just like regular assignment, the various operations to store a variable in a |
| 1351 | > namespace only store a pointer to the PMC. If you modify the local PMC after |
| 1352 | > storing in a namespace, those changes will also appear in the stored global. To |
| 1353 | > store a true copy of the PMC, C<clone> it before you store it. |
| 1354 | 1170c1324,1325 |
| 1355 | < <p>Leaving the global variable as an alias for a local variable has its advantages. If you retrieve a stored global into a register and modify it:</p> |
| 1356 | --- |
| 1357 | > Leaving the global variable as an alias for a local variable has its advantages. |
| 1358 | > If you retrieve a stored global into a register and modify it: |
| 1359 | 1174c1329,1330 |
| 1360 | < <p>... you modify the value of the stored global, so you don't need to call <code>set_global</code> again.</p> |
| 1361 | --- |
| 1362 | > ... you modify the value of the stored global, so you don't need to call |
| 1363 | > C<set_global> again. |
| 1364 | 1178c1334 |
| 1365 | < Copyright © 2002-2009, Parrot Foundation. |
| 1366 | --- |
| 1367 | > Copyright © 2002-2010, Parrot Foundation. |
| 1368 | diff -r parrot-trunk/docs/html/docs/book/pir/ch05_control_structures.pod.html parrot/docs/html/docs/book/pir/ch05_control_structures.pod.html |
| 1369 | 23c23 |
| 1370 | < <a href="../../../../html/index.html">Home</a> » Control Structures |
| 1371 | --- |
| 1372 | > Control Structures |
| 1373 | 302c302 |
| 1374 | < Copyright © 2002-2009, Parrot Foundation. |
| 1375 | --- |
| 1376 | > Copyright © 2002-2010, Parrot Foundation. |
| 1377 | diff -r parrot-trunk/docs/html/docs/book/pir/ch06_subroutines.pod.html parrot/docs/html/docs/book/pir/ch06_subroutines.pod.html |
| 1378 | 23c23 |
| 1379 | < <a href="../../../../html/index.html">Home</a> » Subroutines |
| 1380 | --- |
| 1381 | > Subroutines |
| 1382 | 759c759 |
| 1383 | < --> Native Call Interface (NCI) is a special version of the Parrot calling conventions for calling functions in shared C libraries with a known signature. This is a simplified version of the first test in <em><a href="../../../t/pmc/nci.t.html">t/pmc/nci.t</a></em>:</p> |
| 1384 | --- |
| 1385 | > --> Native Call Interface (NCI) is a special version of the Parrot calling conventions for calling functions in shared C libraries with a known signature. This is a simplified version of the first test in <em>t/pmc/nci.t</em>:</p> |
| 1386 | 789c789 |
| 1387 | < Copyright © 2002-2009, Parrot Foundation. |
| 1388 | --- |
| 1389 | > Copyright © 2002-2010, Parrot Foundation. |
| 1390 | diff -r parrot-trunk/docs/html/docs/book/pir/ch07_objects.pod.html parrot/docs/html/docs/book/pir/ch07_objects.pod.html |
| 1391 | 23c23 |
| 1392 | < <a href="../../../../html/index.html">Home</a> » Classes and Objects |
| 1393 | --- |
| 1394 | > Classes and Objects |
| 1395 | 341c341 |
| 1396 | < Copyright © 2002-2009, Parrot Foundation. |
| 1397 | --- |
| 1398 | > Copyright © 2002-2010, Parrot Foundation. |
| 1399 | diff -r parrot-trunk/docs/html/docs/book/pir/ch08_io.pod.html parrot/docs/html/docs/book/pir/ch08_io.pod.html |
| 1400 | 23c23 |
| 1401 | < <a href="../../../../html/index.html">Home</a> » I/O |
| 1402 | --- |
| 1403 | > I/O |
| 1404 | 368c368 |
| 1405 | < Copyright © 2002-2009, Parrot Foundation. |
| 1406 | --- |
| 1407 | > Copyright © 2002-2010, Parrot Foundation. |
| 1408 | diff -r parrot-trunk/docs/html/docs/book/pir/ch09_exceptions.pod.html parrot/docs/html/docs/book/pir/ch09_exceptions.pod.html |
| 1409 | 23c23 |
| 1410 | < <a href="../../../../html/index.html">Home</a> » Exceptions |
| 1411 | --- |
| 1412 | > Exceptions |
| 1413 | 277c277 |
| 1414 | < Copyright © 2002-2009, Parrot Foundation. |
| 1415 | --- |
| 1416 | > Copyright © 2002-2010, Parrot Foundation. |
| 1417 | diff -r parrot-trunk/docs/html/docs/compiler_faq.pod.html parrot/docs/html/docs/compiler_faq.pod.html |
| 1418 | 23c23 |
| 1419 | < <a href="../../html/index.html">Home</a> » Parrot FAQ for compiler writers in PIR |
| 1420 | --- |
| 1421 | > Parrot FAQ for compiler writers in PIR |
| 1422 | 302c302 |
| 1423 | < See also <em><a href="../t/dynpmc/dynlexpad.t.html">t/dynpmc/dynlexpad.t</a></em>.</p> |
| 1424 | --- |
| 1425 | > See also <em>t/dynpmc/dynlexpad.t</em>.</p> |
| 1426 | 636c636 |
| 1427 | < Copyright © 2002-2009, Parrot Foundation. |
| 1428 | --- |
| 1429 | > Copyright © 2002-2010, Parrot Foundation. |
| 1430 | diff -r parrot-trunk/docs/html/docs/configuration.pod.html parrot/docs/html/docs/configuration.pod.html |
| 1431 | 23c23 |
| 1432 | < <a href="../../html/index.html">Home</a> » <a href="../../html/tools.html">Tools</a> » Parrot Configuration System |
| 1433 | --- |
| 1434 | > Parrot Configuration System |
| 1435 | 55c55 |
| 1436 | < you would add the code used to determine its size in <em><a href="../config/auto/sizes.pm.html">config/auto/sizes.pm</a></em>. |
| 1437 | --- |
| 1438 | > you would add the code used to determine its size in <em>config/auto/sizes.pm</em>. |
| 1439 | 83c83 |
| 1440 | < To enable them run <em><a href="../Configure.pl.html">Configure.pl</a></em> with the <code>--ask</code> option.</p> |
| 1441 | --- |
| 1442 | > To enable them run <em>Configure.pl</em> with the <code>--ask</code> option.</p> |
| 1443 | 118,119c118,119 |
| 1444 | < the <em><a href="../Configure.pl.html">Configure.pl</a></em> script. |
| 1445 | < The system is invoked by instantiating a <a href='..%2Flib%2FParrot%2FConfigure.pm.html'>Parrot::Configure</a> object, |
| 1446 | --- |
| 1447 | > the <em>Configure.pl</em> script. |
| 1448 | > The system is invoked by instantiating a <a href='TODO'>Parrot::Configure</a> object, |
| 1449 | 131c131 |
| 1450 | < the step <em><a href="../config/init/defaults.pm.html">config/init/defaults.pm</a></em> uses the <code>init::defaults</code> namespace.</p> |
| 1451 | --- |
| 1452 | > the step <em>config/init/defaults.pm</em> uses the <code>init::defaults</code> namespace.</p> |
| 1453 | 133c133 |
| 1454 | < <p>Each step inherits its constructor and some other methods from <em><a href="../lib/Parrot/Configure/Step.pm.html">lib/Parrot/Configure/Step.pm</a></em>. |
| 1455 | --- |
| 1456 | > <p>Each step inherits its constructor and some other methods from <em>lib/Parrot/Configure/Step.pm</em>. |
| 1457 | 167c167 |
| 1458 | < <p>The configuration system won't execute your step by default unless it's specifically told to. To do this, edit <em><a href="../lib/Parrot/Configure/Step/List.pm.html">lib/Parrot/Configure/Step/List.pm</a></em>. Steps are run in the order in which that are registered with the <a href='..%2Flib%2FParrot%2FConfigure.pm.html'>Parrot::Configure</a> object.</p> |
| 1459 | --- |
| 1460 | > <p>The configuration system won't execute your step by default unless it's specifically told to. To do this, edit <em>lib/Parrot/Configure/Step/List.pm</em>. Steps are run in the order in which that are registered with the <a href='TODO'>Parrot::Configure</a> object.</p> |
| 1461 | 169c169 |
| 1462 | < <p>Various utility functions for configuration steps are provided by the <a href='..%2Flib%2FParrot%2FConfigure%2FUtils.pm.html'>Parrot::Configure::Utils</a> module.</p> |
| 1463 | --- |
| 1464 | > <p>Various utility functions for configuration steps are provided by the <a href='TODO'>Parrot::Configure::Utils</a> module.</p> |
| 1465 | 210c210 |
| 1466 | < <p>Command-line arguments are now processed by <code>process_options()</code>, a subroutine exported by <a href='..%2Flib%2FParrot%2FConfigure%2FOptions.pm.html'>Parrot::Configure::Options</a>. If you add a new option, don't forget to add it to this documentation and to appropriate locations. Most options should be added to <code>@shared_valid_options</code> in <em><a href="../lib/Parrot/Configure/Options/Conf/Shared.pm.html">lib/Parrot/Configure/Options/Conf/Shared.pm</a></em>.</p> |
| 1467 | --- |
| 1468 | > <p>Command-line arguments are now processed by <code>process_options()</code>, a subroutine exported by <a href='TODO'>Parrot::Configure::Options</a>. If you add a new option, don't forget to add it to this documentation and to appropriate locations. Most options should be added to <code>@shared_valid_options</code> in <em>lib/Parrot/Configure/Options/Conf/Shared.pm</em>.</p> |
| 1469 | 212c212 |
| 1470 | < <p>Arguments passed to <em><a href="../Configure.pl.html">Configure.pl</a></em> are held in a <a href='..%2Flib%2FParrot%2FConfigure%2FData.pm.html'>Parrot::Configure::Data</a> object stored inside the <a href='..%2Flib%2FParrot%2FConfigure.pm.html'>Parrot::Configure</a> object. The options data object may be accessed via the <code>Parrot::Configure::options()</code> method.</p> |
| 1471 | --- |
| 1472 | > <p>Arguments passed to <em>Configure.pl</em> are held in a <a href='TODO'>Parrot::Configure::Data</a> object stored inside the <a href='TODO'>Parrot::Configure</a> object. The options data object may be accessed via the <code>Parrot::Configure::options()</code> method.</p> |
| 1473 | 217c217 |
| 1474 | < <p>As an alternative to typing a long string of options on the command-line, Parrot can now be configured from a configuration file. You put the options in a configuration file, then call <em><a href="../Configure.pl.html">Configure.pl</a></em> as follows:</p> |
| 1475 | --- |
| 1476 | > <p>As an alternative to typing a long string of options on the command-line, Parrot can now be configured from a configuration file. You put the options in a configuration file, then call <em>Configure.pl</em> as follows:</p> |
| 1477 | 228c228 |
| 1478 | < <p>The second step is <em><a href="../config/init/defaults.pm.html">config/init/defaults.pm</a></em>, which sets up some defaults in a <a href='..%2Flib%2FParrot%2FConfigure%2FData.pm.html'>Parrot::Configure::Data</a> object contained by the main <a href='..%2Flib%2FParrot%2FConfigure.pm.html'>Parrot::Configure</a> object. It can be accessed via the <code>Parrot::Configure::data()</code> method. You get and set configuration system's data by interacting with this object. Some of its methods are summarized below.</p> |
| 1479 | --- |
| 1480 | > <p>The second step is <em>config/init/defaults.pm</em>, which sets up some defaults in a <a href='TODO'>Parrot::Configure::Data</a> object contained by the main <a href='TODO'>Parrot::Configure</a> object. It can be accessed via the <code>Parrot::Configure::data()</code> method. You get and set configuration system's data by interacting with this object. Some of its methods are summarized below.</p> |
| 1481 | 245c245 |
| 1482 | < Returns a string that can be <code>eval</code>ed by Perl to create a hash representing the configuration system's data.See the <a href='..%2Flib%2FParrot%2FConfigure%2FData.pm.html'>Parrot::Configure::Data</a> documentation for further details.</dl> |
| 1483 | --- |
| 1484 | > Returns a string that can be <code>eval</code>ed by Perl to create a hash representing the configuration system's data.See the <a href='TODO'>Parrot::Configure::Data</a> documentation for further details.</dl> |
| 1485 | 261c261 |
| 1486 | < These settings are deleted before <em><a href="../lib/Parrot/Config.pm.html">lib/Parrot/Config.pm</a></em> is written. These entries are only used e.g. for Makefile creation.</dl> |
| 1487 | --- |
| 1488 | > These settings are deleted before <em>lib/Parrot/Config.pm</em> is written. These entries are only used e.g. for Makefile creation.</dl> |
| 1489 | 266c266 |
| 1490 | < <p>Parrot configuration is currently jump-started by extracting considerable information from variables associated with the instance of Perl 5 which the user is using to run <em><a href="../Configure.pl.html">Configure.pl</a></em>. These variables are largely looked up in the <code>%Config</code> found in the Perl 5 <em>Config.pm</em>, but may also be sought in Perl 5 special variables such as <code>$^O</code>. All such lookups should be done in configuration step <code>init::defaults</code> and <b>only</b> in that step. Special accessors are available for working with such variables; see <em><a href="../config/init/defaults.pm.html">config/init/defaults.pm</a></em> and <em><a href="../lib/Parrot/Configure/Data.pm.html">lib/Parrot/Configure/Data.pm</a></em>.</p> |
| 1491 | --- |
| 1492 | > <p>Parrot configuration is currently jump-started by extracting considerable information from variables associated with the instance of Perl 5 which the user is using to run <em>Configure.pl</em>. These variables are largely looked up in the <code>%Config</code> found in the Perl 5 <em>Config.pm</em>, but may also be sought in Perl 5 special variables such as <code>$^O</code>. All such lookups should be done in configuration step <code>init::defaults</code> and <b>only</b> in that step. Special accessors are available for working with such variables; see <em>config/init/defaults.pm</em> and <em>lib/Parrot/Configure/Data.pm</em>.</p> |
| 1493 | 276c276 |
| 1494 | < <p><a href='..%2Flib%2FParrot%2FConfigure.pm.html'>Parrot::Configure</a>, <a href='..%2Flib%2FParrot%2FConfigure%2FData.pm.html'>Parrot::Configure::Data</a>, <a href='..%2Flib%2FParrot%2FConfigure%2FUtils.pm.html'>Parrot::Configure::Utils</a>, <a href='..%2Flib%2FParrot%2FConfigure%2FStep.pm.html'>Parrot::Configure::Step</a></p> |
| 1495 | --- |
| 1496 | > <p><a href='TODO'>Parrot::Configure</a>, <a href='TODO'>Parrot::Configure::Data</a>, <a href='TODO'>Parrot::Configure::Utils</a>, <a href='TODO'>Parrot::Configure::Step</a></p> |
| 1497 | 280c280 |
| 1498 | < Copyright © 2002-2009, Parrot Foundation. |
| 1499 | --- |
| 1500 | > Copyright © 2002-2010, Parrot Foundation. |
| 1501 | diff -r parrot-trunk/docs/html/docs/debugger.pod.html parrot/docs/html/docs/debugger.pod.html |
| 1502 | 23c23 |
| 1503 | < <a href="../../html/index.html">Home</a> » <a href="../../html/tools.html">Tools</a> » The Parrot Debugger |
| 1504 | --- |
| 1505 | > The Parrot Debugger |
| 1506 | 307c307 |
| 1507 | < Copyright © 2002-2009, Parrot Foundation. |
| 1508 | --- |
| 1509 | > Copyright © 2002-2010, Parrot Foundation. |
| 1510 | diff -r parrot-trunk/docs/html/docs/debug.pod.html parrot/docs/html/docs/debug.pod.html |
| 1511 | 23c23 |
| 1512 | < <a href="../../html/index.html">Home</a> » <a href="../../html/tools.html">Tools</a> » Debugging Parrot |
| 1513 | --- |
| 1514 | > Debugging Parrot |
| 1515 | 76c76 |
| 1516 | < <p>See <em><a href="dev/infant.pod.html">docs/dev/infant.pod</a></em> for details of one frequent problem: infant mortality. Infant mortality is when you create a Parrot object, but the garbage collector runs before you put it into a Parrot register or in something else that is itself within a Parrot register.</p> |
| 1517 | --- |
| 1518 | > <p>See <em>docs/dev/infant.pod</em> for details of one frequent problem: infant mortality. Infant mortality is when you create a Parrot object, but the garbage collector runs before you put it into a Parrot register or in something else that is itself within a Parrot register.</p> |
| 1519 | 88c88 |
| 1520 | < <p>One possible tool is <code>parrot_debugger</code>, the Parrot Debugger. See <em><a href="debugger.pod.html">docs/debugger.pod</a></em> for details on it.</p> |
| 1521 | --- |
| 1522 | > <p>One possible tool is <code>parrot_debugger</code>, the Parrot Debugger. See <em>docs/debugger.pod</em> for details on it.</p> |
| 1523 | 247c247 |
| 1524 | < Copyright © 2002-2009, Parrot Foundation. |
| 1525 | --- |
| 1526 | > Copyright © 2002-2010, Parrot Foundation. |
| 1527 | diff -r parrot-trunk/docs/html/docs/dev/byteorder.pod.html parrot/docs/html/docs/dev/byteorder.pod.html |
| 1528 | 23c23 |
| 1529 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/developer.html">Developer Documentation</a> » Byteorder Conversion Functions |
| 1530 | --- |
| 1531 | > Byteorder Conversion Functions |
| 1532 | 54c54 |
| 1533 | < <p>When reading a pbc stored in a different architecture, the pbc header defines the pbc byteorder for the architecture which stored the pbc, and the <em><a href="../../src/packfile/pf_items.c.html">src/packfile/pf_items.c</a></em> functions are used to convert the values to the native endianness, wordsize and ptrsize.</p> |
| 1534 | --- |
| 1535 | > <p>When reading a pbc stored in a different architecture, the pbc header defines the pbc byteorder for the architecture which stored the pbc, and the <em>src/packfile/pf_items.c</em> functions are used to convert the values to the native endianness, wordsize and ptrsize.</p> |
| 1536 | 129c129 |
| 1537 | < <p>The fetch and transformer functions are implemented in <em><a href="../../src/packfile/pf_items.c.html">src/packfile/pf_items.c</a></em></p> |
| 1538 | --- |
| 1539 | > <p>The fetch and transformer functions are implemented in <em>src/packfile/pf_items.c</em></p> |
| 1540 | 133c133 |
| 1541 | < Copyright © 2002-2009, Parrot Foundation. |
| 1542 | --- |
| 1543 | > Copyright © 2002-2010, Parrot Foundation. |
| 1544 | diff -r parrot-trunk/docs/html/docs/dev/c_functions.pod.html parrot/docs/html/docs/dev/c_functions.pod.html |
| 1545 | 23c23 |
| 1546 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/developer.html">Developer Documentation</a> » C function decoration guidelines |
| 1547 | --- |
| 1548 | > C function decoration guidelines |
| 1549 | 214c214 |
| 1550 | < Copyright © 2002-2009, Parrot Foundation. |
| 1551 | --- |
| 1552 | > Copyright © 2002-2010, Parrot Foundation. |
| 1553 | diff -r parrot-trunk/docs/html/docs/dev/debugging_with_msvc.pod.html parrot/docs/html/docs/dev/debugging_with_msvc.pod.html |
23 | | < <title>Parrot - Untitled</title> |
24 | | --- |
25 | | > <title>Parrot - Getting Started</title> |
26 | | 23c23 |
27 | | < Untitled |
28 | | --- |
29 | | > <a href="../../../../html/index.html">Home</a> » Getting Started |
30 | | 154c154 |
31 | | < Copyright © 2002-2010, Parrot Foundation. |
32 | | --- |
33 | | > Copyright © 2002-2009, Parrot Foundation. |
34 | | diff -r parrot/docs/html/docs/book/pct/ch03_compiler_tools.pod.html parrot-trunk/docs/html/docs/book/pct/ch03_compiler_tools.pod.html |
35 | | 5c5 |
36 | | < <title>Parrot - Untitled</title> |
37 | | --- |
38 | | > <title>Parrot - Parrot Compiler Tools</title> |
39 | | 23c23 |
40 | | < Untitled |
41 | | --- |
42 | | > <a href="../../../../html/index.html">Home</a> » Parrot Compiler Tools |
| 1555 | < <title>Parrot - Debugging Parrot with Microsoft</title> |
| 1556 | --- |
| 1557 | > <title>Parrot - Debugging Parrot with Microsoft Visual C++</title> |
| 1558 | 23c23 |
| 1559 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/developer.html">Developer Documentation</a> » Debugging Parrot with Microsoft |
| 1560 | --- |
| 1561 | > Debugging Parrot with Microsoft Visual C++ |
| 1562 | 161c161 |
| 1563 | < Copyright © 2002-2009, Parrot Foundation. |
| 1564 | --- |
| 1565 | > Copyright © 2002-2010, Parrot Foundation. |
| 1566 | diff -r parrot-trunk/docs/html/docs/dev/events.pod.html parrot/docs/html/docs/dev/events.pod.html |
| 1567 | 23c23 |
| 1568 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/developer.html">Developer Documentation</a> » Design Notes for Events |
| 1569 | --- |
| 1570 | > Design Notes for Events |
| 1571 | 152c152 |
| 1572 | < Copyright © 2002-2009, Parrot Foundation. |
| 1573 | --- |
| 1574 | > Copyright © 2002-2010, Parrot Foundation. |
| 1575 | diff -r parrot-trunk/docs/html/docs/dev/headerizer.pod.html parrot/docs/html/docs/dev/headerizer.pod.html |
| 1576 | 23c23 |
| 1577 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/developer.html">Developer Documentation</a> » The Headerizer |
| 1578 | --- |
| 1579 | > The Headerizer |
| 1580 | 26,27c26,27 |
| 1581 | < <h1><a name="TITLE" |
| 1582 | < >TITLE</a></h1> |
| 1583 | --- |
| 1584 | > <h1><a name="NAME" |
| 1585 | > >NAME</a></h1> |
| 1586 | 39c39 |
| 1587 | < <p>The Headerizer (<em><a href="../../tools/build/headerizer.pl.html">tools/build/headerizer.pl</a></em>) is a tool that generates chunks of <em>.h</em> header files based on C source code.</p> |
| 1588 | --- |
| 1589 | > <p>The Headerizer (<em>tools/build/headerizer.pl</em>) is a tool that generates chunks of <em>.h</em> header files based on C source code.</p> |
| 1590 | 66c66 |
| 1591 | < Copyright © 2002-2009, Parrot Foundation. |
| 1592 | --- |
| 1593 | > Copyright © 2002-2010, Parrot Foundation. |
| 1594 | diff -r parrot-trunk/docs/html/docs/dev/infant.pod.html parrot/docs/html/docs/dev/infant.pod.html |
| 1595 | 23c23 |
| 1596 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/developer.html">Developer Documentation</a> » Infant Mortality |
| 1597 | --- |
| 1598 | > Infant Mortality |
| 1599 | 298c298 |
| 1600 | < Copyright © 2002-2009, Parrot Foundation. |
| 1601 | --- |
| 1602 | > Copyright © 2002-2010, Parrot Foundation. |
| 1603 | diff -r parrot-trunk/docs/html/docs/dev/longopt.pod.html parrot/docs/html/docs/dev/longopt.pod.html |
| 1604 | 23c23 |
| 1605 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/developer.html">Developer Documentation</a> » Long option parsing |
| 1606 | --- |
| 1607 | > Long option parsing |
| 1608 | 98c98 |
| 1609 | < Copyright © 2002-2009, Parrot Foundation. |
| 1610 | --- |
| 1611 | > Copyright © 2002-2010, Parrot Foundation. |
| 1612 | diff -r parrot-trunk/docs/html/docs/dev/optimizer.pod.html parrot/docs/html/docs/dev/optimizer.pod.html |
| 1613 | 23c23 |
| 1614 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/developer.html">Developer Documentation</a> » About the IMCC optimizer |
| 1615 | --- |
| 1616 | > About the IMCC optimizer |
| 1617 | 165c165 |
| 1618 | < Copyright © 2002-2009, Parrot Foundation. |
| 1619 | --- |
| 1620 | > Copyright © 2002-2010, Parrot Foundation. |
| 1621 | diff -r parrot-trunk/docs/html/docs/dev/parrot_api.pod.html parrot/docs/html/docs/dev/parrot_api.pod.html |
| 1622 | 23c23 |
| 1623 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/developer.html">Developer Documentation</a> » Notes on the PARROT_EXPORT macro |
| 1624 | --- |
| 1625 | > Notes on the PARROT_EXPORT macro |
| 1626 | 64c64 |
| 1627 | < Copyright © 2002-2009, Parrot Foundation. |
| 1628 | --- |
| 1629 | > Copyright © 2002-2010, Parrot Foundation. |
| 1630 | diff -r parrot-trunk/docs/html/docs/dev/pccmethods.pod.html parrot/docs/html/docs/dev/pccmethods.pod.html |
| 1631 | 23c23 |
| 1632 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/developer.html">Developer Documentation</a> » Parrot Calling Conventions in C |
| 1633 | --- |
| 1634 | > Parrot Calling Conventions in C |
| 1635 | 115c115 |
| 1636 | < <p>That is, a register type, followed by a name, optionally followed by one or more flags specified as adverbs. The list of supported adverbs is listed in <em><a href="../pdds/pdd03_calling_conventions.pod.html">docs/pdds/pdd03_calling_conventions.pod</a></em>, the calling conventions design document.</p> |
| 1637 | --- |
| 1638 | > <p>That is, a register type, followed by a name, optionally followed by one or more flags specified as adverbs. The list of supported adverbs is listed in <em>docs/pdds/pdd03_calling_conventions.pod</em>, the calling conventions design document.</p> |
| 1639 | 141c141 |
| 1640 | < Copyright © 2002-2009, Parrot Foundation. |
| 1641 | --- |
| 1642 | > Copyright © 2002-2010, Parrot Foundation. |
| 1643 | diff -r parrot-trunk/docs/html/docs/dev/pcc_state.pod.html parrot/docs/html/docs/dev/pcc_state.pod.html |
| 1644 | 23c23 |
| 1645 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/developer.html">Developer Documentation</a> » parrot calling conventions state table |
| 1646 | --- |
| 1647 | > parrot calling conventions state table |
| 1648 | 134c134 |
| 1649 | < Copyright © 2002-2009, Parrot Foundation. |
| 1650 | --- |
| 1651 | > Copyright © 2002-2010, Parrot Foundation. |
| 1652 | diff -r parrot-trunk/docs/html/docs/dev/pmc_freeze.pod.html parrot/docs/html/docs/dev/pmc_freeze.pod.html |
| 1653 | 23c23 |
| 1654 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/developer.html">Developer Documentation</a> » Freeze/Thaw Design Notes |
| 1655 | --- |
| 1656 | > Freeze/Thaw Design Notes |
| 1657 | 215c215 |
| 1658 | < <p><em><a href="../../src/pmc_freeze.c.html">src/pmc_freeze.c</a></em>, <em>pf/pf_items.c</em></p> |
| 1659 | --- |
| 1660 | > <p><em>src/pmc_freeze.c</em>, <em>pf/pf_items.c</em></p> |
| 1661 | 224c224 |
| 1662 | < Copyright © 2002-2009, Parrot Foundation. |
| 1663 | --- |
| 1664 | > Copyright © 2002-2010, Parrot Foundation. |
| 1665 | diff -r parrot-trunk/docs/html/docs/dev/pmc_obj_design_meeting_notes.pod.html parrot/docs/html/docs/dev/pmc_obj_design_meeting_notes.pod.html |
| 1666 | 23c23 |
| 1667 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/developer.html">Developer Documentation</a> » Parrot PMC/Object Design Meeting Notes |
| 1668 | --- |
| 1669 | > Parrot PMC/Object Design Meeting Notes |
| 1670 | 190c190 |
| 1671 | < Copyright © 2002-2009, Parrot Foundation. |
| 1672 | --- |
| 1673 | > Copyright © 2002-2010, Parrot Foundation. |
| 1674 | diff -r parrot-trunk/docs/html/docs/dev/profiling.pod.html parrot/docs/html/docs/dev/profiling.pod.html |
| 1675 | 23c23 |
| 1676 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/developer.html">Developer Documentation</a> » Name |
| 1677 | --- |
| 1678 | > Name |
| 1679 | 91c91 |
| 1680 | < Copyright © 2002-2009, Parrot Foundation. |
| 1681 | --- |
| 1682 | > Copyright © 2002-2010, Parrot Foundation. |
| 1683 | diff -r parrot-trunk/docs/html/docs/embed.pod.html parrot/docs/html/docs/embed.pod.html |
| 1684 | 23c23 |
| 1685 | < <a href="../../html/index.html">Home</a> » <a href="../../html/developer.html">Developer Documentation</a> » Parrot embedding system |
| 1686 | --- |
| 1687 | > Parrot embedding system |
| 1688 | 2224c2224 |
| 1689 | < <p><em><a href="../src/main.c.html">src/main.c</a></em> and <em>t/src/*.t</em> for Parrot's use of the embedding system.</p> |
| 1690 | --- |
| 1691 | > <p><em>src/main.c</em> and <em>t/src/*.t</em> for Parrot's use of the embedding system.</p> |
| 1692 | 2230c2230 |
| 1693 | < Copyright © 2002-2009, Parrot Foundation. |
| 1694 | --- |
| 1695 | > Copyright © 2002-2010, Parrot Foundation. |
| 1696 | diff -r parrot-trunk/docs/html/docs/gettingstarted.pod.html parrot/docs/html/docs/gettingstarted.pod.html |
| 1697 | 23c23 |
| 1698 | < <a href="../../html/index.html">Home</a> » Parrot Developer FAQ |
| 1699 | --- |
| 1700 | > Parrot Developer FAQ |
| 1701 | 97c97 |
| 1702 | < <p>There are a few categories of documentation, each with different intents. It'll probably help to be aware of them before you go digging in. I highly suggest you check out <em><a href="pdds/pdd07_codingstd.pod.html">/docs/pdds/pdd07_codingstd.pod</a></em> for guidelines on how documentation is supposed to be laid out. For now, here's the executive summary:</p> |
| 1703 | --- |
| 1704 | > <p>There are a few categories of documentation, each with different intents. It'll probably help to be aware of them before you go digging in. I highly suggest you check out <em>/docs/pdds/pdd07_codingstd.pod</em> for guidelines on how documentation is supposed to be laid out. For now, here's the executive summary:</p> |
| 1705 | 170c170 |
| 1706 | < <p>See <em><a href="submissions.pod.html">docs/submissions.pod</a></em> for details.</p> |
| 1707 | --- |
| 1708 | > <p>See <em>docs/submissions.pod</em> for details.</p> |
| 1709 | 175c175 |
| 1710 | < <p>See <em><a href="submissions.pod.html">docs/submissions.pod</a></em> for details.</p> |
| 1711 | --- |
| 1712 | > <p>See <em>docs/submissions.pod</em> for details.</p> |
| 1713 | 184c184 |
| 1714 | < Copyright © 2002-2009, Parrot Foundation. |
| 1715 | --- |
| 1716 | > Copyright © 2002-2010, Parrot Foundation. |
| 1717 | diff -r parrot-trunk/docs/html/docs/glossary.pod.html parrot/docs/html/docs/glossary.pod.html |
| 1718 | 23c23 |
| 1719 | < <a href="../../html/index.html">Home</a> » Parrot Glossary |
| 1720 | --- |
| 1721 | > Parrot Glossary |
| 1722 | 206c206 |
| 1723 | < Copyright © 2002-2009, Parrot Foundation. |
| 1724 | --- |
| 1725 | > Copyright © 2002-2010, Parrot Foundation. |
| 1726 | diff -r parrot-trunk/docs/html/docs/intro.pod.html parrot/docs/html/docs/intro.pod.html |
| 1727 | 23c23 |
| 1728 | < <a href="../../html/index.html">Home</a> » The Parrot Primer |
| 1729 | --- |
| 1730 | > The Parrot Primer |
| 1731 | 181c181 |
| 1732 | < <p>The first step to building Parrot is to run the <em><a href="../Configure.pl.html">Configure.pl</a></em> program, |
| 1733 | --- |
| 1734 | > <p>The first step to building Parrot is to run the <em>Configure.pl</em> program, |
| 1735 | 399c399 |
| 1736 | < Copyright © 2002-2009, Parrot Foundation. |
| 1737 | --- |
| 1738 | > Copyright © 2002-2010, Parrot Foundation. |
| 1739 | diff -r parrot-trunk/docs/html/docs/memory_internals.pod.html parrot/docs/html/docs/memory_internals.pod.html |
| 1740 | 23c23 |
| 1741 | < <a href="../../html/index.html">Home</a> » <a href="../../html/developer.html">Developer Documentation</a> » Memory Internals |
| 1742 | --- |
| 1743 | > Memory Internals |
| 1744 | 72c72 |
| 1745 | < <p>See <em><a href="pdds/pdd09_gc.pod.html">docs/pdds/pdd09_gc.pod</a></em> for details about the garbage collector system.</p> |
| 1746 | --- |
| 1747 | > <p>See <em>docs/pdds/pdd09_gc.pod</em> for details about the garbage collector system.</p> |
| 1748 | 160c160 |
| 1749 | < <p>The <em><a href="../Configure.pl.html">Configure.pl</a></em> option <code>--gc</code> allows one to use either method.</p> |
| 1750 | --- |
| 1751 | > <p>The <em>Configure.pl</em> option <code>--gc</code> allows one to use either method.</p> |
| 1752 | 221c221 |
| 1753 | < Copyright © 2002-2009, Parrot Foundation. |
| 1754 | --- |
| 1755 | > Copyright © 2002-2010, Parrot Foundation. |
| 1756 | Only in parrot-trunk/docs/html/docs: ops |
| 1757 | diff -r parrot-trunk/docs/html/docs/overview.pod.html parrot/docs/html/docs/overview.pod.html |
| 1758 | 23c23 |
| 1759 | < <a href="../../html/index.html">Home</a> » A Parrot Overview |
| 1760 | --- |
| 1761 | > A Parrot Overview |
| 1762 | 159c159 |
| 1763 | < <p>One interesting thing about vtables is that you can construct them dynamically. You can find out more about vtables in <em><a href="vtables.pod.html">docs/vtables.pod</a></em>.</p> |
| 1764 | --- |
| 1765 | > <p>One interesting thing about vtables is that you can construct them dynamically. You can find out more about vtables in <em>docs/vtables.pod</em>.</p> |
| 1766 | 181c181 |
| 1767 | < <p>The bytecode format is fully documented in <em><a href="parrotbyte.pod.html">docs/parrotbyte.pod</a></em>.</p> |
| 1768 | --- |
| 1769 | > <p>The bytecode format is fully documented in <em>docs/parrotbyte.pod</em>.</p> |
| 1770 | 185c185 |
| 1771 | < Copyright © 2002-2009, Parrot Foundation. |
| 1772 | --- |
| 1773 | > Copyright © 2002-2010, Parrot Foundation. |
| 1774 | Only in parrot-trunk/docs/html/docs: packfile-c.pod.html |
| 1775 | diff -r parrot-trunk/docs/html/docs/parrotbyte.pod.html parrot/docs/html/docs/parrotbyte.pod.html |
| 1776 | 23c23 |
| 1777 | < <a href="../../html/index.html">Home</a> » <a href="../../html/developer.html">Developer Documentation</a> » The Parrot Bytecode (PBC) Format |
| 1778 | --- |
| 1779 | > The Parrot Bytecode (PBC) Format |
| 1780 | 48c48 |
| 1781 | < <p>The <b>Wordsize</b> (or <code>opcode_t</code> size) must be 4 (32-bit) or 8 (64 bit). The bytecode loader is responsible for transforming the file into the VM native wordsize on the fly. For performance, a utility <em>pbc_dump</em> is provided to convert PBCs on disk if they cannot be recompiled. See <em><a href="../src/pbc_dump.c.html">src/pbc_dump.c</a></em> for more information.</p> |
| 1782 | --- |
| 1783 | > <p>The <b>Wordsize</b> (or <code>opcode_t</code> size) must be 4 (32-bit) or 8 (64 bit). The bytecode loader is responsible for transforming the file into the VM native wordsize on the fly. For performance, a utility <em>pbc_dump</em> is provided to convert PBCs on disk if they cannot be recompiled. See <em>src/pbc_dump.c</em> for more information.</p> |
| 1784 | 319c319 |
| 1785 | < Copyright © 2002-2009, Parrot Foundation. |
| 1786 | --- |
| 1787 | > Copyright © 2002-2010, Parrot Foundation. |
| 1788 | diff -r parrot-trunk/docs/html/docs/parrothist.pod.html parrot/docs/html/docs/parrothist.pod.html |
| 1789 | 23c23 |
| 1790 | < <a href="../../html/index.html">Home</a> » Parrot Release History |
| 1791 | --- |
| 1792 | > Parrot Release History |
| 1793 | 29c29 |
| 1794 | < <p>parrothist - Parrot Release History</p> |
| 1795 | --- |
| 1796 | > <p>docs/parrothist.pod - Parrot Release History</p> |
| 1797 | 158c158 |
| 1798 | < Copyright © 2002-2009, Parrot Foundation. |
| 1799 | --- |
| 1800 | > Copyright © 2002-2010, Parrot Foundation. |
| 1801 | diff -r parrot-trunk/docs/html/docs/parrot.pod.html parrot/docs/html/docs/parrot.pod.html |
| 1802 | 23c23 |
| 1803 | < <a href="../../html/index.html">Home</a> » Parrot |
| 1804 | --- |
| 1805 | > Parrot |
| 1806 | 128c128 |
| 1807 | < The list is archived at: <a href='http://groups.google.com/group/parrot-dev/'><a href="http://groups.google.com/group/parrot-dev/">http://groups.google.com/group/parrot-dev/</a></a> Many people have contributed their time and expertise to the Parrot project; see the <em><a href="../CREDITS.html">CREDITS</a></em> file for details.</p> |
| 1808 | --- |
| 1809 | > The list is archived at: <a href='http://groups.google.com/group/parrot-dev/'><a href="http://groups.google.com/group/parrot-dev/">http://groups.google.com/group/parrot-dev/</a></a> Many people have contributed their time and expertise to the Parrot project; see the <em>CREDITS</em> file for details.</p> |
| 1810 | 147c147 |
| 1811 | < Copyright © 2002-2009, Parrot Foundation. |
| 1812 | --- |
| 1813 | > Copyright © 2002-2010, Parrot Foundation. |
| 1814 | Only in parrot-trunk/docs/html/docs: pct |
| 1815 | diff -r parrot-trunk/docs/html/docs/pdds/draft/pdd01_overview.pod.html parrot/docs/html/docs/pdds/draft/pdd01_overview.pod.html |
| 1816 | 23c23 |
| 1817 | < <a href="../../../../html/index.html">Home</a> » <a href="../../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » [DRAFT] PDD 1: Overview |
| 1818 | --- |
| 1819 | > [DRAFT] PDD 1: Overview |
| 1820 | 306c306 |
| 1821 | < Copyright © 2002-2009, Parrot Foundation. |
| 1822 | --- |
| 1823 | > Copyright © 2002-2010, Parrot Foundation. |
| 1824 | diff -r parrot-trunk/docs/html/docs/pdds/draft/pdd05_opfunc.pod.html parrot/docs/html/docs/pdds/draft/pdd05_opfunc.pod.html |
| 1825 | 23c23 |
| 1826 | < <a href="../../../../html/index.html">Home</a> » <a href="../../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » [DRAFT] PDD 5: Opcodes |
| 1827 | --- |
| 1828 | > [DRAFT] PDD 5: Opcodes |
| 1829 | 189c189 |
| 1830 | < Copyright © 2002-2009, Parrot Foundation. |
| 1831 | --- |
| 1832 | > Copyright © 2002-2010, Parrot Foundation. |
| 1833 | diff -r parrot-trunk/docs/html/docs/pdds/draft/pdd06_pasm.pod.html parrot/docs/html/docs/pdds/draft/pdd06_pasm.pod.html |
| 1834 | 23c23 |
| 1835 | < <a href="../../../../html/index.html">Home</a> » <a href="../../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » [DRAFT] PDD 6: Parrot Assembly Language (PASM) |
| 1836 | --- |
| 1837 | > [DRAFT] PDD 6: Parrot Assembly Language (PASM) |
| 1838 | 168c168 |
| 1839 | < Copyright © 2002-2009, Parrot Foundation. |
| 1840 | --- |
| 1841 | > Copyright © 2002-2010, Parrot Foundation. |
| 1842 | diff -r parrot-trunk/docs/html/docs/pdds/draft/pdd08_keys.pod.html parrot/docs/html/docs/pdds/draft/pdd08_keys.pod.html |
| 1843 | 23c23 |
| 1844 | < <a href="../../../../html/index.html">Home</a> » <a href="../../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » [DRAFT] PDD 8: PMC Keys |
| 1845 | --- |
| 1846 | > [DRAFT] PDD 8: PMC Keys |
| 1847 | 214c214 |
| 1848 | < Copyright © 2002-2009, Parrot Foundation. |
| 1849 | --- |
| 1850 | > Copyright © 2002-2010, Parrot Foundation. |
| 1851 | diff -r parrot-trunk/docs/html/docs/pdds/draft/pdd10_embedding.pod.html parrot/docs/html/docs/pdds/draft/pdd10_embedding.pod.html |
| 1852 | 23c23 |
| 1853 | < <a href="../../../../html/index.html">Home</a> » <a href="../../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » [DRAFT] PDD10: Embedding and Extending |
| 1854 | --- |
| 1855 | > [DRAFT] PDD10: Embedding and Extending |
| 1856 | 260c260 |
| 1857 | < Copyright © 2002-2009, Parrot Foundation. |
| 1858 | --- |
| 1859 | > Copyright © 2002-2010, Parrot Foundation. |
| 1860 | diff -r parrot-trunk/docs/html/docs/pdds/draft/pdd11_extending.pod.html parrot/docs/html/docs/pdds/draft/pdd11_extending.pod.html |
| 1861 | 23c23 |
| 1862 | < <a href="../../../../html/index.html">Home</a> » <a href="../../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » [DRAFT] PDD 11: Extending |
| 1863 | --- |
| 1864 | > [DRAFT] PDD 11: Extending |
| 1865 | 40c40 |
| 1866 | < <p>$Revision: 47669 $</p> |
| 1867 | --- |
| 1868 | > <p>$Revision: 48025 $</p> |
| 1869 | 326c326 |
| 1870 | < <p><em><a href="../../glossary.pod.html">docs/glossary.pod</a></em></p> |
| 1871 | --- |
| 1872 | > <p><em>docs/glossary.pod</em></p> |
| 1873 | 330c330 |
| 1874 | < Copyright © 2002-2009, Parrot Foundation. |
| 1875 | --- |
| 1876 | > Copyright © 2002-2010, Parrot Foundation. |
| 1877 | diff -r parrot-trunk/docs/html/docs/pdds/draft/pdd14_numbers.pod.html parrot/docs/html/docs/pdds/draft/pdd14_numbers.pod.html |
| 1878 | 23c23 |
| 1879 | < <a href="../../../../html/index.html">Home</a> » <a href="../../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » [DRAFT] PDD 14: Numbers |
| 1880 | --- |
| 1881 | > [DRAFT] PDD 14: Numbers |
| 1882 | 489c489 |
| 1883 | < Copyright © 2002-2009, Parrot Foundation. |
| 1884 | --- |
| 1885 | > Copyright © 2002-2010, Parrot Foundation. |
| 1886 | diff -r parrot-trunk/docs/html/docs/pdds/draft/pdd16_native_call.pod.html parrot/docs/html/docs/pdds/draft/pdd16_native_call.pod.html |
| 1887 | 23c23 |
| 1888 | < <a href="../../../../html/index.html">Home</a> » <a href="../../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » [DRAFT] PDD 16: Native Call Interface (NCI) |
| 1889 | --- |
| 1890 | > [DRAFT] PDD 16: Native Call Interface (NCI) |
| 1891 | 319c319 |
| 1892 | < <p><em><a href="../../../t/pmc/nci.t.html">t/pmc/nci.t</a></em>, <em><a href="../../../src/nci_test.c.html">src/nci_test.c</a></em></p> |
| 1893 | --- |
| 1894 | > <p><em>t/pmc/nci.t</em>, <em>src/nci_test.c</em></p> |
| 1895 | 323c323 |
| 1896 | < Copyright © 2002-2009, Parrot Foundation. |
| 1897 | --- |
| 1898 | > Copyright © 2002-2010, Parrot Foundation. |
| 1899 | diff -r parrot-trunk/docs/html/docs/pdds/draft/pdd29_compiler_tools.pod.html parrot/docs/html/docs/pdds/draft/pdd29_compiler_tools.pod.html |
| 1900 | 23c23 |
| 1901 | < <a href="../../../../html/index.html">Home</a> » <a href="../../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » [DRAFT] PDD 29: Compiler Tools |
| 1902 | --- |
| 1903 | > [DRAFT] PDD 29: Compiler Tools |
| 1904 | 339c339 |
| 1905 | < Copyright © 2002-2009, Parrot Foundation. |
| 1906 | --- |
| 1907 | > Copyright © 2002-2010, Parrot Foundation. |
| 1908 | diff -r parrot-trunk/docs/html/docs/pdds/draft/pdd31_hll_interop.pod.html parrot/docs/html/docs/pdds/draft/pdd31_hll_interop.pod.html |
| 1909 | 23c23 |
| 1910 | < <a href="../../../../html/index.html">Home</a> » <a href="../../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » [DRAFT] PDD 31: Inter-Language Calling |
| 1911 | --- |
| 1912 | > [DRAFT] PDD 31: Inter-Language Calling |
| 1913 | 373c373 |
| 1914 | < Copyright © 2002-2009, Parrot Foundation. |
| 1915 | --- |
| 1916 | > Copyright © 2002-2010, Parrot Foundation. |
| 1917 | diff -r parrot-trunk/docs/html/docs/pdds/draft/pdd31_hll.pod.html parrot/docs/html/docs/pdds/draft/pdd31_hll.pod.html |
| 1918 | 23c23 |
| 1919 | < <a href="../../../../html/index.html">Home</a> » <a href="../../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » [DRAFT] PDD 31: HLL Compilers and Libraries |
| 1920 | --- |
| 1921 | > [DRAFT] PDD 31: HLL Compilers and Libraries |
| 1922 | 192c192 |
| 1923 | < Copyright © 2002-2009, Parrot Foundation. |
| 1924 | --- |
| 1925 | > Copyright © 2002-2010, Parrot Foundation. |
| 1926 | diff -r parrot-trunk/docs/html/docs/pdds/pdd00_pdd.pod.html parrot/docs/html/docs/pdds/pdd00_pdd.pod.html |
| 1927 | 23c23 |
| 1928 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 0: Design Document Format |
| 1929 | --- |
| 1930 | > PDD 0: Design Document Format |
| 1931 | 92c92 |
| 1932 | < An example of the currently accepted layout is given in <em><a href="pdd_template.pod.html">docs/pdds/pdd_template.pod</a></em>, |
| 1933 | --- |
| 1934 | > An example of the currently accepted layout is given in <em>docs/pdds/pdd_template.pod</em>, |
| 1935 | 177c177 |
| 1936 | < Copyright © 2002-2009, Parrot Foundation. |
| 1937 | --- |
| 1938 | > Copyright © 2002-2010, Parrot Foundation. |
| 1939 | diff -r parrot-trunk/docs/html/docs/pdds/pdd03_calling_conventions.pod.html parrot/docs/html/docs/pdds/pdd03_calling_conventions.pod.html |
| 1940 | 23c23 |
| 1941 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 3: Calling Conventions |
| 1942 | --- |
| 1943 | > PDD 3: Calling Conventions |
| 1944 | 299c299 |
| 1945 | < Copyright © 2002-2009, Parrot Foundation. |
| 1946 | --- |
| 1947 | > Copyright © 2002-2010, Parrot Foundation. |
| 1948 | diff -r parrot-trunk/docs/html/docs/pdds/pdd07_codingstd.pod.html parrot/docs/html/docs/pdds/pdd07_codingstd.pod.html |
| 1949 | 23c23 |
| 1950 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 7: Conventions and Guidelines for Parrot Source Code |
| 1951 | --- |
| 1952 | > PDD 7: Conventions and Guidelines for Parrot Source Code |
| 1953 | 32c32 |
| 1954 | < <p>$Revision: 45652 $</p> |
| 1955 | --- |
| 1956 | > <p>$Revision: 47658 $</p> |
| 1957 | 410c410 |
| 1958 | < <p>The <em><a href="../../t/distro/file_metadata.t.html">t/distro/file_metadata.t</a></em> test checks that the files needing this property have it set.</p> |
| 1959 | --- |
| 1960 | > <p>The <em>t/distro/file_metadata.t</em> test checks that the files needing this property have it set.</p> |
| 1961 | 423c423 |
| 1962 | < <p>The <em><a href="../../t/distro/file_metadata.t.html">t/distro/file_metadata.t</a></em> test checks that the files needing this property have it set.</p> |
| 1963 | --- |
| 1964 | > <p>The <em>t/distro/file_metadata.t</em> test checks that the files needing this property have it set.</p> |
| 1965 | 428c428 |
| 1966 | < <p>The <code>svn:eol-style</code> property makes sure that whenever a file is checked out of subversion it has the correct end-of-line characters appropriate for the given platform. Therefore, most files should have their <code>svn:eol-style</code> property set to <code>native</code>. However, this is not true for all files. Some input files to tests (such as the <code>*.input</code> and <code>*.output</code> files for PIR tests) need to have <code>LF</code> as their <code>svn:eol-style</code> property. The current list of such files is described in <em><a href="../../t/distro/file_metadata.t.html">t/distro/file_metadata.t</a></em>.</p> |
| 1967 | --- |
| 1968 | > <p>The <code>svn:eol-style</code> property makes sure that whenever a file is checked out of subversion it has the correct end-of-line characters appropriate for the given platform. Therefore, most files should have their <code>svn:eol-style</code> property set to <code>native</code>. However, this is not true for all files. Some input files to tests (such as the <code>*.input</code> and <code>*.output</code> files for PIR tests) need to have <code>LF</code> as their <code>svn:eol-style</code> property. The current list of such files is described in <em>t/distro/file_metadata.t</em>.</p> |
| 1969 | 438c438 |
| 1970 | < <p>The <em><a href="../../t/distro/file_metadata.t.html">t/distro/file_metadata.t</a></em> test checks that the files needing this property have it set.</p> |
| 1971 | --- |
| 1972 | > <p>The <em>t/distro/file_metadata.t</em> test checks that the files needing this property have it set.</p> |
| 1973 | 567,569c567,569 |
| 1974 | < This inline Pod documentation is parsed to HTML by running: |
| 1975 | < <pre> $ perl tools/docs/write_docs.pl --delete</pre> |
| 1976 | < or: $ make html |
| 1977 | --- |
| 1978 | > This inline Pod documentation is transformed to HTML with: |
| 1979 | > <pre> $ make html</pre> |
| 1980 | > |
| 1981 | 640c640 |
| 1982 | < Copyright © 2002-2009, Parrot Foundation. |
| 1983 | --- |
| 1984 | > Copyright © 2002-2010, Parrot Foundation. |
| 1985 | diff -r parrot-trunk/docs/html/docs/pdds/pdd09_gc.pod.html parrot/docs/html/docs/pdds/pdd09_gc.pod.html |
| 1986 | 23c23 |
| 1987 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 9: Garbage Collection Subsystem |
| 1988 | --- |
| 1989 | > PDD 9: Garbage Collection Subsystem |
| 1990 | 680c680 |
| 1991 | < Copyright © 2002-2009, Parrot Foundation. |
| 1992 | --- |
| 1993 | > Copyright © 2002-2010, Parrot Foundation. |
| 1994 | diff -r parrot-trunk/docs/html/docs/pdds/pdd13_bytecode.pod.html parrot/docs/html/docs/pdds/pdd13_bytecode.pod.html |
| 1995 | 23c23 |
| 1996 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 13: Bytecode |
| 1997 | --- |
| 1998 | > PDD 13: Bytecode |
| 1999 | 990c990 |
| 2000 | < Copyright © 2002-2009, Parrot Foundation. |
| 2001 | --- |
| 2002 | > Copyright © 2002-2010, Parrot Foundation. |
| 2003 | diff -r parrot-trunk/docs/html/docs/pdds/pdd15_objects.pod.html parrot/docs/html/docs/pdds/pdd15_objects.pod.html |
| 2004 | 23c23 |
| 2005 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 15: Objects and Classes |
| 2006 | --- |
| 2007 | > PDD 15: Objects and Classes |
| 2008 | 1273c1273 |
| 2009 | < Copyright © 2002-2009, Parrot Foundation. |
| 2010 | --- |
| 2011 | > Copyright © 2002-2010, Parrot Foundation. |
| 2012 | diff -r parrot-trunk/docs/html/docs/pdds/pdd17_pmc.pod.html parrot/docs/html/docs/pdds/pdd17_pmc.pod.html |
| 2013 | 23c23 |
| 2014 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 17: Polymorphic Containers |
| 2015 | --- |
| 2016 | > PDD 17: Polymorphic Containers |
| 2017 | 91c91 |
| 2018 | < <p><code>_metadata</code> holds internal PMC metadata (properties). See the setprop/getprop ops in <em><a href="../ops/pmc.pod.html">docs/ops/pmc.pod</a></em>.</p> |
| 2019 | --- |
| 2020 | > <p><code>_metadata</code> holds internal PMC metadata (properties). See the setprop/getprop ops in <em>docs/ops/pmc.pod</em>.</p> |
| 2021 | 797c797 |
| 2022 | < Divide the value of the <i>self</i> PMC by the value of a PMC, native integer, or native floating-point number and store the remainder in <i>dest</i>. Note that <i>dest</i> may be the same PMC as <i>self</i>; in that case optimizations may be made. The <code>i_</code> variants perform an inplace operation, modifying the value of <i>self</i>.Note that <code>modulus</code> uses Knuth's "corrected mod" algorithm, as implemented in <em><a href="../../src/utils.c.html">src/utils.c</a></em>, while <code>cmodulus</code> uses the C-style fmod function. |
| 2023 | --- |
| 2024 | > Divide the value of the <i>self</i> PMC by the value of a PMC, native integer, or native floating-point number and store the remainder in <i>dest</i>. Note that <i>dest</i> may be the same PMC as <i>self</i>; in that case optimizations may be made. The <code>i_</code> variants perform an inplace operation, modifying the value of <i>self</i>.Note that <code>modulus</code> uses Knuth's "corrected mod" algorithm, as implemented in <em>src/utils.c</em>, while <code>cmodulus</code> uses the C-style fmod function. |
| 2025 | 1228c1228 |
| 2026 | < <p><em><a href="../pmc2c.pod.html">docs/pmc2c.pod</a></em></p> |
| 2027 | --- |
| 2028 | > <p><em>docs/pmc2c.pod</em></p> |
| 2029 | 1232c1232 |
| 2030 | < Copyright © 2002-2009, Parrot Foundation. |
| 2031 | --- |
| 2032 | > Copyright © 2002-2010, Parrot Foundation. |
| 2033 | diff -r parrot-trunk/docs/html/docs/pdds/pdd18_security.pod.html parrot/docs/html/docs/pdds/pdd18_security.pod.html |
| 2034 | 23c23 |
| 2035 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 18: Security Model |
| 2036 | --- |
| 2037 | > PDD 18: Security Model |
| 2038 | 234c234 |
| 2039 | < Copyright © 2002-2009, Parrot Foundation. |
| 2040 | --- |
| 2041 | > Copyright © 2002-2010, Parrot Foundation. |
| 2042 | diff -r parrot-trunk/docs/html/docs/pdds/pdd19_pir.pod.html parrot/docs/html/docs/pdds/pdd19_pir.pod.html |
| 2043 | 23c23 |
| 2044 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 19: Parrot Intermediate Representation (PIR) |
| 2045 | --- |
| 2046 | > PDD 19: Parrot Intermediate Representation (PIR) |
| 2047 | 838c838 |
| 2048 | < Copyright © 2002-2009, Parrot Foundation. |
| 2049 | --- |
| 2050 | > Copyright © 2002-2010, Parrot Foundation. |
| 2051 | diff -r parrot-trunk/docs/html/docs/pdds/pdd20_lexical_vars.pod.html parrot/docs/html/docs/pdds/pdd20_lexical_vars.pod.html |
| 2052 | 23c23 |
| 2053 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 20: Lexical Variables |
| 2054 | --- |
| 2055 | > PDD 20: Lexical Variables |
| 2056 | 312c312 |
| 2057 | < <p><em><a href="../../t/op/lexicals.t.html">t/op/lexicals.t</a></em></p> |
| 2058 | --- |
| 2059 | > <p><em>t/op/lexicals.t</em></p> |
| 2060 | 316c316 |
| 2061 | < Copyright © 2002-2009, Parrot Foundation. |
| 2062 | --- |
| 2063 | > Copyright © 2002-2010, Parrot Foundation. |
| 2064 | diff -r parrot-trunk/docs/html/docs/pdds/pdd21_namespaces.pod.html parrot/docs/html/docs/pdds/pdd21_namespaces.pod.html |
| 2065 | 23c23 |
| 2066 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 21: Namespaces |
| 2067 | --- |
| 2068 | > PDD 21: Namespaces |
| 2069 | 436c436 |
| 2070 | < Copyright © 2002-2009, Parrot Foundation. |
| 2071 | --- |
| 2072 | > Copyright © 2002-2010, Parrot Foundation. |
| 2073 | diff -r parrot-trunk/docs/html/docs/pdds/pdd22_io.pod.html parrot/docs/html/docs/pdds/pdd22_io.pod.html |
| 2074 | 23c23 |
| 2075 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 22: I/O |
| 2076 | --- |
| 2077 | > PDD 22: I/O |
| 2078 | 755c755 |
| 2079 | < <p><em><a href="../../src/io/core.c.html">src/io/core.c</a></em>, <em><a href="../../src/ops/io.ops.html">src/ops/io.ops</a></em>, <em>include/parrot/io.h</em>, <em>runtime/parrot/library/Stream/*</em>, <em><a href="../../src/io/unix.c.html">src/io/unix.c</a></em>, <em><a href="../../src/io/win32.c.html">src/io/win32.c</a></em>, Perl 5's IO::AIO, and POE</p> |
| 2080 | --- |
| 2081 | > <p><em>src/io/core.c</em>, <em>src/ops/io.ops</em>, <em>include/parrot/io.h</em>, <em>runtime/parrot/library/Stream/*</em>, <em>src/io/unix.c</em>, <em>src/io/win32.c</em>, Perl 5's IO::AIO, and POE</p> |
| 2082 | 759c759 |
| 2083 | < Copyright © 2002-2009, Parrot Foundation. |
| 2084 | --- |
| 2085 | > Copyright © 2002-2010, Parrot Foundation. |
| 2086 | diff -r parrot-trunk/docs/html/docs/pdds/pdd23_exceptions.pod.html parrot/docs/html/docs/pdds/pdd23_exceptions.pod.html |
| 2087 | 23c23 |
| 2088 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 23: Exceptions |
| 2089 | --- |
| 2090 | > PDD 23: Exceptions |
| 2091 | 425,428c425,428 |
| 2092 | < <p><em><a href="../../src/ops/core.ops.html">src/ops/core.ops</a></em>, |
| 2093 | < <em><a href="../../src/exceptions.c.html">src/exceptions.c</a></em>, |
| 2094 | < <em><a href="../../src/pmc/exception.pmc.html">src/pmc/exception.pmc</a></em>, |
| 2095 | < <em><a href="../../src/pmc/exceptionhandler.pmc.html">src/pmc/exceptionhandler.pmc</a></em></p> |
| 2096 | --- |
| 2097 | > <p><em>src/ops/core.ops</em>, |
| 2098 | > <em>src/exceptions.c</em>, |
| 2099 | > <em>src/pmc/exception.pmc</em>, |
| 2100 | > <em>src/pmc/exceptionhandler.pmc</em></p> |
| 2101 | 432c432 |
| 2102 | < Copyright © 2002-2009, Parrot Foundation. |
| 2103 | --- |
| 2104 | > Copyright © 2002-2010, Parrot Foundation. |
| 2105 | diff -r parrot-trunk/docs/html/docs/pdds/pdd24_events.pod.html parrot/docs/html/docs/pdds/pdd24_events.pod.html |
| 2106 | 23c23 |
| 2107 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 24: Events |
| 2108 | --- |
| 2109 | > PDD 24: Events |
| 2110 | 336c336 |
| 2111 | < Copyright © 2002-2009, Parrot Foundation. |
| 2112 | --- |
| 2113 | > Copyright © 2002-2010, Parrot Foundation. |
| 2114 | diff -r parrot-trunk/docs/html/docs/pdds/pdd25_concurrency.pod.html parrot/docs/html/docs/pdds/pdd25_concurrency.pod.html |
| 2115 | 23c23 |
| 2116 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 25: Concurrency |
| 2117 | --- |
| 2118 | > PDD 25: Concurrency |
| 2119 | 231c231 |
| 2120 | < and a set of core routines in <em><a href="../../src/scheduler.c.html">src/scheduler.c</a></em>.</p> |
| 2121 | --- |
| 2122 | > and a set of core routines in <em>src/scheduler.c</em>.</p> |
| 2123 | 437c437 |
| 2124 | < Copyright © 2002-2009, Parrot Foundation. |
| 2125 | --- |
| 2126 | > Copyright © 2002-2010, Parrot Foundation. |
| 2127 | diff -r parrot-trunk/docs/html/docs/pdds/pdd26_ast.pod.html parrot/docs/html/docs/pdds/pdd26_ast.pod.html |
| 2128 | 23c23 |
| 2129 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 26: Compiler Tools - Abstract Syntax Tree |
| 2130 | --- |
| 2131 | > PDD 26: Compiler Tools - Abstract Syntax Tree |
| 2132 | 374c374 |
| 2133 | < The table of PIR opcodes that PAST "knows" about is given in <em><a href="../../compilers/pct/src/PAST/Compiler.pir.html">compilers/pct/src/PAST/Compiler.pir</a></em> . |
| 2134 | --- |
| 2135 | > The table of PIR opcodes that PAST "knows" about is given in <em>compilers/pct/src/PAST/Compiler.pir</em> . |
| 2136 | 456c456 |
| 2137 | < Copyright © 2002-2009, Parrot Foundation. |
| 2138 | --- |
| 2139 | > Copyright © 2002-2010, Parrot Foundation. |
| 2140 | diff -r parrot-trunk/docs/html/docs/pdds/pdd27_multiple_dispatch.pod.html parrot/docs/html/docs/pdds/pdd27_multiple_dispatch.pod.html |
| 2141 | 23c23 |
| 2142 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 27: Multiple Dispatch |
| 2143 | --- |
| 2144 | > PDD 27: Multiple Dispatch |
| 2145 | 262c262 |
| 2146 | < <p><em>docs/mmd.pod</em>, <em><a href="../../src/multidispatch.c.html">src/multidispatch.c</a></em>, <em><a href="../../src/pmc/multisub.pmc.html">src/pmc/multisub.pmc</a></em></p> |
| 2147 | --- |
| 2148 | > <p><em>docs/mmd.pod</em>, <em>src/multidispatch.c</em>, <em>src/pmc/multisub.pmc</em></p> |
| 2149 | 266c266 |
| 2150 | < Copyright © 2002-2009, Parrot Foundation. |
| 2151 | --- |
| 2152 | > Copyright © 2002-2010, Parrot Foundation. |
| 2153 | diff -r parrot-trunk/docs/html/docs/pdds/pdd28_strings.pod.html parrot/docs/html/docs/pdds/pdd28_strings.pod.html |
| 2154 | 23c23 |
| 2155 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 28: Strings |
| 2156 | --- |
| 2157 | > PDD 28: Strings |
| 2158 | 739c739 |
| 2159 | < Copyright © 2002-2009, Parrot Foundation. |
| 2160 | --- |
| 2161 | > Copyright © 2002-2010, Parrot Foundation. |
| 2162 | diff -r parrot-trunk/docs/html/docs/pdds/pdd30_install.pod.html parrot/docs/html/docs/pdds/pdd30_install.pod.html |
| 2163 | 23c23 |
| 2164 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 30: Installation |
| 2165 | --- |
| 2166 | > PDD 30: Installation |
| 2167 | 41c41 |
| 2168 | < <p>$Revision: 47917 $</p> |
| 2169 | --- |
| 2170 | > <p>$Revision: 48025 $</p> |
| 2171 | 120c120 |
| 2172 | < <p>A new language is generated by <em><a href="../../tools/dev/mk_language_shell.pl.html">tools/dev/mk_language_shell.pl</a></em></p> |
| 2173 | --- |
| 2174 | > <p>A new language is generated by <em>tools/dev/mk_language_shell.pl</em></p> |
| 2175 | 122c122 |
| 2176 | < <p>The makefiles are generated from a makefile template, which can use conditional platform and config logic. The forward slashes are automatically converted to backslashes for MSWin32 and <code>\n</code> is converted to <code>\r\n</code> for MSWin32 nmake. See <a href='..%2F..%2Flib%2FParrot%2FConfigure%2FCompiler.pm.html'>Parrot::Configure::Compiler</a>.</p> |
| 2177 | --- |
| 2178 | > <p>The makefiles are generated from a makefile template, which can use conditional platform and config logic. The forward slashes are automatically converted to backslashes for MSWin32 and <code>\n</code> is converted to <code>\r\n</code> for MSWin32 nmake. See <a href='TODO'>Parrot::Configure::Compiler</a>.</p> |
| 2179 | 136c136 |
| 2180 | < Copyright © 2002-2009, Parrot Foundation. |
| 2181 | --- |
| 2182 | > Copyright © 2002-2010, Parrot Foundation. |
| 2183 | diff -r parrot-trunk/docs/html/docs/pdds/pdd_template.pod.html parrot/docs/html/docs/pdds/pdd_template.pod.html |
| 2184 | 23c23 |
| 2185 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » Design Document Template |
| 2186 | --- |
| 2187 | > Design Document Template |
| 2188 | 85c85 |
| 2189 | < Copyright © 2002-2009, Parrot Foundation. |
| 2190 | --- |
| 2191 | > Copyright © 2002-2010, Parrot Foundation. |
| 2192 | diff -r parrot-trunk/docs/html/docs/pmc/array.pod.html parrot/docs/html/docs/pmc/array.pod.html |
| 2193 | 23c23 |
| 2194 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/developer.html">Developer Documentation</a> » Array base class |
| 2195 | --- |
| 2196 | > Array base class |
| 2197 | 26,27c26,27 |
| 2198 | < <h1><a name="TITLE" |
| 2199 | < >TITLE</a></h1> |
| 2200 | --- |
| 2201 | > <h1><a name="NAME" |
| 2202 | > >NAME</a></h1> |
| 2203 | 135c135 |
| 2204 | < Copyright © 2002-2009, Parrot Foundation. |
| 2205 | --- |
| 2206 | > Copyright © 2002-2010, Parrot Foundation. |
| 2207 | Only in parrot-trunk/docs/html/docs/pmc: documentation.pod.html |
| 2208 | diff -r parrot-trunk/docs/html/docs/pmc/struct.pod.html parrot/docs/html/docs/pmc/struct.pod.html |
| 2209 | 23c23 |
| 2210 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/developer.html">Developer Documentation</a> » Accessing C Structs from Parrot |
| 2211 | --- |
| 2212 | > Accessing C Structs from Parrot |
| 2213 | 29c29 |
| 2214 | < <p>Structures - Accessing C Structs from Parrot</p> |
| 2215 | --- |
| 2216 | > <p>Accessing C Structs from Parrot</p> |
| 2217 | 286c286 |
| 2218 | < Copyright © 2002-2009, Parrot Foundation. |
| 2219 | --- |
| 2220 | > Copyright © 2002-2010, Parrot Foundation. |
| 2221 | diff -r parrot-trunk/docs/html/docs/pmc/subs.pod.html parrot/docs/html/docs/pmc/subs.pod.html |
| 2222 | 23c23 |
| 2223 | < <a href="../../../html/index.html">Home</a> » <a href="../../../html/developer.html">Developer Documentation</a> » Parrot Subroutines |
| 2224 | --- |
| 2225 | > Parrot Subroutines |
| 2226 | 29c29 |
| 2227 | < <p>Subs - Parrot Subroutines</p> |
| 2228 | --- |
| 2229 | > <p>Parrot Subroutines</p> |
| 2230 | 46c46 |
| 2231 | < <p>Parrot comes with different subroutine and related classes which implement CPS (Continuation Passing Style) and PCC (Parrot Calling Conventions) <em><a href="../pdds/pdd03_calling_conventions.pod.html">docs/pdds/pdd03_calling_conventions.pod</a></em>.</p> |
| 2232 | --- |
| 2233 | > <p>Parrot comes with different subroutine and related classes which implement CPS (Continuation Passing Style) and PCC (Parrot Calling Conventions) <em>docs/pdds/pdd03_calling_conventions.pod</em>.</p> |
| 2234 | 328c328 |
| 2235 | < <p><em><a href="../../src/pmc/sub.pmc.html">src/pmc/sub.pmc</a></em>, <em>src/pmc/closure.pmc</em>, <em><a href="../../src/pmc/continuation.pmc.html">src/pmc/continuation.pmc</a></em>, <em><a href="../../src/pmc/coroutine.pmc.html">src/pmc/coroutine.pmc</a></em>, <em><a href="../../src/sub.c.html">src/sub.c</a></em>, <em><a href="../../t/pmc/sub.t.html">t/pmc/sub.t</a></em></p> |
| 2236 | --- |
| 2237 | > <p><em>src/pmc/sub.pmc</em>, <em>src/pmc/closure.pmc</em>, <em>src/pmc/continuation.pmc</em>, <em>src/pmc/coroutine.pmc</em>, <em>src/sub.c</em>, <em>t/pmc/sub.t</em></p> |
| 2238 | 333c333 |
| 2239 | < <p><em><a href="../pdds/pdd03_calling_conventions.pod.html">docs/pdds/pdd03_calling_conventions.pod</a></em> <em><a href="../pdds/pdd19_pir.pod.html">docs/pdds/pdd19_pir.pod</a></em></p> |
| 2240 | --- |
| 2241 | > <p><em>docs/pdds/pdd03_calling_conventions.pod</em> <em>docs/pdds/pdd19_pir.pod</em></p> |
44 | | < Copyright © 2002-2010, Parrot Foundation. |
45 | | --- |
46 | | > Copyright © 2002-2009, Parrot Foundation. |
47 | | diff -r parrot/docs/html/docs/book/pct/ch04_pge.pod.html parrot-trunk/docs/html/docs/book/pct/ch04_pge.pod.html |
48 | | 5c5 |
49 | | < <title>Parrot - Untitled</title> |
50 | | --- |
51 | | > <title>Parrot - Grammar Engine</title> |
52 | | 23c23 |
53 | | < Untitled |
54 | | --- |
55 | | > <a href="../../../../html/index.html">Home</a> » Grammar Engine |
56 | | 631c631 |
57 | | < Copyright © 2002-2010, Parrot Foundation. |
58 | | --- |
59 | | > Copyright © 2002-2009, Parrot Foundation. |
60 | | diff -r parrot/docs/html/docs/book/pct/ch05_nqp.pod.html parrot-trunk/docs/html/docs/book/pct/ch05_nqp.pod.html |
61 | | 5c5 |
62 | | < <title>Parrot - Untitled</title> |
63 | | --- |
64 | | > <title>Parrot - Grammar Actions</title> |
65 | | 23c23 |
66 | | < Untitled |
67 | | --- |
68 | | > <a href="../../../../html/index.html">Home</a> » Grammar Actions |
69 | | 226c226 |
70 | | < Copyright © 2002-2010, Parrot Foundation. |
71 | | --- |
72 | | > Copyright © 2002-2009, Parrot Foundation. |
73 | | diff -r parrot/docs/html/docs/book/pir/ch01_introduction.pod.html parrot-trunk/docs/html/docs/book/pir/ch01_introduction.pod.html |
74 | | 5c5 |
75 | | < <title>Parrot - Untitled</title> |
76 | | --- |
77 | | > <title>Parrot - Introduction</title> |
78 | | 23c23 |
79 | | < Untitled |
80 | | --- |
81 | | > <a href="../../../../html/index.html">Home</a> » Introduction |
82 | | 162c162 |
83 | | < Copyright © 2002-2010, Parrot Foundation. |
84 | | --- |
85 | | > Copyright © 2002-2009, Parrot Foundation. |
86 | | diff -r parrot/docs/html/docs/book/pir/ch02_getting_started.pod.html parrot-trunk/docs/html/docs/book/pir/ch02_getting_started.pod.html |
87 | | 5c5 |
88 | | < <title>Parrot - Untitled</title> |
89 | | --- |
90 | | > <title>Parrot - Getting Started</title> |
91 | | 23c23 |
92 | | < Untitled |
93 | | --- |
94 | | > <a href="../../../../html/index.html">Home</a> » Getting Started |
95 | | 60c60 |
96 | | < <p>To install Parrot in a different location, use the <code>--prefix</code> option to <em>Configure.pl</em>:</p> |
97 | | --- |
98 | | > <p>To install Parrot in a different location, use the <code>--prefix</code> option to <em><a href="../../../Configure.pl.html">Configure.pl</a></em>:</p> |
99 | | 87c87 |
100 | | < Copyright © 2002-2010, Parrot Foundation. |
101 | | --- |
102 | | > Copyright © 2002-2009, Parrot Foundation. |
103 | | diff -r parrot/docs/html/docs/book/pir/ch03_basic_syntax.pod.html parrot-trunk/docs/html/docs/book/pir/ch03_basic_syntax.pod.html |
104 | | 5c5 |
105 | | < <title>Parrot - Untitled</title> |
106 | | --- |
107 | | > <title>Parrot - Basic Syntax</title> |
108 | | 23c23 |
109 | | < Untitled |
110 | | --- |
111 | | > <a href="../../../../html/index.html">Home</a> » Basic Syntax |
112 | | 216c216 |
113 | | < Copyright © 2002-2010, Parrot Foundation. |
114 | | --- |
115 | | > Copyright © 2002-2009, Parrot Foundation. |
116 | | diff -r parrot/docs/html/docs/book/pir/ch04_variables.pod.html parrot-trunk/docs/html/docs/book/pir/ch04_variables.pod.html |
117 | | 5c5 |
118 | | < <title>Parrot - Untitled</title> |
119 | | --- |
120 | | > <title>Parrot - Variables</title> |
121 | | 23c23 |
122 | | < Untitled |
123 | | --- |
124 | | > <a href="../../../../html/index.html">Home</a> » Variables |
125 | | 279,284c279,291 |
126 | | < Both C<and> and C<or> are short-circuiting ops. If they can determine what |
127 | | < value to return from the first argument, they'll never evaluate the second. |
128 | | < This is significant only for PMCs, as they might have side effects on |
129 | | < evaluation.The C<xor>X<xor opcode> opcode returns the first argument if it is the only |
130 | | < true value, returns the second argument if it is the only true value, and |
131 | | < returns false if both values are true or both are false:<pre> $I0 = xor 1, 0 # returns 1 |
132 | | --- |
133 | | > </pre> |
134 | | > <p>Both <code>and</code> and <code>or</code> are short-circuiting ops. |
135 | | > If they can determine what value to return from the first argument, |
136 | | > they'll never evaluate the second. |
137 | | > This is significant only for PMCs, |
138 | | > as they might have side effects on evaluation.</p> |
139 | | > |
140 | | > <p>The <code>xor</code><!-- |
141 | | > INDEX: xor opcode |
142 | | > --> opcode returns the first argument if it is the only true value, |
143 | | > returns the second argument if it is the only true value, |
144 | | > and returns false if both values are true or both are false:</p> |
145 | | > <pre> $I0 = xor 1, 0 # returns 1 |
146 | | 289,290c296,298 |
147 | | < The C<not>X<not opcode> opcode returns a true value when the argument is false |
148 | | < and a false value if the argument is true: |
149 | | --- |
150 | | > <p>The <code>not</code><!-- |
151 | | > INDEX: not opcode |
152 | | > --> opcode returns a true value when the argument is false and a false value if the argument is true:</p> |
153 | | 294,298c302,316 |
154 | | < X<bitwise opcodes> |
155 | | < The bitwise opcodes operate on their values a single bit at a time. |
156 | | < C<band>X<band opcode>, C<bor>X<bor opcode>, and C<bxor>X<bxor opcode> return a |
157 | | < value that is the logical AND, OR, or XOR of each bit in the source arguments. |
158 | | < They each take two arguments. |
159 | | --- |
160 | | > <p><!-- |
161 | | > INDEX: bitwise opcodes |
162 | | > --> The bitwise opcodes operate on their values a single bit at a time. |
163 | | > <code>band</code><!-- |
164 | | > INDEX: band opcode |
165 | | > -->, |
166 | | > <code>bor</code><!-- |
167 | | > INDEX: bor opcode |
168 | | > -->, |
169 | | > and <code>bxor</code><!-- |
170 | | > INDEX: bxor opcode |
171 | | > --> return a value that is the logical AND, |
172 | | > OR, |
173 | | > or XOR of each bit in the source arguments. |
174 | | > They each take two arguments.</p> |
175 | | 306,307c324,326 |
176 | | < C<band>, C<bor>, and C<bxor> also have variants that modify the result |
177 | | < in place. |
178 | | --- |
179 | | > <p><code>band</code>, |
180 | | > <code>bor</code>, |
181 | | > and <code>bxor</code> also have variants that modify the result in place.</p> |
182 | | 315c334,336 |
183 | | < C<bnot>X<bnot opcode> is the logical NOT of each bit in the source argument. |
184 | | --- |
185 | | > <p><code>bnot</code><!-- |
186 | | > INDEX: bnot opcode |
187 | | > --> is the logical NOT of each bit in the source argument.</p> |
188 | | 322,326c343,349 |
189 | | < X<shl opcode> |
190 | | < X<shr opcode> |
191 | | < X<lsr opcode> |
192 | | < The logical and arithmetic shift operations shift their values by a specified |
193 | | < number of bits: |
194 | | --- |
195 | | > <p><!-- |
196 | | > INDEX: shl opcode |
197 | | > --> <!-- |
198 | | > INDEX: shr opcode |
199 | | > --> <!-- |
200 | | > INDEX: lsr opcode |
201 | | > --> The logical and arithmetic shift operations shift their values by a specified number of bits:</p> |
202 | | 338,344c361,372 |
203 | | < X<strings> |
204 | | < Parrot strings are buffers of variable-sized data. The most common use of |
205 | | < strings is to store text data. Strings can also hold binary or other |
206 | | < non-textual data, though this is rare.N<In general, a custom PMC is more |
207 | | < useful.> Parrot strings are flexible and powerful, to handle the complexity of |
208 | | < human-readable (and computer-representable) text data. String operations work |
209 | | < with string literals, variables, and constants, and with string-like PMCs. |
210 | | --- |
211 | | > <p><!-- |
212 | | > INDEX: strings |
213 | | > --> Parrot strings are buffers of variable-sized data. |
214 | | > The most common use of strings is to store text data. |
215 | | > Strings can also hold binary or other non-textual data, |
216 | | > though this is rare.In general, |
217 | | > a custom PMC is more useful. Parrot strings are flexible and powerful, |
218 | | > to handle the complexity of human-readable (and computer-representable) text data. |
219 | | > String operations work with string literals, |
220 | | > variables, |
221 | | > and constants, |
222 | | > and with string-like PMCs.</p> |
223 | | 349,353c377,381 |
224 | | < X<string escapes> |
225 | | < X<escape sequences> |
226 | | < |
227 | | < Strings in double-quotes allow escape sequences using backslashes. Strings in |
228 | | < single-quotes only allow escapes for nested quotes: |
229 | | --- |
230 | | > <p><!-- |
231 | | > INDEX: string escapes |
232 | | > --> <!-- |
233 | | > INDEX: escape sequences |
234 | | > --></p> |
235 | | 355,356c383,384 |
236 | | < $S0 = "This string is \n on two lines" |
237 | | < $S0 = 'This is a \n one-line string with a slash in it' |
238 | | --- |
239 | | > <p>Strings in double-quotes allow escape sequences using backslashes. |
240 | | > Strings in single-quotes only allow escapes for nested quotes:</p> |
241 | | 357a386,387 |
242 | | > <pre> $S0 = "This string is \n on two lines" |
243 | | > $S0 = 'This is a \n one-line string with a slash in it'</pre> |
244 | | 359,360c389 |
245 | | < Table 4.1 shows the escape sequences Parrot supports in double-quoted |
246 | | < strings. |
247 | | --- |
248 | | > <p>Table 4.1 shows the escape sequences Parrot supports in double-quoted strings.</p> |
249 | | 365,375c394,396 |
250 | | < X<heredocs> |
251 | | < If you need more flexibility in defining a string, use a heredoc string |
252 | | < literal. The C<E<lt>E<lt>> operator starts a heredoc. The string terminator |
253 | | < immediately follows. All text until the terminator is part of the string. The |
254 | | < terminator must appear on its own line, must appear at the beginning of the |
255 | | < line, and may not have any trailing whitespace. |
256 | | < |
257 | | < $S2 = <<"End_Token" |
258 | | < This is a multi-line string literal. Notice that |
259 | | < it doesn't use quotation marks. |
260 | | < End_Token |
261 | | --- |
262 | | > <p><!-- |
263 | | > INDEX: heredocs |
264 | | > --> If you need more flexibility in defining a string, use a heredoc string literal. The <code><<</code> operator starts a heredoc. The string terminator immediately follows. All text until the terminator is part of the string. The terminator must appear on its own line, must appear at the beginning of the line, and may not have any trailing whitespace.</p> |
265 | | 376a398,401 |
266 | | > <pre> $S2 = <<"End_Token" |
267 | | > This is a multi-line string literal. Notice that |
268 | | > it doesn't use quotation marks. |
269 | | > End_Token</pre> |
270 | | 381,382c406,410 |
271 | | < X<. operator> |
272 | | < X<strings;concatenation> |
273 | | --- |
274 | | > <p><!-- |
275 | | > INDEX: . operator |
276 | | > --> <!-- |
277 | | > INDEX: strings;concatenation |
278 | | > --></p> |
279 | | 384,386c412 |
280 | | < Use the C<.> operator to concatenate strings. The following example |
281 | | < concatenates the string "cd" onto the string "ab" and stores the result in |
282 | | < C<$S1>. |
283 | | --- |
284 | | > <p>Use the <code>.</code> operator to concatenate strings. The following example concatenates the string "cd" onto the string "ab" and stores the result in <code>$S1</code>.</p> |
285 | | 391,394c417,419 |
286 | | < X<.= operator> |
287 | | < Concatenation has a C<.=> variant to modify the result in place. In the |
288 | | < next example, the C<.=> operation appends "xy" onto the string "abcd" in |
289 | | < C<$S1>. |
290 | | --- |
291 | | > <p><!-- |
292 | | > INDEX: .= operator |
293 | | > --> Concatenation has a <code>.=</code> variant to modify the result in place. In the next example, the <code>.=</code> operation appends "xy" onto the string "abcd" in <code>$S1</code>.</p> |
294 | | 401,402c426,428 |
295 | | < X<repeat opcode> |
296 | | < The C<repeat> opcode repeats a string a specified number of times: |
297 | | --- |
298 | | > <p><!-- |
299 | | > INDEX: repeat opcode |
300 | | > --> The <code>repeat</code> opcode repeats a string a specified number of times:</p> |
301 | | 407,408c433 |
302 | | < In this example, C<repeat> generates a new string with "a" repeated five |
303 | | < times and stores it in C<$S1>. |
304 | | --- |
305 | | > <p>In this example, <code>repeat</code> generates a new string with "a" repeated five times and stores it in <code>$S1</code>.</p> |
306 | | 413,415c438,440 |
307 | | < X<length opcode> |
308 | | < The C<length> opcode returns the length of a string in characters. This won't |
309 | | < be the same as the length in I<bytes> for multibyte encoded strings: |
310 | | --- |
311 | | > <p><!-- |
312 | | > INDEX: length opcode |
313 | | > --> The <code>length</code> opcode returns the length of a string in characters. This won't be the same as the length in <i>bytes</i> for multibyte encoded strings:</p> |
314 | | 420c445 |
315 | | < C<length> has no equivalent for PMC strings. |
316 | | --- |
317 | | > <p><code>length</code> has no equivalent for PMC strings.</p> |
318 | | 425,428c450,452 |
319 | | < The simplest version of the C<substr>X<substr opcode> opcode takes three |
320 | | < arguments: a source string, an offset position, and a length. It returns a |
321 | | < substring of the original string, starting from the offset position (0 is the |
322 | | < first character) and spanning the length: |
323 | | --- |
324 | | > <p>The simplest version of the <code>substr</code><!-- |
325 | | > INDEX: substr opcode |
326 | | > --> opcode takes three arguments: a source string, an offset position, and a length. It returns a substring of the original string, starting from the offset position (0 is the first character) and spanning the length:</p> |
327 | | 431,444c455,457 |
328 | | < This example extracts a two-character string from "abcde" at a one-character |
329 | | < offset from the beginning of the string (starting with the second character). |
330 | | < It generates a new string, "bc", in the destination register C<$S0>. |
331 | | < |
332 | | < When the offset position is negative, it counts backward from the end of the |
333 | | < string. Thus an offset of -1 starts at the last character of the string. |
334 | | < |
335 | | < C<substr> no longer has a four-argument form, as in-place string operations |
336 | | < have been removed. There is a C<replace> operator which will perform the |
337 | | < replacement and return a new_string without modifying the old_string. |
338 | | < The arguments are new_string, old_string, offset, count and |
339 | | < replacement_string. The old_string is copied to the new_string with the |
340 | | < replacement_string inserted from offset replacing the content for count |
341 | | < characters. |
342 | | --- |
343 | | > <p>This example extracts a two-character string from "abcde" at a one-character offset from the beginning of the string (starting with the second character). It generates a new string, "bc", in the destination register <code>$S0</code>.</p> |
344 | | > |
345 | | > <p>When the offset position is negative, it counts backward from the end of the string. Thus an offset of -1 starts at the last character of the string.</p> |
346 | | 446,447c459,461 |
347 | | < This example replaces the substring "bc" in C<$S1> with the string "XYZ", |
348 | | < and returns "aXYZde" in C<$S0>, C<$S1> is not changed: |
349 | | --- |
350 | | > <p><code>substr</code> no longer has a four-argument form, as in-place string operations have been removed. There is a <code>replace</code> operator which will perform the replacement and return a new_string without modifying the old_string. The arguments are new_string, old_string, offset, count and replacement_string. The old_string is copied to the new_string with the replacement_string inserted from offset replacing the content for count characters.</p> |
351 | | > |
352 | | > <p>This example replaces the substring "bc" in <code>$S1</code> with the string "XYZ", and returns "aXYZde" in <code>$S0</code>, <code>$S1</code> is not changed:</p> |
353 | | 453,456c467 |
354 | | < When the offset position in a C<replace> is one character beyond the original |
355 | | < string length, C<replace> appends the replacement string just like the |
356 | | < concatenation operator. If the replacement string is an empty string, the |
357 | | < opcode removes the characters from the original string in the new string. |
358 | | --- |
359 | | > <p>When the offset position in a <code>replace</code> is one character beyond the original string length, <code>replace</code> appends the replacement string just like the concatenation operator. If the replacement string is an empty string, the opcode removes the characters from the original string in the new string.</p> |
360 | | 464,469c475,479 |
361 | | < The C<chr>X<chr opcode> opcode takes an integer value and returns the |
362 | | < corresponding character in the ASCII character set as a one-character string. |
363 | | < The C<ord>X<ord opcode> opcode takes a single character string and returns the |
364 | | < integer value of the character at the first position in the string. The integer |
365 | | < value of the character will differ depending on the current encoding of the |
366 | | < string: |
367 | | --- |
368 | | > <p>The <code>chr</code><!-- |
369 | | > INDEX: chr opcode |
370 | | > --> opcode takes an integer value and returns the corresponding character in the ASCII character set as a one-character string. The <code>ord</code><!-- |
371 | | > INDEX: ord opcode |
372 | | > --> opcode takes a single character string and returns the integer value of the character at the first position in the string. The integer value of the character will differ depending on the current encoding of the string:</p> |
373 | | 473,475c483 |
374 | | < C<ord> has a two-argument variant that takes a character offset to select |
375 | | < a single character from a multicharacter string. The offset must be within |
376 | | < the length of the string: |
377 | | --- |
378 | | > <p><code>ord</code> has a two-argument variant that takes a character offset to select a single character from a multicharacter string. The offset must be within the length of the string:</p> |
379 | | 478,479c486 |
380 | | < A negative offset counts backward from the end of the string, so -1 is |
381 | | < the last character. |
382 | | --- |
383 | | > <p>A negative offset counts backward from the end of the string, so -1 is the last character.</p> |
384 | | 485c492,494 |
385 | | < X<strings;formatting> |
386 | | --- |
387 | | > <p><!-- |
388 | | > INDEX: strings;formatting |
389 | | > --></p> |
390 | | 487,490c496,498 |
391 | | < The C<sprintf>X<sprintf opcode> opcode generates a formatted string from a |
392 | | < series of values. It takes two arguments: a string specifying the format, and |
393 | | < an array PMC containing the values to be formatted. The format string and the |
394 | | < result can be either strings or PMCs: |
395 | | --- |
396 | | > <p>The <code>sprintf</code><!-- |
397 | | > INDEX: sprintf opcode |
398 | | > --> opcode generates a formatted string from a series of values. It takes two arguments: a string specifying the format, and an array PMC containing the values to be formatted. The format string and the result can be either strings or PMCs:</p> |
399 | | 494,510c502,508 |
400 | | < The format string is similar to C's C<sprintf> function with extensions for |
401 | | < Parrot data types. Each format field in the string starts with a C<%> and ends |
402 | | < with a character specifying the output format. Table 4.2 lists the available |
403 | | < output format characters. |
404 | | < |
405 | | < Each format field supports several specifier options: R<flags>, R<width>, |
406 | | < R<precision>, and R<size>. Table 4.3 lists the format flags. |
407 | | < |
408 | | < The R<width> is a number defining the minimum width of the output from |
409 | | < a field. The R<precision> is the maximum width for strings or |
410 | | < integers, and the number of decimal places for floating-point fields. |
411 | | < If either R<width> or R<precision> is an asterisk (C<*>), it takes its |
412 | | < value from the next argument in the PMC. |
413 | | < |
414 | | < The R<size> modifier defines the type of the argument the field takes. |
415 | | < Table 4.4 lists the size flags. The values in the aggregate PMC must |
416 | | < have a type compatible with the specified R<size>. |
417 | | --- |
418 | | > <p>The format string is similar to C's <code>sprintf</code> function with extensions for Parrot data types. Each format field in the string starts with a <code>%</code> and ends with a character specifying the output format. Table 4.2 lists the available output format characters.</p> |
419 | | > |
420 | | > <p>Each format field supports several specifier options: flags, width, precision, and size. Table 4.3 lists the format flags.</p> |
421 | | > |
422 | | > <p>The width is a number defining the minimum width of the output from a field. The precision is the maximum width for strings or integers, and the number of decimal places for floating-point fields. If either width or precision is an asterisk (<code>*</code>), it takes its value from the next argument in the PMC.</p> |
423 | | > |
424 | | > <p>The size modifier defines the type of the argument the field takes. Table 4.4 lists the size flags. The values in the aggregate PMC must have a type compatible with the specified size.</p> |
425 | | 514,519c512 |
426 | | < The format string of this C<sprintf> example has two format fields. The first, |
427 | | < C<%#Px>, extracts a PMC argument (C<P>) from the aggregate C<$P2> and formats |
428 | | < it as a hexadecimal integer (C<x>) with a leading 0x (C<#>). The second format |
429 | | < field, C<%+2.3Pf>, takes a PMC argument (C<P>) and formats it as a |
430 | | < floating-point number (C<f>) with a minimum of two whole digits and a maximum |
431 | | < of three decimal places (C<2.3>) and a leading sign (C<+>). |
432 | | --- |
433 | | > <p>The format string of this <code>sprintf</code> example has two format fields. The first, <code>%#Px</code>, extracts a PMC argument (<code>P</code>) from the aggregate <code>$P2</code> and formats it as a hexadecimal integer (<code>x</code>) with a leading 0x (<code>#</code>). The second format field, <code>%+2.3Pf</code>, takes a PMC argument (<code>P</code>) and formats it as a floating-point number (<code>f</code>) with a minimum of two whole digits and a maximum of three decimal places (<code>2.3</code>) and a leading sign (<code>+</code>).</p> |
434 | | 521,522c514 |
435 | | < The test files F<t/op/string.t> and F<t/op/sprintf.t> have many more |
436 | | < examples of format strings. |
437 | | --- |
438 | | > <p>The test files <em><a href="../../../t/op/string.t.html">t/op/string.t</a></em> and <em><a href="../../../t/op/sprintf.t.html">t/op/sprintf.t</a></em> have many more examples of format strings.</p> |
439 | | 527,529c519,521 |
440 | | < The C<join>X<join opcode> opcode joins the elements of an array PMC into |
441 | | < a single string. The first argument separates the individual elements of |
442 | | < the PMC in the final string result. |
443 | | --- |
444 | | > <p>The <code>join</code><!-- |
445 | | > INDEX: join opcode |
446 | | > --> opcode joins the elements of an array PMC into a single string. The first argument separates the individual elements of the PMC in the final string result.</p> |
447 | | 539,541c531 |
448 | | < This example builds a C<Array> in C<$P0> with the values C<"hi">, C<0>, C<1>, |
449 | | < C<0>, and C<"parrot">. It then joins those values (separated by the string |
450 | | < C<"__">) into a single string stored in C<$S0>. |
451 | | --- |
452 | | > <p>This example builds a <code>Array</code> in <code>$P0</code> with the values <code>"hi"</code>, <code>0</code>, <code>1</code>, <code>0</code>, and <code>"parrot"</code>. It then joins those values (separated by the string <code>"__"</code>) into a single string stored in <code>$S0</code>.</p> |
453 | | 546,547c536 |
454 | | < Splitting a string yields a new array containing the resulting substrings of |
455 | | < the original string. |
456 | | --- |
457 | | > <p>Splitting a string yields a new array containing the resulting substrings of the original string.</p> |
458 | | 549,551c538 |
459 | | < This example splits the string "abc" into individual characters and stores them |
460 | | < in an array in C<$P0>. It then prints out the first and third elements of the |
461 | | < array. |
462 | | --- |
463 | | > <p>This example splits the string "abc" into individual characters and stores them in an array in <code>$P0</code>. It then prints out the first and third elements of the array.</p> |
464 | | 561,564c548,550 |
465 | | < The C<index>X<index opcode> opcode searches for a substring |
466 | | < within a string. If it finds the substring, it returns the position |
467 | | < where the substring was found as a character offset from the beginning |
468 | | < of the string. If it fails to find the substring, it returns -1: |
469 | | --- |
470 | | > <p>The <code>index</code><!-- |
471 | | > INDEX: index opcode |
472 | | > --> opcode searches for a substring within a string. If it finds the substring, it returns the position where the substring was found as a character offset from the beginning of the string. If it fails to find the substring, it returns -1:</p> |
473 | | 570,571c556 |
474 | | < C<index> also has a three-argument version, where the final argument |
475 | | < defines an offset position for starting the search. |
476 | | --- |
477 | | > <p><code>index</code> also has a three-argument version, where the final argument defines an offset position for starting the search.</p> |
478 | | 575,576c560 |
479 | | < This example finds the second "eb" in "Beeblebrox" instead of the first, |
480 | | < because the search skips the first three characters in the string. |
481 | | --- |
482 | | > <p>This example finds the second "eb" in "Beeblebrox" instead of the first, because the search skips the first three characters in the string.</p> |
483 | | 581,585c565,571 |
484 | | < The numeric bitwise opcodes also have string variants for AND, OR, and XOR: |
485 | | < C<bors>X<bors opcode>, C<bands>X<bands opcode>, and C<bxors>X<bxors opcode>. |
486 | | < These take string or string-like PMC arguments and perform the logical |
487 | | < operation on each byte of the strings to produce the result string. |
488 | | < Remember that in-place string operations are no longer available. |
489 | | --- |
490 | | > <p>The numeric bitwise opcodes also have string variants for AND, OR, and XOR: <code>bors</code><!-- |
491 | | > INDEX: bors opcode |
492 | | > -->, <code>bands</code><!-- |
493 | | > INDEX: bands opcode |
494 | | > -->, and <code>bxors</code><!-- |
495 | | > INDEX: bxors opcode |
496 | | > -->. These take string or string-like PMC arguments and perform the logical operation on each byte of the strings to produce the result string. Remember that in-place string operations are no longer available.</p> |
497 | | 595,596c581 |
498 | | < The bitwise string opcodes produce meaningful results only when used with |
499 | | < simple ASCII strings, because Parrot performs bitwise operations per byte. |
500 | | --- |
501 | | > <p>The bitwise string opcodes produce meaningful results only when used with simple ASCII strings, because Parrot performs bitwise operations per byte.</p> |
502 | | 601,604c586,590 |
503 | | < Strings use copy-on-write (COW)X<copy-on-write>X<COW (copy-on-write)> |
504 | | < optimizations. A call to C<$S1 = $S0> doesn't immediately make a copy of |
505 | | < C<$S0>, it only makes both variables point to the same string. Parrot |
506 | | < doesn't make a copy of the string until one of two strings is modified. |
507 | | --- |
508 | | > <p>Strings use copy-on-write (COW)<!-- |
509 | | > INDEX: copy-on-write |
510 | | > --><!-- |
511 | | > INDEX: COW (copy-on-write) |
512 | | > --> optimizations. A call to <code>$S1 = $S0</code> doesn't immediately make a copy of <code>$S0</code>, it only makes both variables point to the same string. Parrot doesn't make a copy of the string until one of two strings is modified.</p> |
513 | | 611,614c597 |
514 | | < Modifying one of the two variables causes Parrot to create a new string. This |
515 | | < example preserves the existing value in C<$S0> and assigns the new value to the |
516 | | < new string in C<$S1>. The benefit of copy-on-write is avoiding the cost of |
517 | | < copying strings until the copies are necessary. |
518 | | --- |
519 | | > <p>Modifying one of the two variables causes Parrot to create a new string. This example preserves the existing value in <code>$S0</code> and assigns the new value to the new string in <code>$S1</code>. The benefit of copy-on-write is avoiding the cost of copying strings until the copies are necessary.</p> |
520 | | 619,637c602,610 |
521 | | < X<charset> |
522 | | < X<ASCII character set> |
523 | | < X<encoding> |
524 | | < Years ago, strings only needed to support the ASCII character set (or |
525 | | < charset), a mapping of 128 bit patterns to symbols and English-language |
526 | | < characters. This worked as long as everyone using a computer read and |
527 | | < wrote English and only used a small handful of punctuation symbols. In |
528 | | < other words, it was woefully insufficient. A modern string system must |
529 | | < manage charsets in order to make sense out of all the string data in the |
530 | | < world. A modern string system must also handle different encodings -- |
531 | | < ways to represent various charsets in memory and on disk. |
532 | | < |
533 | | < Every string in Parrot has an associated encoding and character set. The default |
534 | | < charset is 8-bit ASCII, which is almost universally supported. Double-quoted |
535 | | < string constants can have an optional prefix specifying the string's encoding |
536 | | < and charset.N<As you might suspect, single-quoted strings do not support this.> |
537 | | < Parrot tracks information about encoding and charset internally, and |
538 | | < automatically converts strings when necessary to preserve these |
539 | | < characteristics. Strings constants may have prefixes of the form C<encoding:charset:>. |
540 | | --- |
541 | | > <p><!-- |
542 | | > INDEX: charset |
543 | | > --> <!-- |
544 | | > INDEX: ASCII character set |
545 | | > --> <!-- |
546 | | > INDEX: encoding |
547 | | > --> Years ago, strings only needed to support the ASCII character set (or charset), a mapping of 128 bit patterns to symbols and English-language characters. This worked as long as everyone using a computer read and wrote English and only used a small handful of punctuation symbols. In other words, it was woefully insufficient. A modern string system must manage charsets in order to make sense out of all the string data in the world. A modern string system must also handle different encodings -- ways to represent various charsets in memory and on disk.</p> |
548 | | > |
549 | | > <p>Every string in Parrot has an associated encoding and character set. The default charset is 8-bit ASCII, which is almost universally supported. Double-quoted string constants can have an optional prefix specifying the string's encoding and charset.As you might suspect, single-quoted strings do not support this. Parrot tracks information about encoding and charset internally, and automatically converts strings when necessary to preserve these characteristics. Strings constants may have prefixes of the form <code>encoding:charset:</code>.</p> |
550 | | 643,663c616,630 |
551 | | < X<ISO 8859-1 character set> |
552 | | < X<Latin 1 character set> |
553 | | < X<UCS-2 encoding> |
554 | | < X<UTF-8 encoding> |
555 | | < X<UTF-16 encoding> |
556 | | < Parrot supports the character sets C<ascii>, C<binary>, C<iso-8859-1> |
557 | | < (Latin 1), and C<unicode> and the encodings C<fixed_8>, C<ucs2>, |
558 | | < C<utf8>, and C<utf16>. |
559 | | < |
560 | | < The C<binary> charset treats the string as a buffer of raw unformatted |
561 | | < binary data. It isn't really a string per se, because binary data |
562 | | < contains no readable characters. This exists to support libraries which |
563 | | < manipulate binary data that doesn't easily fit into any other primitive |
564 | | < data type. |
565 | | < |
566 | | < When Parrot operates on two strings (as in concatenation or comparison), they |
567 | | < must both use the same character set and encoding. Parrot will automatically |
568 | | < upgrade one or both of the strings to the next highest compatible format as |
569 | | < necessary. ASCII strings will automatically upgrade to UTF-8 strings if needed, |
570 | | < and UTF-8 will upgrade to UTF-16. All of these conversions happen inside |
571 | | < Parrot, so the programmer doesn't need to worry about the details. |
572 | | --- |
573 | | > <p><!-- |
574 | | > INDEX: ISO 8859-1 character set |
575 | | > --> <!-- |
576 | | > INDEX: Latin 1 character set |
577 | | > --> <!-- |
578 | | > INDEX: UCS-2 encoding |
579 | | > --> <!-- |
580 | | > INDEX: UTF-8 encoding |
581 | | > --> <!-- |
582 | | > INDEX: UTF-16 encoding |
583 | | > --> Parrot supports the character sets <code>ascii</code>, <code>binary</code>, <code>iso-8859-1</code> (Latin 1), and <code>unicode</code> and the encodings <code>fixed_8</code>, <code>ucs2</code>, <code>utf8</code>, and <code>utf16</code>.</p> |
584 | | > |
585 | | > <p>The <code>binary</code> charset treats the string as a buffer of raw unformatted binary data. It isn't really a string per se, because binary data contains no readable characters. This exists to support libraries which manipulate binary data that doesn't easily fit into any other primitive data type.</p> |
586 | | > |
587 | | > <p>When Parrot operates on two strings (as in concatenation or comparison), they must both use the same character set and encoding. Parrot will automatically upgrade one or both of the strings to the next highest compatible format as necessary. ASCII strings will automatically upgrade to UTF-8 strings if needed, and UTF-8 will upgrade to UTF-16. All of these conversions happen inside Parrot, so the programmer doesn't need to worry about the details.</p> |
588 | | 668,675c635,639 |
589 | | < X<Polymorphic Containers (PMCs)> |
590 | | < X<PMCs (Polymorphic Containers)> |
591 | | < Polymorphic Containers (PMCs) are the basis for complex data types and |
592 | | < object-oriented behavior in Parrot. In PIR, any variable that isn't a |
593 | | < low-level integer, number, or string is a PMC. PMC variables act much |
594 | | < like the low-level variables, but you have to instantiate a new PMC |
595 | | < object before you use it. The C<new> opcode creates a new PMC object of |
596 | | < the specified type. |
597 | | --- |
598 | | > <p><!-- |
599 | | > INDEX: Polymorphic Containers (PMCs) |
600 | | > --> <!-- |
601 | | > INDEX: PMCs (Polymorphic Containers) |
602 | | > --> Polymorphic Containers (PMCs) are the basis for complex data types and object-oriented behavior in Parrot. In PIR, any variable that isn't a low-level integer, number, or string is a PMC. PMC variables act much like the low-level variables, but you have to instantiate a new PMC object before you use it. The <code>new</code> opcode creates a new PMC object of the specified type.</p> |
603 | | 680,687c644,648 |
604 | | < This example creates a C<String> object, stores it in the PMC register |
605 | | < variable C<$P0>, assigns it the value "That's a bollard and not a |
606 | | < parrot", and prints it. |
607 | | < |
608 | | < Every PMC has a type that indicates what data it can store and what |
609 | | < behavior it supports. The C<typeof>X<typeof opcode> opcode reports the |
610 | | < type of a PMC. When the result is a string variable, C<typeof> returns |
611 | | < the name of the type: |
612 | | --- |
613 | | > <p>This example creates a <code>String</code> object, stores it in the PMC register variable <code>$P0</code>, assigns it the value "That's a bollard and not a parrot", and prints it.</p> |
614 | | > |
615 | | > <p>Every PMC has a type that indicates what data it can store and what behavior it supports. The <code>typeof</code><!-- |
616 | | > INDEX: typeof opcode |
617 | | > --> opcode reports the type of a PMC. When the result is a string variable, <code>typeof</code> returns the name of the type:</p> |
618 | | 692,693c653 |
619 | | < When the result is a PMC variable, C<typeof> returns the C<Class> PMC |
620 | | < for that object type. |
621 | | --- |
622 | | > <p>When the result is a PMC variable, <code>typeof</code> returns the <code>Class</code> PMC for that object type.</p> |
623 | | 698,707c658,664 |
624 | | < X<scalar PMCs> |
625 | | < X<PMCs (Polymorphic Containers);scalar> |
626 | | < In most of the examples shown so far, PMCs duplicate the behavior of integers, |
627 | | < numbers, and strings. Parrot provides a set of PMCs for this exact purpose. |
628 | | < C<Integer>, C<Float>, and C<String> are thin overlays on Parrot's low-level |
629 | | < integers, numbers, and strings. |
630 | | < |
631 | | < A previous example showed a string literal assigned to a PMC variable of type |
632 | | < C<String>. Direct assignment of a literal to a PMC works for all the low-level |
633 | | < types and their PMC equivalents: |
634 | | --- |
635 | | > <p><!-- |
636 | | > INDEX: scalar PMCs |
637 | | > --> <!-- |
638 | | > INDEX: PMCs (Polymorphic Containers);scalar |
639 | | > --> In most of the examples shown so far, PMCs duplicate the behavior of integers, numbers, and strings. Parrot provides a set of PMCs for this exact purpose. <code>Integer</code>, <code>Float</code>, and <code>String</code> are thin overlays on Parrot's low-level integers, numbers, and strings.</p> |
640 | | > |
641 | | > <p>A previous example showed a string literal assigned to a PMC variable of type <code>String</code>. Direct assignment of a literal to a PMC works for all the low-level types and their PMC equivalents:</p> |
642 | | 717c674,676 |
643 | | < X<boxing> |
644 | | --- |
645 | | > <p><!-- |
646 | | > INDEX: boxing |
647 | | > --></p> |
648 | | 719,722c678 |
649 | | < You may also assign non-constant low-level integer, number, or string registers |
650 | | < directly to a PMC. The PMC handles the conversion from the low-level type to |
651 | | < its own internal storage.N<This conversion of a simpler type to a more complex |
652 | | < type is "boxing".> |
653 | | --- |
654 | | > <p>You may also assign non-constant low-level integer, number, or string registers directly to a PMC. The PMC handles the conversion from the low-level type to its own internal storage.This conversion of a simpler type to a more complex type is "boxing".</p> |
655 | | 735,736c691 |
656 | | < The C<box> opcode is a handy shortcut to create the appropriate PMC |
657 | | < object from an integer, number, or string literal or variable. |
658 | | --- |
659 | | > <p>The <code>box</code> opcode is a handy shortcut to create the appropriate PMC object from an integer, number, or string literal or variable.</p> |
660 | | 743,746c698,700 |
661 | | < X<unboxing> |
662 | | < In the reverse situation, when assigning a PMC to an integer, number, or |
663 | | < string variable, the PMC also has the ability to convert its value to |
664 | | < the low-level type.N<The reverse of "boxing" is "unboxing".> |
665 | | --- |
666 | | > <p><!-- |
667 | | > INDEX: unboxing |
668 | | > --> In the reverse situation, when assigning a PMC to an integer, number, or string variable, the PMC also has the ability to convert its value to the low-level type.The reverse of "boxing" is "unboxing".</p> |
669 | | 762,768c716,724 |
670 | | < This example creates C<Integer>X<Integer PMC>, C<Float>X<Float PMC>, |
671 | | < and C<String>X<String PMC> PMCs, and shows the effect of assigning each |
672 | | < one back to a low-level type. |
673 | | < |
674 | | < Converting a string to an integer or number only makes sense when the contents |
675 | | < of the string are a number. The C<String> PMC will attempt to extract a number |
676 | | < from the beginning of the string, but otherwise will return a false value. |
677 | | --- |
678 | | > <p>This example creates <code>Integer</code><!-- |
679 | | > INDEX: Integer PMC |
680 | | > -->, <code>Float</code><!-- |
681 | | > INDEX: Float PMC |
682 | | > -->, and <code>String</code><!-- |
683 | | > INDEX: String PMC |
684 | | > --> PMCs, and shows the effect of assigning each one back to a low-level type.</p> |
685 | | > |
686 | | > <p>Converting a string to an integer or number only makes sense when the contents of the string are a number. The <code>String</code> PMC will attempt to extract a number from the beginning of the string, but otherwise will return a false value.</p> |
687 | | 773,778c729,733 |
688 | | < X<aggregate PMCs> |
689 | | < X<PMCs (Polymorphic Containers);aggregate> |
690 | | < PMCs can define complex types that hold multiple values, commonly called |
691 | | < aggregates. Two basic aggregate types are ordered arrays and associative |
692 | | < arrays. The primary difference between these is that ordered arrays use integer |
693 | | < keys for indexes and associative arrays use string keys. |
694 | | --- |
695 | | > <p><!-- |
696 | | > INDEX: aggregate PMCs |
697 | | > --> <!-- |
698 | | > INDEX: PMCs (Polymorphic Containers);aggregate |
699 | | > --> PMCs can define complex types that hold multiple values, commonly called aggregates. Two basic aggregate types are ordered arrays and associative arrays. The primary difference between these is that ordered arrays use integer keys for indexes and associative arrays use string keys.</p> |
700 | | 780,781c735 |
701 | | < Aggregate PMCs support the use of numeric or string keys. PIR also offers a |
702 | | < extensive set of operations for manipulating aggregate data types. |
703 | | --- |
704 | | > <p>Aggregate PMCs support the use of numeric or string keys. PIR also offers a extensive set of operations for manipulating aggregate data types.</p> |
705 | | 786,809c740,748 |
706 | | < X<arrays> |
707 | | < X<ordered arrays> |
708 | | < Parrot provides several ordered array PMCs, differentiated by whether |
709 | | < the array should store booleans, integers, numbers, strings, or other |
710 | | < PMCs, and whether the array should maintain a fixed size or dynamically |
711 | | < resize for the number of elements it stores. |
712 | | < |
713 | | < The core array types are C<FixedPMCArray>, C<ResizablePMCArray>, |
714 | | < C<FixedIntegerArray>, C<ResizableIntegerArray>, C<FixedFloatArray>, |
715 | | < C<ResizableFloatArray>, C<FixedStringArray>, C<ResizableStringArray>, |
716 | | < C<FixedBooleanArray>, and C<ResizableBooleanArray>. The array |
717 | | < types that start with "Fixed" have a fixed size and do not allow |
718 | | < elements to be added outside their allocated size. The "Resizable" |
719 | | < variants automatically extend themselves as more elements are |
720 | | < added.N<With some additional overhead for checking array bounds and |
721 | | < reallocating array memory.> The array types that include "String", |
722 | | < "Integer", or "Boolean" in the name use alternate packing methods for |
723 | | < greater memory efficiency. |
724 | | < |
725 | | < Parrot's core ordered array PMCs all have zero-based integer keys. Extracting |
726 | | < or inserting an element into the array uses PIR's standard key syntax, with the |
727 | | < key in square brackets after the variable name. An lvalue key sets the value |
728 | | < for that key. An rvalue key extracts the value for that key in the aggregate |
729 | | < to use as the argument value: |
730 | | --- |
731 | | > <p><!-- |
732 | | > INDEX: arrays |
733 | | > --> <!-- |
734 | | > INDEX: ordered arrays |
735 | | > --> Parrot provides several ordered array PMCs, differentiated by whether the array should store booleans, integers, numbers, strings, or other PMCs, and whether the array should maintain a fixed size or dynamically resize for the number of elements it stores.</p> |
736 | | > |
737 | | > <p>The core array types are <code>FixedPMCArray</code>, <code>ResizablePMCArray</code>, <code>FixedIntegerArray</code>, <code>ResizableIntegerArray</code>, <code>FixedFloatArray</code>, <code>ResizableFloatArray</code>, <code>FixedStringArray</code>, <code>ResizableStringArray</code>, <code>FixedBooleanArray</code>, and <code>ResizableBooleanArray</code>. The array types that start with "Fixed" have a fixed size and do not allow elements to be added outside their allocated size. The "Resizable" variants automatically extend themselves as more elements are added.With some additional overhead for checking array bounds and reallocating array memory. The array types that include "String", "Integer", or "Boolean" in the name use alternate packing methods for greater memory efficiency.</p> |
738 | | > |
739 | | > <p>Parrot's core ordered array PMCs all have zero-based integer keys. Extracting or inserting an element into the array uses PIR's standard key syntax, with the key in square brackets after the variable name. An lvalue key sets the value for that key. An rvalue key extracts the value for that key in the aggregate to use as the argument value:</p> |
740 | | 815,817c754 |
741 | | < Setting the array to an integer value directly (without a key) sets the number |
742 | | < of elements of the array. Assigning an array directly to an integer retrieves |
743 | | < the number of elements of the array. |
744 | | --- |
745 | | > <p>Setting the array to an integer value directly (without a key) sets the number of elements of the array. Assigning an array directly to an integer retrieves the number of elements of the array.</p> |
746 | | 821,822c758 |
747 | | < This is equivalent to using the C<elements> opcode to retrieve the number of |
748 | | < items currently in an array: |
749 | | --- |
750 | | > <p>This is equivalent to using the <code>elements</code> opcode to retrieve the number of items currently in an array:</p> |
751 | | 825,829c761 |
752 | | < Some other useful instructions for working with ordered arrays are |
753 | | < C<push>, C<pop>, C<shift>, and C<unshift>, to add or remove elements. |
754 | | < C<push> and C<pop> work on the end of the array, the highest numbered |
755 | | < index. C<shift> and C<unshift> work on the start of the array, adding or |
756 | | < removing the zeroth element, and renumbering all the following elements. |
757 | | --- |
758 | | > <p>Some other useful instructions for working with ordered arrays are <code>push</code>, <code>pop</code>, <code>shift</code>, and <code>unshift</code>, to add or remove elements. <code>push</code> and <code>pop</code> work on the end of the array, the highest numbered index. <code>shift</code> and <code>unshift</code> work on the start of the array, adding or removing the zeroth element, and renumbering all the following elements.</p> |
759 | | 839,847c771,777 |
760 | | < X<associative arrays> |
761 | | < X<hashes> |
762 | | < X<dictionaries> |
763 | | < An associative array is an unordered aggregate that uses string keys to |
764 | | < identify elements. You may know them as "hash tables", "hashes", "maps", or |
765 | | < "dictionaries". Parrot provides one core associative array PMC, called C<Hash>. |
766 | | < String keys work very much like integer keys. An lvalue key sets the value of |
767 | | < an element, and an rvalue key extracts the value of an element. The string in |
768 | | < the key must always be in single or double quotes. |
769 | | --- |
770 | | > <p><!-- |
771 | | > INDEX: associative arrays |
772 | | > --> <!-- |
773 | | > INDEX: hashes |
774 | | > --> <!-- |
775 | | > INDEX: dictionaries |
776 | | > --> An associative array is an unordered aggregate that uses string keys to identify elements. You may know them as "hash tables", "hashes", "maps", or "dictionaries". Parrot provides one core associative array PMC, called <code>Hash</code>. String keys work very much like integer keys. An lvalue key sets the value of an element, and an rvalue key extracts the value of an element. The string in the key must always be in single or double quotes.</p> |
777 | | 852,854c782,784 |
778 | | < Assigning a C<Hash>X<Hash PMC> PMC (without a key) to an integer result |
779 | | < fetches the number of elements in the hash.N<You may not set a C<Hash> |
780 | | < PMC directly to an integer value.> |
781 | | --- |
782 | | > <p>Assigning a <code>Hash</code><!-- |
783 | | > INDEX: Hash PMC |
784 | | > --> PMC (without a key) to an integer result fetches the number of elements in the hash.You may not set a <code>Hash</code> PMC directly to an integer value.</p> |
785 | | 857,860c787,789 |
786 | | < The C<exists>X<exists opcode> opcode tests whether a keyed value exists in an |
787 | | < aggregate. It returns 1 if it finds the key in the aggregate and 0 otherwise. |
788 | | < It doesn't care if the value itself is true or false, only that an entry exists |
789 | | < for that key: |
790 | | --- |
791 | | > <p>The <code>exists</code><!-- |
792 | | > INDEX: exists opcode |
793 | | > --> opcode tests whether a keyed value exists in an aggregate. It returns 1 if it finds the key in the aggregate and 0 otherwise. It doesn't care if the value itself is true or false, only that an entry exists for that key:</p> |
794 | | 866,867c795,797 |
795 | | < The C<delete>X<delete opcode> opcode removes an element from an associative |
796 | | < array: |
797 | | --- |
798 | | > <p>The <code>delete</code><!-- |
799 | | > INDEX: delete opcode |
800 | | > --> opcode removes an element from an associative array:</p> |
801 | | 873,878c803,807 |
802 | | < X<iterators> |
803 | | < X<PMCs (Polymorphic Containers); iterators> |
804 | | < An iterator extracts values from an aggregate PMC one at a time. Iterators are |
805 | | < most useful in loops which perform an action on every element in an aggregate. |
806 | | < The C<iter> opcode creates a new iterator from an aggregate PMC. It takes one |
807 | | < argument, the PMC over which to iterate: |
808 | | --- |
809 | | > <p><!-- |
810 | | > INDEX: iterators |
811 | | > --> <!-- |
812 | | > INDEX: PMCs (Polymorphic Containers); iterators |
813 | | > --> An iterator extracts values from an aggregate PMC one at a time. Iterators are most useful in loops which perform an action on every element in an aggregate. The <code>iter</code> opcode creates a new iterator from an aggregate PMC. It takes one argument, the PMC over which to iterate:</p> |
814 | | 881c810,812 |
815 | | < The C<shift>X<shift opcode> opcode extracts the next value from the iterator. |
816 | | --- |
817 | | > <p>The <code>shift</code><!-- |
818 | | > INDEX: shift opcode |
819 | | > --> opcode extracts the next value from the iterator.</p> |
820 | | 884,885c815 |
821 | | < Evaluating the iterator PMC as a boolean returns whether the iterator has |
822 | | < reached the end of the aggregate: |
823 | | --- |
824 | | > <p>Evaluating the iterator PMC as a boolean returns whether the iterator has reached the end of the aggregate:</p> |
825 | | 888,896c818,822 |
826 | | < Parrot provides predefined constants for working with iterators. |
827 | | < C<.ITERATE_FROM_START> and C<.ITERATE_FROM_END> constants select whether an |
828 | | < ordered array iterator starts from the beginning or end of the array. These |
829 | | < two constants have no effect on associative array iterators, as their elements |
830 | | < are unordered. |
831 | | < |
832 | | < Load the iterator constants with the C<.include>X<.include directive> |
833 | | < directive to include the file F<iterator.pasm>. To use them, set the |
834 | | < iterator PMC to the value of the constant: |
835 | | --- |
836 | | > <p>Parrot provides predefined constants for working with iterators. <code>.ITERATE_FROM_START</code> and <code>.ITERATE_FROM_END</code> constants select whether an ordered array iterator starts from the beginning or end of the array. These two constants have no effect on associative array iterators, as their elements are unordered.</p> |
837 | | > |
838 | | > <p>Load the iterator constants with the <code>.include</code><!-- |
839 | | > INDEX: .include directive |
840 | | > --> directive to include the file <em>iterator.pasm</em>. To use them, set the iterator PMC to the value of the constant:</p> |
841 | | 903,906c829 |
842 | | < With all of those separate pieces in one place, this example loads the iterator |
843 | | < constants, creates an ordered array of "a", "b", "c", creates an iterator from |
844 | | < that array, and then loops over the iterator using a conditional C<goto> to |
845 | | < checks the boolean value of the iterator and another unconditional C<goto>: |
846 | | --- |
847 | | > <p>With all of those separate pieces in one place, this example loads the iterator constants, creates an ordered array of "a", "b", "c", creates an iterator from that array, and then loops over the iterator using a conditional <code>goto</code> to checks the boolean value of the iterator and another unconditional <code>goto</code>:</p> |
848 | | 923,925c846 |
849 | | < Associative array iterators work similarly to ordered array iterators. When |
850 | | < iterating over associative arrays, the C<shift> opcode extracts keys instead of |
851 | | < values. The key looks up the value in the original hash PMC. |
852 | | --- |
853 | | > <p>Associative array iterators work similarly to ordered array iterators. When iterating over associative arrays, the <code>shift</code> opcode extracts keys instead of values. The key looks up the value in the original hash PMC.</p> |
854 | | 941,951c862 |
855 | | < This example creates an associative array C<$P2> that contains three |
856 | | < keys "a", "b", and "c", assigning them the values 10, 20, and 30. It |
857 | | < creates an iterator (C<$P1>) from the associative array using the |
858 | | < C<iter> opcode, and then starts a loop over the iterator. At the start |
859 | | < of each loop, the C<unless> instruction checks whether the iterator has |
860 | | < any more elements. If there are no more elements, C<goto> jumps to the |
861 | | < end of the loop, marked by the label C<iter_end>. If there are more |
862 | | < elements, the C<shift> opcode extracts the next key. Keyed assignment |
863 | | < stores the integer value of the element indexed by the key in C<$I9>. |
864 | | < After printing the integer value, C<goto> jumps back to the start of the |
865 | | < loop, marked by C<iter_loop>. |
866 | | --- |
867 | | > <p>This example creates an associative array <code>$P2</code> that contains three keys "a", "b", and "c", assigning them the values 10, 20, and 30. It creates an iterator (<code>$P1</code>) from the associative array using the <code>iter</code> opcode, and then starts a loop over the iterator. At the start of each loop, the <code>unless</code> instruction checks whether the iterator has any more elements. If there are no more elements, <code>goto</code> jumps to the end of the loop, marked by the label <code>iter_end</code>. If there are more elements, the <code>shift</code> opcode extracts the next key. Keyed assignment stores the integer value of the element indexed by the key in <code>$I9</code>. After printing the integer value, <code>goto</code> jumps back to the start of the loop, marked by <code>iter_loop</code>.</p> |
868 | | 956,962c867,871 |
869 | | < X<keys> |
870 | | < X<multi-level keys> |
871 | | < Aggregates can hold any data type, including other aggregates. |
872 | | < Accessing elements deep within nested data structures is a common |
873 | | < operation, so PIR provides a way to do it in a single instruction. |
874 | | < Complex keys specify a series of nested data structures, with each |
875 | | < individual key separated by a semicolon. |
876 | | --- |
877 | | > <p><!-- |
878 | | > INDEX: keys |
879 | | > --> <!-- |
880 | | > INDEX: multi-level keys |
881 | | > --> Aggregates can hold any data type, including other aggregates. Accessing elements deep within nested data structures is a common operation, so PIR provides a way to do it in a single instruction. Complex keys specify a series of nested data structures, with each individual key separated by a semicolon.</p> |
882 | | 972,975c881 |
883 | | < This example builds up a data structure of an associative array |
884 | | < containing an ordered array. The complex key C<["answer"; $I1]> |
885 | | < retrieves an element of the array within the hash. You can also set a |
886 | | < value using a complex key: |
887 | | --- |
888 | | > <p>This example builds up a data structure of an associative array containing an ordered array. The complex key <code>["answer"; $I1]</code> retrieves an element of the array within the hash. You can also set a value using a complex key:</p> |
889 | | 978,979c884 |
890 | | < The individual keys are integer or string literals, or variables with |
891 | | < integer or string values. |
892 | | --- |
893 | | > <p>The individual keys are integer or string literals, or variables with integer or string values.</p> |
894 | | 984,989c889,891 |
895 | | < X<PMCs (Polymorphic Containers); copying vs. cloning> |
896 | | < PMC registers don't directly store the data for a PMC, they only store a |
897 | | < pointer to the structure that stores the data. As a result, the C<=> |
898 | | < operator doesn't copy the entire PMC, it only copies the pointer to the |
899 | | < PMC data. If you later modify the copy of the variable, it will also |
900 | | < modify the original. |
901 | | --- |
902 | | > <p><!-- |
903 | | > INDEX: PMCs (Polymorphic Containers); copying vs. cloning |
904 | | > --> PMC registers don't directly store the data for a PMC, they only store a pointer to the structure that stores the data. As a result, the <code>=</code> operator doesn't copy the entire PMC, it only copies the pointer to the PMC data. If you later modify the copy of the variable, it will also modify the original.</p> |
905 | | 997,1000c899 |
906 | | < In this example, C<$P0> and C<$P1> are both pointers to the same |
907 | | < internal data structure. Setting C<$P1> to the string literal |
908 | | < "Zaphod", it overwrites the previous value "Ford". Both C<$P0> and |
909 | | < C<$P1> refer to the C<String> PMC "Zaphod". |
910 | | --- |
911 | | > <p>In this example, <code>$P0</code> and <code>$P1</code> are both pointers to the same internal data structure. Setting <code>$P1</code> to the string literal "Zaphod", it overwrites the previous value "Ford". Both <code>$P0</code> and <code>$P1</code> refer to the <code>String</code> PMC "Zaphod".</p> |
912 | | 1002,1003c901,905 |
913 | | < The C<clone> X<clone opcode> opcode makes a deep copy of a PMC, instead |
914 | | < of copying the pointer like C<=>X<= operator> does. |
915 | | --- |
916 | | > <p>The <code>clone</code> <!-- |
917 | | > INDEX: clone opcode |
918 | | > --> opcode makes a deep copy of a PMC, instead of copying the pointer like <code>=</code><!-- |
919 | | > INDEX: = operator |
920 | | > --> does.</p> |
921 | | 1011,1018c913,919 |
922 | | < This example creates an identical, independent clone of the PMC in |
923 | | < C<$P0> and puts it in C<$P1>. Later changes to C<$P0> have no effect on |
924 | | < the PMC in C<$P1>.N<With low-level strings, the copies created by |
925 | | < C<clone> are copy-on-writeX<copy-on-write> exactly the same as the copy |
926 | | < created by C<=>.> |
927 | | < |
928 | | < To assign the I<value> of one PMC to another PMC that already exists, use the |
929 | | < C<assign>X<assign opcode> opcode: |
930 | | --- |
931 | | > <p>This example creates an identical, independent clone of the PMC in <code>$P0</code> and puts it in <code>$P1</code>. Later changes to <code>$P0</code> have no effect on the PMC in <code>$P1</code>.With low-level strings, the copies created by <code>clone</code> are copy-on-write<!-- |
932 | | > INDEX: copy-on-write |
933 | | > --> exactly the same as the copy created by <code>=</code>.</p> |
934 | | > |
935 | | > <p>To assign the <i>value</i> of one PMC to another PMC that already exists, use the <code>assign</code><!-- |
936 | | > INDEX: assign opcode |
937 | | > --> opcode:</p> |
938 | | 1027,1032c928 |
939 | | < This example creates two C<Integer> PMCs, C<$P1> and C<$P2>, and gives the |
940 | | < first one the value 42. It then uses C<assign> to pass the same integer value |
941 | | < on to C<$P1>. Though C<$P0> increments, C<$P1> doesn't change. The result for |
942 | | < C<assign> must have an existing object of the right type in it, because |
943 | | < C<assign> neither creates a new duplicate object (as does C<clone>) or reuses |
944 | | < the source object (as does C<=>). |
945 | | --- |
946 | | > <p>This example creates two <code>Integer</code> PMCs, <code>$P1</code> and <code>$P2</code>, and gives the first one the value 42. It then uses <code>assign</code> to pass the same integer value on to <code>$P1</code>. Though <code>$P0</code> increments, <code>$P1</code> doesn't change. The result for <code>assign</code> must have an existing object of the right type in it, because <code>assign</code> neither creates a new duplicate object (as does <code>clone</code>) or reuses the source object (as does <code>=</code>).</p> |
947 | | 1037,1038c933,937 |
948 | | < X<properties> |
949 | | < X<PMCs (Polymorphic Containers); properties> |
950 | | --- |
951 | | > <p><!-- |
952 | | > INDEX: properties |
953 | | > --> <!-- |
954 | | > INDEX: PMCs (Polymorphic Containers); properties |
955 | | > --></p> |
956 | | 1040,1041c939 |
957 | | < PMCs can have additional values attached to them as "properties" of the |
958 | | < PMC. Most properties hold extra metadata about the PMC. |
959 | | --- |
960 | | > <p>PMCs can have additional values attached to them as "properties" of the PMC. Most properties hold extra metadata about the PMC.</p> |
961 | | 1043,1045c941,943 |
962 | | < The C<setprop>X<setprop opcode> opcode sets the value of a named property on a |
963 | | < PMC. It takes three arguments: the PMC on which to set a property, the name of |
964 | | < the property, and a PMC containing the value of the property. |
965 | | --- |
966 | | > <p>The <code>setprop</code><!-- |
967 | | > INDEX: setprop opcode |
968 | | > --> opcode sets the value of a named property on a PMC. It takes three arguments: the PMC on which to set a property, the name of the property, and a PMC containing the value of the property.</p> |
969 | | 1048,1050c946,948 |
970 | | < The C<getprop>X<getprop opcode> opcode returns the value of a property. It |
971 | | < takes two arguments: the name of the property and the PMC from which to |
972 | | < retrieve the property value. |
973 | | --- |
974 | | > <p>The <code>getprop</code><!-- |
975 | | > INDEX: getprop opcode |
976 | | > --> opcode returns the value of a property. It takes two arguments: the name of the property and the PMC from which to retrieve the property value.</p> |
977 | | 1053,1056c951 |
978 | | < This example creates a C<String> object in C<$P0> and an C<Integer> object with |
979 | | < the value 1 in C<$P1>. C<setprop> sets a property named "eric" on the object in |
980 | | < C<$P0> and gives the property the value of C<$P1>. C<getprop> retrieves the |
981 | | < value of the property "eric" on C<$P0> and stores it in C<$P2>. |
982 | | --- |
983 | | > <p>This example creates a <code>String</code> object in <code>$P0</code> and an <code>Integer</code> object with the value 1 in <code>$P1</code>. <code>setprop</code> sets a property named "eric" on the object in <code>$P0</code> and gives the property the value of <code>$P1</code>. <code>getprop</code> retrieves the value of the property "eric" on <code>$P0</code> and stores it in <code>$P2</code>.</p> |
984 | | 1067,1068c962 |
985 | | < Parrot stores PMC properties in an associative array where the name of the |
986 | | < property is the key. |
987 | | --- |
988 | | > <p>Parrot stores PMC properties in an associative array where the name of the property is the key.</p> |
989 | | 1070c964,966 |
990 | | < C<delprop>X<delprop opcode> deletes a property from a PMC. |
991 | | --- |
992 | | > <p><code>delprop</code><!-- |
993 | | > INDEX: delprop opcode |
994 | | > --> deletes a property from a PMC.</p> |
995 | | 1073,1074c969,971 |
996 | | < You can fetch a complete hash of all properties on a PMC with |
997 | | < C<prophash>X<prophash opcode>: |
998 | | --- |
999 | | > <p>You can fetch a complete hash of all properties on a PMC with <code>prophash</code><!-- |
1000 | | > INDEX: prophash opcode |
1001 | | > -->:</p> |
1002 | | 1077c974 |
1003 | | < Fetching the value of a non-existent property returns an C<Undef> PMC. |
1004 | | --- |
1005 | | > <p>Fetching the value of a non-existent property returns an <code>Undef</code> PMC.</p> |
1006 | | 1082,1104c979,991 |
1007 | | < X<vtable functions> |
1008 | | < You may have noticed that a simple operation sometimes has a different effect |
1009 | | < on different PMCs. Assigning a low-level integer value to a C<Integer> PMC sets |
1010 | | < its integer value of the PMC, but assigning that same integer to an ordered |
1011 | | < array sets the size of the array. |
1012 | | < |
1013 | | < Every PMC defines a standard set of low-level operations called vtable |
1014 | | < functions. When you perform an assignment like: |
1015 | | < |
1016 | | < $P0 = 5 |
1017 | | < |
1018 | | < |
1019 | | < ... Parrot calls the C<set_integer_native> vtable function on the PMC referred |
1020 | | < to by register C<$P0>. |
1021 | | < |
1022 | | < X<polymorphic substitution> |
1023 | | < Parrot has a fixed set of vtable functions, so that any PMC can stand in for |
1024 | | < any other PMC; they're polymorphic.N<Hence the name "Polymorphic Container".> |
1025 | | < Every PMC defines some behavior for every vtable function. The default behavior |
1026 | | < is to throw an exception reporting that the PMC doesn't implement that vtable |
1027 | | < function. The full set of vtable functions for a PMC defines the PMC's basic |
1028 | | < interface, but PMCs may also define methods to extend their behavior beyond the |
1029 | | < vtable set. |
1030 | | --- |
1031 | | > <p><!-- |
1032 | | > INDEX: vtable functions |
1033 | | > --> You may have noticed that a simple operation sometimes has a different effect on different PMCs. Assigning a low-level integer value to a <code>Integer</code> PMC sets its integer value of the PMC, but assigning that same integer to an ordered array sets the size of the array.</p> |
1034 | | > |
1035 | | > <p>Every PMC defines a standard set of low-level operations called vtable functions. When you perform an assignment like:</p> |
1036 | | > |
1037 | | > <pre> $P0 = 5</pre> |
1038 | | > |
1039 | | > <p>... Parrot calls the <code>set_integer_native</code> vtable function on the PMC referred to by register <code>$P0</code>.</p> |
1040 | | > |
1041 | | > <p><!-- |
1042 | | > INDEX: polymorphic substitution |
1043 | | > --> Parrot has a fixed set of vtable functions, so that any PMC can stand in for any other PMC; they're polymorphic.Hence the name "Polymorphic Container". Every PMC defines some behavior for every vtable function. The default behavior is to throw an exception reporting that the PMC doesn't implement that vtable function. The full set of vtable functions for a PMC defines the PMC's basic interface, but PMCs may also define methods to extend their behavior beyond the vtable set.</p> |
1044 | | 1109,1120c996,1006 |
1045 | | < X<namespaces> |
1046 | | < X<global variables> |
1047 | | < Parrot performs operations on variables stored in small register sets local to |
1048 | | < each subroutine. For more complex tasks,N<...and for most high-level languages |
1049 | | < that Parrot supports.> it's also useful to have variables that live beyond the |
1050 | | < scope of a single subroutine. These variables may be global to the entire |
1051 | | < program or restricted to a particular library. Parrot stores long-lived |
1052 | | < variables in a hierarchy of namespaces. |
1053 | | < |
1054 | | < The opcodes C<set_global>X<set_global opcode> and |
1055 | | < C<get_global>X<get_global opcode> store and fetch a variable in a |
1056 | | < namespace: |
1057 | | --- |
1058 | | > <p><!-- |
1059 | | > INDEX: namespaces |
1060 | | > --> <!-- |
1061 | | > INDEX: global variables |
1062 | | > --> Parrot performs operations on variables stored in small register sets local to each subroutine. For more complex tasks,...and for most high-level languages that Parrot supports. it's also useful to have variables that live beyond the scope of a single subroutine. These variables may be global to the entire program or restricted to a particular library. Parrot stores long-lived variables in a hierarchy of namespaces.</p> |
1063 | | > |
1064 | | > <p>The opcodes <code>set_global</code><!-- |
1065 | | > INDEX: set_global opcode |
1066 | | > --> and <code>get_global</code><!-- |
1067 | | > INDEX: get_global opcode |
1068 | | > --> store and fetch a variable in a namespace:</p> |
1069 | | 1128,1144c1014,1018 |
1070 | | < The first two statements in this example create a C<String> PMC in |
1071 | | < C<$P0> and assign it a value. In the third statement, C<set_global> |
1072 | | < stores that PMC as the named global variable C<bee>. At some later |
1073 | | < point in the program, C<get_global> retrieves the global variable by |
1074 | | < name, and stores it in C<$P1> to print. |
1075 | | < |
1076 | | < Namespaces can only store PMC variables. Parrot boxes all primitive integer, |
1077 | | < number, or string values into the corresponding PMCs before storing them in a |
1078 | | < namespace. |
1079 | | < |
1080 | | < The name of every variable stored in a particular namespace must be |
1081 | | < unique. You can't have store both an C<Integer> PMC and an array PMC |
1082 | | < both named "bee", stored in the same namespace.N<You may wonder why |
1083 | | < anyone would want to do this. We wonder the same thing, but Perl 5 does |
1084 | | < it all the time. The Perl 6 implementation on Parrot includes type |
1085 | | < sigils in the names of the variables it stores in namespaces so each |
1086 | | < name is unique, e.g. C<$bee>, C<@bee>....> |
1087 | | --- |
1088 | | > <p>The first two statements in this example create a <code>String</code> PMC in <code>$P0</code> and assign it a value. In the third statement, <code>set_global</code> stores that PMC as the named global variable <code>bee</code>. At some later point in the program, <code>get_global</code> retrieves the global variable by name, and stores it in <code>$P1</code> to print.</p> |
1089 | | > |
1090 | | > <p>Namespaces can only store PMC variables. Parrot boxes all primitive integer, number, or string values into the corresponding PMCs before storing them in a namespace.</p> |
1091 | | > |
1092 | | > <p>The name of every variable stored in a particular namespace must be unique. You can't have store both an <code>Integer</code> PMC and an array PMC both named "bee", stored in the same namespace.You may wonder why anyone would want to do this. We wonder the same thing, but Perl 5 does it all the time. The Perl 6 implementation on Parrot includes type sigils in the names of the variables it stores in namespaces so each name is unique, e.g. <code>$bee</code>, <code>@bee</code>....</p> |
1093 | | 1149,1150c1023,1027 |
1094 | | < X<hierarchical namespaces> |
1095 | | < X<namespaces; hierarchy> |
1096 | | --- |
1097 | | > <p><!-- |
1098 | | > INDEX: hierarchical namespaces |
1099 | | > --> <!-- |
1100 | | > INDEX: namespaces; hierarchy |
1101 | | > --></p> |
1102 | | 1152,1162c1029,1031 |
1103 | | < A single global namespace would be far too limiting for most languages or |
1104 | | < applications. The risk of accidental collisions -- where two libraries try to |
1105 | | < use the same name for some variable -- would be quite high for larger code |
1106 | | < bases. Parrot maintains a collection of namespaces arranged as a tree, with the |
1107 | | < C<parrot> namespace as the root. Every namespace you declare is a child of the |
1108 | | < C<parrot> namespace (or a child of a child....). |
1109 | | < |
1110 | | < The C<set_global> and C<get_global> opcodes both have alternate forms that take |
1111 | | < a key name to access a variable in a particular namespace within the tree. This |
1112 | | < code example stores a variable as C<bill> in the Duck namespace and retrieves |
1113 | | < it again: |
1114 | | --- |
1115 | | > <p>A single global namespace would be far too limiting for most languages or applications. The risk of accidental collisions -- where two libraries try to use the same name for some variable -- would be quite high for larger code bases. Parrot maintains a collection of namespaces arranged as a tree, with the <code>parrot</code> namespace as the root. Every namespace you declare is a child of the <code>parrot</code> namespace (or a child of a child....).</p> |
1116 | | > |
1117 | | > <p>The <code>set_global</code> and <code>get_global</code> opcodes both have alternate forms that take a key name to access a variable in a particular namespace within the tree. This code example stores a variable as <code>bill</code> in the Duck namespace and retrieves it again:</p> |
1118 | | 1166,1168c1035 |
1119 | | < The key name for the namespace can have multiple levels, which correspond to |
1120 | | < levels in the namespace hierarchy. This example stores a variable as C<bill> in |
1121 | | < the Electric namespace under the General namespace in the hierarchy. |
1122 | | --- |
1123 | | > <p>The key name for the namespace can have multiple levels, which correspond to levels in the namespace hierarchy. This example stores a variable as <code>bill</code> in the Electric namespace under the General namespace in the hierarchy.</p> |
1124 | | 1172,1173c1039,1043 |
1125 | | < X<root namespace> |
1126 | | < X<namespaces; root> |
1127 | | --- |
1128 | | > <p><!-- |
1129 | | > INDEX: root namespace |
1130 | | > --> <!-- |
1131 | | > INDEX: namespaces; root |
1132 | | > --></p> |
1133 | | 1175,1181c1045,1047 |
1134 | | < The C<set_global> and C<get_global> opcode operate on the currently selected |
1135 | | < namespace. The default top-level namespace is the "root" namespace. The |
1136 | | < C<.namespace>X<.namespace directive> directive allows you to declare any |
1137 | | < namespace for subsequent code. If you select the General Electric |
1138 | | < namespace, then store or retrieve the C<bill> variable without |
1139 | | < specifying a namespace, you will work with the General Electric bill, |
1140 | | < not the Duck bill. |
1141 | | --- |
1142 | | > <p>The <code>set_global</code> and <code>get_global</code> opcode operate on the currently selected namespace. The default top-level namespace is the "root" namespace. The <code>.namespace</code><!-- |
1143 | | > INDEX: .namespace directive |
1144 | | > --> directive allows you to declare any namespace for subsequent code. If you select the General Electric namespace, then store or retrieve the <code>bill</code> variable without specifying a namespace, you will work with the General Electric bill, not the Duck bill.</p> |
1145 | | 1183c1049 |
1146 | | < .namespace ["General";"Electric"] |
1147 | | --- |
1148 | | > <pre> .namespace ["General";"Electric"] |
1149 | | 1185,1191c1051,1052 |
1150 | | < set_global "bill", $P0 |
1151 | | < $P1 = get_global "bill" |
1152 | | < |
1153 | | < |
1154 | | < Passing an empty key to the C<.namespace> directive resets the selected |
1155 | | < namespace to the root namespace. The brackets are required even when the |
1156 | | < key is empty. |
1157 | | --- |
1158 | | > set_global "bill", $P0 |
1159 | | > $P1 = get_global "bill"</pre> |
1160 | | 1193c1054 |
1161 | | < .namespace [ ] |
1162 | | --- |
1163 | | > <p>Passing an empty key to the <code>.namespace</code> directive resets the selected namespace to the root namespace. The brackets are required even when the key is empty.</p> |
1164 | | 1194a1056 |
1165 | | > <pre> .namespace [ ]</pre> |
1166 | | 1196,1202c1058,1062 |
1167 | | < When you need to be absolutely sure you're working with the root namespace |
1168 | | < regardless of what namespace is currently active, use the |
1169 | | < C<set_root_global>X<set_root_global opcode> and |
1170 | | < C<get_root_global>X<get_root_global opcode> opcodes instead of |
1171 | | < C<set_global> and C<get_global>. This example sets and retrieves the |
1172 | | < variable C<bill> in the Dollar namespace, which is directly under the |
1173 | | < root namespace: |
1174 | | --- |
1175 | | > <p>When you need to be absolutely sure you're working with the root namespace regardless of what namespace is currently active, use the <code>set_root_global</code><!-- |
1176 | | > INDEX: set_root_global opcode |
1177 | | > --> and <code>get_root_global</code><!-- |
1178 | | > INDEX: get_root_global opcode |
1179 | | > --> opcodes instead of <code>set_global</code> and <code>get_global</code>. This example sets and retrieves the variable <code>bill</code> in the Dollar namespace, which is directly under the root namespace:</p> |
1180 | | 1206,1222c1066,1080 |
1181 | | < X<HLL namespaces> |
1182 | | < X<namespaces; hll> |
1183 | | < To prevent further collisions, each high-level language running on |
1184 | | < Parrot operates within its own virtual namespace root. The default |
1185 | | < virtual root is C<parrot>, and the C<.HLL>X<.HLL directive> directive |
1186 | | < (for I<H>igh-I<L>evel I<L>anguage) selects an alternate virtual root for |
1187 | | < a particular high-level language: |
1188 | | < |
1189 | | < .HLL 'ruby' |
1190 | | < |
1191 | | < |
1192 | | < The C<set_hll_global>X<set_hll_global opcode> and |
1193 | | < C<get_hll_global>X<get_hll_global opcode> opcodes are like |
1194 | | < C<set_root_global> and C<get_root_global>, except they always operate on |
1195 | | < the virtual root for the currently selected HLL. This example stores and |
1196 | | < retrieves a C<bill> variable in the Euro namespace, under the Dutch HLL |
1197 | | < namespace root: |
1198 | | --- |
1199 | | > <p><!-- |
1200 | | > INDEX: HLL namespaces |
1201 | | > --> <!-- |
1202 | | > INDEX: namespaces; hll |
1203 | | > --> To prevent further collisions, each high-level language running on Parrot operates within its own virtual namespace root. The default virtual root is <code>parrot</code>, and the <code>.HLL</code><!-- |
1204 | | > INDEX: .HLL directive |
1205 | | > --> directive (for <i>H</i>igh-<i>L</i>evel <i>L</i>anguage) selects an alternate virtual root for a particular high-level language:</p> |
1206 | | > |
1207 | | > <pre> .HLL 'ruby'</pre> |
1208 | | > |
1209 | | > <p>The <code>set_hll_global</code><!-- |
1210 | | > INDEX: set_hll_global opcode |
1211 | | > --> and <code>get_hll_global</code><!-- |
1212 | | > INDEX: get_hll_global opcode |
1213 | | > --> opcodes are like <code>set_root_global</code> and <code>get_root_global</code>, except they always operate on the virtual root for the currently selected HLL. This example stores and retrieves a <code>bill</code> variable in the Euro namespace, under the Dutch HLL namespace root:</p> |
1214 | | 1224c1082 |
1215 | | < .HLL 'Dutch' |
1216 | | --- |
1217 | | > <pre> .HLL 'Dutch' |
1218 | | 1226,1228c1084,1085 |
1219 | | < set_hll_global ["Euro"], "bill", $P0 |
1220 | | < $P1 = get_hll_global ["Euro"], "bill" |
1221 | | < |
1222 | | --- |
1223 | | > set_hll_global ["Euro"], "bill", $P0 |
1224 | | > $P1 = get_hll_global ["Euro"], "bill"</pre> |
1225 | | 1233,1265c1090,1094 |
1226 | | < X<NameSpace PMC> |
1227 | | < Namespaces are just PMCs. They implement the standard vtable functions |
1228 | | < and a few extra methods. The C<get_namespace>X<get_namespace opcode> |
1229 | | < opcode retrieves the currently selected namespace as a PMC object: |
1230 | | < |
1231 | | < $P0 = get_namespace |
1232 | | < |
1233 | | < |
1234 | | < The C<get_root_namespace>X<get_root_namespace opcode> opcode retrieves |
1235 | | < the namespace object for the root namespace. The |
1236 | | < C<get_hll_namespace>X<get_hll_namespace opcode> opcode retrieves the |
1237 | | < virtual root for the currently selected HLL. |
1238 | | < |
1239 | | < $P0 = get_root_namespace |
1240 | | < $P0 = get_hll_namespace |
1241 | | < |
1242 | | < |
1243 | | < Each of these three opcodes can take a key argument to retrieve a namespace |
1244 | | < under the currenly selected namespace, root namespace, or HLL root namespace: |
1245 | | < |
1246 | | < $P0 = get_namespace ["Duck"] |
1247 | | < $P0 = get_root_namespace ["General";"Electric"] |
1248 | | < $P0 = get_hll_namespace ["Euro"] |
1249 | | < |
1250 | | < |
1251 | | < Once you have a namespace object you can use it to retrieve variables from the |
1252 | | < namespace instead of using a keyed lookup. This example first looks up the Euro |
1253 | | < namespace in the currently selected HLL, then retrieves the C<bill> variable |
1254 | | < from that namespace: |
1255 | | < |
1256 | | < $P0 = get_hll_namespace ["Euro"] |
1257 | | < $P1 = get_global $P0, "bill" |
1258 | | < |
1259 | | --- |
1260 | | > <p><!-- |
1261 | | > INDEX: NameSpace PMC |
1262 | | > --> Namespaces are just PMCs. They implement the standard vtable functions and a few extra methods. The <code>get_namespace</code><!-- |
1263 | | > INDEX: get_namespace opcode |
1264 | | > --> opcode retrieves the currently selected namespace as a PMC object:</p> |
1265 | | 1267,1270c1096 |
1266 | | < Namespaces also provide a set of methods to provide more complex |
1267 | | < behavior than the standard vtable functions allow. The |
1268 | | < C<get_name>X<get_name method> method returns the name of the namespace |
1269 | | < as a C<ResizableStringArray>: |
1270 | | --- |
1271 | | > <pre> $P0 = get_namespace</pre> |
1272 | | 1272c1098,1102 |
1273 | | < $P3 = $P0.'get_name'() |
1274 | | --- |
1275 | | > <p>The <code>get_root_namespace</code><!-- |
1276 | | > INDEX: get_root_namespace opcode |
1277 | | > --> opcode retrieves the namespace object for the root namespace. The <code>get_hll_namespace</code><!-- |
1278 | | > INDEX: get_hll_namespace opcode |
1279 | | > --> opcode retrieves the virtual root for the currently selected HLL.</p> |
1280 | | 1273a1104,1105 |
1281 | | > <pre> $P0 = get_root_namespace |
1282 | | > $P0 = get_hll_namespace</pre> |
1283 | | 1275,1276c1107 |
1284 | | < The C<get_parent>X<get_parent method> method retrieves a namespace |
1285 | | < object for the parent namespace that contains this one: |
1286 | | --- |
1287 | | > <p>Each of these three opcodes can take a key argument to retrieve a namespace under the currenly selected namespace, root namespace, or HLL root namespace:</p> |
1288 | | 1278c1109,1111 |
1289 | | < $P5 = $P0.'get_parent'() |
1290 | | --- |
1291 | | > <pre> $P0 = get_namespace ["Duck"] |
1292 | | > $P0 = get_root_namespace ["General";"Electric"] |
1293 | | > $P0 = get_hll_namespace ["Euro"]</pre> |
1294 | | 1279a1113 |
1295 | | > <p>Once you have a namespace object you can use it to retrieve variables from the namespace instead of using a keyed lookup. This example first looks up the Euro namespace in the currently selected HLL, then retrieves the <code>bill</code> variable from that namespace:</p> |
1296 | | 1281,1282c1115,1116 |
1297 | | < The C<get_class>X<get_class method> method retrieves any Class PMC |
1298 | | < associated with the namespace: |
1299 | | --- |
1300 | | > <pre> $P0 = get_hll_namespace ["Euro"] |
1301 | | > $P1 = get_global $P0, "bill"</pre> |
1302 | | 1284c1118,1120 |
1303 | | < $P6 = $P0.'get_class'() |
1304 | | --- |
1305 | | > <p>Namespaces also provide a set of methods to provide more complex behavior than the standard vtable functions allow. The <code>get_name</code><!-- |
1306 | | > INDEX: get_name method |
1307 | | > --> method returns the name of the namespace as a <code>ResizableStringArray</code>:</p> |
1308 | | 1285a1122 |
1309 | | > <pre> $P3 = $P0.'get_name'()</pre> |
1310 | | 1287,1289c1124,1126 |
1311 | | < The C<add_var>X<add_var method> and C<find_var>X<find_var method> |
1312 | | < methods store and retrieve variables in a namespace in a |
1313 | | < language-neutral way: |
1314 | | --- |
1315 | | > <p>The <code>get_parent</code><!-- |
1316 | | > INDEX: get_parent method |
1317 | | > --> method retrieves a namespace object for the parent namespace that contains this one:</p> |
1318 | | 1291,1292c1128 |
1319 | | < $P0.'add_var'("bee", $P3) |
1320 | | < $P1 = $P0.'find_var'("bee") |
1321 | | --- |
1322 | | > <pre> $P5 = $P0.'get_parent'()</pre> |
1323 | | 1293a1130,1132 |
1324 | | > <p>The <code>get_class</code><!-- |
1325 | | > INDEX: get_class method |
1326 | | > --> method retrieves any Class PMC associated with the namespace:</p> |
1327 | | 1295,1296c1134 |
1328 | | < The C<find_namespace>X<find_namespace method> method looks up a |
1329 | | < namespace, just like the C<get_namespace> opcode: |
1330 | | --- |
1331 | | > <pre> $P6 = $P0.'get_class'()</pre> |
1332 | | 1298c1136,1140 |
1333 | | < $P1 = $P0.'find_namespace'("Duck") |
1334 | | --- |
1335 | | > <p>The <code>add_var</code><!-- |
1336 | | > INDEX: add_var method |
1337 | | > --> and <code>find_var</code><!-- |
1338 | | > INDEX: find_var method |
1339 | | > --> methods store and retrieve variables in a namespace in a language-neutral way:</p> |
1340 | | 1299a1142,1143 |
1341 | | > <pre> $P0.'add_var'("bee", $P3) |
1342 | | > $P1 = $P0.'find_var'("bee")</pre> |
1343 | | 1301,1302c1145,1147 |
1344 | | < The C<add_namespace>X<add_namespace method> method adds a new namespace |
1345 | | < as a child of the namespace object: |
1346 | | --- |
1347 | | > <p>The <code>find_namespace</code><!-- |
1348 | | > INDEX: find_namespace method |
1349 | | > --> method looks up a namespace, just like the <code>get_namespace</code> opcode:</p> |
1350 | | 1304c1149 |
1351 | | < $P0.'add_namespace'($P1) |
1352 | | --- |
1353 | | > <pre> $P1 = $P0.'find_namespace'("Duck")</pre> |
1354 | | 1305a1151,1153 |
1355 | | > <p>The <code>add_namespace</code><!-- |
1356 | | > INDEX: add_namespace method |
1357 | | > --> method adds a new namespace as a child of the namespace object:</p> |
1358 | | 1307,1310c1155 |
1359 | | < The C<make_namespace>X<make_namespace method> method looks up a |
1360 | | < namespace as a child of the namespace object and returns it. If the |
1361 | | < requested namespace doesn't exist, C<make_namespace> creates a new one |
1362 | | < and adds it under that name: |
1363 | | --- |
1364 | | > <pre> $P0.'add_namespace'($P1)</pre> |
1365 | | 1312c1157,1159 |
1366 | | < $P1 = $P0.'make_namespace'("Duck") |
1367 | | --- |
1368 | | > <p>The <code>make_namespace</code><!-- |
1369 | | > INDEX: make_namespace method |
1370 | | > --> method looks up a namespace as a child of the namespace object and returns it. If the requested namespace doesn't exist, <code>make_namespace</code> creates a new one and adds it under that name:</p> |
1371 | | 1313a1161 |
1372 | | > <pre> $P1 = $P0.'make_namespace'("Duck")</pre> |
1373 | | 1318,1322c1166,1168 |
1374 | | < X<aliasing> |
1375 | | < Just like regular assignment, the various operations to store a variable in a |
1376 | | < namespace only store a pointer to the PMC. If you modify the local PMC after |
1377 | | < storing in a namespace, those changes will also appear in the stored global. To |
1378 | | < store a true copy of the PMC, C<clone> it before you store it. |
1379 | | --- |
1380 | | > <p><!-- |
1381 | | > INDEX: aliasing |
1382 | | > --> Just like regular assignment, the various operations to store a variable in a namespace only store a pointer to the PMC. If you modify the local PMC after storing in a namespace, those changes will also appear in the stored global. To store a true copy of the PMC, <code>clone</code> it before you store it.</p> |
1383 | | 1324,1325c1170 |
1384 | | < Leaving the global variable as an alias for a local variable has its advantages. |
1385 | | < If you retrieve a stored global into a register and modify it: |
1386 | | --- |
1387 | | > <p>Leaving the global variable as an alias for a local variable has its advantages. If you retrieve a stored global into a register and modify it:</p> |
1388 | | 1329,1330c1174 |
1389 | | < ... you modify the value of the stored global, so you don't need to call |
1390 | | < C<set_global> again. |
1391 | | --- |
1392 | | > <p>... you modify the value of the stored global, so you don't need to call <code>set_global</code> again.</p> |
1393 | | 1334c1178 |
1394 | | < Copyright © 2002-2010, Parrot Foundation. |
1395 | | --- |
1396 | | > Copyright © 2002-2009, Parrot Foundation. |
1397 | | diff -r parrot/docs/html/docs/book/pir/ch05_control_structures.pod.html parrot-trunk/docs/html/docs/book/pir/ch05_control_structures.pod.html |
1398 | | 5c5 |
1399 | | < <title>Parrot - Untitled</title> |
1400 | | --- |
1401 | | > <title>Parrot - Control Structures</title> |
1402 | | 23c23 |
1403 | | < Untitled |
1404 | | --- |
1405 | | > <a href="../../../../html/index.html">Home</a> » Control Structures |
1406 | | 302c302 |
1407 | | < Copyright © 2002-2010, Parrot Foundation. |
1408 | | --- |
1409 | | > Copyright © 2002-2009, Parrot Foundation. |
1410 | | diff -r parrot/docs/html/docs/book/pir/ch06_subroutines.pod.html parrot-trunk/docs/html/docs/book/pir/ch06_subroutines.pod.html |
1411 | | 5c5 |
1412 | | < <title>Parrot - Untitled</title> |
1413 | | --- |
1414 | | > <title>Parrot - Subroutines</title> |
1415 | | 23c23 |
1416 | | < Untitled |
1417 | | --- |
1418 | | > <a href="../../../../html/index.html">Home</a> » Subroutines |
1419 | | 759c759 |
1420 | | < --> Native Call Interface (NCI) is a special version of the Parrot calling conventions for calling functions in shared C libraries with a known signature. This is a simplified version of the first test in <em>t/pmc/nci.t</em>:</p> |
1421 | | --- |
1422 | | > --> Native Call Interface (NCI) is a special version of the Parrot calling conventions for calling functions in shared C libraries with a known signature. This is a simplified version of the first test in <em><a href="../../../t/pmc/nci.t.html">t/pmc/nci.t</a></em>:</p> |
1423 | | 789c789 |
1424 | | < Copyright © 2002-2010, Parrot Foundation. |
1425 | | --- |
1426 | | > Copyright © 2002-2009, Parrot Foundation. |
1427 | | diff -r parrot/docs/html/docs/book/pir/ch07_objects.pod.html parrot-trunk/docs/html/docs/book/pir/ch07_objects.pod.html |
1428 | | 5c5 |
1429 | | < <title>Parrot - Untitled</title> |
1430 | | --- |
1431 | | > <title>Parrot - Classes and Objects</title> |
1432 | | 23c23 |
1433 | | < Untitled |
1434 | | --- |
1435 | | > <a href="../../../../html/index.html">Home</a> » Classes and Objects |
1436 | | 341c341 |
1437 | | < Copyright © 2002-2010, Parrot Foundation. |
1438 | | --- |
1439 | | > Copyright © 2002-2009, Parrot Foundation. |
1440 | | diff -r parrot/docs/html/docs/book/pir/ch08_io.pod.html parrot-trunk/docs/html/docs/book/pir/ch08_io.pod.html |
1441 | | 5c5 |
1442 | | < <title>Parrot - Untitled</title> |
1443 | | --- |
1444 | | > <title>Parrot - I/O</title> |
1445 | | 23c23 |
1446 | | < Untitled |
1447 | | --- |
1448 | | > <a href="../../../../html/index.html">Home</a> » I/O |
1449 | | 368c368 |
1450 | | < Copyright © 2002-2010, Parrot Foundation. |
1451 | | --- |
1452 | | > Copyright © 2002-2009, Parrot Foundation. |
1453 | | diff -r parrot/docs/html/docs/book/pir/ch09_exceptions.pod.html parrot-trunk/docs/html/docs/book/pir/ch09_exceptions.pod.html |
1454 | | 5c5 |
1455 | | < <title>Parrot - Untitled</title> |
1456 | | --- |
1457 | | > <title>Parrot - Exceptions</title> |
1458 | | 23c23 |
1459 | | < Untitled |
1460 | | --- |
1461 | | > <a href="../../../../html/index.html">Home</a> » Exceptions |
1462 | | 277c277 |
1463 | | < Copyright © 2002-2010, Parrot Foundation. |
1464 | | --- |
1465 | | > Copyright © 2002-2009, Parrot Foundation. |
1466 | | diff -r parrot/docs/html/docs/compiler_faq.pod.html parrot-trunk/docs/html/docs/compiler_faq.pod.html |
1467 | | 5c5 |
1468 | | < <title>Parrot - Untitled</title> |
1469 | | --- |
1470 | | > <title>Parrot - Parrot FAQ for compiler writers in PIR</title> |
1471 | | 23c23 |
1472 | | < Untitled |
1473 | | --- |
1474 | | > <a href="../../html/index.html">Home</a> » Parrot FAQ for compiler writers in PIR |
1475 | | 302c302 |
1476 | | < See also <em>t/dynpmc/dynlexpad.t</em>.</p> |
1477 | | --- |
1478 | | > See also <em><a href="../t/dynpmc/dynlexpad.t.html">t/dynpmc/dynlexpad.t</a></em>.</p> |
1479 | | 636c636 |
1480 | | < Copyright © 2002-2010, Parrot Foundation. |
1481 | | --- |
1482 | | > Copyright © 2002-2009, Parrot Foundation. |
1483 | | diff -r parrot/docs/html/docs/configuration.pod.html parrot-trunk/docs/html/docs/configuration.pod.html |
1484 | | 5c5 |
1485 | | < <title>Parrot - Untitled</title> |
1486 | | --- |
1487 | | > <title>Parrot - Parrot Configuration System</title> |
1488 | | 23c23 |
1489 | | < Untitled |
1490 | | --- |
1491 | | > <a href="../../html/index.html">Home</a> » <a href="../../html/tools.html">Tools</a> » Parrot Configuration System |
1492 | | 55c55 |
1493 | | < you would add the code used to determine its size in <em>config/auto/sizes.pm</em>. |
1494 | | --- |
1495 | | > you would add the code used to determine its size in <em><a href="../config/auto/sizes.pm.html">config/auto/sizes.pm</a></em>. |
1496 | | 83c83 |
1497 | | < To enable them run <em>Configure.pl</em> with the <code>--ask</code> option.</p> |
1498 | | --- |
1499 | | > To enable them run <em><a href="../Configure.pl.html">Configure.pl</a></em> with the <code>--ask</code> option.</p> |
1500 | | 118,119c118,119 |
1501 | | < the <em>Configure.pl</em> script. |
1502 | | < The system is invoked by instantiating a <a href='TODO'>Parrot::Configure</a> object, |
1503 | | --- |
1504 | | > the <em><a href="../Configure.pl.html">Configure.pl</a></em> script. |
1505 | | > The system is invoked by instantiating a <a href='..%2Flib%2FParrot%2FConfigure.pm.html'>Parrot::Configure</a> object, |
1506 | | 131c131 |
1507 | | < the step <em>config/init/defaults.pm</em> uses the <code>init::defaults</code> namespace.</p> |
1508 | | --- |
1509 | | > the step <em><a href="../config/init/defaults.pm.html">config/init/defaults.pm</a></em> uses the <code>init::defaults</code> namespace.</p> |
1510 | | 133c133 |
1511 | | < <p>Each step inherits its constructor and some other methods from <em>lib/Parrot/Configure/Step.pm</em>. |
1512 | | --- |
1513 | | > <p>Each step inherits its constructor and some other methods from <em><a href="../lib/Parrot/Configure/Step.pm.html">lib/Parrot/Configure/Step.pm</a></em>. |
1514 | | 167c167 |
1515 | | < <p>The configuration system won't execute your step by default unless it's specifically told to. To do this, edit <em>lib/Parrot/Configure/Step/List.pm</em>. Steps are run in the order in which that are registered with the <a href='TODO'>Parrot::Configure</a> object.</p> |
1516 | | --- |
1517 | | > <p>The configuration system won't execute your step by default unless it's specifically told to. To do this, edit <em><a href="../lib/Parrot/Configure/Step/List.pm.html">lib/Parrot/Configure/Step/List.pm</a></em>. Steps are run in the order in which that are registered with the <a href='..%2Flib%2FParrot%2FConfigure.pm.html'>Parrot::Configure</a> object.</p> |
1518 | | 169c169 |
1519 | | < <p>Various utility functions for configuration steps are provided by the <a href='TODO'>Parrot::Configure::Utils</a> module.</p> |
1520 | | --- |
1521 | | > <p>Various utility functions for configuration steps are provided by the <a href='..%2Flib%2FParrot%2FConfigure%2FUtils.pm.html'>Parrot::Configure::Utils</a> module.</p> |
1522 | | 210c210 |
1523 | | < <p>Command-line arguments are now processed by <code>process_options()</code>, a subroutine exported by <a href='TODO'>Parrot::Configure::Options</a>. If you add a new option, don't forget to add it to this documentation and to appropriate locations. Most options should be added to <code>@shared_valid_options</code> in <em>lib/Parrot/Configure/Options/Conf/Shared.pm</em>.</p> |
1524 | | --- |
1525 | | > <p>Command-line arguments are now processed by <code>process_options()</code>, a subroutine exported by <a href='..%2Flib%2FParrot%2FConfigure%2FOptions.pm.html'>Parrot::Configure::Options</a>. If you add a new option, don't forget to add it to this documentation and to appropriate locations. Most options should be added to <code>@shared_valid_options</code> in <em><a href="../lib/Parrot/Configure/Options/Conf/Shared.pm.html">lib/Parrot/Configure/Options/Conf/Shared.pm</a></em>.</p> |
1526 | | 212c212 |
1527 | | < <p>Arguments passed to <em>Configure.pl</em> are held in a <a href='TODO'>Parrot::Configure::Data</a> object stored inside the <a href='TODO'>Parrot::Configure</a> object. The options data object may be accessed via the <code>Parrot::Configure::options()</code> method.</p> |
1528 | | --- |
1529 | | > <p>Arguments passed to <em><a href="../Configure.pl.html">Configure.pl</a></em> are held in a <a href='..%2Flib%2FParrot%2FConfigure%2FData.pm.html'>Parrot::Configure::Data</a> object stored inside the <a href='..%2Flib%2FParrot%2FConfigure.pm.html'>Parrot::Configure</a> object. The options data object may be accessed via the <code>Parrot::Configure::options()</code> method.</p> |
1530 | | 217c217 |
1531 | | < <p>As an alternative to typing a long string of options on the command-line, Parrot can now be configured from a configuration file. You put the options in a configuration file, then call <em>Configure.pl</em> as follows:</p> |
1532 | | --- |
1533 | | > <p>As an alternative to typing a long string of options on the command-line, Parrot can now be configured from a configuration file. You put the options in a configuration file, then call <em><a href="../Configure.pl.html">Configure.pl</a></em> as follows:</p> |
1534 | | 228c228 |
1535 | | < <p>The second step is <em>config/init/defaults.pm</em>, which sets up some defaults in a <a href='TODO'>Parrot::Configure::Data</a> object contained by the main <a href='TODO'>Parrot::Configure</a> object. It can be accessed via the <code>Parrot::Configure::data()</code> method. You get and set configuration system's data by interacting with this object. Some of its methods are summarized below.</p> |
1536 | | --- |
1537 | | > <p>The second step is <em><a href="../config/init/defaults.pm.html">config/init/defaults.pm</a></em>, which sets up some defaults in a <a href='..%2Flib%2FParrot%2FConfigure%2FData.pm.html'>Parrot::Configure::Data</a> object contained by the main <a href='..%2Flib%2FParrot%2FConfigure.pm.html'>Parrot::Configure</a> object. It can be accessed via the <code>Parrot::Configure::data()</code> method. You get and set configuration system's data by interacting with this object. Some of its methods are summarized below.</p> |
1538 | | 245c245 |
1539 | | < Returns a string that can be <code>eval</code>ed by Perl to create a hash representing the configuration system's data.See the <a href='TODO'>Parrot::Configure::Data</a> documentation for further details.</dl> |
1540 | | --- |
1541 | | > Returns a string that can be <code>eval</code>ed by Perl to create a hash representing the configuration system's data.See the <a href='..%2Flib%2FParrot%2FConfigure%2FData.pm.html'>Parrot::Configure::Data</a> documentation for further details.</dl> |
1542 | | 261c261 |
1543 | | < These settings are deleted before <em>lib/Parrot/Config.pm</em> is written. These entries are only used e.g. for Makefile creation.</dl> |
1544 | | --- |
1545 | | > These settings are deleted before <em><a href="../lib/Parrot/Config.pm.html">lib/Parrot/Config.pm</a></em> is written. These entries are only used e.g. for Makefile creation.</dl> |
1546 | | 266c266 |
1547 | | < <p>Parrot configuration is currently jump-started by extracting considerable information from variables associated with the instance of Perl 5 which the user is using to run <em>Configure.pl</em>. These variables are largely looked up in the <code>%Config</code> found in the Perl 5 <em>Config.pm</em>, but may also be sought in Perl 5 special variables such as <code>$^O</code>. All such lookups should be done in configuration step <code>init::defaults</code> and <b>only</b> in that step. Special accessors are available for working with such variables; see <em>config/init/defaults.pm</em> and <em>lib/Parrot/Configure/Data.pm</em>.</p> |
1548 | | --- |
1549 | | > <p>Parrot configuration is currently jump-started by extracting considerable information from variables associated with the instance of Perl 5 which the user is using to run <em><a href="../Configure.pl.html">Configure.pl</a></em>. These variables are largely looked up in the <code>%Config</code> found in the Perl 5 <em>Config.pm</em>, but may also be sought in Perl 5 special variables such as <code>$^O</code>. All such lookups should be done in configuration step <code>init::defaults</code> and <b>only</b> in that step. Special accessors are available for working with such variables; see <em><a href="../config/init/defaults.pm.html">config/init/defaults.pm</a></em> and <em><a href="../lib/Parrot/Configure/Data.pm.html">lib/Parrot/Configure/Data.pm</a></em>.</p> |
1550 | | 276c276 |
1551 | | < <p><a href='TODO'>Parrot::Configure</a>, <a href='TODO'>Parrot::Configure::Data</a>, <a href='TODO'>Parrot::Configure::Utils</a>, <a href='TODO'>Parrot::Configure::Step</a></p> |
1552 | | --- |
1553 | | > <p><a href='..%2Flib%2FParrot%2FConfigure.pm.html'>Parrot::Configure</a>, <a href='..%2Flib%2FParrot%2FConfigure%2FData.pm.html'>Parrot::Configure::Data</a>, <a href='..%2Flib%2FParrot%2FConfigure%2FUtils.pm.html'>Parrot::Configure::Utils</a>, <a href='..%2Flib%2FParrot%2FConfigure%2FStep.pm.html'>Parrot::Configure::Step</a></p> |
1554 | | 280c280 |
1555 | | < Copyright © 2002-2010, Parrot Foundation. |
1556 | | --- |
1557 | | > Copyright © 2002-2009, Parrot Foundation. |
1558 | | diff -r parrot/docs/html/docs/debugger.pod.html parrot-trunk/docs/html/docs/debugger.pod.html |
1559 | | 5c5 |
1560 | | < <title>Parrot - Untitled</title> |
1561 | | --- |
1562 | | > <title>Parrot - The Parrot Debugger</title> |
1563 | | 23c23 |
1564 | | < Untitled |
1565 | | --- |
1566 | | > <a href="../../html/index.html">Home</a> » <a href="../../html/tools.html">Tools</a> » The Parrot Debugger |
1567 | | 307c307 |
1568 | | < Copyright © 2002-2010, Parrot Foundation. |
1569 | | --- |
1570 | | > Copyright © 2002-2009, Parrot Foundation. |
1571 | | diff -r parrot/docs/html/docs/debug.pod.html parrot-trunk/docs/html/docs/debug.pod.html |
1572 | | 5c5 |
1573 | | < <title>Parrot - Untitled</title> |
1574 | | --- |
1575 | | > <title>Parrot - Debugging Parrot</title> |
1576 | | 23c23 |
1577 | | < Untitled |
1578 | | --- |
1579 | | > <a href="../../html/index.html">Home</a> » <a href="../../html/tools.html">Tools</a> » Debugging Parrot |
1580 | | 76c76 |
1581 | | < <p>See <em>docs/dev/infant.pod</em> for details of one frequent problem: infant mortality. Infant mortality is when you create a Parrot object, but the garbage collector runs before you put it into a Parrot register or in something else that is itself within a Parrot register.</p> |
1582 | | --- |
1583 | | > <p>See <em><a href="dev/infant.pod.html">docs/dev/infant.pod</a></em> for details of one frequent problem: infant mortality. Infant mortality is when you create a Parrot object, but the garbage collector runs before you put it into a Parrot register or in something else that is itself within a Parrot register.</p> |
1584 | | 88c88 |
1585 | | < <p>One possible tool is <code>parrot_debugger</code>, the Parrot Debugger. See <em>docs/debugger.pod</em> for details on it.</p> |
1586 | | --- |
1587 | | > <p>One possible tool is <code>parrot_debugger</code>, the Parrot Debugger. See <em><a href="debugger.pod.html">docs/debugger.pod</a></em> for details on it.</p> |
1588 | | 247c247 |
1589 | | < Copyright © 2002-2010, Parrot Foundation. |
1590 | | --- |
1591 | | > Copyright © 2002-2009, Parrot Foundation. |
1592 | | diff -r parrot/docs/html/docs/dev/byteorder.pod.html parrot-trunk/docs/html/docs/dev/byteorder.pod.html |
1593 | | 5c5 |
1594 | | < <title>Parrot - Untitled</title> |
1595 | | --- |
1596 | | > <title>Parrot - Byteorder Conversion Functions</title> |
1597 | | 23c23 |
1598 | | < Untitled |
1599 | | --- |
1600 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/developer.html">Developer Documentation</a> » Byteorder Conversion Functions |
1601 | | 54c54 |
1602 | | < <p>When reading a pbc stored in a different architecture, the pbc header defines the pbc byteorder for the architecture which stored the pbc, and the <em>src/packfile/pf_items.c</em> functions are used to convert the values to the native endianness, wordsize and ptrsize.</p> |
1603 | | --- |
1604 | | > <p>When reading a pbc stored in a different architecture, the pbc header defines the pbc byteorder for the architecture which stored the pbc, and the <em><a href="../../src/packfile/pf_items.c.html">src/packfile/pf_items.c</a></em> functions are used to convert the values to the native endianness, wordsize and ptrsize.</p> |
1605 | | 129c129 |
1606 | | < <p>The fetch and transformer functions are implemented in <em>src/packfile/pf_items.c</em></p> |
1607 | | --- |
1608 | | > <p>The fetch and transformer functions are implemented in <em><a href="../../src/packfile/pf_items.c.html">src/packfile/pf_items.c</a></em></p> |
1609 | | 133c133 |
1610 | | < Copyright © 2002-2010, Parrot Foundation. |
1611 | | --- |
1612 | | > Copyright © 2002-2009, Parrot Foundation. |
1613 | | diff -r parrot/docs/html/docs/dev/c_functions.pod.html parrot-trunk/docs/html/docs/dev/c_functions.pod.html |
1614 | | 5c5 |
1615 | | < <title>Parrot - Untitled</title> |
1616 | | --- |
1617 | | > <title>Parrot - C function decoration guidelines</title> |
1618 | | 23c23 |
1619 | | < Untitled |
1620 | | --- |
1621 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/developer.html">Developer Documentation</a> » C function decoration guidelines |
1622 | | 214c214 |
1623 | | < Copyright © 2002-2010, Parrot Foundation. |
1624 | | --- |
1625 | | > Copyright © 2002-2009, Parrot Foundation. |
1626 | | diff -r parrot/docs/html/docs/dev/debugging_with_msvc.pod.html parrot-trunk/docs/html/docs/dev/debugging_with_msvc.pod.html |
1627 | | 5c5 |
1628 | | < <title>Parrot - Untitled</title> |
1629 | | --- |
1630 | | > <title>Parrot - Debugging Parrot with Microsoft</title> |
1631 | | 23c23 |
1632 | | < Untitled |
1633 | | --- |
1634 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/developer.html">Developer Documentation</a> » Debugging Parrot with Microsoft |
1635 | | 161c161 |
1636 | | < Copyright © 2002-2010, Parrot Foundation. |
1637 | | --- |
1638 | | > Copyright © 2002-2009, Parrot Foundation. |
1639 | | diff -r parrot/docs/html/docs/dev/events.pod.html parrot-trunk/docs/html/docs/dev/events.pod.html |
1640 | | 5c5 |
1641 | | < <title>Parrot - Untitled</title> |
1642 | | --- |
1643 | | > <title>Parrot - Design Notes for Events</title> |
1644 | | 23c23 |
1645 | | < Untitled |
1646 | | --- |
1647 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/developer.html">Developer Documentation</a> » Design Notes for Events |
1648 | | 152c152 |
1649 | | < Copyright © 2002-2010, Parrot Foundation. |
1650 | | --- |
1651 | | > Copyright © 2002-2009, Parrot Foundation. |
1652 | | diff -r parrot/docs/html/docs/dev/headerizer.pod.html parrot-trunk/docs/html/docs/dev/headerizer.pod.html |
1653 | | 5c5 |
1654 | | < <title>Parrot - Untitled</title> |
1655 | | --- |
1656 | | > <title>Parrot - The Headerizer</title> |
1657 | | 23c23 |
1658 | | < Untitled |
1659 | | --- |
1660 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/developer.html">Developer Documentation</a> » The Headerizer |
1661 | | 39c39 |
1662 | | < <p>The Headerizer (<em>tools/build/headerizer.pl</em>) is a tool that generates chunks of <em>.h</em> header files based on C source code.</p> |
1663 | | --- |
1664 | | > <p>The Headerizer (<em><a href="../../tools/build/headerizer.pl.html">tools/build/headerizer.pl</a></em>) is a tool that generates chunks of <em>.h</em> header files based on C source code.</p> |
1665 | | 66c66 |
1666 | | < Copyright © 2002-2010, Parrot Foundation. |
1667 | | --- |
1668 | | > Copyright © 2002-2009, Parrot Foundation. |
1669 | | diff -r parrot/docs/html/docs/dev/infant.pod.html parrot-trunk/docs/html/docs/dev/infant.pod.html |
1670 | | 5c5 |
1671 | | < <title>Parrot - Untitled</title> |
1672 | | --- |
1673 | | > <title>Parrot - Infant Mortality</title> |
1674 | | 23c23 |
1675 | | < Untitled |
1676 | | --- |
1677 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/developer.html">Developer Documentation</a> » Infant Mortality |
1678 | | 298c298 |
1679 | | < Copyright © 2002-2010, Parrot Foundation. |
1680 | | --- |
1681 | | > Copyright © 2002-2009, Parrot Foundation. |
1682 | | diff -r parrot/docs/html/docs/dev/longopt.pod.html parrot-trunk/docs/html/docs/dev/longopt.pod.html |
1683 | | 5c5 |
1684 | | < <title>Parrot - Untitled</title> |
1685 | | --- |
1686 | | > <title>Parrot - Long option parsing</title> |
1687 | | 23c23 |
1688 | | < Untitled |
1689 | | --- |
1690 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/developer.html">Developer Documentation</a> » Long option parsing |
1691 | | 98c98 |
1692 | | < Copyright © 2002-2010, Parrot Foundation. |
1693 | | --- |
1694 | | > Copyright © 2002-2009, Parrot Foundation. |
1695 | | diff -r parrot/docs/html/docs/dev/optimizer.pod.html parrot-trunk/docs/html/docs/dev/optimizer.pod.html |
1696 | | 5c5 |
1697 | | < <title>Parrot - Untitled</title> |
1698 | | --- |
1699 | | > <title>Parrot - About the IMCC optimizer</title> |
1700 | | 23c23 |
1701 | | < Untitled |
1702 | | --- |
1703 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/developer.html">Developer Documentation</a> » About the IMCC optimizer |
1704 | | 165c165 |
1705 | | < Copyright © 2002-2010, Parrot Foundation. |
1706 | | --- |
1707 | | > Copyright © 2002-2009, Parrot Foundation. |
1708 | | diff -r parrot/docs/html/docs/dev/parrot_api.pod.html parrot-trunk/docs/html/docs/dev/parrot_api.pod.html |
1709 | | 5c5 |
1710 | | < <title>Parrot - Untitled</title> |
1711 | | --- |
1712 | | > <title>Parrot - Notes on the PARROT_EXPORT macro</title> |
1713 | | 23c23 |
1714 | | < Untitled |
1715 | | --- |
1716 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/developer.html">Developer Documentation</a> » Notes on the PARROT_EXPORT macro |
1717 | | 64c64 |
1718 | | < Copyright © 2002-2010, Parrot Foundation. |
1719 | | --- |
1720 | | > Copyright © 2002-2009, Parrot Foundation. |
1721 | | diff -r parrot/docs/html/docs/dev/pccmethods.pod.html parrot-trunk/docs/html/docs/dev/pccmethods.pod.html |
1722 | | 5c5 |
1723 | | < <title>Parrot - Untitled</title> |
1724 | | --- |
1725 | | > <title>Parrot - Parrot Calling Conventions in C</title> |
1726 | | 23c23 |
1727 | | < Untitled |
1728 | | --- |
1729 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/developer.html">Developer Documentation</a> » Parrot Calling Conventions in C |
1730 | | 115c115 |
1731 | | < <p>That is, a register type, followed by a name, optionally followed by one or more flags specified as adverbs. The list of supported adverbs is listed in <em>docs/pdds/pdd03_calling_conventions.pod</em>, the calling conventions design document.</p> |
1732 | | --- |
1733 | | > <p>That is, a register type, followed by a name, optionally followed by one or more flags specified as adverbs. The list of supported adverbs is listed in <em><a href="../pdds/pdd03_calling_conventions.pod.html">docs/pdds/pdd03_calling_conventions.pod</a></em>, the calling conventions design document.</p> |
1734 | | 141c141 |
1735 | | < Copyright © 2002-2010, Parrot Foundation. |
1736 | | --- |
1737 | | > Copyright © 2002-2009, Parrot Foundation. |
1738 | | diff -r parrot/docs/html/docs/dev/pcc_state.pod.html parrot-trunk/docs/html/docs/dev/pcc_state.pod.html |
1739 | | 5c5 |
1740 | | < <title>Parrot - Untitled</title> |
1741 | | --- |
1742 | | > <title>Parrot - parrot calling conventions state table</title> |
1743 | | 23c23 |
1744 | | < Untitled |
1745 | | --- |
1746 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/developer.html">Developer Documentation</a> » parrot calling conventions state table |
1747 | | 134c134 |
1748 | | < Copyright © 2002-2010, Parrot Foundation. |
1749 | | --- |
1750 | | > Copyright © 2002-2009, Parrot Foundation. |
1751 | | diff -r parrot/docs/html/docs/dev/pmc_freeze.pod.html parrot-trunk/docs/html/docs/dev/pmc_freeze.pod.html |
1752 | | 5c5 |
1753 | | < <title>Parrot - Untitled</title> |
1754 | | --- |
1755 | | > <title>Parrot - Freeze/Thaw Design Notes</title> |
1756 | | 23c23 |
1757 | | < Untitled |
1758 | | --- |
1759 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/developer.html">Developer Documentation</a> » Freeze/Thaw Design Notes |
1760 | | 215c215 |
1761 | | < <p><em>src/pmc_freeze.c</em>, <em>pf/pf_items.c</em></p> |
1762 | | --- |
1763 | | > <p><em><a href="../../src/pmc_freeze.c.html">src/pmc_freeze.c</a></em>, <em>pf/pf_items.c</em></p> |
1764 | | 224c224 |
1765 | | < Copyright © 2002-2010, Parrot Foundation. |
1766 | | --- |
1767 | | > Copyright © 2002-2009, Parrot Foundation. |
1768 | | diff -r parrot/docs/html/docs/dev/pmc_obj_design_meeting_notes.pod.html parrot-trunk/docs/html/docs/dev/pmc_obj_design_meeting_notes.pod.html |
1769 | | 5c5 |
1770 | | < <title>Parrot - Untitled</title> |
1771 | | --- |
1772 | | > <title>Parrot - Parrot PMC/Object Design Meeting Notes</title> |
1773 | | 23c23 |
1774 | | < Untitled |
1775 | | --- |
1776 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/developer.html">Developer Documentation</a> » Parrot PMC/Object Design Meeting Notes |
1777 | | 190c190 |
1778 | | < Copyright © 2002-2010, Parrot Foundation. |
1779 | | --- |
1780 | | > Copyright © 2002-2009, Parrot Foundation. |
1781 | | diff -r parrot/docs/html/docs/dev/profiling.pod.html parrot-trunk/docs/html/docs/dev/profiling.pod.html |
1782 | | 5c5 |
1783 | | < <title>Parrot - Untitled</title> |
1784 | | --- |
1785 | | > <title>Parrot - Name</title> |
1786 | | 23c23 |
1787 | | < Untitled |
1788 | | --- |
1789 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/developer.html">Developer Documentation</a> » Name |
1790 | | 91c91 |
1791 | | < Copyright © 2002-2010, Parrot Foundation. |
1792 | | --- |
1793 | | > Copyright © 2002-2009, Parrot Foundation. |
1794 | | diff -r parrot/docs/html/docs/embed.pod.html parrot-trunk/docs/html/docs/embed.pod.html |
1795 | | 5c5 |
1796 | | < <title>Parrot - Untitled</title> |
1797 | | --- |
1798 | | > <title>Parrot - Parrot embedding system</title> |
1799 | | 23c23 |
1800 | | < Untitled |
1801 | | --- |
1802 | | > <a href="../../html/index.html">Home</a> » <a href="../../html/developer.html">Developer Documentation</a> » Parrot embedding system |
1803 | | 2224c2224 |
1804 | | < <p><em>src/main.c</em> and <em>t/src/*.t</em> for Parrot's use of the embedding system.</p> |
1805 | | --- |
1806 | | > <p><em><a href="../src/main.c.html">src/main.c</a></em> and <em>t/src/*.t</em> for Parrot's use of the embedding system.</p> |
1807 | | 2230c2230 |
1808 | | < Copyright © 2002-2010, Parrot Foundation. |
1809 | | --- |
1810 | | > Copyright © 2002-2009, Parrot Foundation. |
1811 | | diff -r parrot/docs/html/docs/gettingstarted.pod.html parrot-trunk/docs/html/docs/gettingstarted.pod.html |
1812 | | 5c5 |
1813 | | < <title>Parrot - Untitled</title> |
1814 | | --- |
1815 | | > <title>Parrot - Parrot Developer FAQ</title> |
1816 | | 23c23 |
1817 | | < Untitled |
1818 | | --- |
1819 | | > <a href="../../html/index.html">Home</a> » Parrot Developer FAQ |
1820 | | 97c97 |
1821 | | < <p>There are a few categories of documentation, each with different intents. It'll probably help to be aware of them before you go digging in. I highly suggest you check out <em>/docs/pdds/pdd07_codingstd.pod</em> for guidelines on how documentation is supposed to be laid out. For now, here's the executive summary:</p> |
1822 | | --- |
1823 | | > <p>There are a few categories of documentation, each with different intents. It'll probably help to be aware of them before you go digging in. I highly suggest you check out <em><a href="pdds/pdd07_codingstd.pod.html">/docs/pdds/pdd07_codingstd.pod</a></em> for guidelines on how documentation is supposed to be laid out. For now, here's the executive summary:</p> |
1824 | | 170c170 |
1825 | | < <p>See <em>docs/submissions.pod</em> for details.</p> |
1826 | | --- |
1827 | | > <p>See <em><a href="submissions.pod.html">docs/submissions.pod</a></em> for details.</p> |
1828 | | 175c175 |
1829 | | < <p>See <em>docs/submissions.pod</em> for details.</p> |
1830 | | --- |
1831 | | > <p>See <em><a href="submissions.pod.html">docs/submissions.pod</a></em> for details.</p> |
1832 | | 184c184 |
1833 | | < Copyright © 2002-2010, Parrot Foundation. |
1834 | | --- |
1835 | | > Copyright © 2002-2009, Parrot Foundation. |
1836 | | diff -r parrot/docs/html/docs/glossary.pod.html parrot-trunk/docs/html/docs/glossary.pod.html |
1837 | | 5c5 |
1838 | | < <title>Parrot - Untitled</title> |
1839 | | --- |
1840 | | > <title>Parrot - Parrot Glossary</title> |
1841 | | 23c23 |
1842 | | < Untitled |
1843 | | --- |
1844 | | > <a href="../../html/index.html">Home</a> » Parrot Glossary |
1845 | | 206c206 |
1846 | | < Copyright © 2002-2010, Parrot Foundation. |
1847 | | --- |
1848 | | > Copyright © 2002-2009, Parrot Foundation. |
1849 | | diff -r parrot/docs/html/docs/intro.pod.html parrot-trunk/docs/html/docs/intro.pod.html |
1850 | | 5c5 |
1851 | | < <title>Parrot - Untitled</title> |
1852 | | --- |
1853 | | > <title>Parrot - The Parrot Primer</title> |
1854 | | 23c23 |
1855 | | < Untitled |
1856 | | --- |
1857 | | > <a href="../../html/index.html">Home</a> » The Parrot Primer |
1858 | | 181c181 |
1859 | | < <p>The first step to building Parrot is to run the <em>Configure.pl</em> program, |
1860 | | --- |
1861 | | > <p>The first step to building Parrot is to run the <em><a href="../Configure.pl.html">Configure.pl</a></em> program, |
1862 | | 399c399 |
1863 | | < Copyright © 2002-2010, Parrot Foundation. |
1864 | | --- |
1865 | | > Copyright © 2002-2009, Parrot Foundation. |
1866 | | diff -r parrot/docs/html/docs/memory_internals.pod.html parrot-trunk/docs/html/docs/memory_internals.pod.html |
1867 | | 5c5 |
1868 | | < <title>Parrot - Untitled</title> |
1869 | | --- |
1870 | | > <title>Parrot - Memory Internals</title> |
1871 | | 23c23 |
1872 | | < Untitled |
1873 | | --- |
1874 | | > <a href="../../html/index.html">Home</a> » <a href="../../html/developer.html">Developer Documentation</a> » Memory Internals |
1875 | | 72c72 |
1876 | | < <p>See <em>docs/pdds/pdd09_gc.pod</em> for details about the garbage collector system.</p> |
1877 | | --- |
1878 | | > <p>See <em><a href="pdds/pdd09_gc.pod.html">docs/pdds/pdd09_gc.pod</a></em> for details about the garbage collector system.</p> |
1879 | | 160c160 |
1880 | | < <p>The <em>Configure.pl</em> option <code>--gc</code> allows one to use either method.</p> |
1881 | | --- |
1882 | | > <p>The <em><a href="../Configure.pl.html">Configure.pl</a></em> option <code>--gc</code> allows one to use either method.</p> |
1883 | | 221c221 |
1884 | | < Copyright © 2002-2010, Parrot Foundation. |
1885 | | --- |
1886 | | > Copyright © 2002-2009, Parrot Foundation. |
1887 | | Only in parrot-trunk/docs/html/docs: ops |
1888 | | diff -r parrot/docs/html/docs/overview.pod.html parrot-trunk/docs/html/docs/overview.pod.html |
1889 | | 5c5 |
1890 | | < <title>Parrot - Untitled</title> |
1891 | | --- |
1892 | | > <title>Parrot - A Parrot Overview</title> |
1893 | | 23c23 |
1894 | | < Untitled |
1895 | | --- |
1896 | | > <a href="../../html/index.html">Home</a> » A Parrot Overview |
1897 | | 159c159 |
1898 | | < <p>One interesting thing about vtables is that you can construct them dynamically. You can find out more about vtables in <em>docs/vtables.pod</em>.</p> |
1899 | | --- |
1900 | | > <p>One interesting thing about vtables is that you can construct them dynamically. You can find out more about vtables in <em><a href="vtables.pod.html">docs/vtables.pod</a></em>.</p> |
1901 | | 181c181 |
1902 | | < <p>The bytecode format is fully documented in <em>docs/parrotbyte.pod</em>.</p> |
1903 | | --- |
1904 | | > <p>The bytecode format is fully documented in <em><a href="parrotbyte.pod.html">docs/parrotbyte.pod</a></em>.</p> |
1905 | | 185c185 |
1906 | | < Copyright © 2002-2010, Parrot Foundation. |
1907 | | --- |
1908 | | > Copyright © 2002-2009, Parrot Foundation. |
1909 | | Only in parrot-trunk/docs/html/docs: packfile-c.pod.html |
1910 | | diff -r parrot/docs/html/docs/parrotbyte.pod.html parrot-trunk/docs/html/docs/parrotbyte.pod.html |
1911 | | 5c5 |
1912 | | < <title>Parrot - Untitled</title> |
1913 | | --- |
1914 | | > <title>Parrot - The Parrot Bytecode (PBC) Format</title> |
1915 | | 23c23 |
1916 | | < Untitled |
1917 | | --- |
1918 | | > <a href="../../html/index.html">Home</a> » <a href="../../html/developer.html">Developer Documentation</a> » The Parrot Bytecode (PBC) Format |
1919 | | 48c48 |
1920 | | < <p>The <b>Wordsize</b> (or <code>opcode_t</code> size) must be 4 (32-bit) or 8 (64 bit). The bytecode loader is responsible for transforming the file into the VM native wordsize on the fly. For performance, a utility <em>pbc_dump</em> is provided to convert PBCs on disk if they cannot be recompiled. See <em>src/pbc_dump.c</em> for more information.</p> |
1921 | | --- |
1922 | | > <p>The <b>Wordsize</b> (or <code>opcode_t</code> size) must be 4 (32-bit) or 8 (64 bit). The bytecode loader is responsible for transforming the file into the VM native wordsize on the fly. For performance, a utility <em>pbc_dump</em> is provided to convert PBCs on disk if they cannot be recompiled. See <em><a href="../src/pbc_dump.c.html">src/pbc_dump.c</a></em> for more information.</p> |
1923 | | 319c319 |
1924 | | < Copyright © 2002-2010, Parrot Foundation. |
1925 | | --- |
1926 | | > Copyright © 2002-2009, Parrot Foundation. |
1927 | | diff -r parrot/docs/html/docs/parrothist.pod.html parrot-trunk/docs/html/docs/parrothist.pod.html |
1928 | | 5c5 |
1929 | | < <title>Parrot - Untitled</title> |
1930 | | --- |
1931 | | > <title>Parrot - Parrot Release History</title> |
1932 | | 23c23 |
1933 | | < Untitled |
1934 | | --- |
1935 | | > <a href="../../html/index.html">Home</a> » Parrot Release History |
1936 | | 158c158 |
1937 | | < Copyright © 2002-2010, Parrot Foundation. |
1938 | | --- |
1939 | | > Copyright © 2002-2009, Parrot Foundation. |
1940 | | diff -r parrot/docs/html/docs/parrot.pod.html parrot-trunk/docs/html/docs/parrot.pod.html |
1941 | | 5c5 |
1942 | | < <title>Parrot - Untitled</title> |
1943 | | --- |
1944 | | > <title>Parrot - Parrot</title> |
1945 | | 23c23 |
1946 | | < Untitled |
1947 | | --- |
1948 | | > <a href="../../html/index.html">Home</a> » Parrot |
1949 | | 128c128 |
1950 | | < The list is archived at: <a href='http://groups.google.com/group/parrot-dev/'><a href="http://groups.google.com/group/parrot-dev/">http://groups.google.com/group/parrot-dev/</a></a> Many people have contributed their time and expertise to the Parrot project; see the <em>CREDITS</em> file for details.</p> |
1951 | | --- |
1952 | | > The list is archived at: <a href='http://groups.google.com/group/parrot-dev/'><a href="http://groups.google.com/group/parrot-dev/">http://groups.google.com/group/parrot-dev/</a></a> Many people have contributed their time and expertise to the Parrot project; see the <em><a href="../CREDITS.html">CREDITS</a></em> file for details.</p> |
1953 | | 147c147 |
1954 | | < Copyright © 2002-2010, Parrot Foundation. |
1955 | | --- |
1956 | | > Copyright © 2002-2009, Parrot Foundation. |
1957 | | Only in parrot-trunk/docs/html/docs: pct |
1958 | | diff -r parrot/docs/html/docs/pdds/draft/pdd01_overview.pod.html parrot-trunk/docs/html/docs/pdds/draft/pdd01_overview.pod.html |
1959 | | 5c5 |
1960 | | < <title>Parrot - Untitled</title> |
1961 | | --- |
1962 | | > <title>Parrot - [DRAFT] PDD 1: Overview</title> |
1963 | | 23c23 |
1964 | | < Untitled |
1965 | | --- |
1966 | | > <a href="../../../../html/index.html">Home</a> » <a href="../../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » [DRAFT] PDD 1: Overview |
1967 | | 306c306 |
1968 | | < Copyright © 2002-2010, Parrot Foundation. |
1969 | | --- |
1970 | | > Copyright © 2002-2009, Parrot Foundation. |
1971 | | diff -r parrot/docs/html/docs/pdds/draft/pdd05_opfunc.pod.html parrot-trunk/docs/html/docs/pdds/draft/pdd05_opfunc.pod.html |
1972 | | 5c5 |
1973 | | < <title>Parrot - Untitled</title> |
1974 | | --- |
1975 | | > <title>Parrot - [DRAFT] PDD 5: Opcodes</title> |
1976 | | 23c23 |
1977 | | < Untitled |
1978 | | --- |
1979 | | > <a href="../../../../html/index.html">Home</a> » <a href="../../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » [DRAFT] PDD 5: Opcodes |
1980 | | 189c189 |
1981 | | < Copyright © 2002-2010, Parrot Foundation. |
1982 | | --- |
1983 | | > Copyright © 2002-2009, Parrot Foundation. |
1984 | | diff -r parrot/docs/html/docs/pdds/draft/pdd06_pasm.pod.html parrot-trunk/docs/html/docs/pdds/draft/pdd06_pasm.pod.html |
1985 | | 5c5 |
1986 | | < <title>Parrot - Untitled</title> |
1987 | | --- |
1988 | | > <title>Parrot - [DRAFT] PDD 6: Parrot Assembly Language (PASM)</title> |
1989 | | 23c23 |
1990 | | < Untitled |
1991 | | --- |
1992 | | > <a href="../../../../html/index.html">Home</a> » <a href="../../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » [DRAFT] PDD 6: Parrot Assembly Language (PASM) |
1993 | | 168c168 |
1994 | | < Copyright © 2002-2010, Parrot Foundation. |
1995 | | --- |
1996 | | > Copyright © 2002-2009, Parrot Foundation. |
1997 | | diff -r parrot/docs/html/docs/pdds/draft/pdd08_keys.pod.html parrot-trunk/docs/html/docs/pdds/draft/pdd08_keys.pod.html |
1998 | | 5c5 |
1999 | | < <title>Parrot - Untitled</title> |
2000 | | --- |
2001 | | > <title>Parrot - [DRAFT] PDD 8: PMC Keys</title> |
2002 | | 23c23 |
2003 | | < Untitled |
2004 | | --- |
2005 | | > <a href="../../../../html/index.html">Home</a> » <a href="../../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » [DRAFT] PDD 8: PMC Keys |
2006 | | 214c214 |
2007 | | < Copyright © 2002-2010, Parrot Foundation. |
2008 | | --- |
2009 | | > Copyright © 2002-2009, Parrot Foundation. |
2010 | | diff -r parrot/docs/html/docs/pdds/draft/pdd10_embedding.pod.html parrot-trunk/docs/html/docs/pdds/draft/pdd10_embedding.pod.html |
2011 | | 5c5 |
2012 | | < <title>Parrot - Untitled</title> |
2013 | | --- |
2014 | | > <title>Parrot - [DRAFT] PDD10: Embedding and Extending</title> |
2015 | | 23c23 |
2016 | | < Untitled |
2017 | | --- |
2018 | | > <a href="../../../../html/index.html">Home</a> » <a href="../../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » [DRAFT] PDD10: Embedding and Extending |
2019 | | 260c260 |
2020 | | < Copyright © 2002-2010, Parrot Foundation. |
2021 | | --- |
2022 | | > Copyright © 2002-2009, Parrot Foundation. |
2023 | | diff -r parrot/docs/html/docs/pdds/draft/pdd11_extending.pod.html parrot-trunk/docs/html/docs/pdds/draft/pdd11_extending.pod.html |
2024 | | 5c5 |
2025 | | < <title>Parrot - Untitled</title> |
2026 | | --- |
2027 | | > <title>Parrot - [DRAFT] PDD 11: Extending</title> |
2028 | | 23c23 |
2029 | | < Untitled |
2030 | | --- |
2031 | | > <a href="../../../../html/index.html">Home</a> » <a href="../../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » [DRAFT] PDD 11: Extending |
2032 | | 40c40 |
2033 | | < <p>$Revision: 48025 $</p> |
2034 | | --- |
2035 | | > <p>$Revision: 47669 $</p> |
2036 | | 326c326 |
2037 | | < <p><em>docs/glossary.pod</em></p> |
2038 | | --- |
2039 | | > <p><em><a href="../../glossary.pod.html">docs/glossary.pod</a></em></p> |
2040 | | 330c330 |
2041 | | < Copyright © 2002-2010, Parrot Foundation. |
2042 | | --- |
2043 | | > Copyright © 2002-2009, Parrot Foundation. |
2044 | | diff -r parrot/docs/html/docs/pdds/draft/pdd14_numbers.pod.html parrot-trunk/docs/html/docs/pdds/draft/pdd14_numbers.pod.html |
2045 | | 5c5 |
2046 | | < <title>Parrot - Untitled</title> |
2047 | | --- |
2048 | | > <title>Parrot - [DRAFT] PDD 14: Numbers</title> |
2049 | | 23c23 |
2050 | | < Untitled |
2051 | | --- |
2052 | | > <a href="../../../../html/index.html">Home</a> » <a href="../../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » [DRAFT] PDD 14: Numbers |
2053 | | 489c489 |
2054 | | < Copyright © 2002-2010, Parrot Foundation. |
2055 | | --- |
2056 | | > Copyright © 2002-2009, Parrot Foundation. |
2057 | | diff -r parrot/docs/html/docs/pdds/draft/pdd16_native_call.pod.html parrot-trunk/docs/html/docs/pdds/draft/pdd16_native_call.pod.html |
2058 | | 5c5 |
2059 | | < <title>Parrot - Untitled</title> |
2060 | | --- |
2061 | | > <title>Parrot - [DRAFT] PDD 16: Native Call Interface (NCI)</title> |
2062 | | 23c23 |
2063 | | < Untitled |
2064 | | --- |
2065 | | > <a href="../../../../html/index.html">Home</a> » <a href="../../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » [DRAFT] PDD 16: Native Call Interface (NCI) |
2066 | | 319c319 |
2067 | | < <p><em>t/pmc/nci.t</em>, <em>src/nci_test.c</em></p> |
2068 | | --- |
2069 | | > <p><em><a href="../../../t/pmc/nci.t.html">t/pmc/nci.t</a></em>, <em><a href="../../../src/nci_test.c.html">src/nci_test.c</a></em></p> |
2070 | | 323c323 |
2071 | | < Copyright © 2002-2010, Parrot Foundation. |
2072 | | --- |
2073 | | > Copyright © 2002-2009, Parrot Foundation. |
2074 | | diff -r parrot/docs/html/docs/pdds/draft/pdd29_compiler_tools.pod.html parrot-trunk/docs/html/docs/pdds/draft/pdd29_compiler_tools.pod.html |
2075 | | 5c5 |
2076 | | < <title>Parrot - Untitled</title> |
2077 | | --- |
2078 | | > <title>Parrot - [DRAFT] PDD 29: Compiler Tools</title> |
2079 | | 23c23 |
2080 | | < Untitled |
2081 | | --- |
2082 | | > <a href="../../../../html/index.html">Home</a> » <a href="../../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » [DRAFT] PDD 29: Compiler Tools |
2083 | | 339c339 |
2084 | | < Copyright © 2002-2010, Parrot Foundation. |
2085 | | --- |
2086 | | > Copyright © 2002-2009, Parrot Foundation. |
2087 | | diff -r parrot/docs/html/docs/pdds/draft/pdd31_hll_interop.pod.html parrot-trunk/docs/html/docs/pdds/draft/pdd31_hll_interop.pod.html |
2088 | | 5c5 |
2089 | | < <title>Parrot - Untitled</title> |
2090 | | --- |
2091 | | > <title>Parrot - [DRAFT] PDD 31: Inter-Language Calling</title> |
2092 | | 23c23 |
2093 | | < Untitled |
2094 | | --- |
2095 | | > <a href="../../../../html/index.html">Home</a> » <a href="../../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » [DRAFT] PDD 31: Inter-Language Calling |
2096 | | 373c373 |
2097 | | < Copyright © 2002-2010, Parrot Foundation. |
2098 | | --- |
2099 | | > Copyright © 2002-2009, Parrot Foundation. |
2100 | | diff -r parrot/docs/html/docs/pdds/draft/pdd31_hll.pod.html parrot-trunk/docs/html/docs/pdds/draft/pdd31_hll.pod.html |
2101 | | 5c5 |
2102 | | < <title>Parrot - Untitled</title> |
2103 | | --- |
2104 | | > <title>Parrot - [DRAFT] PDD 31: HLL Compilers and Libraries</title> |
2105 | | 23c23 |
2106 | | < Untitled |
2107 | | --- |
2108 | | > <a href="../../../../html/index.html">Home</a> » <a href="../../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » [DRAFT] PDD 31: HLL Compilers and Libraries |
2109 | | 192c192 |
2110 | | < Copyright © 2002-2010, Parrot Foundation. |
2111 | | --- |
2112 | | > Copyright © 2002-2009, Parrot Foundation. |
2113 | | diff -r parrot/docs/html/docs/pdds/pdd00_pdd.pod.html parrot-trunk/docs/html/docs/pdds/pdd00_pdd.pod.html |
2114 | | 5c5 |
2115 | | < <title>Parrot - Untitled</title> |
2116 | | --- |
2117 | | > <title>Parrot - PDD 0: Design Document Format</title> |
2118 | | 23c23 |
2119 | | < Untitled |
2120 | | --- |
2121 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 0: Design Document Format |
2122 | | 92c92 |
2123 | | < An example of the currently accepted layout is given in <em>docs/pdds/pdd_template.pod</em>, |
2124 | | --- |
2125 | | > An example of the currently accepted layout is given in <em><a href="pdd_template.pod.html">docs/pdds/pdd_template.pod</a></em>, |
2126 | | 177c177 |
2127 | | < Copyright © 2002-2010, Parrot Foundation. |
2128 | | --- |
2129 | | > Copyright © 2002-2009, Parrot Foundation. |
2130 | | diff -r parrot/docs/html/docs/pdds/pdd03_calling_conventions.pod.html parrot-trunk/docs/html/docs/pdds/pdd03_calling_conventions.pod.html |
2131 | | 5c5 |
2132 | | < <title>Parrot - Untitled</title> |
2133 | | --- |
2134 | | > <title>Parrot - PDD 3: Calling Conventions</title> |
2135 | | 23c23 |
2136 | | < Untitled |
2137 | | --- |
2138 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 3: Calling Conventions |
2139 | | 299c299 |
2140 | | < Copyright © 2002-2010, Parrot Foundation. |
2141 | | --- |
2142 | | > Copyright © 2002-2009, Parrot Foundation. |
2143 | | diff -r parrot/docs/html/docs/pdds/pdd07_codingstd.pod.html parrot-trunk/docs/html/docs/pdds/pdd07_codingstd.pod.html |
2144 | | 5c5 |
2145 | | < <title>Parrot - Untitled</title> |
2146 | | --- |
2147 | | > <title>Parrot - PDD 7: Conventions and Guidelines for Parrot Source Code</title> |
2148 | | 23c23 |
2149 | | < Untitled |
2150 | | --- |
2151 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 7: Conventions and Guidelines for Parrot Source Code |
2152 | | 32c32 |
2153 | | < <p>$Revision: 47658 $</p> |
2154 | | --- |
2155 | | > <p>$Revision: 45652 $</p> |
2156 | | 410c410 |
2157 | | < <p>The <em>t/distro/file_metadata.t</em> test checks that the files needing this property have it set.</p> |
2158 | | --- |
2159 | | > <p>The <em><a href="../../t/distro/file_metadata.t.html">t/distro/file_metadata.t</a></em> test checks that the files needing this property have it set.</p> |
2160 | | 423c423 |
2161 | | < <p>The <em>t/distro/file_metadata.t</em> test checks that the files needing this property have it set.</p> |
2162 | | --- |
2163 | | > <p>The <em><a href="../../t/distro/file_metadata.t.html">t/distro/file_metadata.t</a></em> test checks that the files needing this property have it set.</p> |
2164 | | 428c428 |
2165 | | < <p>The <code>svn:eol-style</code> property makes sure that whenever a file is checked out of subversion it has the correct end-of-line characters appropriate for the given platform. Therefore, most files should have their <code>svn:eol-style</code> property set to <code>native</code>. However, this is not true for all files. Some input files to tests (such as the <code>*.input</code> and <code>*.output</code> files for PIR tests) need to have <code>LF</code> as their <code>svn:eol-style</code> property. The current list of such files is described in <em>t/distro/file_metadata.t</em>.</p> |
2166 | | --- |
2167 | | > <p>The <code>svn:eol-style</code> property makes sure that whenever a file is checked out of subversion it has the correct end-of-line characters appropriate for the given platform. Therefore, most files should have their <code>svn:eol-style</code> property set to <code>native</code>. However, this is not true for all files. Some input files to tests (such as the <code>*.input</code> and <code>*.output</code> files for PIR tests) need to have <code>LF</code> as their <code>svn:eol-style</code> property. The current list of such files is described in <em><a href="../../t/distro/file_metadata.t.html">t/distro/file_metadata.t</a></em>.</p> |
2168 | | 438c438 |
2169 | | < <p>The <em>t/distro/file_metadata.t</em> test checks that the files needing this property have it set.</p> |
2170 | | --- |
2171 | | > <p>The <em><a href="../../t/distro/file_metadata.t.html">t/distro/file_metadata.t</a></em> test checks that the files needing this property have it set.</p> |
2172 | | 567,569c567,569 |
2173 | | < This inline Pod documentation is transformed to HTML with: |
2174 | | < <pre> $ make html</pre> |
2175 | | < |
2176 | | --- |
2177 | | > This inline Pod documentation is parsed to HTML by running: |
2178 | | > <pre> $ perl tools/docs/write_docs.pl --delete</pre> |
2179 | | > or: $ make html |
2180 | | 640c640 |
2181 | | < Copyright © 2002-2010, Parrot Foundation. |
2182 | | --- |
2183 | | > Copyright © 2002-2009, Parrot Foundation. |
2184 | | diff -r parrot/docs/html/docs/pdds/pdd09_gc.pod.html parrot-trunk/docs/html/docs/pdds/pdd09_gc.pod.html |
2185 | | 5c5 |
2186 | | < <title>Parrot - Untitled</title> |
2187 | | --- |
2188 | | > <title>Parrot - PDD 9: Garbage Collection Subsystem</title> |
2189 | | 23c23 |
2190 | | < Untitled |
2191 | | --- |
2192 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 9: Garbage Collection Subsystem |
2193 | | 680c680 |
2194 | | < Copyright © 2002-2010, Parrot Foundation. |
2195 | | --- |
2196 | | > Copyright © 2002-2009, Parrot Foundation. |
2197 | | diff -r parrot/docs/html/docs/pdds/pdd13_bytecode.pod.html parrot-trunk/docs/html/docs/pdds/pdd13_bytecode.pod.html |
2198 | | 5c5 |
2199 | | < <title>Parrot - Untitled</title> |
2200 | | --- |
2201 | | > <title>Parrot - PDD 13: Bytecode</title> |
2202 | | 23c23 |
2203 | | < Untitled |
2204 | | --- |
2205 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 13: Bytecode |
2206 | | 990c990 |
2207 | | < Copyright © 2002-2010, Parrot Foundation. |
2208 | | --- |
2209 | | > Copyright © 2002-2009, Parrot Foundation. |
2210 | | diff -r parrot/docs/html/docs/pdds/pdd15_objects.pod.html parrot-trunk/docs/html/docs/pdds/pdd15_objects.pod.html |
2211 | | 5c5 |
2212 | | < <title>Parrot - Untitled</title> |
2213 | | --- |
2214 | | > <title>Parrot - PDD 15: Objects and Classes</title> |
2215 | | 23c23 |
2216 | | < Untitled |
2217 | | --- |
2218 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 15: Objects and Classes |
2219 | | 1273c1273 |
2220 | | < Copyright © 2002-2010, Parrot Foundation. |
2221 | | --- |
2222 | | > Copyright © 2002-2009, Parrot Foundation. |
2223 | | diff -r parrot/docs/html/docs/pdds/pdd17_pmc.pod.html parrot-trunk/docs/html/docs/pdds/pdd17_pmc.pod.html |
2224 | | 5c5 |
2225 | | < <title>Parrot - Untitled</title> |
2226 | | --- |
2227 | | > <title>Parrot - PDD 17: Polymorphic Containers</title> |
2228 | | 23c23 |
2229 | | < Untitled |
2230 | | --- |
2231 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 17: Polymorphic Containers |
2232 | | 91c91 |
2233 | | < <p><code>_metadata</code> holds internal PMC metadata (properties). See the setprop/getprop ops in <em>docs/ops/pmc.pod</em>.</p> |
2234 | | --- |
2235 | | > <p><code>_metadata</code> holds internal PMC metadata (properties). See the setprop/getprop ops in <em><a href="../ops/pmc.pod.html">docs/ops/pmc.pod</a></em>.</p> |
2236 | | 797c797 |
2237 | | < Divide the value of the <i>self</i> PMC by the value of a PMC, native integer, or native floating-point number and store the remainder in <i>dest</i>. Note that <i>dest</i> may be the same PMC as <i>self</i>; in that case optimizations may be made. The <code>i_</code> variants perform an inplace operation, modifying the value of <i>self</i>.Note that <code>modulus</code> uses Knuth's "corrected mod" algorithm, as implemented in <em>src/utils.c</em>, while <code>cmodulus</code> uses the C-style fmod function. |
2238 | | --- |
2239 | | > Divide the value of the <i>self</i> PMC by the value of a PMC, native integer, or native floating-point number and store the remainder in <i>dest</i>. Note that <i>dest</i> may be the same PMC as <i>self</i>; in that case optimizations may be made. The <code>i_</code> variants perform an inplace operation, modifying the value of <i>self</i>.Note that <code>modulus</code> uses Knuth's "corrected mod" algorithm, as implemented in <em><a href="../../src/utils.c.html">src/utils.c</a></em>, while <code>cmodulus</code> uses the C-style fmod function. |
2240 | | 1228c1228 |
2241 | | < <p><em>docs/pmc2c.pod</em></p> |
2242 | | --- |
2243 | | > <p><em><a href="../pmc2c.pod.html">docs/pmc2c.pod</a></em></p> |
2244 | | 1232c1232 |
2245 | | < Copyright © 2002-2010, Parrot Foundation. |
2246 | | --- |
2247 | | > Copyright © 2002-2009, Parrot Foundation. |
2248 | | diff -r parrot/docs/html/docs/pdds/pdd18_security.pod.html parrot-trunk/docs/html/docs/pdds/pdd18_security.pod.html |
2249 | | 5c5 |
2250 | | < <title>Parrot - Untitled</title> |
2251 | | --- |
2252 | | > <title>Parrot - PDD 18: Security Model</title> |
2253 | | 23c23 |
2254 | | < Untitled |
2255 | | --- |
2256 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 18: Security Model |
2257 | | 234c234 |
2258 | | < Copyright © 2002-2010, Parrot Foundation. |
2259 | | --- |
2260 | | > Copyright © 2002-2009, Parrot Foundation. |
2261 | | diff -r parrot/docs/html/docs/pdds/pdd19_pir.pod.html parrot-trunk/docs/html/docs/pdds/pdd19_pir.pod.html |
2262 | | 5c5 |
2263 | | < <title>Parrot - Untitled</title> |
2264 | | --- |
2265 | | > <title>Parrot - PDD 19: Parrot Intermediate Representation (PIR)</title> |
2266 | | 23c23 |
2267 | | < Untitled |
2268 | | --- |
2269 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 19: Parrot Intermediate Representation (PIR) |
2270 | | 838c838 |
2271 | | < Copyright © 2002-2010, Parrot Foundation. |
2272 | | --- |
2273 | | > Copyright © 2002-2009, Parrot Foundation. |
2274 | | diff -r parrot/docs/html/docs/pdds/pdd20_lexical_vars.pod.html parrot-trunk/docs/html/docs/pdds/pdd20_lexical_vars.pod.html |
2275 | | 5c5 |
2276 | | < <title>Parrot - Untitled</title> |
2277 | | --- |
2278 | | > <title>Parrot - PDD 20: Lexical Variables</title> |
2279 | | 23c23 |
2280 | | < Untitled |
2281 | | --- |
2282 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 20: Lexical Variables |
2283 | | 312c312 |
2284 | | < <p><em>t/op/lexicals.t</em></p> |
2285 | | --- |
2286 | | > <p><em><a href="../../t/op/lexicals.t.html">t/op/lexicals.t</a></em></p> |
2287 | | 316c316 |
2288 | | < Copyright © 2002-2010, Parrot Foundation. |
2289 | | --- |
2290 | | > Copyright © 2002-2009, Parrot Foundation. |
2291 | | diff -r parrot/docs/html/docs/pdds/pdd21_namespaces.pod.html parrot-trunk/docs/html/docs/pdds/pdd21_namespaces.pod.html |
2292 | | 5c5 |
2293 | | < <title>Parrot - Untitled</title> |
2294 | | --- |
2295 | | > <title>Parrot - PDD 21: Namespaces</title> |
2296 | | 23c23 |
2297 | | < Untitled |
2298 | | --- |
2299 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 21: Namespaces |
2300 | | 436c436 |
2301 | | < Copyright © 2002-2010, Parrot Foundation. |
2302 | | --- |
2303 | | > Copyright © 2002-2009, Parrot Foundation. |
2304 | | diff -r parrot/docs/html/docs/pdds/pdd22_io.pod.html parrot-trunk/docs/html/docs/pdds/pdd22_io.pod.html |
2305 | | 5c5 |
2306 | | < <title>Parrot - Untitled</title> |
2307 | | --- |
2308 | | > <title>Parrot - PDD 22: I/O</title> |
2309 | | 23c23 |
2310 | | < Untitled |
2311 | | --- |
2312 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 22: I/O |
2313 | | 755c755 |
2314 | | < <p><em>src/io/core.c</em>, <em>src/ops/io.ops</em>, <em>include/parrot/io.h</em>, <em>runtime/parrot/library/Stream/*</em>, <em>src/io/unix.c</em>, <em>src/io/win32.c</em>, Perl 5's IO::AIO, and POE</p> |
2315 | | --- |
2316 | | > <p><em><a href="../../src/io/core.c.html">src/io/core.c</a></em>, <em><a href="../../src/ops/io.ops.html">src/ops/io.ops</a></em>, <em>include/parrot/io.h</em>, <em>runtime/parrot/library/Stream/*</em>, <em><a href="../../src/io/unix.c.html">src/io/unix.c</a></em>, <em><a href="../../src/io/win32.c.html">src/io/win32.c</a></em>, Perl 5's IO::AIO, and POE</p> |
2317 | | 759c759 |
2318 | | < Copyright © 2002-2010, Parrot Foundation. |
2319 | | --- |
2320 | | > Copyright © 2002-2009, Parrot Foundation. |
2321 | | diff -r parrot/docs/html/docs/pdds/pdd23_exceptions.pod.html parrot-trunk/docs/html/docs/pdds/pdd23_exceptions.pod.html |
2322 | | 5c5 |
2323 | | < <title>Parrot - Untitled</title> |
2324 | | --- |
2325 | | > <title>Parrot - PDD 23: Exceptions</title> |
2326 | | 23c23 |
2327 | | < Untitled |
2328 | | --- |
2329 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 23: Exceptions |
2330 | | 425,428c425,428 |
2331 | | < <p><em>src/ops/core.ops</em>, |
2332 | | < <em>src/exceptions.c</em>, |
2333 | | < <em>src/pmc/exception.pmc</em>, |
2334 | | < <em>src/pmc/exceptionhandler.pmc</em></p> |
2335 | | --- |
2336 | | > <p><em><a href="../../src/ops/core.ops.html">src/ops/core.ops</a></em>, |
2337 | | > <em><a href="../../src/exceptions.c.html">src/exceptions.c</a></em>, |
2338 | | > <em><a href="../../src/pmc/exception.pmc.html">src/pmc/exception.pmc</a></em>, |
2339 | | > <em><a href="../../src/pmc/exceptionhandler.pmc.html">src/pmc/exceptionhandler.pmc</a></em></p> |
2340 | | 432c432 |
2341 | | < Copyright © 2002-2010, Parrot Foundation. |
2342 | | --- |
2343 | | > Copyright © 2002-2009, Parrot Foundation. |
2344 | | diff -r parrot/docs/html/docs/pdds/pdd24_events.pod.html parrot-trunk/docs/html/docs/pdds/pdd24_events.pod.html |
2345 | | 5c5 |
2346 | | < <title>Parrot - Untitled</title> |
2347 | | --- |
2348 | | > <title>Parrot - PDD 24: Events</title> |
2349 | | 23c23 |
2350 | | < Untitled |
2351 | | --- |
2352 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 24: Events |
2353 | | 336c336 |
2354 | | < Copyright © 2002-2010, Parrot Foundation. |
2355 | | --- |
2356 | | > Copyright © 2002-2009, Parrot Foundation. |
2357 | | diff -r parrot/docs/html/docs/pdds/pdd25_concurrency.pod.html parrot-trunk/docs/html/docs/pdds/pdd25_concurrency.pod.html |
2358 | | 5c5 |
2359 | | < <title>Parrot - Untitled</title> |
2360 | | --- |
2361 | | > <title>Parrot - PDD 25: Concurrency</title> |
2362 | | 23c23 |
2363 | | < Untitled |
2364 | | --- |
2365 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 25: Concurrency |
2366 | | 231c231 |
2367 | | < and a set of core routines in <em>src/scheduler.c</em>.</p> |
2368 | | --- |
2369 | | > and a set of core routines in <em><a href="../../src/scheduler.c.html">src/scheduler.c</a></em>.</p> |
2370 | | 437c437 |
2371 | | < Copyright © 2002-2010, Parrot Foundation. |
2372 | | --- |
2373 | | > Copyright © 2002-2009, Parrot Foundation. |
2374 | | diff -r parrot/docs/html/docs/pdds/pdd26_ast.pod.html parrot-trunk/docs/html/docs/pdds/pdd26_ast.pod.html |
2375 | | 5c5 |
2376 | | < <title>Parrot - Untitled</title> |
2377 | | --- |
2378 | | > <title>Parrot - PDD 26: Compiler Tools - Abstract Syntax Tree</title> |
2379 | | 23c23 |
2380 | | < Untitled |
2381 | | --- |
2382 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 26: Compiler Tools - Abstract Syntax Tree |
2383 | | 374c374 |
2384 | | < The table of PIR opcodes that PAST "knows" about is given in <em>compilers/pct/src/PAST/Compiler.pir</em> . |
2385 | | --- |
2386 | | > The table of PIR opcodes that PAST "knows" about is given in <em><a href="../../compilers/pct/src/PAST/Compiler.pir.html">compilers/pct/src/PAST/Compiler.pir</a></em> . |
2387 | | 456c456 |
2388 | | < Copyright © 2002-2010, Parrot Foundation. |
2389 | | --- |
2390 | | > Copyright © 2002-2009, Parrot Foundation. |
2391 | | diff -r parrot/docs/html/docs/pdds/pdd27_multiple_dispatch.pod.html parrot-trunk/docs/html/docs/pdds/pdd27_multiple_dispatch.pod.html |
2392 | | 5c5 |
2393 | | < <title>Parrot - Untitled</title> |
2394 | | --- |
2395 | | > <title>Parrot - PDD 27: Multiple Dispatch</title> |
2396 | | 23c23 |
2397 | | < Untitled |
2398 | | --- |
2399 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 27: Multiple Dispatch |
2400 | | 262c262 |
2401 | | < <p><em>docs/mmd.pod</em>, <em>src/multidispatch.c</em>, <em>src/pmc/multisub.pmc</em></p> |
2402 | | --- |
2403 | | > <p><em>docs/mmd.pod</em>, <em><a href="../../src/multidispatch.c.html">src/multidispatch.c</a></em>, <em><a href="../../src/pmc/multisub.pmc.html">src/pmc/multisub.pmc</a></em></p> |
2404 | | 266c266 |
2405 | | < Copyright © 2002-2010, Parrot Foundation. |
2406 | | --- |
2407 | | > Copyright © 2002-2009, Parrot Foundation. |
2408 | | diff -r parrot/docs/html/docs/pdds/pdd28_strings.pod.html parrot-trunk/docs/html/docs/pdds/pdd28_strings.pod.html |
2409 | | 5c5 |
2410 | | < <title>Parrot - Untitled</title> |
2411 | | --- |
2412 | | > <title>Parrot - PDD 28: Strings</title> |
2413 | | 23c23 |
2414 | | < Untitled |
2415 | | --- |
2416 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 28: Strings |
2417 | | 739c739 |
2418 | | < Copyright © 2002-2010, Parrot Foundation. |
2419 | | --- |
2420 | | > Copyright © 2002-2009, Parrot Foundation. |
2421 | | diff -r parrot/docs/html/docs/pdds/pdd30_install.pod.html parrot-trunk/docs/html/docs/pdds/pdd30_install.pod.html |
2422 | | 5c5 |
2423 | | < <title>Parrot - Untitled</title> |
2424 | | --- |
2425 | | > <title>Parrot - PDD 30: Installation</title> |
2426 | | 23c23 |
2427 | | < Untitled |
2428 | | --- |
2429 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » PDD 30: Installation |
2430 | | 41c41 |
2431 | | < <p>$Revision: 48025 $</p> |
2432 | | --- |
2433 | | > <p>$Revision: 47917 $</p> |
2434 | | 120c120 |
2435 | | < <p>A new language is generated by <em>tools/dev/mk_language_shell.pl</em></p> |
2436 | | --- |
2437 | | > <p>A new language is generated by <em><a href="../../tools/dev/mk_language_shell.pl.html">tools/dev/mk_language_shell.pl</a></em></p> |
2438 | | 122c122 |
2439 | | < <p>The makefiles are generated from a makefile template, which can use conditional platform and config logic. The forward slashes are automatically converted to backslashes for MSWin32 and <code>\n</code> is converted to <code>\r\n</code> for MSWin32 nmake. See <a href='TODO'>Parrot::Configure::Compiler</a>.</p> |
2440 | | --- |
2441 | | > <p>The makefiles are generated from a makefile template, which can use conditional platform and config logic. The forward slashes are automatically converted to backslashes for MSWin32 and <code>\n</code> is converted to <code>\r\n</code> for MSWin32 nmake. See <a href='..%2F..%2Flib%2FParrot%2FConfigure%2FCompiler.pm.html'>Parrot::Configure::Compiler</a>.</p> |
2442 | | 136c136 |
2443 | | < Copyright © 2002-2010, Parrot Foundation. |
2444 | | --- |
2445 | | > Copyright © 2002-2009, Parrot Foundation. |
2446 | | diff -r parrot/docs/html/docs/pdds/pdd_template.pod.html parrot-trunk/docs/html/docs/pdds/pdd_template.pod.html |
2447 | | 5c5 |
2448 | | < <title>Parrot - Untitled</title> |
2449 | | --- |
2450 | | > <title>Parrot - Design Document Template</title> |
2451 | | 23c23 |
2452 | | < Untitled |
2453 | | --- |
2454 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/pdds.html">Parrot Design Documents (PDDs)</a> » Design Document Template |
2455 | | 85c85 |
2456 | | < Copyright © 2002-2010, Parrot Foundation. |
2457 | | --- |
2458 | | > Copyright © 2002-2009, Parrot Foundation. |
2459 | | diff -r parrot/docs/html/docs/pmc/array.pod.html parrot-trunk/docs/html/docs/pmc/array.pod.html |
2460 | | 5c5 |
2461 | | < <title>Parrot - Untitled</title> |
2462 | | --- |
2463 | | > <title>Parrot - Array base class</title> |
2464 | | 23c23 |
2465 | | < Untitled |
2466 | | --- |
2467 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/developer.html">Developer Documentation</a> » Array base class |
2468 | | 135c135 |
2469 | | < Copyright © 2002-2010, Parrot Foundation. |
2470 | | --- |
2471 | | > Copyright © 2002-2009, Parrot Foundation. |
2472 | | Only in parrot-trunk/docs/html/docs/pmc: documentation.pod.html |
2473 | | diff -r parrot/docs/html/docs/pmc/struct.pod.html parrot-trunk/docs/html/docs/pmc/struct.pod.html |
2474 | | 5c5 |
2475 | | < <title>Parrot - Untitled</title> |
2476 | | --- |
2477 | | > <title>Parrot - Accessing C Structs from Parrot</title> |
2478 | | 23c23 |
2479 | | < Untitled |
2480 | | --- |
2481 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/developer.html">Developer Documentation</a> » Accessing C Structs from Parrot |
2482 | | 286c286 |
2483 | | < Copyright © 2002-2010, Parrot Foundation. |
2484 | | --- |
2485 | | > Copyright © 2002-2009, Parrot Foundation. |
2486 | | diff -r parrot/docs/html/docs/pmc/subs.pod.html parrot-trunk/docs/html/docs/pmc/subs.pod.html |
2487 | | 5c5 |
2488 | | < <title>Parrot - Untitled</title> |
2489 | | --- |
2490 | | > <title>Parrot - Parrot Subroutines</title> |
2491 | | 23c23 |
2492 | | < Untitled |
2493 | | --- |
2494 | | > <a href="../../../html/index.html">Home</a> » <a href="../../../html/developer.html">Developer Documentation</a> » Parrot Subroutines |
2495 | | 46c46 |
2496 | | < <p>Parrot comes with different subroutine and related classes which implement CPS (Continuation Passing Style) and PCC (Parrot Calling Conventions) <em>docs/pdds/pdd03_calling_conventions.pod</em>.</p> |
2497 | | --- |
2498 | | > <p>Parrot comes with different subroutine and related classes which implement CPS (Continuation Passing Style) and PCC (Parrot Calling Conventions) <em><a href="../pdds/pdd03_calling_conventions.pod.html">docs/pdds/pdd03_calling_conventions.pod</a></em>.</p> |
2499 | | 328c328 |
2500 | | < <p><em>src/pmc/sub.pmc</em>, <em>src/pmc/closure.pmc</em>, <em>src/pmc/continuation.pmc</em>, <em>src/pmc/coroutine.pmc</em>, <em>src/sub.c</em>, <em>t/pmc/sub.t</em></p> |
2501 | | --- |
2502 | | > <p><em><a href="../../src/pmc/sub.pmc.html">src/pmc/sub.pmc</a></em>, <em>src/pmc/closure.pmc</em>, <em><a href="../../src/pmc/continuation.pmc.html">src/pmc/continuation.pmc</a></em>, <em><a href="../../src/pmc/coroutine.pmc.html">src/pmc/coroutine.pmc</a></em>, <em><a href="../../src/sub.c.html">src/sub.c</a></em>, <em><a href="../../t/pmc/sub.t.html">t/pmc/sub.t</a></em></p> |
2503 | | 333c333 |
2504 | | < <p><em>docs/pdds/pdd03_calling_conventions.pod</em> <em>docs/pdds/pdd19_pir.pod</em></p> |
2505 | | --- |
2506 | | > <p><em><a href="../pdds/pdd03_calling_conventions.pod.html">docs/pdds/pdd03_calling_conventions.pod</a></em> <em><a href="../pdds/pdd19_pir.pod.html">docs/pdds/pdd19_pir.pod</a></em></p> |
2507 | | 342c342 |
2508 | | < Copyright © 2002-2010, Parrot Foundation. |
2509 | | --- |
2510 | | > Copyright © 2002-2009, Parrot Foundation. |
| 2243 | < Copyright © 2002-2009, Parrot Foundation. |
| 2244 | --- |
| 2245 | > Copyright © 2002-2010, Parrot Foundation. |