From 634661fe5a3f091d6c4b15527ddc7cfc3e448469 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 18 Jan 2003 22:15:51 +0000 Subject: [PATCH] check-init.c: Fix comment typos. * check-init.c: Fix comment typos. * class.c: Likewise. * constants.c: Likewise. * decl.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * java-except.h: Likewise. * java-tree.h: Likewise. * javaop.h: Likewise. * jcf-dump.c: Likewise. * jcf-io.c: Likewise. * jcf-parse.c: Likewise. * jcf-write.c: Likewise. * lang.c: Likewise. * mangle.c: Likewise. * typeck.c: Likewise. * verify.c: Likewise. From-SVN: r61477 --- gcc/java/ChangeLog | 20 ++++++++++++++++++++ gcc/java/check-init.c | 2 +- gcc/java/class.c | 2 +- gcc/java/constants.c | 2 +- gcc/java/decl.c | 2 +- gcc/java/except.c | 2 +- gcc/java/expr.c | 8 ++++---- gcc/java/java-except.h | 2 +- gcc/java/java-tree.h | 6 +++--- gcc/java/javaop.h | 2 +- gcc/java/jcf-dump.c | 2 +- gcc/java/jcf-io.c | 4 ++-- gcc/java/jcf-parse.c | 4 ++-- gcc/java/jcf-write.c | 10 +++++----- gcc/java/lang.c | 4 ++-- gcc/java/mangle.c | 6 +++--- gcc/java/typeck.c | 2 +- gcc/java/verify.c | 4 ++-- 18 files changed, 52 insertions(+), 32 deletions(-) diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index d40ecb4f572..32556e78d33 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,23 @@ +2003-01-18 Kazu Hirata + + * check-init.c: Fix comment typos. + * class.c: Likewise. + * constants.c: Likewise. + * decl.c: Likewise. + * except.c: Likewise. + * expr.c: Likewise. + * java-except.h: Likewise. + * java-tree.h: Likewise. + * javaop.h: Likewise. + * jcf-dump.c: Likewise. + * jcf-io.c: Likewise. + * jcf-parse.c: Likewise. + * jcf-write.c: Likewise. + * lang.c: Likewise. + * mangle.c: Likewise. + * typeck.c: Likewise. + * verify.c: Likewise. + 2003-01-18 Kaveh R. Ghazi * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H). diff --git a/gcc/java/check-init.c b/gcc/java/check-init.c index c9a71627b79..3ca989b424b 100644 --- a/gcc/java/check-init.c +++ b/gcc/java/check-init.c @@ -407,7 +407,7 @@ struct alternatives /* The value of num_current_locals at the start of this compound. */ int num_locals; - /* The value of the "before" set at the start of the control stucture. + /* The value of the "before" set at the start of the control structure. Used for SWITCH_EXPR but not set for LABELED_BLOCK_EXPR. */ words saved; diff --git a/gcc/java/class.c b/gcc/java/class.c index 2018d664736..6d4949777cd 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -2044,7 +2044,7 @@ register_class (void) The preferred mechanism is through the .jcr section, which contain a list of pointers to classes which get registered during - constructor invoction time. The fallback mechanism is to generate + constructor invocation time. The fallback mechanism is to generate a `constructor' function which calls _Jv_RegisterClass for each class in this file. */ diff --git a/gcc/java/constants.c b/gcc/java/constants.c index 583e0bd7134..cdf307c7f65 100644 --- a/gcc/java/constants.c +++ b/gcc/java/constants.c @@ -401,7 +401,7 @@ build_ref_from_constant_pool (int index) return build1 (INDIRECT_REF, ptr_type_node, t); } -/* Build an initializer for the constants field of the current constal pool. +/* Build an initializer for the constants field of the current constant pool. Should only be called at top-level, since it may emit declarations. */ tree diff --git a/gcc/java/decl.c b/gcc/java/decl.c index eec38706730..99c2652160e 100644 --- a/gcc/java/decl.c +++ b/gcc/java/decl.c @@ -65,7 +65,7 @@ tree java_lang_cloneable_identifier_node; /* Name of the Serializable class. */ tree java_io_serializable_identifier_node; -/* Set to nonzero value in order to emit class initilization code +/* Set to nonzero value in order to emit class initialization code before static field references. */ extern int always_initialize_class_p; diff --git a/gcc/java/except.c b/gcc/java/except.c index 600deb89f45..9ad41a658ba 100644 --- a/gcc/java/except.c +++ b/gcc/java/except.c @@ -315,7 +315,7 @@ prepare_eh_table_type (tree type) /* The "type" (metch_info) in a (Java) exception table is one: * a) NULL - meaning match any type in a try-finally. - * b) a pointer to a (ccmpiled) class (low-order bit 0). + * b) a pointer to a (compiled) class (low-order bit 0). * c) a pointer to the Utf8Const name of the class, plus one * (which yields a value with low-order bit 1). */ diff --git a/gcc/java/expr.c b/gcc/java/expr.c index b36e3683041..e5c677c2c11 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -92,7 +92,7 @@ static GTY(()) tree methods_ident; static GTY(()) tree ncode_ident; tree dtable_ident = NULL_TREE; -/* Set to nonzero value in order to emit class initilization code +/* Set to nonzero value in order to emit class initialization code before static field references. */ int always_initialize_class_p; @@ -125,7 +125,7 @@ int always_initialize_class_p; static GTY(()) tree quick_stack; -/* A free-list of unused permamnet TREE_LIST nodes. */ +/* A free-list of unused permanent TREE_LIST nodes. */ static GTY((deletable (""))) tree tree_list_free_list; /* The stack pointer of the Java virtual machine. @@ -795,7 +795,7 @@ build_java_arraystore_check (tree array, tree object) /* No check is needed if the element type is final or is itself an array. Also check that element_type matches object_type, since in the bytecode - compilation case element_type may be the actual element type of the arra + compilation case element_type may be the actual element type of the array rather than its declared type. */ if (element_type == object_type && (TYPE_ARRAY_P (TREE_TYPE (element_type)) @@ -955,7 +955,7 @@ expand_java_multianewarray (tree class_type, int ndim) ARRAY is an array type. May expand some bound checking and NULL pointer checking. RHS_TYPE_NODE we are going to store. In the case of the CHAR/BYTE/BOOLEAN SHORT, the type popped of the stack is an - INT. In those cases, we make the convertion. + INT. In those cases, we make the conversion. if ARRAy is a reference type, the assignment is checked at run-time to make sure that the RHS can be assigned to the array element diff --git a/gcc/java/java-except.h b/gcc/java/java-except.h index 27a34d13922..b536ce0623e 100644 --- a/gcc/java/java-except.h +++ b/gcc/java/java-except.h @@ -34,7 +34,7 @@ struct eh_range and the TREE_VALUE is the LABEL_DECL of the handler. */ tree handlers; - /* Surrunding handler, if any. */ + /* Surrounding handler, if any. */ struct eh_range *outer; /* The first child range. It is is nested inside this range diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h index 9a79f3e36b4..88e6f07622b 100644 --- a/gcc/java/java-tree.h +++ b/gcc/java/java-tree.h @@ -810,7 +810,7 @@ union lang_tree_node (DECL_LANG_SPECIFIC(DECL)->u.f.ict) /* A list of all the static method calls in the method DECL (if optimizing). Actually each TREE_VALUE points to a COMPONT_EXPR that wraps the - invoation so we can later patch it. */ + invocation so we can later patch it. */ #define DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND(DECL) \ (DECL_LANG_SPECIFIC(DECL)->u.f.smic) /* The Number of Artificial Parameters (NAP) DECL contains. this$ @@ -838,7 +838,7 @@ union lang_tree_node #define FIELD_LOCAL_ALIAS_USED(DECL) DECL_LANG_FLAG_7 (DECL) /* True when DECL is a this$ field. Note that - FIELD_LOCAL_ALIAS_USED can be differenciated when tested against + FIELD_LOCAL_ALIAS_USED can be differentiated when tested against FIELD_LOCAL_ALIAS. */ #define FIELD_THISN(DECL) DECL_LANG_FLAG_7 (DECL) @@ -1517,7 +1517,7 @@ extern tree *type_map; #define MODIFY_EXPR_FROM_INITIALIZATION_P(EXPR) TREE_LANG_FLAG_2 (EXPR) /* True if EXPR (a TREE_TYPE denoting a class type) has its methods - already checked (for redifitions, etc, see java_check_regular_methods.) */ + already checked (for redefinitions, etc, see java_check_regular_methods.) */ #define CLASS_METHOD_CHECKED_P(EXPR) TREE_LANG_FLAG_2 (EXPR) /* True if TYPE (a TREE_TYPE denoting a class type) was found to diff --git a/gcc/java/javaop.h b/gcc/java/javaop.h index e9157015ad2..da09254ad10 100644 --- a/gcc/java/javaop.h +++ b/gcc/java/javaop.h @@ -39,7 +39,7 @@ typedef unsigned int16 uint16; #endif typedef unsigned int32 uint32; -/* A signed 64-bit (or more) integral type, suiteable for Java's 'long'. */ +/* A signed 64-bit (or more) integral type, suitable for Java's 'long'. */ #ifndef int64 #define int64 long long #endif diff --git a/gcc/java/jcf-dump.c b/gcc/java/jcf-dump.c index 66358f5d474..6d976e53450 100644 --- a/gcc/java/jcf-dump.c +++ b/gcc/java/jcf-dump.c @@ -1079,7 +1079,7 @@ disassemble_method (JCF* jcf, const unsigned char *byte_ops, int len) /* This is the actual code emitted for each of opcodes in javaops.def. The actual opcode-specific stuff is handled by the OPKIND macro. I.e. for an opcode whose OPKIND is BINOP, the BINOP will be called. - Those macros are defiend below. The OPKINDs that do not have any + Those macros are defined below. The OPKINDs that do not have any inline parameters (such as BINOP) and therefore do mot need anything else to me printed out just use an empty body. */ diff --git a/gcc/java/jcf-io.c b/gcc/java/jcf-io.c index 6fe472f1e0a..abc20736b7d 100644 --- a/gcc/java/jcf-io.c +++ b/gcc/java/jcf-io.c @@ -310,7 +310,7 @@ typedef struct memoized_dirlist_entry struct dirent **files; } memoized_dirlist_entry; -/* Returns true if ENTRY (a memoized_dirlist_entry *) correponds to +/* Returns true if ENTRY (a memoized_dirlist_entry *) corresponds to the directory given by KEY (a char *) giving the directory name. */ @@ -378,7 +378,7 @@ caching_stat (char *filename, struct stat *buf) else dent = *((memoized_dirlist_entry **) slot); - /* Put the spearator back. */ + /* Put the separator back. */ if (sep) *sep = DIR_SEPARATOR; diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c index 8e2fa395ac4..892e5616b5f 100644 --- a/gcc/java/jcf-parse.c +++ b/gcc/java/jcf-parse.c @@ -71,7 +71,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ extern struct obstack temporary_obstack; -/* Set to nonzero value in order to emit class initilization code +/* Set to nonzero value in order to emit class initialization code before static field references. */ extern int always_initialize_class_p; @@ -357,7 +357,7 @@ handle_innerclass_attribute (int count, JCF *jcf) entry isn't a member (like an inner class) the value is 0. */ int ocii = JCF_readu2 (jcf); /* Read inner_name_index. If the class we're dealing with is - an annonymous class, it must be 0. */ + an anonymous class, it must be 0. */ int ini = JCF_readu2 (jcf); /* Read the access flag. */ int acc = JCF_readu2 (jcf); diff --git a/gcc/java/jcf-write.c b/gcc/java/jcf-write.c index 384cbee00b7..7133fdb128d 100644 --- a/gcc/java/jcf-write.c +++ b/gcc/java/jcf-write.c @@ -129,7 +129,7 @@ struct jcf_block If the label has been defined: Until perform_relocations is finished, this is the maximum possible - value of the bytecode offset at the begnning of this block. + value of the bytecode offset at the beginning of this block. After perform_relocations, it is the actual offset (pc). */ int pc; @@ -537,7 +537,7 @@ alloc_handler (struct jcf_block *start_label, struct jcf_block *end_label, /* The index of jvm local variable allocated for this DECL. This is assigned when generating .class files; contrast DECL_LOCAL_SLOT_NUMBER which is set when *reading* a .class file. - (We don't allocate DECL_LANG_SPECIFIC for locals from Java sourc code.) */ + (We don't allocate DECL_LANG_SPECIFIC for locals from Java source code.) */ #define DECL_LOCAL_INDEX(DECL) DECL_ALIGN(DECL) @@ -1069,7 +1069,7 @@ emit_jsr (struct jcf_block *target, struct jcf_partial *state) /* Generate code to evaluate EXP. If the result is true, branch to TRUE_LABEL; otherwise, branch to FALSE_LABEL. - TRUE_BRANCH_FIRST is a code geneation hint that the + TRUE_BRANCH_FIRST is a code generation hint that the TRUE_LABEL may follow right after this. (The idea is that we may be able to optimize away GOTO TRUE_LABEL; TRUE_LABEL:) */ @@ -2820,7 +2820,7 @@ generate_classfile (tree clas, struct jcf_partial *state) append_chunk (NULL, 0, state); cpool_chunk = state->chunk; - /* Next allocate the chunk containing acces_flags through fields_counr. */ + /* Next allocate the chunk containing acces_flags through fields_count. */ if (clas == object_type_node) i = 10; else @@ -3292,7 +3292,7 @@ make_class_file_name (tree clas) return r; } -/* Write out the contens of a class (RECORD_TYPE) CLAS, as a .class file. +/* Write out the contents of a class (RECORD_TYPE) CLAS, as a .class file. The output .class file name is make_class_file_name(CLAS). */ void diff --git a/gcc/java/lang.c b/gcc/java/lang.c index 1feb63993b5..63ced434b30 100644 --- a/gcc/java/lang.c +++ b/gcc/java/lang.c @@ -920,7 +920,7 @@ java_unsafe_for_reeval (tree t) This variable is used to avoid multiple calls to the static constructor for each class. - It looks somthing like this: + It looks something like this: foo () { @@ -937,7 +937,7 @@ java_unsafe_for_reeval (tree t) Each of these boolean variables has an entry in the DECL_FUNCTION_INIT_TEST_TABLE of a method. When inlining a method we must merge the DECL_FUNCTION_INIT_TEST_TABLE from the function - being linlined and create the boolean variables in the outermost + being inlined and create the boolean variables in the outermost scope of the method being inlined into. */ /* Create a mapping from a boolean variable in a method being inlined diff --git a/gcc/java/mangle.c b/gcc/java/mangle.c index 9b52b2b1beb..ca5997cba74 100644 --- a/gcc/java/mangle.c +++ b/gcc/java/mangle.c @@ -278,7 +278,7 @@ find_compression_array_template_match (tree string) /* We go through the compression table and try to find a complete or partial match. The function returns the compression table entry - that (evenutally partially) matches TYPE. *NEXT_CURRENT can be set + that (eventually partially) matches TYPE. *NEXT_CURRENT can be set to the rest of TYPE to be mangled. */ static int @@ -380,7 +380,7 @@ mangle_record_type (tree type, int for_pointer) } /* Mangle a pointer type. There are two cases: the pointer is already - in the compression table: the compression is emited sans 'P' + in the compression table: the compression is emitted sans 'P' indicator. Otherwise, a 'P' is emitted and, depending on the type, a partial compression or/plus the rest of the mangling. */ @@ -474,7 +474,7 @@ mangle_array_type (tree p_type) compression_table_add (p_type); } -/* Write a substition string for entry I. Substitution string starts a +/* Write a substitution string for entry I. Substitution string starts a -1 (encoded S_.) The base is 36, and the code shamlessly taken from cp/mangle.c. */ diff --git a/gcc/java/typeck.c b/gcc/java/typeck.c index 8990a9934c2..468de74cbb6 100644 --- a/gcc/java/typeck.c +++ b/gcc/java/typeck.c @@ -337,7 +337,7 @@ java_array_type_length (tree array_type) /* An array of unknown length will be ultimately given an length of -2, so that we can still have `length' producing a negative value - even if found. This was part of an optimization amaing at removing + even if found. This was part of an optimization aiming at removing `length' from static arrays. We could restore it, FIXME. */ tree diff --git a/gcc/java/verify.c b/gcc/java/verify.c index d67f30c4096..a5375bf1357 100644 --- a/gcc/java/verify.c +++ b/gcc/java/verify.c @@ -363,7 +363,7 @@ start_pc_cmp (const void *xp, const void *yp) #define VERIFICATION_ERROR_WITH_INDEX(MESSAGE) \ do { message = MESSAGE; goto error_with_index; } while (0) -/* Recursive helper function to pop argument types during verifiation. +/* Recursive helper function to pop argument types during verification. ARG_TYPES is the list of formal parameter types. Return NULL on success and a freshly malloc'd error message on failure. */ @@ -713,7 +713,7 @@ verify_jvm_instructions (JCF* jcf, const unsigned char *byte_ops, long length) prev_eh_ranges = NULL_EH_RANGE; /* Allocate decl and rtx for this variable now, so if we're not - optmizing, we get a temporary that survives the whole method. */ + optimizing, we get a temporary that survives the whole method. */ find_local_variable (index, type, oldpc); if (TYPE_IS_WIDE (type))