Ticket #72: book.patch

File book.patch, 5.2 KB (added by jimmy, 6 years ago)
  • docs/book/ch02_getting_started.pod

    226226and why. 
    228228It's important that you create your patches from a checked-out subversion 
    229 repository, not from a tarball or or snapshot. This way, you can ensure 
     229repository, not from a tarball or a snapshot. This way, you can ensure 
    230230that your diff is made against the latest version of the files. If you patch 
    231231an old version, the problem may have already been resolved! Make sure 
    232232the paths listed in the patch match those in the repository. There are two 
  • docs/book/ch03_pir_basics.pod

    2525X<PIR (Parrot intermediate representation);documentation> 
    2626PIR is well documented, both in traditional documentation and in 
    2727instructional code examples. The documentation for the PIR compiler IMCC 
    28 in F<imcc/docs/> or the project documentation in F<docs/> are good 
     28in F<docs/imcc/> or the project documentation in F<docs/> are good 
    2929sources for information about the current syntax, semantics, and 
    3030implementation. The other PIR compiler, PIRC, has it's own documentation 
    3131that is slowly maturing. This is a useful source of information too. The 
    32 test suite in F<imcc/t> shows examples of proper working code. In fact, 
     32test suite in F<t/compilers/imcc/> shows examples of proper working code. In fact, 
    3333the test suite is the definitive PIR resource, because it shows how PIR 
    3434I<actually works>, even when the documentation may be out of date. 
    100100Parrot registers are allocated in a linear array, and register numbers 
    101101are indices into this array. Having more registers means Parrot must 
    102 allocate more storage space for them, which can decrease memory efficency 
     102allocate more storage space for them, which can decrease memory efficiency 
    103103and register allocation/fetch performance. In general, it's better to 
    104104keep the number of registers small. However, the number of the register 
    105105does not necessarily correspond to the actual storage location where the 
    373373provide these structures would work well for some languages but would 
    374374require all sorts of messy translation in others. The only way to make 
    375375sure all languages and their control structures can be equally 
    376 accomodated is to simply give them the most simple and fundamental 
     376accommodated is to simply give them the most simple and fundamental 
    377377building blocks to work with. Language agnosticism is an important 
    378378design goal in Parrot, and creates a very flexible and powerful 
    379379development environment for our language developers. 
  • docs/book/ch04_pir_subroutines.pod

    1818in that all code in PIR must exist in a subroutine. Execution starts, 
    1919as we have seen, in the C<:main> subroutine, and others can be called 
    2020to perform the tasks of a program. From subroutines we can construct 
    21 more elaborate chunks of code reusability: methods and objects. In 
     21more elaborate chunks of code reusability methods and objects. In 
    2222this chapter we will talk about how subroutines work in PIR, and how 
    2323they can be used by developers to create programs for Parrot. 
    564564    .local pmc obj 
    565565    newclass class, "Foo"       # create a new Foo class 
    566566    new obj, "Foo"              # instantiate a Foo object 
    567     obj."meth"()                # call obj."_meth" which is actually 
    568     print "done\n"              # "_meth" in the "Foo" namespace 
     567    obj."meth"()                # call obj."meth" which is actually 
     568    print "done\n"              # in the "Foo" namespace 
    569569    end 
    570570  .end 
    572572  .namespace [ "Foo" ]          # start namespace "Foo" 
    574   .sub meth :method             # define Foo::_meth global 
     574  .sub meth :method             # define Foo::meth global 
    575575     print "in meth\n" 
    576576     $S0 = "other_meth"         # method names can be in a register too 
    577577     self.$S0()                 # self is the invocant 
  • docs/book/ch11_pmcs.pod

    107107code to access the PMC using integer indices. C<provides hash> means 
    108108that we can use string and PMC keys to access values in the PMC. These 
    109109C<provides> each correspond to a series of VTABLE interfaces that the 
    110 PMC must provide, or must inherit. Without the necessary VABLE 
     110PMC must provide, or must inherit. Without the necessary VTABLE 
    111111interfaces available, Parrot may try to perform illegal operations and 
    112112things will go badly. We'll talk about all the available C<provides> 
    113113interfaces and the VTABLE interfaces that they must define. 
    314314# Local variables: 
    315315#   c-file-style: "parrot" 
    316316# End: 
    317 # vim: expandtab shiftwidth=4: 
    318  No newline at end of file 
     317# vim: expandtab shiftwidth=4: