[patch] java/*: Fix comment typos.

Kazu Hirata kazu@cs.umass.edu
Wed Oct 22 18:06:00 GMT 2003


Hi,

Attached is a patch to fix comment typos.  Committed as obvious.

Kazu Hirata

2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>

	* ChangeLog: Fix typos.
	* expr.c: Fix comment typos.
	* jcf-write.c: Likewise.
	* lang.c: Likewise.
	* lex.c: Likewise.
	* mangle.c: Likewise.
	* parse-scan.y: Likewise.
	* parse.y: Likewise.

Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/ChangeLog,v
retrieving revision 1.1275
diff -u -r1.1275 ChangeLog
--- ChangeLog	22 Oct 2003 15:44:52 -0000	1.1275
+++ ChangeLog	22 Oct 2003 17:54:48 -0000
@@ -3458,7 +3458,7 @@
 
 2001-08-31  Per Bothner  <per@bothner.com>
 
-	* class.c (set_constant_value):  When not emiting class files, then a
+	* class.c (set_constant_value):  When not emitting class files, then a
 	String ConstantValue is a utf8const_ptr_type.
 
 2001-08-30  Per Bothner  <per@bothner.com>
@@ -3726,7 +3726,7 @@
 	`finish_class' when compiling to native.
 	(resolve_expression_name): Use `orig' after building outer class
 	field access.
-	(patch_invoke): Remember static method invokations.
+	(patch_invoke): Remember static method invocations.
 
 2001-08-06  Richard Henderson  <rth@redhat.com>
 
@@ -4186,7 +4186,7 @@
 	(add_instance_initializer): Use it.
 	(java_fix_constructors): Set `current_class' before fix pass.
 	(fix_constructors): Just return if already fixed. Move `super()'
-	invokation ahead. Use `build_instance_initializer.'
+	invocation ahead. Use `build_instance_initializer.'
 	Fixes PR java/1315.
 
 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
@@ -4194,7 +4194,7 @@
 	* parse.y (resolve_qualified_expression_name): Pass field's
 	DECL_CONTEXT to `not_accessible_p.'
 	(not_accessible_p): Changed parameters order in `inherits_from_p'
-	invokation.
+	invocation.
 
 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
 
@@ -7033,7 +7033,7 @@
 
 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
 
-	* jcf-write.c (generate_bytecode_insns): At invokation time,
+	* jcf-write.c (generate_bytecode_insns): At invocation time,
 	always relate an interface method to the type of its selector.
 
 2000-04-05  Tom Tromey  <tromey@cygnus.com>
@@ -7604,7 +7604,7 @@
 2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
 
 	* parse.y (outer_field_access_fix): First parameter now a tree
-	node. Check for assignement to final. First argument to
+	node. Check for assignment to final. First argument to
 	build_outer_field_access_fix modified to accommodate prototype.
 	(build_outer_field_access): Don't check for assignment to final
 	here.
@@ -8522,7 +8522,7 @@
 
 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
 
-	* parse.y (java_complete_lhs): Force convertion of array
+	* parse.y (java_complete_lhs): Force conversion of array
 	dimensions to int_type_node, that's what runtime's ABI expects.
 
 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
@@ -9543,7 +9543,7 @@
 1999-05-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
 
 	* lex.c (java_lex): Accepts `+' or `-' after the beginning of a
-	floating point litteral only when the exponent indicator has been
+	floating point literal only when the exponent indicator has been
 	parsed.
 
 1999-05-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
@@ -10265,7 +10265,7 @@
 	non accessible fields.
 	(java_stabilize_reference): New function.
 	(java_complete_lhs): Fixed indentation. Use
-	java_stabilize_reference in compound assignement. Insert the
+	java_stabilize_reference in compound assignment. Insert the
 	cast. If not processing `+' fix string constants before processing
 	binop.
 
@@ -10893,7 +10893,7 @@
 	with assembler temp labels.
 
 	* parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
-	MODIFY_EXPR.  Without this, code for the assignement may not be
+	MODIFY_EXPR.  Without this, code for the assignment may not be
 	generated at all and the synchronized statement will read an
 	uninitialized variable.
 
@@ -14616,7 +14616,7 @@
 	(block:): Likewise.
 	(labeled_statement_nsi:): Generate debug info when reducing
 	expression_statement:.
-	(check_pkg_class_access): get_access_flags_from_decl invokation
+	(check_pkg_class_access): get_access_flags_from_decl invocation
 	fixed for new CLASS_* flags location.
 	(source_end_java_method): Save/restore parser context when
 	entering/leaving this routine. Restore lineno to its right value
Index: expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/expr.c,v
retrieving revision 1.176
diff -u -r1.176 expr.c
--- expr.c	22 Oct 2003 15:44:52 -0000	1.176
+++ expr.c	22 Oct 2003 17:54:50 -0000
@@ -107,7 +107,7 @@
 
    If a variable is on the quick stack, it means the value of variable
    when the quick stack was last flushed.  Conceptually, flush_quick_stack
-   saves all the the quick_stack elements in parellel.  However, that is
+   saves all the the quick_stack elements in parallel.  However, that is
    complicated, so it actually saves them (i.e. copies each stack value
    to is home virtual register) from low indexes.  This allows a quick_stack
    element at index i (counting from the bottom of stack the) to references
@@ -456,7 +456,7 @@
 }
 
 
-/* Pop and discrad the top COUNT stack slots. */
+/* Pop and discard the top COUNT stack slots. */
 
 static void
 java_stack_pop (int count)
Index: jcf-write.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/jcf-write.c,v
retrieving revision 1.137
diff -u -r1.137 jcf-write.c
--- jcf-write.c	30 Sep 2003 18:24:33 -0000	1.137
+++ jcf-write.c	22 Oct 2003 17:54:51 -0000
@@ -276,7 +276,7 @@
   /* Information about the current switch statement. */
   struct jcf_switch_state *sw_state;
 
-  /* The count of jsr instructions that have been emmitted.  */
+  /* The count of jsr instructions that have been emitted.  */
   long num_jsrs;
 };
 
@@ -2868,7 +2868,7 @@
   append_chunk (NULL, 0, state);
   cpool_chunk = state->chunk;
 
-  /* Next allocate the chunk containing acces_flags through fields_count. */
+  /* Next allocate the chunk containing access_flags through fields_count. */
   if (clas == object_type_node)
     i = 10;
   else
@@ -2877,7 +2877,7 @@
   i = get_access_flags (TYPE_NAME (clas));
   if (! (i & ACC_INTERFACE))
     i |= ACC_SUPER;
-  PUT2 (i); /* acces_flags */
+  PUT2 (i); /* access_flags */
   i = find_class_constant (&state->cpool, clas);  PUT2 (i);  /* this_class */
   if (clas == object_type_node)
     {
Index: lang.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/lang.c,v
retrieving revision 1.143
diff -u -r1.143 lang.c
--- lang.c	28 Sep 2003 04:56:34 -0000	1.143
+++ lang.c	22 Oct 2003 17:54:52 -0000
@@ -1104,14 +1104,14 @@
       return NULL;
     }
   /* Assume that constants and references counts nothing.  These should
-     be majorized by amount of operations amoung them we count later
+     be majorized by amount of operations among them we count later
      and are common target of CSE and similar optimizations.  */
   if (TREE_CODE_CLASS (TREE_CODE (x)) == 'c'
       || TREE_CODE_CLASS (TREE_CODE (x)) == 'r')
     return NULL;
   switch (TREE_CODE (x))
     { 
-    /* Reconginze assignments of large structures and constructors of
+    /* Recognize assignments of large structures and constructors of
        big arrays.  */
     case MODIFY_EXPR:
     case CONSTRUCTOR:
Index: lex.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/lex.c,v
retrieving revision 1.106
diff -u -r1.106 lex.c
--- lex.c	13 May 2003 18:06:50 -0000	1.106
+++ lex.c	22 Oct 2003 17:54:53 -0000
@@ -1360,7 +1360,7 @@
       string = obstack_finish (&temporary_obstack);
 #ifndef JC1_LITE
       if (!no_error || (c != '"'))
-	java_lval->node = error_mark_node; /* FIXME: Requires futher
+	java_lval->node = error_mark_node; /* FIXME: Requires further
                                               testing.  */
       else
 	java_lval->node = build_string (strlen (string), string);
Index: mangle.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/mangle.c,v
retrieving revision 1.31
diff -u -r1.31 mangle.c
--- mangle.c	21 Oct 2003 23:59:46 -0000	1.31
+++ mangle.c	22 Oct 2003 17:54:53 -0000
@@ -471,7 +471,7 @@
 }
 
 /* Write a substitution string for entry I. Substitution string starts a
-   -1 (encoded S_.) The base is 36, and the code shamlessly taken from
+   -1 (encoded S_.) The base is 36, and the code shamelessly taken from
    cp/mangle.c.  */
 
 static void
Index: parse-scan.y
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/parse-scan.y,v
retrieving revision 1.33
diff -u -r1.33 parse-scan.y
--- parse-scan.y	28 Jun 2003 00:42:31 -0000	1.33
+++ parse-scan.y	22 Oct 2003 17:54:53 -0000
@@ -565,7 +565,7 @@
 /* extra SC_TK, FIXME */
 |	modifiers constructor_declarator throws constructor_body SC_TK
 		{ modifier_value = 0; }
-/* I'm not happy with the SC_TK addition. It isn't in the grammer and should
+/* I'm not happy with the SC_TK addition. It isn't in the grammar and should
    probably be matched by and empty statement. But it doesn't work. FIXME */
 ;
 
Index: parse.y
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/parse.y,v
retrieving revision 1.449
diff -u -r1.449 parse.y
--- parse.y	9 Oct 2003 05:44:57 -0000	1.449
+++ parse.y	22 Oct 2003 17:55:01 -0000
@@ -367,7 +367,7 @@
   binop_lookup [((VALUE) - PLUS_TK) % ARRAY_SIZE (binop_lookup)]
 
 /* This is the end index for binary operators that can also be used
-   in compound assignements. */
+   in compound assignments. */
 #define BINOP_COMPOUND_CANDIDATES 11
 
 /* The "$L" identifier we use to create labels.  */
@@ -2021,7 +2021,7 @@
 
 /* Created after JDK1.1 rules originally added to
    class_instance_creation_expression, but modified to use
-   'class_type' instead of 'TypeName' (type_name) which is mentionned
+   'class_type' instead of 'TypeName' (type_name) which is mentioned
    in the documentation but doesn't exist. */
 
 anonymous_class_creation:
@@ -2808,7 +2808,7 @@
   current_class = saver->class_type;
   current_function_decl = saver->function_decl;
 
-  /* Retrive the restored context */
+  /* Retrieve the restored context */
   ctxp = restored;
 
   /* Re-installed the data for the parsing to carry on */
@@ -3730,7 +3730,7 @@
 
   /* Take care of the file and line business */
   DECL_SOURCE_FILE (decl) = EXPR_WFL_FILENAME (cl);
-  /* If we're emiting xrefs, store the line/col number information */
+  /* If we're emitting xrefs, store the line/col number information */
   if (flag_emit_xref)
     DECL_SOURCE_LINE (decl) = EXPR_WFL_LINECOL (cl);
   else
@@ -3898,7 +3898,7 @@
   if ((type_decl = IDENTIFIER_CLASS_VALUE (EXPR_WFL_NODE (type_name))))
     {
       /* Create a class which either implements on extends the designated
-	 class. The class bears an innacessible name. */
+	 class. The class bears an inaccessible name. */
       if (CLASS_INTERFACE (type_decl))
 	{
 	  /* It's OK to modify it here. It's been already used and
@@ -4099,7 +4099,7 @@
 	     methods first, then finit$ to get a picture of what's
 	     used.  It works with the exception that we would have to
 	     go back on all constructor invoked in regular methods to
-	     have their invokation reworked (to include the right amount
+	     have their invocation reworked (to include the right amount
 	     of alias initializer parameters.)
 
 	     The only real way around, I think, is a first pass to
@@ -4109,10 +4109,10 @@
 
 	     On the other hand, it only affect local inner classes,
 	     whose constructors (and finit$ call) will be featuring
-	     unecessary arguments. It's easy for a developper to keep
+	     unnecessary arguments. It's easy for a developer to keep
 	     this number of parameter down by using the `final'
 	     keyword only when necessary. For the time being, we can
-	     issue a warning on unecessary finals. FIXME */
+	     issue a warning on unnecessary finals. FIXME */
 	  init = build_assignment (ASSIGN_TK, EXPR_WFL_LINECOL (wfl),
 				   wfl, init);
 
@@ -4130,7 +4130,7 @@
     return;
 
   /* If we ever registered an alias field, insert and marker to
-     remeber where the list ends. The second part of the list (the one
+     remember where the list ends. The second part of the list (the one
      featuring initialized fields) so it can be later reversed to
      enforce 8.5. The marker will be removed during that operation. */
   marker = build_tree_list (NULL_TREE, NULL_TREE);
@@ -4469,7 +4469,7 @@
   return to_return;
 }
 
-/* Shared accros method_declarator and method_header to remember the
+/* Shared across method_declarator and method_header to remember the
    patch stage that was reached during the declaration of the method.
    A method DECL is built differently is there is no patch
    (JDEP_NO_PATCH) or a patch (JDEP_METHOD or JDEP_METHOD_RETURN)
@@ -4969,7 +4969,7 @@
 
       /* The argument node: a name and a (possibly) incomplete type.  */
       arg_node = build_tree_list (name, real_type);
-      /* Remeber arguments declared final. */
+      /* Remember arguments declared final. */
       ARG_FINAL_P (arg_node) = ARG_FINAL_P (current);
 
       if (jdep)
@@ -5057,7 +5057,7 @@
 }
 
 /* Makes sure that SUPER_DECL is suitable to extend THIS_DECL. Returns
-   0 if everthing is OK.  */
+   0 if everything is OK.  */
 
 static int
 parser_check_super (tree super_decl, tree this_decl, tree wfl)
@@ -5331,7 +5331,7 @@
 	    break;
 
 	  case AIPL_FUNCTION_CTOR_INVOCATION:
-	    /* There are two case: the constructor invokation happends
+	    /* There are two case: the constructor invocation happens
 	       outside the local inner, in which case, locales from the outer
 	       context are directly used.
 
@@ -7631,7 +7631,7 @@
   java_parse_abort_on_error ();
 }
 
-/* Expand methods in the current set of classes rememebered for
+/* Expand methods in the current set of classes remembered for
    generation.  */
 
 static void
@@ -8260,7 +8260,7 @@
     return 0;
 
   /* If the inner class extends the declaration context of the field
-     we're try to acces, then this isn't an outer field access */
+     we're trying to access, then this isn't an outer field access */
   if (inherits_from_p (type, DECL_CONTEXT (decl)))
     return 0;
 
@@ -8684,7 +8684,7 @@
   return saved_thisn;
 }
 
-/* Return the assignement to the hidden enclosing context `this$<n>'
+/* Return the assignment to the hidden enclosing context `this$<n>'
    by the second incoming parameter to the innerclass constructor. The
    form used is `this.this$<n> = this$<n>;'.  */
 
@@ -8901,7 +8901,7 @@
       if (!found)
 	compound = add_stmt_to_compound (compound, NULL_TREE,
                                          build_super_invocation (mdecl));
-      /* Explicit super() invokation should take place before the
+      /* Explicit super() invocation should take place before the
          instance initializer blocks. */
       else
 	{
@@ -9007,7 +9007,7 @@
 
 
   /* Find anonymous classes and expand their constructor. This extra pass is
-     neccessary because the constructor itself is only generated when the
+     necessary because the constructor itself is only generated when the
      method in which it is defined is expanded. */
   for (cur_ctxp = ctxp_for_generation; cur_ctxp; cur_ctxp = cur_ctxp->next)
     {
@@ -9878,7 +9878,7 @@
 		}
 	    }
 
-	  /* Report and error if we're using a numerical litteral as a
+	  /* Report and error if we're using a numerical literal as a
              qualifier. It can only be an INTEGER_CST. */
 	  else if (TREE_CODE (qual_wfl) == INTEGER_CST)
 	    {
@@ -10451,7 +10451,7 @@
 	  this_arg = primary ? primary : current_this;
 
 	  /* If we're using an access method, things are different.
-	     There are two familly of cases:
+	     There are two family of cases:
 
 	     1) We're not generating bytecodes:
 
@@ -10467,7 +10467,7 @@
 	     - LIST is static. It's invocation is transformed from
 	       x(a1,....,an) into TYPE_OF(this$<n>).x(a1,....an).
 
-	     Of course, this$<n> can be abitrary complex, ranging from
+	     Of course, this$<n> can be arbitrarily complex, ranging from
 	     this$0 (the immediate outer context) to
 	     access$0(access$0(...(this$0))).
 
@@ -10709,8 +10709,8 @@
   *mdecl = md;
   *this_arg = ta;
 
-  /* Returnin a nonzero value indicates we were doing a non static
-     method invokation that is now a static invocation. It will have
+  /* Returning a nonzero value indicates we were doing a non static
+     method invocation that is now a static invocation. It will have
      callee displace `this' to insert it in the regular argument
      list. */
   return (non_static_context && to_return);
@@ -10739,7 +10739,7 @@
 	TREE_TYPE (TREE_VALUE (ta)) != TREE_VALUE (t))
       TREE_VALUE (ta) = convert (TREE_VALUE (t), TREE_VALUE (ta));
 
-  /* Resolve unresolved returned type isses */
+  /* Resolve unresolved returned type issues */
   t = TREE_TYPE (TREE_TYPE (method));
   if (TREE_CODE (t) == POINTER_TYPE && !CLASS_LOADED_P (TREE_TYPE (t)))
     resolve_and_layout (TREE_TYPE (t), NULL);
@@ -11420,7 +11420,7 @@
 	    return;
 	  }
 	qual = TREE_CHAIN (qual);
-	/* Do one more interation to set things up */
+	/* Do one more iteration to set things up */
 	super_found = again = 1;
       }
   } while (again);
@@ -11482,7 +11482,7 @@
   else
     RESOLVE_PACKAGE_NAME_P (qual_wfl) = 1;
 
-  /* Propagate the qualification accross other components of the
+  /* Propagate the qualification across other components of the
      qualified name */
   for (qual = TREE_CHAIN (qual); qual;
        qual_wfl = QUAL_WFL (qual), qual = TREE_CHAIN (qual))
@@ -12533,7 +12533,7 @@
 {
   tree wfl, node_to_insert = node;
 
-  /* We want to process THIS . xxx symbolicaly, to keep it consistent
+  /* We want to process THIS . xxx symbolically, to keep it consistent
      with the way we're processing SUPER. A THIS from a primary as a
      different form than a SUPER. Turn THIS into something symbolic */
   if (TREE_CODE (node) == THIS_EXPR)
@@ -13014,7 +13014,7 @@
 /* Return 1 if RHS_TYPE can be converted to LHS_TYPE by identity
    conversion (5.1.1) or widening primitive conversion (5.1.2).  Return
    0 is the conversion test fails.  This implements parts the method
-   invocation convertion (5.3).  */
+   invocation conversion (5.3).  */
 
 static int
 valid_builtin_assignconv_identity_widening_p (tree lhs_type, tree rhs_type)
@@ -13104,7 +13104,7 @@
 	  /* Otherwise, SOURCE must implement DEST */
 	  return interface_of_p (dest, source);
 	}
-      /* DEST is an array, cast permited if SOURCE is of Object type */
+      /* DEST is an array, cast permitted if SOURCE is of Object type */
       return (cast && source == object_type_node ? 1 : 0);
     }
   if (TYPE_INTERFACE_P (source))
@@ -13448,7 +13448,7 @@
       if (code == RDIV_EXPR && TREE_CODE (prom_type) == INTEGER_TYPE)
 	TREE_SET_CODE (node, TRUNC_DIV_EXPR);
 
-      /* Before divisions as is disapear, try to simplify and bail if
+      /* Before divisions as is disappear, try to simplify and bail if
          applicable, otherwise we won't perform even simple
          simplifications like (1-1)/3. We can't do that with floating
          point number, folds can't handle them at this stage. */
@@ -14378,7 +14378,7 @@
 	if (cast_type != long_type_node)
 	  op = convert (integer_type_node, op);
 
-      /* Try widening/narrowing convertion.  Potentially, things need
+      /* Try widening/narrowing conversion.  Potentially, things need
 	 to be worked out in gcc so we implement the extreme cases
 	 correctly.  fold_convert() needs to be fixed.  */
       return convert (cast_type, op);
@@ -14925,7 +14925,7 @@
 
 /* 14.6 Labeled Statements */
 
-/* Action taken when a lableled statement is parsed. a new
+/* Action taken when a labeled statement is parsed. a new
    LABELED_BLOCK_EXPR is created. No statement is attached to the
    label, yet.  LABEL can be NULL_TREE for artificially-generated blocks. */
 
@@ -15167,7 +15167,7 @@
 	    (merge_qualified_name (label_id, EXPR_WFL_NODE (name)))))
 	/* Null means that we don't have a target for this named
 	   break/continue. In this case, we make the target to be the
-	   label name, so that the error can be reported accuratly in
+	   label name, so that the error can be reported accurately in
 	   patch_bc_statement. */
 	label_block_expr = EXPR_WFL_NODE (name);
     }



More information about the Gcc-patches mailing list