• Home
  • Raw
  • Download

Lines Matching refs:pos

32 BytesTrie::readValue(const uint8_t *pos, int32_t leadByte) {  in readValue()  argument
37 value=((leadByte-kMinTwoByteValueLead)<<8)|*pos; in readValue()
39 value=((leadByte-kMinThreeByteValueLead)<<16)|(pos[0]<<8)|pos[1]; in readValue()
41 value=(pos[0]<<16)|(pos[1]<<8)|pos[2]; in readValue()
43 value=(pos[0]<<24)|(pos[1]<<16)|(pos[2]<<8)|pos[3]; in readValue()
49 BytesTrie::jumpByDelta(const uint8_t *pos) { in jumpByDelta() argument
50 int32_t delta=*pos++; in jumpByDelta()
54 delta=((delta-kMinTwoByteDeltaLead)<<8)|*pos++; in jumpByDelta()
56 delta=((delta-kMinThreeByteDeltaLead)<<16)|(pos[0]<<8)|pos[1]; in jumpByDelta()
57 pos+=2; in jumpByDelta()
59 delta=(pos[0]<<16)|(pos[1]<<8)|pos[2]; in jumpByDelta()
60 pos+=3; in jumpByDelta()
62 delta=(pos[0]<<24)|(pos[1]<<16)|(pos[2]<<8)|pos[3]; in jumpByDelta()
63 pos+=4; in jumpByDelta()
65 return pos+delta; in jumpByDelta()
70 const uint8_t *pos=pos_; in current() local
71 if(pos==NULL) { in current()
75 return (remainingMatchLength_<0 && (node=*pos)>=kMinValueLead) ? in current()
81 BytesTrie::branchNext(const uint8_t *pos, int32_t length, int32_t inByte) { in branchNext() argument
84 length=*pos++; in branchNext()
90 if(inByte<*pos++) { in branchNext()
92 pos=jumpByDelta(pos); in branchNext()
95 pos=skipDelta(pos); in branchNext()
102 if(inByte==*pos++) { in branchNext()
104 int32_t node=*pos; in branchNext()
111 ++pos; in branchNext()
118 delta=((node-kMinTwoByteValueLead)<<8)|*pos++; in branchNext()
120 delta=((node-kMinThreeByteValueLead)<<16)|(pos[0]<<8)|pos[1]; in branchNext()
121 pos+=2; in branchNext()
123 delta=(pos[0]<<16)|(pos[1]<<8)|pos[2]; in branchNext()
124 pos+=3; in branchNext()
126 delta=(pos[0]<<24)|(pos[1]<<16)|(pos[2]<<8)|pos[3]; in branchNext()
127 pos+=4; in branchNext()
130 pos+=delta; in branchNext()
131 node=*pos; in branchNext()
134 pos_=pos; in branchNext()
138 pos=skipValue(pos); in branchNext()
140 if(inByte==*pos++) { in branchNext()
141 pos_=pos; in branchNext()
142 int32_t node=*pos; in branchNext()
151 BytesTrie::nextImpl(const uint8_t *pos, int32_t inByte) { in nextImpl() argument
153 int32_t node=*pos++; in nextImpl()
155 return branchNext(pos, node, inByte); in nextImpl()
159 if(inByte==*pos++) { in nextImpl()
161 pos_=pos; in nextImpl()
162 return (length<0 && (node=*pos)>=kMinValueLead) ? in nextImpl()
173 pos=skipValue(pos, node); in nextImpl()
175 U_ASSERT(*pos<kMinValueLead); in nextImpl()
184 const uint8_t *pos=pos_; in next() local
185 if(pos==NULL) { in next()
194 if(inByte==*pos++) { in next()
196 pos_=pos; in next()
198 return (length<0 && (node=*pos)>=kMinValueLead) ? in next()
205 return nextImpl(pos, inByte); in next()
214 const uint8_t *pos=pos_; in next() local
215 if(pos==NULL) { in next()
227 pos_=pos; in next()
229 return (length<0 && (node=*pos)>=kMinValueLead) ? in next()
236 if(inByte!=*pos) { in next()
240 ++pos; in next()
247 pos_=pos; in next()
249 return (length<0 && (node=*pos)>=kMinValueLead) ? in next()
258 if(inByte!=*pos) { in next()
262 ++pos; in next()
267 int32_t node=*pos++; in next()
269 UStringTrieResult result=branchNext(pos, node, inByte); in next()
290 pos=pos_; // branchNext() advanced pos and wrote it to pos_ . in next()
294 if(inByte!=*pos) { in next()
298 ++pos; in next()
307 pos=skipValue(pos, node); in next()
309 U_ASSERT(*pos<kMinValueLead); in next()
316 BytesTrie::findUniqueValueFromBranch(const uint8_t *pos, int32_t length, in findUniqueValueFromBranch() argument
319 ++pos; // ignore the comparison byte in findUniqueValueFromBranch()
320 … if(NULL==findUniqueValueFromBranch(jumpByDelta(pos), length>>1, haveUniqueValue, uniqueValue)) { in findUniqueValueFromBranch()
324 pos=skipDelta(pos); in findUniqueValueFromBranch()
327 ++pos; // ignore a comparison byte in findUniqueValueFromBranch()
329 int32_t node=*pos++; in findUniqueValueFromBranch()
331 int32_t value=readValue(pos, node>>1); in findUniqueValueFromBranch()
332 pos=skipValue(pos, node); in findUniqueValueFromBranch()
343 if(!findUniqueValue(pos+value, haveUniqueValue, uniqueValue)) { in findUniqueValueFromBranch()
349 return pos+1; // ignore the last comparison byte in findUniqueValueFromBranch()
353 BytesTrie::findUniqueValue(const uint8_t *pos, UBool haveUniqueValue, int32_t &uniqueValue) { in findUniqueValue() argument
355 int32_t node=*pos++; in findUniqueValue()
358 node=*pos++; in findUniqueValue()
360 pos=findUniqueValueFromBranch(pos, node+1, haveUniqueValue, uniqueValue); in findUniqueValue()
361 if(pos==NULL) { in findUniqueValue()
367 pos+=node-kMinLinearMatch+1; // Ignore the match bytes. in findUniqueValue()
370 int32_t value=readValue(pos, node>>1); in findUniqueValue()
382 pos=skipValue(pos, node); in findUniqueValue()
389 const uint8_t *pos=pos_; in getNextBytes() local
390 if(pos==NULL) { in getNextBytes()
394 append(out, *pos); // Next byte of a pending linear-match node. in getNextBytes()
397 int32_t node=*pos++; in getNextBytes()
402 pos=skipValue(pos, node); in getNextBytes()
403 node=*pos++; in getNextBytes()
409 node=*pos++; in getNextBytes()
411 getNextBranchBytes(pos, ++node, out); in getNextBytes()
415 append(out, *pos); in getNextBytes()
421 BytesTrie::getNextBranchBytes(const uint8_t *pos, int32_t length, ByteSink &out) { in getNextBranchBytes() argument
423 ++pos; // ignore the comparison byte in getNextBranchBytes()
424 getNextBranchBytes(jumpByDelta(pos), length>>1, out); in getNextBranchBytes()
426 pos=skipDelta(pos); in getNextBranchBytes()
429 append(out, *pos++); in getNextBranchBytes()
430 pos=skipValue(pos); in getNextBranchBytes()
432 append(out, *pos); in getNextBranchBytes()