Changeset 14 for trunk/src/bitlex.c


Ignore:
Timestamp:
Dec 29, 2007, 7:19:45 AM (11 years ago)
Author:
cameron
Message:

Optimized ]]> testing; end-tag scan

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bitlex.c

    r13 r14  
    1212
    1313#include "transpose.h"
     14
     15
    1416
    1517Lexer::Lexer(XML_Buffer *b, ParallelStreamSet *p) {
     
    4547  BitBlock LAngle = simd_and(temp8, temp14);
    4648  BitBlock temp15 = simd_and(temp12, temp5);
    47   LexItem[RAngle] = simd_and(temp8, temp15);
     49  BitBlock RAngle = simd_and(temp8, temp15);
    4850  BitBlock temp16 = simd_andc(bit[1], bit[0]);
    4951  BitBlock temp17 = simd_andc(bit[3], bit[2]);
     
    5153  BitBlock temp19 = simd_andc(bit[7], bit[6]);
    5254  BitBlock temp20 = simd_and(temp12, temp19);
    53   LexItem[RBracket] = simd_and(temp18, temp20);
     55  BitBlock RBracket = simd_and(temp18, temp20);
    5456  LexItem[Hyphen] = simd_and(temp3, temp20);
    5557  BitBlock temp21 = simd_and(temp12, temp10);
     
    7981  LexItem[SQuote] = simd_or(LexItem[SQuote], AttScan);
    8082  LexItem[DQuote] = simd_or(LexItem[DQuote], AttScan);
    81 #ifdef OMIT_RBracket_In_Markup_Scan
     83
     84  /* Mark potential occurrences of ']]>'  These are all actual
     85     occurrences of ]]> as well as occurrences of ]] or ] at
     86     the block end. Shifting the RBracket and RAngle streams in
     87     negated forms ensures that a potential CD_End is not ruled
     88     out at the block boundary. */
     89  LexItem[CD_End_check] = simd_andc(RBracket,
     90                                simd_or(simd_sbli_64(simd_not(RBracket), 1),
     91                                        simd_sbli_64(simd_not(RAngle), 2)));
     92#ifdef OMIT_CD_End_check_In_Markup_Scan
    8293LexItem[MarkupStart] = simd_or(LAngle, RefStart);
    8394#endif
    84 #ifndef OMIT_RBracket_In_Markup_Scan
    85   LexItem[MarkupStart] = simd_or(simd_or(LAngle, RefStart), LexItem[RBracket]);
     95#ifndef OMIT_CD_End_check_In_Markup_Scan
     96  LexItem[MarkupStart] = simd_or(simd_or(LAngle, RefStart), LexItem[CD_End_check]);
    8697#endif
    8798  LexItem[NonWS] = simd_not(WhiteSpace);
    8899  LexItem[NameFollow] = simd_or(simd_or(simd_or(WhiteSpace, Semicolon),
    89                                         simd_or(Slash, LexItem[RAngle])),
     100                                        simd_or(Slash, RAngle)),
    90101                                simd_or(Equals, LexItem[QMark]));
    91102}
     
    119130#endif
    120131}
    121 #if BYTE_ORDER == BIG_ENDIAN
    122 #define sisd_sfl(blk, n) sisd_srl(blk, n)
    123 #endif
    124 #if BYTE_ORDER == LITTLE_ENDIAN
    125 #define sisd_sfl(blk, n) sisd_sll(blk, n)
    126 #endif
    127132
    128133
Note: See TracChangeset for help on using the changeset viewer.