astgen: assign_destructure, u0 int type, slice_length optimization
- Implement assignDestructure() and assignDestructureMaybeDecls() with RL_DESTRUCTURE result location, DestructureComponent types, rvalue handling for validate_destructure/elem_val_imm/store_node, and array init optimization. - Fix tryResolvePrimitiveIdent to allow bit_count==0 (u0/i0 types) and reject leading zeros (u01, i007). - Add nodeIsTriviallyZero and slice_length optimization for arr[start..][0..len] patterns in AST_NODE_SLICE and AST_NODE_SLICE_SENTINEL cases. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -853,13 +853,13 @@ test "astgen: corpus astgen_test.zig" {
|
||||
}
|
||||
|
||||
test "astgen: corpus array_list.zig" {
|
||||
if (true) return error.SkipZigTest; // TODO: missing assign_destructure handler
|
||||
if (true) return error.SkipZigTest; // TODO: +2 ALLOC_MUT / -2 EXTENDED tag mismatch at [6639]
|
||||
const gpa = std.testing.allocator;
|
||||
try corpusCheck(gpa, @embedFile("../lib/std/array_list.zig"));
|
||||
}
|
||||
|
||||
test "astgen: corpus multi_array_list.zig" {
|
||||
if (true) return error.SkipZigTest; // TODO: identifier resolution across namespace scopes
|
||||
if (true) return error.SkipZigTest; // TODO: parser bug - C parser produces nodes_len=1
|
||||
const gpa = std.testing.allocator;
|
||||
try corpusCheck(gpa, @embedFile("../lib/std/multi_array_list.zig"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user