Ticket #958: doc-fixes.patch

File doc-fixes.patch, 5.2 KB (added by jrtayloriv, 12 years ago)
  • src/gc/api.c

     
    16921692 
    16931693=head1 SEE ALSO 
    16941694 
    1695 F<include/parrot/gc_api.h>, F<src/cpu_dep.c> and F<docs/pdds/pdd09_gc.pod>. 
     1695F<include/parrot/gc_api.h>, F<src/gc/system.c> and F<docs/pdds/pdd09_gc.pod>. 
    16961696 
    16971697=head1 HISTORY 
    16981698 
  • src/runcore/cores.c

     
    382382        PARROT_ASSERT(debugger); 
    383383 
    384384        /* set the top of the stack so GC can trace it for GC-able pointers 
    385          * see trace_system_areas() in src/cpu_dep.c */ 
     385         * see trace_system_areas() in src/gc/system.c */ 
    386386        debugger->lo_var_ptr = interp->lo_var_ptr; 
    387387 
    388388        pio = Parrot_io_STDERR(debugger); 
  • docs/memory_internals.pod

     
    117117=head2 General structure of a buffer-like item 
    118118 
    119119    struct parrot_object_t { 
    120         UnionVal cache; 
    121120        unsigned flags; 
    122121        ... 
    123122    } PObj; 
    124123 
    125 This does not totally reflect the current implementation, but is the spirit of 
    126 the abstraction of current objects. The C<UnionVal cache> field is a C<union> 
    127 that contains a variety of pointer and data configurations. The flags field 
    128 may contain a series of flags which indicate the type, status, configuration, 
    129 and special requirements of each item. Buffers, C<PMC>s, and C<PObj>s all 
    130 have these basic fields in common, although they also contain a variety of 
    131 other data fields, depending on type. 
     124The flags field may contain a series of flags which indicate the type, status,  
     125configuration, and special requirements of each item. C<Buffer>s, C<PMC>s, and  
     126C<PObj>s all have this basic field in common. 
    132127 
     128C<PMC>s and C<Buffer>s each have an additional field which contain a pointer  
     129to a block of data. 
     130 
    133131=head2 GC-related PObj flags 
    134132 
    135133Only three flags need to be checked during a mark run: C<PObj_live_FLAG>, 
  • docs/pdds/pdd28_strings.pod

     
    257257 
    258258Parrot's internal strings (C<STRING>s) have the following structure: 
    259259 
    260   struct parrot_string_t { 
    261       UnionVal                      cache; 
    262       Parrot_UInt                   flags; 
    263       UINTVAL                       bufused; 
    264       UINTVAL                       strlen; 
    265       UINTVAL                       hashval; 
    266       const struct _encoding       *encoding; 
    267       const struct _charset        *charset; 
    268       const struct _normalization  *normalization; 
    269   }; 
     260    struct parrot_string_t { 
     261        Parrot_UInt flags; 
     262        void *     _bufstart; 
     263        size_t     _buflen; 
     264        char       *strstart; 
     265        UINTVAL     bufused; 
     266        UINTVAL     strlen; 
     267        UINTVAL     hashval; 
     268        const struct _encoding *encoding; 
     269        const struct _charset  *charset; 
     270}; 
    270271 
    271272The fields are: 
    272273 
    273274=over 4 
    274275 
    275 =item cache 
     276=item _bufstart 
    276277 
    277 A structure that holds the buffer for the string data and the size of the 
    278 buffer in bytes. 
     278A pointer to  the buffer for the string data. 
    279279 
    280 {{ NOTE: this is currently called "cache" for compatibility with PMC 
    281 structures.  As we eliminate the cache from PMCs, we will flatten out this 
    282 union value in the string structure to two members: a string buffer and the 
    283 size of the buffer used. }} 
     280=item _buflen  
    284281 
     282The size of the buffer in bytes. 
     283 
    285284=item flags 
    286285 
    287286Binary flags used for garbage collection, copy-on-write tracking, and other 
     
    320319The charset structure specifies the character set (by index number and by 
    321320name) and provides functions for transcoding to and from that character set. 
    322321 
    323 =item normalization 
    324  
    325 What normalization form the string data is in, one of the four Unicode 
    326 normalization forms or NFG. This structure stores the current normalization 
    327 form, function pointers for composition and decomposition for the current 
    328 normalization form, and a pointer to the grapheme table for NFG. 
    329  
    330322=back 
    331323 
    332324{{DEPRECATION NOTE: the enum C<parrot_string_representation_t> will be removed 
  • include/parrot/pobj.h

     
    3838                    v                 v 
    3939 
    4040The actual set-up is more involved because of padding.  obj->bufstart must 
    41 be suitably aligned for any UnionVal.  (Perhaps it should be a Buffer 
    42 there instead.)  The start of the memory region (as returned by malloc() 
    43 is also suitably aligned for any use.  If, for example, malloc() returns 
     41be suitably aligned. The start of the memory region (as returned by malloc()) 
     42is suitably aligned for any use.  If, for example, malloc() returns 
    4443objects aligned on 8-byte boundaries, and obj->bufstart is also aligned 
    4544on 8-byte boundaries, then there should be 4 bytes of padding.  It is 
    4645handled differently in the two files alloc_resources.c and res_lea.c.