Changeset 151 for trunk/src/engine.c


Ignore:
Timestamp:
May 22, 2008, 2:42:11 PM (11 years ago)
Author:
lindanl
Message:

Performance test definitions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/engine.c

    r147 r151  
    640640//      int lgth = AbsPos()-name_start;
    641641
     642#if (not defined(OMISSION)) or ((OMISSION != END_TAG_MATCHING)  and (OMISSION != NAME_LOOKUP))
    642643        char * start_elem_name = model_info->symbol_table->Get_UTF8_name(nameID);
    643644        int lgth = model_info->symbol_table->Get_UTF8_lgth(nameID);
     
    673674            }
    674675        }
    675 //     
     676#endif
     677#if defined(OMISSION) and ((OMISSION == END_TAG_MATCHING) or (OMISSION == NAME_LOOKUP))
     678        ScanTo(NameFollow);
     679#endif
    676680//      for(int i=0; i<lgth; i++) {
    677681//              if (start_elem_name[i] != end_elem_name[i])
     
    727731                        int att_nameID = Parse_Name();
    728732                        att_name_end = AbsPos();
    729                
     733                #if (not defined(OMISSION)) or ((OMISSION != ATTRIBUTE_UNIQUENESS) and (OMISSION != NAME_LOOKUP))
    730734                        int attID = model_info->getOrInsertGlobalAttName(att_nameID);
    731735                        if (attID >= LastAttOccurrence.size()) LastAttOccurrence.push_back(0);
     
    737741                        }
    738742                        LastAttOccurrence[attID] = att_name_start;
     743                 #endif
    739744                        /* The following optimized tests handle the frequently occurring
    740745                        case that there are no blanks on either side of the equals sign.
     
    814819        }
    815820}
    816 
    817821
    818822template <CodeUnit_Base C>
     
    18821886                        att_name_start = AbsPos();
    18831887                        int att_nameID = Parse_Name();
    1884                
     1888                        #if (not defined(OMISSION)) or (OMISSION != ATTRIBUTE_UNIQUENESS)
    18851889                        int attID = model_info->getOrInsertGlobalAttName(att_nameID);
    18861890                        if (attID >= LastAttOccurrence.size()) LastAttOccurrence.push_back(0);
     
    18921896                        }
    18931897                        LastAttOccurrence[attID] = att_name_start;
     1898                        #endif
    18941899                        /* The following optimized tests handle the frequently occurring
    18951900                        case that there are no blanks on either side of the equals sign.
     
    21572162        int name_pos = AbsPos();
    21582163        ScanTo(NameFollow);
     2164        #if (not defined(OMISSION)) or (OMISSION != NAME_LOOKUP)
    21592165        int lgth = AbsPos()-name_pos;
     2166
    21602167        if (entity_Info->version == XML_1_1){
    21612168                return model_info->symbol_table->UTF8_Lookup_or_Insert_XML11_Name((char *)GetCodeUnitPtr(name_pos),lgth);
     
    21632170        else
    21642171                return model_info->symbol_table->UTF8_Lookup_or_Insert_XML10_Name((char *)GetCodeUnitPtr(name_pos),lgth);
     2172        #endif
    21652173}
    21662174
     
    21682176template <CodeUnit_Base C>
    21692177inline void ParsingEngine<C>::Parse_DocumentContent() {
    2170 #ifdef VALIDATION
    2171         printf("Validation Mode On!\n");
     2178#if (VALIDATION_MODE == ON)
    21722179        int final_state = Parse_ValidContent(model_info->rootModel);
    21732180        if (model_info->rootModel->transition_map[final_state][0]==0) {
     
    21752182        }
    21762183#endif
    2177 #ifndef VALIDATION     
     2184#if (VALIDATION_MODE == OFF)   
    21782185        Parse_WF_Element();
    21792186        ScanTo(NonWS);
Note: See TracChangeset for help on using the changeset viewer.