Index: Graph.cpp =================================================================== --- Graph.cpp (revision 489103) +++ Graph.cpp (working copy) @@ -676,7 +676,7 @@ } // vf_Graph::SetNextCountNode /** - * Function recieves first enumerated graph node. + * Function receives first enumerated graph node. */ unsigned vf_Graph::GetStartCountNode() @@ -686,7 +686,7 @@ } // vf_Graph::GetStartCountNode /** - * Function recieves graph node relevant to enumeration element. + * Function receives graph node relevant to enumeration element. */ unsigned vf_Graph::GetCountElementNode( unsigned count ) // graph node number @@ -697,7 +697,7 @@ } // vf_Graph::GetCountElementNode /** - * Function recieves graph node enumeration count. + * Function receives graph node enumeration count. */ unsigned vf_Graph::GetNodeCountElement( unsigned node_num ) // graph node number @@ -958,7 +958,7 @@ void vf_Graph::DumpDotNodeInternal( unsigned num, // graph node number char *next_node, // separator between nodes in stream - char *next_instr, // separator between intructions in stream + char *next_instr, // separator between instructions in stream ofstream &out, // output file stream vf_Context_t *ctex) // verifier contex { @@ -1209,7 +1209,7 @@ if( index ) { /** - * Identify dead code nodes and fill by nop inctruction + * Identify dead code nodes and fill by nop instruction */ for( index = handlcount + 1; index < vGraph->GetNodeNumber() - 1; index++ ) { if( !vGraph->IsNodeMarked( index ) ) { Index: ver_real.h =================================================================== --- ver_real.h (revision 489103) +++ ver_real.h (working copy) @@ -46,7 +46,7 @@ */ //=========================================================== /** - * Define debug mode for verifer. + * Define debug mode for verifier. */ #ifdef NDEBUG #define _VERIFY_DEBUG 0 @@ -289,7 +289,7 @@ */ //=========================================================== /** - * Predefined stuctures + * Predefined structures */ /// Verifier context structure. typedef struct vf_Context vf_Context_t; @@ -790,13 +790,13 @@ void SetNextCountNode( unsigned node_num ); /** - * Function recieves first enumerated graph node. + * Function receives first enumerated graph node. * @return First enumerated graph node in graph enumeration structure. */ unsigned GetStartCountNode(); /** - * Function recieves graph node relevant to enumeration element. + * Function receives graph node relevant to enumeration element. * @param count - given enumeration element * @return Graph node relevant to enumeration element. * @note Assertion is raised if count is out of range. @@ -804,7 +804,7 @@ unsigned GetCountElementNode( unsigned count ); /** - * Function recieves graph node enumeration count. + * Function receives graph node enumeration count. * @param node_num - given node * @return Graph node enumeration count. * @note Assertion is raised if node_num is out of range. @@ -885,7 +885,7 @@ * Function dumps graph node instruction in file stream in DOT format. * @param node_num - number of graph node * @param next_node - separator between nodes in stream - * @param next_instr - separator between intructions in stream + * @param next_instr - separator between instructions in stream * @param fout - output file stream * @param context - current verifier context * @note Function is valid in debug mode. @@ -1190,7 +1190,7 @@ unsigned m_edgeNum; ///< graph edge number /** - * Stucture contains useful valid types + * Structure contains useful valid types */ struct vf_ContextVType { vf_ValidType_t *m_class; ///< context a given class valid type @@ -1202,11 +1202,11 @@ } m_vtype; /** - * Stucture contains debug dump flags + * Structure contains debug dump flags */ struct vf_ContextDump { unsigned m_verify : 1; ///< verify all flag - unsigned m_with_subroutine : 1; ///< verified method has subrotine + unsigned m_with_subroutine : 1; ///< verified method has subroutine unsigned m_constraint : 1; ///< dump type constraints for class unsigned m_code : 1; ///< print code array in stream unsigned m_graph : 1; ///< print original control flow graph @@ -1427,7 +1427,7 @@ * Function parses descriptor and sets input and output data flow vectors. * @param descr - descriptor of method, class or field * @param inlen - number of entries for IN data flow vector - * @param add - additional number of enties to IN data flow vector + * @param add - additional number of entries to IN data flow vector * @param outlen - number of entries for OUT data flow vector (for method) * @param invector - pointer to IN data flow vector * @param outvector - pointer to OUT data flow vector @@ -1461,7 +1461,7 @@ vf_create_class_valid_type( const char *class_name, vf_Context_t *context ); /** - * Function provides contraint checks for current class. + * Function provides constraint checks for current class. * @param context - verifier context * @return Check result. * @note Provides only checks with loaded classes. Index: Verifier.cpp =================================================================== --- Verifier.cpp (revision 489103) +++ Verifier.cpp (working copy) @@ -399,8 +399,8 @@ /** * Function receives half word (2 bytes) branch offset from bytecode array and - * sets reseived offset and next instruction offset into instruction. - * Function returns recieved offset. + * sets received offset and next instruction offset into instruction. + * Function returns received offset. */ static inline int vf_get_double_hword_branch_offset( vf_Instr_t *code, // instruction @@ -411,7 +411,7 @@ { // get first branch offset int offset = vf_get_hword_offset( code_pc, bytecode, index_p ); - // create and set edge branchs for instruction + // create and set edge branches for instruction vf_create_instruction_offset( code, 2, pool ); // set first edge branch for instruction vf_set_instruction_offset( code, 0, offset ); @@ -422,8 +422,8 @@ /** * Function receives word (4 bytes) branch offset from bytecode array and - * sets reseived offset and next instruction offset into instruction. - * Function returns recieved offset. + * sets received offset and next instruction offset into instruction. + * Function returns received offset. */ static inline int vf_get_double_word_branch_offset( vf_Instr_t *code, // instruction @@ -434,7 +434,7 @@ { // get first branch offset int offset = vf_get_word_offset( code_pc, bytecode, index_p ); - // create and set edge branchs for instruction + // create and set edge branches for instruction vf_create_instruction_offset( code, 2, pool ); // set first edge branch for instruction vf_set_instruction_offset( code, 0, offset ); @@ -445,8 +445,8 @@ /** * Function receives tableswitch branch from bytecode array and - * sets reseived offset into instruction. - * Function returns recieved branch. + * sets received offset into instruction. + * Function returns received branch. */ static inline int vf_get_tableswitch_alternative( vf_Instr_t *code, // instruction @@ -503,7 +503,7 @@ * Function returns number of alternatives. */ static inline Verifier_Result -vf_set_lookupswitch_offsets( vf_Instr_t *code, // inctruction +vf_set_lookupswitch_offsets( vf_Instr_t *code, // instruction unsigned code_pc, // instruction offset in bytecode unsigned *index_p, // offset index in bytecode array unsigned char *bytecode, // array of bytecode @@ -691,7 +691,7 @@ } // vf_set_vector_stack_entry_addr /** - * Function sets signle word data type for given stack map vector entry. + * Function sets single word data type for given stack map vector entry. */ static inline void vf_set_vector_stack_entry_word( vf_MapEntry_t *vector, // stack map vector @@ -1198,12 +1198,12 @@ } // vf_set_out_vector_stack_entry_ref /** - * Function sets return adress data type for code instruction OUT stack map vector entry. + * Function sets return address data type for code instruction OUT stack map vector entry. */ static inline void vf_set_out_vector_stack_entry_addr( vf_Code_t *code, // code instruction unsigned num, // OUT vector entry number - unsigned count) // program coint + unsigned count) // program count { vf_set_vector_stack_entry_addr( code->m_outvector, num, count ); return; @@ -1398,7 +1398,7 @@ void vf_set_description_vector( const char *descr, // descriptor int inlen, // number of entries for IN vector - int add, // additional number of enties + int add, // additional number of entries // to IN data flow vector int outlen, // number of entries for OUT vector vf_MapEntry_t **invector, // pointer to IN vector @@ -3874,7 +3874,7 @@ } // vf_opcode_newarray /** - * Function recieves valid type string of array by array element name. + * Function receives valid type string of array by array element name. */ static inline const char * vf_get_class_array_valid_type( const char *element_name, // array element name @@ -5027,7 +5027,7 @@ result = VER_ErrorInstruction; goto labelEnd_vf_parse_bytecode; } - // skip 2 parametrs (u1 + u1) + // skip 2 parameters (u1 + u1) index += 1 + 1; break; case OPCODE_NEW: /* 0xbb + u2 */ @@ -5239,14 +5239,14 @@ vf_set_out_vector_stack_entry_ref( &code[index + 1], 0, type ); /** - * Set handler branchs + * Set handler branches * Set handler branches to last instructions of basic blocks */ for( count = start_pc + 1; count <= end_pc; count++ ) { if( count < len && codeInstr[count].m_mark ) { // calculate code instruction number instr = codeInstr[count].m_instr - 1; - // check existen of handler array + // check existence of handler array if( code[instr].m_handler == NULL ) { // create handler array for code instruction code[instr].m_handler = @@ -5313,7 +5313,7 @@ labelEnd_vf_parse_bytecode: /** - * Free alocated memory + * Free allocated memory */ ctex->m_codeNum = codeNum; ctex->m_nodeNum = bbCount; Index: ver_utils.cpp =================================================================== --- ver_utils.cpp (revision 489103) +++ ver_utils.cpp (working copy) @@ -377,7 +377,7 @@ void vf_TypePool::SetRestriction( const char *target, // target class name const char *source, // source class name - unsigned short index, // constrant pool index + unsigned short index, // constant pool index vf_CheckConstraint_t check_type) // constraint check type { vf_TypeConstraint_t *restriction; @@ -706,7 +706,7 @@ } // vf_resolve_class /** - * Function checkes if target class is super class of source class. + * Function checks if target class is super class of source class. */ static inline bool vf_is_super_class( class_handler source, // checked class @@ -722,7 +722,7 @@ } // vf_is_super_class /** - * Function checkes if target class is super interface of source class. + * Function checks if target class is super interface of source class. */ static inline bool vf_is_super_interface( class_handler source, // checked class @@ -773,7 +773,7 @@ } // vf_is_param_valid /** - * Function checkes narrow reference conversion between interface classes. + * Function checks narrow reference conversion between interface classes. * If class1 has method1 and class2 has method2, correspondingly, * and methods are the same name and signature, function returns 1. * If methods have different return types, function returns 0. @@ -812,7 +812,7 @@ } // vf_check_interface_methods /** - * Function checkes casting conversion between classes. + * Function checks casting conversion between classes. */ static bool vf_is_checkcast_valid( class_handler source, // checked class @@ -867,7 +867,7 @@ } // vf_is_checkcast_valid /** - * Function checkes assignment conversion between classes. + * Function checks assignment conversion between classes. * * If strict flag is true, strict assignment compatible check is provided, * else if strict flag is false, weak assignment compatible check is provided. @@ -984,7 +984,7 @@ } // vf_is_assign_valid /** - * Function checkes conversions between classes. + * Function checks conversions between classes. */ static bool vf_is_valid( class_handler source, // checked class @@ -1007,7 +1007,7 @@ case VF_CHECK_DIRECT_SUPER: // check if target is a direct super class of source return class_is_same_class( class_get_super_class( source ), target ); case VF_CHECK_ACCESS_FIELD: // protected field access - case VF_CHECK_ACCESS_METHOD: // protected method acceess + case VF_CHECK_ACCESS_METHOD: // protected method access return vf_is_super_class( source, current ); case VF_CHECK_INVOKESPECIAL: // check object for invokespecial instruction return vf_is_super_class( source, current ) @@ -1089,7 +1089,7 @@ * Checks some constraints without loading of needed classes. */ static inline Verifier_Result -vf_check_without_loading( vf_TypeConstraint_t *restriction, // checked constratint +vf_check_without_loading( vf_TypeConstraint_t *restriction, // checked constraint vf_Context_t *ctex) // verifier context { switch( restriction->check_type ) @@ -1194,7 +1194,7 @@ * to store restriction to the class for future constraint check. */ static inline Verifier_Result -vf_check_constraint( vf_TypeConstraint_t *restriction, // checked constratint +vf_check_constraint( vf_TypeConstraint_t *restriction, // checked constraint vf_Context_t *ctex) // verifier context { /** @@ -1309,8 +1309,8 @@ } // vf_check_access_constraint /** - * Function provides initial contraint checks for current class. - * Function checkes only loaded classes, and stores restriction for unloaded ones. + * Function provides initial constraint checks for current class. + * Function checks only loaded classes, and stores restriction for unloaded ones. */ Verifier_Result vf_check_class_constraints( vf_Context_t *ctex ) // verifier context @@ -1353,7 +1353,7 @@ } // vf_check_class_constraints /** - * Function checkes constraint for given class. + * Function checks constraint for given class. * Function loads classes if it's needed. */ static inline Verifier_Result @@ -1400,7 +1400,7 @@ /** * Verifier which is built on Java VM Specification 2nd Edition (4.9.2) - * recommendation of verification proccess doesn't check interfaces usage. + * recommendation of verification process doesn't check interfaces usage. * Unfortunately, a lot of Java applications depends on this neglect. * To be compatible with those applications we should do full constraint * checks only if -Xverify option is present in command line. Index: ver_dataflow.cpp =================================================================== --- ver_dataflow.cpp (revision 489103) +++ ver_dataflow.cpp (working copy) @@ -213,7 +213,7 @@ /** * Function merges two vectors and saves result vector to first vector. - * If first vector was changed, returns true, esle - false. + * If first vector was changed, returns true, else - false. */ static inline bool vf_merge_vectors( vf_MapVector_t *first, // first vector @@ -446,7 +446,7 @@ { return VER_ErrorDataFlow; } - // check local varible type + // check local variable type if( source->m_is_local && (!target->m_is_local || source->m_local != target->m_local) ) { @@ -483,7 +483,7 @@ { case VF_CHECK_NONE: case VF_CHECK_UNINITIALIZED_THIS: - case VF_CHECK_PARAM: // check method invocation convertion + case VF_CHECK_PARAM: // check method invocation conversion if( target->m_vtype != NULL ) { is_error = ctex->m_type->CheckTypes( target->m_vtype, source->m_vtype, 0, VF_CHECK_PARAM ); @@ -593,7 +593,7 @@ return VER_ErrorDataFlow; } - // check local varible type + // check local variable type if( entry1->m_is_local && (!entry2->m_is_local || entry1->m_local != entry2->m_local) ) { @@ -1194,7 +1194,7 @@ vf_MapVector_t *incoming, // incoming data flow vector vf_MapEntry_t *buf, // buf stack map vector unsigned *node_count, // last graph node in recursion - bool *need_recheck, // set to true if need to recheck privious nodes + bool *need_recheck, // set to true if need to recheck previous nodes vf_Context_t *ctex) // verifier context { // get graph @@ -1394,7 +1394,7 @@ vf_Graph_t *graph = ctex->m_graph; graph->CleanNodesMark(); - // set first enumiration node + // set first enumeration node graph->SetStartCountNode(0); graph->SetNodeMark( 0, VERIFY_START_MARK ); @@ -1403,7 +1403,7 @@ // get node by count element unsigned node_num = graph->GetCountElementNode( index ); if( node_num == ~0U ) { - // remove dead nodes from enumiration + // remove dead nodes from enumeration continue; }