96 const duk_uint8_t *p_start;
97 const duk_uint8_t *p_end;
98 const duk_uint8_t *p_found;
125 (
void *) h, (
long) char_offset,
134#ifdef DUK_USE_DDDPRINT
139 (
long) i, (
void *) c->
h, (
long) c->
cidx, (
long) c->
bidx));
161 dist_start = char_offset;
170 if (char_offset >= sce->
cidx) {
171 dist_sce = char_offset - sce->
cidx;
172 if ((dist_sce <= dist_start) && (dist_sce <= dist_end)) {
174 "dist_start=%ld, dist_end=%ld, dist_sce=%ld => "
175 "scan forwards from sce",
176 (
long) use_cache, (
void *) (sce ? sce->
h :
NULL),
177 (sce ? (
long) sce->
cidx : (long) -1),
178 (sce ? (long) sce->
bidx : (long) -1),
179 (long) dist_start, (
long) dist_end, (long) dist_sce));
187 dist_sce = sce->
cidx - char_offset;
188 if ((dist_sce <= dist_start) && (dist_sce <= dist_end)) {
190 "dist_start=%ld, dist_end=%ld, dist_sce=%ld => "
191 "scan backwards from sce",
192 (
long) use_cache, (
void *) (sce ? sce->
h :
NULL),
193 (sce ? (
long) sce->
cidx : (long) -1),
194 (sce ? (long) sce->
bidx : (long) -1),
195 (long) dist_start, (
long) dist_end, (long) dist_sce));
207 if (dist_start <= dist_end) {
209 "dist_start=%ld, dist_end=%ld, dist_sce=%ld => "
210 "scan forwards from string start",
211 (
long) use_cache, (
void *) (sce ? sce->
h :
NULL),
212 (sce ? (
long) sce->
cidx : (long) -1),
213 (sce ? (long) sce->
bidx : (long) -1),
214 (long) dist_start, (
long) dist_end, (long) dist_sce));
221 "dist_start=%ld, dist_end=%ld, dist_sce=%ld => "
222 "scan backwards from string end",
223 (
long) use_cache, (
void *) (sce ? sce->
h :
NULL),
224 (sce ? (
long) sce->
cidx : (long) -1),
225 (sce ? (long) sce->
bidx : (long) -1),
226 (long) dist_start, (
long) dist_end, (long) dist_sce));
245 byte_offset = (duk_uint32_t) (p_found - p_start);
248 (
void *) h, (
long) char_offset, (
long) byte_offset));
262 sce->
bidx = (duk_uint32_t) (p_found - p_start);
263 sce->
cidx = (duk_uint32_t) char_offset;
277 (
const void *) (&heap->
strcache[0]),
278 (
size_t) (((
char *) sce) - ((
char *) &heap->
strcache[0])));
283#ifdef DUK_USE_DDDPRINT
288 (
long) i, (
void *) c->
h, (
long) c->
cidx, (
long) c->
bidx));