mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 08:32:11 +01:00
Add std/json while.string_loop_outer loop name
This commit is contained in:
1 parent
02b2ecd29e
commit
19967648ef
2 files changed
+38
-38
No files matched your search
@@ -19415,13 +19415,13 @@ wuffs_json__decoder__decode_tokens(wuffs_json__decoder* self,
|
||||
(((uint64_t)(1)) << WUFFS_BASE__TOKEN__LINK__SHIFT) |
|
||||
(((uint64_t)(1)) << WUFFS_BASE__TOKEN__LENGTH__SHIFT));
|
||||
(iop_a_src += 1, wuffs_base__make_empty_struct());
|
||||
label__string_loop__continue:;
|
||||
label__string_loop_outer__continue:;
|
||||
while (true) {
|
||||
if (((uint64_t)(io2_a_dst - iop_a_dst)) <= 0) {
|
||||
status =
|
||||
wuffs_base__make_status(wuffs_base__suspension__short_write);
|
||||
WUFFS_BASE__COROUTINE_SUSPENSION_POINT_MAYBE_SUSPEND(3);
|
||||
goto label__string_loop__continue;
|
||||
goto label__string_loop_outer__continue;
|
||||
}
|
||||
v_string_length = 0;
|
||||
label__string_loop_inner__continue:;
|
||||
@@ -19445,7 +19445,7 @@ wuffs_json__decoder__decode_tokens(wuffs_json__decoder* self,
|
||||
wuffs_base__make_status(wuffs_base__suspension__short_read);
|
||||
WUFFS_BASE__COROUTINE_SUSPENSION_POINT_MAYBE_SUSPEND(4);
|
||||
v_string_length = 0;
|
||||
goto label__string_loop__continue;
|
||||
goto label__string_loop_outer__continue;
|
||||
}
|
||||
v_c = wuffs_base__load_u8be__no_bounds_check(iop_a_src);
|
||||
v_char = wuffs_json__lut_chars[v_c];
|
||||
@@ -19459,7 +19459,7 @@ wuffs_json__decoder__decode_tokens(wuffs_json__decoder* self,
|
||||
(((uint64_t)(65532))
|
||||
<< WUFFS_BASE__TOKEN__LENGTH__SHIFT));
|
||||
v_string_length = 0;
|
||||
goto label__string_loop__continue;
|
||||
goto label__string_loop_outer__continue;
|
||||
}
|
||||
v_string_length += 1;
|
||||
goto label__string_loop_inner__continue;
|
||||
@@ -19473,7 +19473,7 @@ wuffs_json__decoder__decode_tokens(wuffs_json__decoder* self,
|
||||
<< WUFFS_BASE__TOKEN__LENGTH__SHIFT));
|
||||
v_string_length = 0;
|
||||
}
|
||||
goto label__string_loop__break;
|
||||
goto label__string_loop_outer__break;
|
||||
} else if (v_char == 2) {
|
||||
if (v_string_length > 0) {
|
||||
*iop_a_dst++ = wuffs_base__make_token(
|
||||
@@ -19484,7 +19484,7 @@ wuffs_json__decoder__decode_tokens(wuffs_json__decoder* self,
|
||||
<< WUFFS_BASE__TOKEN__LENGTH__SHIFT));
|
||||
v_string_length = 0;
|
||||
if (((uint64_t)(io2_a_dst - iop_a_dst)) <= 0) {
|
||||
goto label__string_loop__continue;
|
||||
goto label__string_loop_outer__continue;
|
||||
}
|
||||
}
|
||||
if (((uint64_t)(io2_a_src - iop_a_src)) < 2) {
|
||||
@@ -19498,7 +19498,7 @@ wuffs_json__decoder__decode_tokens(wuffs_json__decoder* self,
|
||||
WUFFS_BASE__COROUTINE_SUSPENSION_POINT_MAYBE_SUSPEND(5);
|
||||
v_string_length = 0;
|
||||
v_char = 0;
|
||||
goto label__string_loop__continue;
|
||||
goto label__string_loop_outer__continue;
|
||||
}
|
||||
v_c = ((uint8_t)(
|
||||
(wuffs_base__load_u16le__no_bounds_check(iop_a_src) >> 8)));
|
||||
@@ -19511,7 +19511,7 @@ wuffs_json__decoder__decode_tokens(wuffs_json__decoder* self,
|
||||
<< WUFFS_BASE__TOKEN__VALUE_MINOR__SHIFT) |
|
||||
(((uint64_t)(3)) << WUFFS_BASE__TOKEN__LINK__SHIFT) |
|
||||
(((uint64_t)(2)) << WUFFS_BASE__TOKEN__LENGTH__SHIFT));
|
||||
goto label__string_loop__continue;
|
||||
goto label__string_loop_outer__continue;
|
||||
} else if (v_c == 117) {
|
||||
if (((uint64_t)(io2_a_src - iop_a_src)) < 6) {
|
||||
if (a_src && a_src->meta.closed) {
|
||||
@@ -19524,7 +19524,7 @@ wuffs_json__decoder__decode_tokens(wuffs_json__decoder* self,
|
||||
WUFFS_BASE__COROUTINE_SUSPENSION_POINT_MAYBE_SUSPEND(6);
|
||||
v_string_length = 0;
|
||||
v_char = 0;
|
||||
goto label__string_loop__continue;
|
||||
goto label__string_loop_outer__continue;
|
||||
}
|
||||
v_uni4_string =
|
||||
(((uint64_t)(wuffs_base__load_u48le__no_bounds_check(
|
||||
@@ -19556,7 +19556,7 @@ wuffs_json__decoder__decode_tokens(wuffs_json__decoder* self,
|
||||
<< WUFFS_BASE__TOKEN__VALUE_MINOR__SHIFT) |
|
||||
(((uint64_t)(3)) << WUFFS_BASE__TOKEN__LINK__SHIFT) |
|
||||
(((uint64_t)(6)) << WUFFS_BASE__TOKEN__LENGTH__SHIFT));
|
||||
goto label__string_loop__continue;
|
||||
goto label__string_loop_outer__continue;
|
||||
} else if (v_uni4_value >= 56320) {
|
||||
} else {
|
||||
if (((uint64_t)(io2_a_src - iop_a_src)) < 12) {
|
||||
@@ -19571,7 +19571,7 @@ wuffs_json__decoder__decode_tokens(wuffs_json__decoder* self,
|
||||
v_string_length = 0;
|
||||
v_uni4_value = 0;
|
||||
v_char = 0;
|
||||
goto label__string_loop__continue;
|
||||
goto label__string_loop_outer__continue;
|
||||
}
|
||||
(iop_a_src += 4, wuffs_base__make_empty_struct());
|
||||
v_uni4_string =
|
||||
@@ -19616,7 +19616,7 @@ wuffs_json__decoder__decode_tokens(wuffs_json__decoder* self,
|
||||
(((uint64_t)(3)) << WUFFS_BASE__TOKEN__LINK__SHIFT) |
|
||||
(((uint64_t)(12))
|
||||
<< WUFFS_BASE__TOKEN__LENGTH__SHIFT));
|
||||
goto label__string_loop__continue;
|
||||
goto label__string_loop_outer__continue;
|
||||
} else {
|
||||
v_uni4_rollback = 4;
|
||||
while (v_uni4_rollback > 0) {
|
||||
@@ -19656,7 +19656,7 @@ wuffs_json__decoder__decode_tokens(wuffs_json__decoder* self,
|
||||
WUFFS_BASE__COROUTINE_SUSPENSION_POINT_MAYBE_SUSPEND(8);
|
||||
v_string_length = 0;
|
||||
v_char = 0;
|
||||
goto label__string_loop__continue;
|
||||
goto label__string_loop_outer__continue;
|
||||
}
|
||||
v_multi_byte_utf8 = ((uint32_t)(
|
||||
wuffs_base__load_u16le__no_bounds_check(iop_a_src)));
|
||||
@@ -19672,7 +19672,7 @@ wuffs_json__decoder__decode_tokens(wuffs_json__decoder* self,
|
||||
(((uint64_t)((v_string_length + 2)))
|
||||
<< WUFFS_BASE__TOKEN__LENGTH__SHIFT));
|
||||
v_string_length = 0;
|
||||
goto label__string_loop__continue;
|
||||
goto label__string_loop_outer__continue;
|
||||
}
|
||||
v_string_length += 2;
|
||||
goto label__string_loop_inner__continue;
|
||||
@@ -19698,7 +19698,7 @@ wuffs_json__decoder__decode_tokens(wuffs_json__decoder* self,
|
||||
WUFFS_BASE__COROUTINE_SUSPENSION_POINT_MAYBE_SUSPEND(9);
|
||||
v_string_length = 0;
|
||||
v_char = 0;
|
||||
goto label__string_loop__continue;
|
||||
goto label__string_loop_outer__continue;
|
||||
}
|
||||
v_multi_byte_utf8 = ((uint32_t)(
|
||||
wuffs_base__load_u24le__no_bounds_check(iop_a_src)));
|
||||
@@ -19718,7 +19718,7 @@ wuffs_json__decoder__decode_tokens(wuffs_json__decoder* self,
|
||||
(((uint64_t)((v_string_length + 3)))
|
||||
<< WUFFS_BASE__TOKEN__LENGTH__SHIFT));
|
||||
v_string_length = 0;
|
||||
goto label__string_loop__continue;
|
||||
goto label__string_loop_outer__continue;
|
||||
}
|
||||
v_string_length += 3;
|
||||
goto label__string_loop_inner__continue;
|
||||
@@ -19745,7 +19745,7 @@ wuffs_json__decoder__decode_tokens(wuffs_json__decoder* self,
|
||||
WUFFS_BASE__COROUTINE_SUSPENSION_POINT_MAYBE_SUSPEND(10);
|
||||
v_string_length = 0;
|
||||
v_char = 0;
|
||||
goto label__string_loop__continue;
|
||||
goto label__string_loop_outer__continue;
|
||||
}
|
||||
v_multi_byte_utf8 =
|
||||
wuffs_base__load_u32le__no_bounds_check(iop_a_src);
|
||||
@@ -19765,7 +19765,7 @@ wuffs_json__decoder__decode_tokens(wuffs_json__decoder* self,
|
||||
(((uint64_t)((v_string_length + 4)))
|
||||
<< WUFFS_BASE__TOKEN__LENGTH__SHIFT));
|
||||
v_string_length = 0;
|
||||
goto label__string_loop__continue;
|
||||
goto label__string_loop_outer__continue;
|
||||
}
|
||||
v_string_length += 4;
|
||||
goto label__string_loop_inner__continue;
|
||||
@@ -19790,7 +19790,7 @@ wuffs_json__decoder__decode_tokens(wuffs_json__decoder* self,
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
label__string_loop__break:;
|
||||
label__string_loop_outer__break:;
|
||||
label__0__continue:;
|
||||
while (true) {
|
||||
if (((uint64_t)(io2_a_src - iop_a_src)) <= 0) {
|
||||
|
||||
+19
-19
@@ -164,10 +164,10 @@ pub func decoder.decode_tokens?(dst: base.token_writer, src: base.io_reader) {
|
||||
length: 1)
|
||||
args.src.skip32_fast!(actual: 1, worst_case: 1)
|
||||
|
||||
while.string_loop true {
|
||||
while.string_loop_outer true {
|
||||
if args.dst.available() <= 0 {
|
||||
yield? base."$short write"
|
||||
continue.string_loop
|
||||
continue.string_loop_outer
|
||||
}
|
||||
|
||||
string_length = 0
|
||||
@@ -188,7 +188,7 @@ pub func decoder.decode_tokens?(dst: base.token_writer, src: base.io_reader) {
|
||||
}
|
||||
yield? base."$short read"
|
||||
string_length = 0
|
||||
continue.string_loop
|
||||
continue.string_loop_outer
|
||||
}
|
||||
c = args.src.peek_u8()
|
||||
char = lut_chars[c]
|
||||
@@ -202,7 +202,7 @@ pub func decoder.decode_tokens?(dst: base.token_writer, src: base.io_reader) {
|
||||
link: 0x3,
|
||||
length: 0xFFFC)
|
||||
string_length = 0
|
||||
continue.string_loop
|
||||
continue.string_loop_outer
|
||||
}
|
||||
string_length += 1
|
||||
continue.string_loop_inner
|
||||
@@ -216,7 +216,7 @@ pub func decoder.decode_tokens?(dst: base.token_writer, src: base.io_reader) {
|
||||
length: string_length)
|
||||
string_length = 0
|
||||
}
|
||||
break.string_loop
|
||||
break.string_loop_outer
|
||||
|
||||
} else if char == 0x02 { // '\\'.
|
||||
if string_length > 0 {
|
||||
@@ -227,7 +227,7 @@ pub func decoder.decode_tokens?(dst: base.token_writer, src: base.io_reader) {
|
||||
length: string_length)
|
||||
string_length = 0
|
||||
if args.dst.available() <= 0 {
|
||||
continue.string_loop
|
||||
continue.string_loop_outer
|
||||
}
|
||||
}
|
||||
assert args.dst.available() > 0
|
||||
@@ -239,7 +239,7 @@ pub func decoder.decode_tokens?(dst: base.token_writer, src: base.io_reader) {
|
||||
yield? base."$short read"
|
||||
string_length = 0
|
||||
char = 0
|
||||
continue.string_loop
|
||||
continue.string_loop_outer
|
||||
}
|
||||
c = (args.src.peek_u16le() >> 8) as base.u8
|
||||
backslash = lut_backslashes[c]
|
||||
@@ -250,7 +250,7 @@ pub func decoder.decode_tokens?(dst: base.token_writer, src: base.io_reader) {
|
||||
value_minor: 0x60_0000 | ((backslash & 0x7F) as base.u32),
|
||||
link: 0x3,
|
||||
length: 2)
|
||||
continue.string_loop
|
||||
continue.string_loop_outer
|
||||
|
||||
} else if c == 0x75 { // 0x75 is 'u'.
|
||||
// -------- BEGIN backslash-u.
|
||||
@@ -261,7 +261,7 @@ pub func decoder.decode_tokens?(dst: base.token_writer, src: base.io_reader) {
|
||||
yield? base."$short read"
|
||||
string_length = 0
|
||||
char = 0
|
||||
continue.string_loop
|
||||
continue.string_loop_outer
|
||||
}
|
||||
|
||||
uni4_string = args.src.peek_u48le_as_u64() >> 16
|
||||
@@ -294,7 +294,7 @@ pub func decoder.decode_tokens?(dst: base.token_writer, src: base.io_reader) {
|
||||
value_minor: 0x60_0000 | uni4_value,
|
||||
link: 0x3,
|
||||
length: 6)
|
||||
continue.string_loop
|
||||
continue.string_loop_outer
|
||||
|
||||
} else if uni4_value >= 0xDC00 {
|
||||
// Low surrogate. No-op (and fall through
|
||||
@@ -313,7 +313,7 @@ pub func decoder.decode_tokens?(dst: base.token_writer, src: base.io_reader) {
|
||||
string_length = 0
|
||||
uni4_value = 0
|
||||
char = 0
|
||||
continue.string_loop
|
||||
continue.string_loop_outer
|
||||
}
|
||||
|
||||
// Roll forward 4 bytes, so that calling
|
||||
@@ -360,7 +360,7 @@ pub func decoder.decode_tokens?(dst: base.token_writer, src: base.io_reader) {
|
||||
value_minor: 0x60_0000 | uni4_high_surrogate | uni4_value,
|
||||
link: 0x3,
|
||||
length: 12)
|
||||
continue.string_loop
|
||||
continue.string_loop_outer
|
||||
|
||||
} else {
|
||||
// Roll back the 4 bytes, then fall
|
||||
@@ -398,7 +398,7 @@ pub func decoder.decode_tokens?(dst: base.token_writer, src: base.io_reader) {
|
||||
yield? base."$short read"
|
||||
string_length = 0
|
||||
char = 0
|
||||
continue.string_loop
|
||||
continue.string_loop_outer
|
||||
}
|
||||
multi_byte_utf8 = args.src.peek_u16le_as_u32()
|
||||
if (multi_byte_utf8 & 0xC000) == 0x8000 {
|
||||
@@ -412,7 +412,7 @@ pub func decoder.decode_tokens?(dst: base.token_writer, src: base.io_reader) {
|
||||
link: 0x3,
|
||||
length: string_length + 2)
|
||||
string_length = 0
|
||||
continue.string_loop
|
||||
continue.string_loop_outer
|
||||
}
|
||||
string_length += 2
|
||||
continue.string_loop_inner
|
||||
@@ -434,7 +434,7 @@ pub func decoder.decode_tokens?(dst: base.token_writer, src: base.io_reader) {
|
||||
yield? base."$short read"
|
||||
string_length = 0
|
||||
char = 0
|
||||
continue.string_loop
|
||||
continue.string_loop_outer
|
||||
}
|
||||
multi_byte_utf8 = args.src.peek_u24le_as_u32()
|
||||
if (multi_byte_utf8 & 0xC0_C000) == 0x80_8000 {
|
||||
@@ -452,7 +452,7 @@ pub func decoder.decode_tokens?(dst: base.token_writer, src: base.io_reader) {
|
||||
link: 0x3,
|
||||
length: string_length + 3)
|
||||
string_length = 0
|
||||
continue.string_loop
|
||||
continue.string_loop_outer
|
||||
}
|
||||
string_length += 3
|
||||
continue.string_loop_inner
|
||||
@@ -475,7 +475,7 @@ pub func decoder.decode_tokens?(dst: base.token_writer, src: base.io_reader) {
|
||||
yield? base."$short read"
|
||||
string_length = 0
|
||||
char = 0
|
||||
continue.string_loop
|
||||
continue.string_loop_outer
|
||||
}
|
||||
multi_byte_utf8 = args.src.peek_u32le()
|
||||
if (multi_byte_utf8 & 0xC0C0_C000) == 0x8080_8000 {
|
||||
@@ -492,7 +492,7 @@ pub func decoder.decode_tokens?(dst: base.token_writer, src: base.io_reader) {
|
||||
link: 0x3,
|
||||
length: string_length + 4)
|
||||
string_length = 0
|
||||
continue.string_loop
|
||||
continue.string_loop_outer
|
||||
}
|
||||
string_length += 4
|
||||
continue.string_loop_inner
|
||||
@@ -513,7 +513,7 @@ pub func decoder.decode_tokens?(dst: base.token_writer, src: base.io_reader) {
|
||||
}
|
||||
return "#bad UTF-8"
|
||||
} endwhile.string_loop_inner
|
||||
} endwhile.string_loop
|
||||
} endwhile.string_loop_outer
|
||||
|
||||
// Emit the trailing '"'.
|
||||
while true {
|
||||
|
||||
Reference in new issue
Block a user