Home | History | Annotate | Download | only in LD

Lines Matching refs:range

31 // Range
33 Layout::Range::Range()
38 Layout::Range::Range(const LDSection& pHdr)
43 Layout::Range::~Range()
95 /// also set up the layout offsets of all the fragments in the same range.
132 /// 1. add a new range <pInputHdr, previous rear fragment>
149 // make a range and push it into the range list
150 Range* range = new Range(pInputHdr);
151 range_list->push_back(range);
153 // set up previous rear of the range.
154 // FIXME: in current design, we can not add a range before finishing adding
155 // fragments in the previous range. If the limitation keeps, we can set
158 // if the pSD's fragment list is empty, the range.prevRear keeps NULL.
160 range->prevRear =
164 // compute the layout order of the previous range.
165 if (!isFirstRange(*range)) {
166 setFragmentLayoutOrder(range->prevRear);
167 setFragmentLayoutOffset(range->prevRear);
220 // check the SectionData's range list
230 // the fragment who has the layout order is not in the last range.
232 Range range = range_list->back();
233 if (isFirstRange(range)) {
234 return range.header;
236 while(range.prevRear->getLayoutOrder() > pFrag.getLayoutOrder()) {
237 if (NULL != range.getPrevNode())
238 range = *range.getPrevNode();
242 return range.header;
244 // the fragment who has no layout order should be in the last range
264 // check the SectionData's range list
275 // the fragment who has the layout order is not in the last range.
277 Range range = range_list->back();
278 if (isFirstRange(range)) {
279 return range.header;
281 while(range.prevRear->getLayoutOrder() > pFrag.getLayoutOrder()) {
282 if (NULL != range.getPrevNode())
283 range = *range.getPrevNode();
287 return range.header;
289 // the fragment who has no layout order should be in the last range
318 FragmentRef* Layout::getFragmentRef(Layout::Range& pRange, uint64_t pOffset)
334 // @param pFront is the first fragment in the range.
335 // @param pRear is the last fragment in the range.
404 // find out which SectionData covers the range of input section header
407 // check range list
416 // find out the specific part in SectionData range
417 RangeList::iterator range, rangeEnd = range_list->end();
418 for (range = range_list->begin(); range != rangeEnd; ++range) {
419 // found the range
420 if (&pInputSection == range->header) {
425 // range not found
426 if (range == rangeEnd) {
430 return getFragmentRef(*range, pOffset);
449 // find out which SectionData covers the range of input section header
452 // check range list
455 llvm::Twine(" correponding range list.\n"));
463 // find out the specific part in SectionData range
466 RangeList::iterator range, rangeEnd = range_list->end();
467 for (range = range_list->begin(); range != rangeEnd; ++range) {
468 if (isEmptyRange(*range))
470 if (getRear(*range)->getOffset() >= target_offset) {
475 // range not found
476 if (range == rangeEnd) {
478 llvm::Twine(" never be in the range list.\n"));
481 return getFragmentRef(*range, pBigOffset);