cvsuser     03/07/07 14:56:22

  Modified:    languages/imcc/docs calling_conventions.pod imcc.pod
                        macros.pod operation.pod parsing.pod running.pod
                        syntax.pod
  Log:
  Typos and formatting
  
  Revision  Changes    Path
  1.5       +9 -9      parrot/languages/imcc/docs/calling_conventions.pod
  
  Index: calling_conventions.pod
  ===================================================================
  RCS file: /cvs/public/parrot/languages/imcc/docs/calling_conventions.pod,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -w -r1.4 -r1.5
  --- calling_conventions.pod   24 Jun 2003 13:59:01 -0000      1.4
  +++ calling_conventions.pod   7 Jul 2003 21:56:21 -0000       1.5
  @@ -20,7 +20,7 @@
   
   =head1 DESCRIPTION
   
  -A imcc does register allocation, it has to track the life span of
  +As imcc does register allocation, it has to track the life span of
   variables. This includes the (possible) data flow in and out of
   subroutines.
   
  @@ -56,20 +56,20 @@
   
   Pushing arguments in reversed order on the user stack makes the left
   most argument the top of stack entry. This allows for a variable
  -amount of function arguments (and return values), where the left most
  -argument before a variable amount of following arguments is the
  +number of function arguments (and return values), where the left most
  +argument before a variable number of following arguments is the
   argument count.
   
   =head2 Status
   
   Implemented. When the subroutine is in the same compilation unit, the
  -callee can B<saveall> registers, when the subroutine is in a different
  +callee can B<saveall> registers; when the subroutine is in a different
   compilation unit, the callee must preserve all used registers.
   
   =head1 Invoking subroutines
   
  -IMCC tries to keep track of the address, where the B<invoke> will branch
  -to, but can only succeed to do so, when the B<set_addr> and the
  +IMCC tries to keep track of the address where the B<invoke> will branch
  +to, but can only succeed to do so when the B<set_addr> and the
   B<invoke> opcodes are located together.
   
     $P10 = new Sub
  @@ -88,8 +88,8 @@
       $P10 = $I1
       ret
   
  -The latter example will very likely lead to a wrong CFG and thus to
  -wrong register allocation.
  +The latter example will very likely lead to an incorrect CFG and thus to
  +incorrect register allocation.
   
   =head2 Status
   
  @@ -141,7 +141,7 @@
     .result r
     .nci_end
   
  -This prepares parameters like described in
  +This prepares parameters as described in
   F<pdd03_calling_conventions.pod>, saves the registers and invokes the
   function.  The B<.arg> pseudo ops put the given argument into
   increasing registers of the appropriate type.
  
  
  
  1.2       +4 -4      parrot/languages/imcc/docs/imcc.pod
  
  Index: imcc.pod
  ===================================================================
  RCS file: /cvs/public/parrot/languages/imcc/docs/imcc.pod,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -w -r1.1 -r1.2
  --- imcc.pod  10 Dec 2002 08:55:11 -0000      1.1
  +++ imcc.pod  7 Jul 2003 21:56:21 -0000       1.2
  @@ -1,12 +1,12 @@
   =head1 NAME
   
  -IMCC - docunentation
  +IMCC - documentation
   
   =head1 VERSION
   
   =over 4
   
  -=item 0.1 intital
  +=item 0.1 initial
   
   =back
   
  @@ -21,7 +21,7 @@
   
   =head2 running.pod
   
  -Imccs command line options.
  +Imcc's command line options.
   
   =head2 parsing.pod
   
  @@ -37,7 +37,7 @@
   
   =head2 README
   
  -Summary of imcc featurs and syntax.
  +Summary of imcc features and syntax.
   
   =head2 *.[chly]
   
  
  
  
  1.4       +1 -1      parrot/languages/imcc/docs/macros.pod
  
  Index: macros.pod
  ===================================================================
  RCS file: /cvs/public/parrot/languages/imcc/docs/macros.pod,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -w -r1.3 -r1.4
  --- macros.pod        3 Jul 2003 11:15:01 -0000       1.3
  +++ macros.pod        7 Jul 2003 21:56:21 -0000       1.4
  @@ -26,7 +26,7 @@
   name for the newly created macro and an optional list of parameters.
   Thereafter follows the definition of the macro which can span several
   lines. The definition is ended by ".endm". In the macro definition the
  -formal parameters, preceeded by a '.', are valid macros.
  +formal parameters, preceded by a '.', are valid macros.
   
     .macro swap (A,B,TEMP) # . marks the directive
       set .TEMP,.A         # . marks the special variable.
  
  
  
  1.4       +24 -19    parrot/languages/imcc/docs/operation.pod
  
  Index: operation.pod
  ===================================================================
  RCS file: /cvs/public/parrot/languages/imcc/docs/operation.pod,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -w -r1.3 -r1.4
  --- operation.pod     5 Mar 2003 16:08:52 -0000       1.3
  +++ operation.pod     7 Jul 2003 21:56:21 -0000       1.4
  @@ -6,7 +6,7 @@
   
   =over 4
   
  -=item 0.1 intital
  +=item 0.1 initial
   
   =item 0.2 uninitialized warning; optimizations
   
  @@ -20,6 +20,8 @@
   
   The main features of imcc are:
   
  +=over 4
  +
   =item Source file parsing
   
   =item Register allocation
  @@ -30,9 +32,11 @@
   
   =item Running the code
   
  +=back
  +
   =head1 Source file parsing
   
  -S. F<parsing.pod>, F<macros.pod> and F<syntax.pod> for more.
  +See F<parsing.pod>, F<macros.pod> and F<syntax.pod> for more.
   
   =head1 Register allocation
   
  @@ -70,15 +74,15 @@
   Currently, imcc assumes, that a subroutine saves all registers on entry,
   as P6C does per B<saveall>, and thus a B<bsr> doesn't count as a branch.
   
  -But there is one exception to this rule: When the target of the
  -subroutine is known (the label is in the same compilation unit, and when
  +But there is one exception to this rule: when the target of the
  +subroutine is known (the label is in the same compilation unit), and when
   no B<saveall> instruction is found in the first 5 instructions after the
   label, then the control flow from the B<bsr> call to the label and from
   the B<ret> to the next basic block is calculated.
   
   =head2 Call graph
   
  -All connection between the B<basic block>s are calculated. This allows
  +All connections between the B<basic block>s are calculated. This allows
   for:
   
   =head2 Loop detection
  @@ -88,7 +92,7 @@
   =head2 Life analysis
   
   Whenever an operand is marked as an B<OUT> argument, this
  -operand starts with a new value. This means, that at this point the
  +operand starts with a new value. This means that at this point the
   life range of the symbol ends and a new life range is started, which
   allows the allocation of a different register to the same variable or
   the same register to a different variable.
  @@ -136,13 +140,13 @@
   
   =head2 Interference graph
   
  -With above information calculated, the next step is to look, which
  -variable does interfer with which other. Non interfering variables can
  +Once the above information is calculated, the next step is to look at
  +which variables interfere with which other. Non-interfering variables can
   be given the same parrot register.
   
   =head2 Register allocation
   
  -F<imcc> then starts allocating registers according to a variables
  +F<imcc> then starts allocating registers according to a variable's
   score. Variables deeply nested inside loops have the highest score and
   get a parrot register first. Variables with a long life range (i.e.
   with many interferences) get allocated last.
  @@ -162,7 +166,7 @@
     ...
     print $I33
   
  -The usage of all these variables makes it necessary, to spill.
  +The usage of all these variables makes it necessary to spill.
   
     new P31, .PerlArray
     ...
  @@ -174,28 +178,28 @@
     set I0, P31[0]     # fetch $I1
     print I0
   
  -When $I1 or $I2 are accessed then, code is generated to fetch the
  +When $I1 or $I2 are accessed, then code is generated to fetch the
   value from the spill array. The life range of such a spilled variable
   is then only one fetch and/or store operation and the actual usage.
   Therefore the variable has minimal interferences with other variables.
   
   =head1 Optimization
   
  -Optimizations are only done, when enabled with the B<-O> switch. Please
  +Optimizations are only done when enabled with the B<-O> switch. Please
   consult F<t/imcpasm/*.t> for examples. They occur between various
  -stages and may be repeatedly done: E.g. after converting a conditional
  +stages and may be repeatedly done: e.g. after converting a conditional
   branch to an absolute one, unreachable code will be removed then,
   which might cause unused labels ...
   
   =head1 Optimizations with -O1
   
  -=head2 Constants substitution
  +=head2 Constant substitution
   
   Constant arguments to many ops are evaluated. Conditional branches
   with constant conditions are converted to unconditional branches.
   Integer arguments to float operations are converted to float operands.
   
  -=head2 If branch optimization
  +=head2 If-branch optimization
   
   A sequence of code:
   
  @@ -225,7 +229,7 @@
   =head2 Dead code removal
   
   Code not reachable after an unconditional branch instruction and basic
  -blocks, that are not entered from somewhere get removed.
  +blocks that are not entered from somewhere get removed.
   
   =head1 Optimizations with -O2
   
  @@ -239,12 +243,12 @@
      $I0 = 10
      $I1 = 20
   
  -where B<$I0> is not used beyond, the first assignment will be tossed,
  +where B<$I0> is not used again, the first assignment will be tossed,
   resulting in code like:
   
      set I0, 20
   
  -=head2 Loop optimization.
  +=head2 Loop optimization
   
   Instructions which are invariant to a loop are pulled out of the loop
   and inserted in front of the loop entry.
  @@ -252,7 +256,8 @@
   =head1 Code generation
   
   Imcc either generates PASM output ready to get assembled by
  -F<assemble.pl> or directly a PBC file, for running with parrot.
  +F<assemble.pl> or else directly generates a PBC file for running with 
  +parrot.
   
   =head1 Running code
   
  
  
  
  1.5       +10 -10    parrot/languages/imcc/docs/parsing.pod
  
  Index: parsing.pod
  ===================================================================
  RCS file: /cvs/public/parrot/languages/imcc/docs/parsing.pod,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -w -r1.4 -r1.5
  --- parsing.pod       29 Jun 2003 15:13:42 -0000      1.4
  +++ parsing.pod       7 Jul 2003 21:56:21 -0000       1.5
  @@ -6,7 +6,7 @@
   
   =over 4
   
  -=item 0.1 intital
  +=item 0.1 initial
   
   =item 0.2 lexicals
   
  @@ -19,7 +19,7 @@
   =head1 DESCRIPTION
   
   Imcc parses and generates code in terms of I<compilation units>. These
  -are self contained blocks of code very similar to subroutines.
  +are self-contained blocks of code very similar to subroutines.
   
   Code for a compilation unit is created as soon (or not earlier) as the
   end of the unit is reached.
  @@ -122,7 +122,7 @@
        _inner:
            stmt2
            ret
  -     _ounter:
  +     _outer:
            stmt1
            bsr _inner
            ret
  @@ -135,12 +135,12 @@
   
   Lexicals and named constants declared in an outer scope are visible and used,
   when not overridden by a C<.local> or C<.const> directive with the same name.
  -S. F<t/syn/scope.t> for examples for this.
  +See F<t/syn/scope.t> for examples for this.
   
  -Please note that variables declard with C<.local> in an outer scope only
  -make the symbol available in inner scopes. It does not mean, that imcc
  -keeps track of the usage of such variables, when they are used in
  -different compilations units. Such variables have to be passed to other
  +Please note that variables declared with C<.local> in an outer scope only
  +make the symbol available in inner scopes. It does not mean that imcc
  +keeps track of the usage of such variables when they are used in
  +different compilation units. Such variables have to be passed to other
   subs like other subroutine arguments - they are not intended to replace
   global variables.
   
  @@ -163,7 +163,7 @@
   will print 2 (both C<a> and C<I0> are getting the same register).
   
   The current behavior will be replaced by a consistent one in the future
  -or tossed alltogether.
  +or tossed altogether.
   
   
   Global labels and constants are kept in the global symbol table
  @@ -174,7 +174,7 @@
   Local labels in different I<compilation units> with the same name are
   allowed, though running the generated PASM through F<assemble.pl>
   doesn't work. Running this code inside imcc is ok.
  -This will probably change so that local labels are mangled to be uniq.
  +This will probably change so that local labels are mangled to be unique.
   
   =head1 FILES
   
  
  
  
  1.9       +21 -15    parrot/languages/imcc/docs/running.pod
  
  Index: running.pod
  ===================================================================
  RCS file: /cvs/public/parrot/languages/imcc/docs/running.pod,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -w -r1.8 -r1.9
  --- running.pod       18 Mar 2003 09:28:14 -0000      1.8
  +++ running.pod       7 Jul 2003 21:56:21 -0000       1.9
  @@ -26,6 +26,8 @@
   
   =head2 Imcc options
   
  +=over 4
  +
   =item -a, --pasm
   
   Assume PASM input on stdin.
  @@ -36,7 +38,7 @@
   
   =item -d, --debug [hexbits]
   
  -Tbe B<-d> switch takes an optional argument, which is considered to hold
  +The B<-d> switch takes an optional argument which is considered to hold
   a hex value of debug bits. Without a value, debug is set to 1.
   
   The individual bits are:
  @@ -56,22 +58,22 @@
   Note: if the argument is separated by whitespace from the B<-d> switch,
   it has to start with a number.
   
  -=item -h --help
  +=item -h, --help
   
   =item -o outputfile
   
  -Act like assembler. Don't run code, except B<-r> is given too. If the
  -outputfile ends with B<.pbc> a PBC file is written. If it ends with
  -B<.pasm> a PASM output is generated, even from PASM input. This canbe
  -handy to check various optimizations including B<-Op>.
  +Act like assembler. Don't run code, unless B<-r> is given too. If the
  +outputfile ends with B<.pbc>, a PBC file is written. If it ends with
  +B<.pasm>, a PASM output is generated, even from PASM input. This can be
  +handy to check various optimizations, including B<-Op>.
   
   =item -r, --run-pbc
   
   =item -v, --verbose
   
  -One B<-v> shows, which files are worked on and prints a summary
  -over register usage and optimization stats perl I<compilation unit>.
  -With two B<-v> switches IMCC prints a line per individual processing
  +One B<-v> shows which files are worked on and prints a summary
  +over register usage and optimization stats per I<compilation unit>.
  +With two B<-v> switches, IMCC prints a line per individual processing
   step too.
   
   =item -y, --yydebug
  @@ -84,23 +86,27 @@
   
   Optimize
   
  - -O0 no opimization (default)
  + -O0 no optimization (default)
    -O1 optimizations w/o life info (e.g. branches)
    -O2 optimizations with life info
    -Op rewrite I and N PASM registers most used first
   
   This will probably change.
   
  +=back
  +
   =head2 Parrot Options
   
  -s. parrot B<-h> for description, used, when running a program inside
  +See parrot B<-h> for description. Used when running a program inside
   imcc.
   
   =head1 <file>
   
   If the file ends in B<.pbc> it will be interpreted immediately.
  -If the file ends in B<.pasm> it is parsed as PASM code else as PIR
  -code then it get's run, except B<-o> was given.
  +
  +If the file ends in B<.pasm>, then it is parsed as PASM code. Otherwise,
  +it is parsed as PIR code. In both cases, it will then be run, unless the
  +B<-o> flag was given.
   If the B<file> is a single dash, input from B<stdin> is read.
   
   =head2 Generated files
  @@ -134,7 +140,7 @@
   
   =head1 BUGS
   
  -The long imcc options are unimplemented.
  +None currently known.
   
   =head1 FILES
   
  
  
  
  1.4       +11 -9     parrot/languages/imcc/docs/syntax.pod
  
  Index: syntax.pod
  ===================================================================
  RCS file: /cvs/public/parrot/languages/imcc/docs/syntax.pod,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -w -r1.3 -r1.4
  --- syntax.pod        6 Jul 2003 09:24:02 -0000       1.3
  +++ syntax.pod        7 Jul 2003 21:56:21 -0000       1.4
  @@ -6,7 +6,7 @@
   
   =over 4
   
  -=item 0.1 intital
  +=item 0.1 initial
   
   =back
   
  @@ -54,9 +54,9 @@
   =item <reg>
   
   A PASM register I0..I31, S0..S31, N0..N31, P0..P31, or a IMCC temporary
  -register $In, $Sn, $Nn, $Pn, where B<n> consits of digit(s) only.
  +register $In, $Sn, $Nn, $Pn, where B<n> consists of digit(s) only.
   The parrot register B<P31> is reserved for spilling and should not be
  -used in complex code sections, which might need spilling (s.
  +used in complex code sections, which might need spilling (see
   F<operation.pod>).
   
   =item <var>
  @@ -82,11 +82,13 @@
   
   B<0x> and B<0b> denote hex and binary constants.
   
  +=back
  +
   =head2 Directive instructions
   
   =over 4
   
  -=item .sub <_indentifier>
  +=item .sub <_identifier>
   
   =item .end
   
  @@ -107,7 +109,7 @@
   
   =item .const <type> <identifier> = <const>
   
  -Define a named constant of tyle I<type> and value I<const>.
  +Define a named constant of style I<type> and value I<const>.
   
   =item .namespace <identifier>
   
  @@ -149,13 +151,13 @@
   
   B<branch> <identifier>.
   
  -=item if <var> goto <identifer>
  +=item if <var> goto <identifier>
   
  -=item unless <var> goto <identifer>
  +=item unless <var> goto <identifier>
   
   Translate to B<if x, identifier> or B<unless ..>.
   
  -=item if <var> <relop> <var> goto <identifer>
  +=item if <var> <relop> <var> goto <identifier>
   
   The B<relop> B<<, <=, ==, != E<gt>= E<gt>> translate to the PASM opcodes
   B<lt>, B<le>, B<eq>, B<ne>, B<ge> or B<gt> B<var>, B<var>,
  @@ -172,7 +174,7 @@
   =item <var> = <var> <binary> <var>
   
   The B<binary>s B<+>, B<->, B<*>, B</>, B<%> and B<**> generate
  -B<add>, B<sub>, B<mul>, B<div>, B<mod> and B<pow> arithmentic ops.
  +B<add>, B<sub>, B<mul>, B<div>, B<mod> and B<pow> arithmetic ops.
   B<binary> B<.> is B<concat> and valid for string arguments.
   
   B<<<> and B<E<gt>E<gt>> are arithmetic shifts B<shl> and B<shr>.
  
  
  

Reply via email to