| ... | ... | @@ -150,9 +150,15 @@ pub const Decl = struct { |
| 150 | 150 | /// The direct parent container of the Decl. |
| 151 | 151 | /// Reference to externally owned memory. |
| 152 | 152 | container: *Scope.Container, |
| 153 | | /// The AST Node decl index or ZIR Inst index that contains this declaration. |
| 153 | |
| 154 | /// An integer that can be checked against the corresponding incrementing |
| 155 | /// generation field of Module. This is used to determine whether `complete` status |
| 156 | /// represents pre- or post- re-analysis. |
| 157 | generation: u32, |
| 158 | /// The AST Node index or ZIR Inst index that contains this declaration. |
| 154 | 159 | /// Must be recomputed when the corresponding source file is modified. |
| 155 | | src_index: usize, |
| 160 | src_node: ast.Node.Index, |
| 161 | |
| 156 | 162 | /// The most recent value of the Decl after a successful semantic analysis. |
| 157 | 163 | typed_value: union(enum) { |
| 158 | 164 | never_succeeded: void, |
| ... | ... | @@ -198,11 +204,6 @@ pub const Decl = struct { |
| 198 | 204 | /// Whether the corresponding AST decl has a `pub` keyword. |
| 199 | 205 | is_pub: bool, |
| 200 | 206 | |
| 201 | | /// An integer that can be checked against the corresponding incrementing |
| 202 | | /// generation field of Module. This is used to determine whether `complete` status |
| 203 | | /// represents pre- or post- re-analysis. |
| 204 | | generation: u32, |
| 205 | | |
| 206 | 207 | /// Represents the position of the code in the output file. |
| 207 | 208 | /// This is populated regardless of semantic analysis and code generation. |
| 208 | 209 | link: link.File.LinkBlock, |
| ... | ... | @@ -249,11 +250,11 @@ pub const Decl = struct { |
| 249 | 250 | } |
| 250 | 251 | |
| 251 | 252 | pub fn relativeToNodeIndex(decl: Decl, offset: i32) ast.Node.Index { |
| 252 | | return @bitCast(ast.Node.Index, offset + @bitCast(i32, decl.srcNode())); |
| 253 | return @bitCast(ast.Node.Index, offset + @bitCast(i32, decl.src_node)); |
| 253 | 254 | } |
| 254 | 255 | |
| 255 | 256 | pub fn nodeIndexToRelative(decl: Decl, node_index: ast.Node.Index) i32 { |
| 256 | | return @bitCast(i32, node_index) - @bitCast(i32, decl.srcNode()); |
| 257 | return @bitCast(i32, node_index) - @bitCast(i32, decl.src_node); |
| 257 | 258 | } |
| 258 | 259 | |
| 259 | 260 | pub fn tokSrcLoc(decl: Decl, token_index: ast.TokenIndex) LazySrcLoc { |
| ... | ... | @@ -271,14 +272,9 @@ pub const Decl = struct { |
| 271 | 272 | }; |
| 272 | 273 | } |
| 273 | 274 | |
| 274 | | pub fn srcNode(decl: Decl) u32 { |
| 275 | | const tree = &decl.container.file_scope.tree; |
| 276 | | return tree.rootDecls()[decl.src_index]; |
| 277 | | } |
| 278 | | |
| 279 | 275 | pub fn srcToken(decl: Decl) u32 { |
| 280 | 276 | const tree = &decl.container.file_scope.tree; |
| 281 | | return tree.firstToken(decl.srcNode()); |
| 277 | return tree.firstToken(decl.src_node); |
| 282 | 278 | } |
| 283 | 279 | |
| 284 | 280 | pub fn srcByteOffset(decl: Decl) u32 { |
| ... | ... | @@ -2458,7 +2454,7 @@ fn astgenAndSemaDecl(mod: *Module, decl: *Decl) !bool { |
| 2458 | 2454 | const tree = try mod.getAstTree(decl.container.file_scope); |
| 2459 | 2455 | const node_tags = tree.nodes.items(.tag); |
| 2460 | 2456 | const node_datas = tree.nodes.items(.data); |
| 2461 | | const decl_node = tree.rootDecls()[decl.src_index]; |
| 2457 | const decl_node = decl.src_node; |
| 2462 | 2458 | switch (node_tags[decl_node]) { |
| 2463 | 2459 | .fn_decl => { |
| 2464 | 2460 | const fn_proto = node_datas[decl_node].lhs; |
| ... | ... | @@ -3292,7 +3288,7 @@ pub fn analyzeContainer(mod: *Module, container_scope: *Scope.Container) !void { |
| 3292 | 3288 | var outdated_decls = std.AutoArrayHashMap(*Decl, void).init(mod.gpa); |
| 3293 | 3289 | defer outdated_decls.deinit(); |
| 3294 | 3290 | |
| 3295 | | for (decls) |decl_node, decl_i| switch (node_tags[decl_node]) { |
| 3291 | for (decls) |decl_node| switch (node_tags[decl_node]) { |
| 3296 | 3292 | .fn_decl => { |
| 3297 | 3293 | const fn_proto = node_datas[decl_node].lhs; |
| 3298 | 3294 | const body = node_datas[decl_node].rhs; |
| ... | ... | @@ -3304,7 +3300,6 @@ pub fn analyzeContainer(mod: *Module, container_scope: *Scope.Container) !void { |
| 3304 | 3300 | &deleted_decls, |
| 3305 | 3301 | &outdated_decls, |
| 3306 | 3302 | decl_node, |
| 3307 | | decl_i, |
| 3308 | 3303 | tree.*, |
| 3309 | 3304 | body, |
| 3310 | 3305 | tree.fnProtoSimple(&params, fn_proto), |
| ... | ... | @@ -3315,7 +3310,6 @@ pub fn analyzeContainer(mod: *Module, container_scope: *Scope.Container) !void { |
| 3315 | 3310 | &deleted_decls, |
| 3316 | 3311 | &outdated_decls, |
| 3317 | 3312 | decl_node, |
| 3318 | | decl_i, |
| 3319 | 3313 | tree.*, |
| 3320 | 3314 | body, |
| 3321 | 3315 | tree.fnProtoMulti(fn_proto), |
| ... | ... | @@ -3327,7 +3321,6 @@ pub fn analyzeContainer(mod: *Module, container_scope: *Scope.Container) !void { |
| 3327 | 3321 | &deleted_decls, |
| 3328 | 3322 | &outdated_decls, |
| 3329 | 3323 | decl_node, |
| 3330 | | decl_i, |
| 3331 | 3324 | tree.*, |
| 3332 | 3325 | body, |
| 3333 | 3326 | tree.fnProtoOne(&params, fn_proto), |
| ... | ... | @@ -3338,7 +3331,6 @@ pub fn analyzeContainer(mod: *Module, container_scope: *Scope.Container) !void { |
| 3338 | 3331 | &deleted_decls, |
| 3339 | 3332 | &outdated_decls, |
| 3340 | 3333 | decl_node, |
| 3341 | | decl_i, |
| 3342 | 3334 | tree.*, |
| 3343 | 3335 | body, |
| 3344 | 3336 | tree.fnProto(fn_proto), |
| ... | ... | @@ -3353,7 +3345,6 @@ pub fn analyzeContainer(mod: *Module, container_scope: *Scope.Container) !void { |
| 3353 | 3345 | &deleted_decls, |
| 3354 | 3346 | &outdated_decls, |
| 3355 | 3347 | decl_node, |
| 3356 | | decl_i, |
| 3357 | 3348 | tree.*, |
| 3358 | 3349 | 0, |
| 3359 | 3350 | tree.fnProtoSimple(&params, decl_node), |
| ... | ... | @@ -3364,7 +3355,6 @@ pub fn analyzeContainer(mod: *Module, container_scope: *Scope.Container) !void { |
| 3364 | 3355 | &deleted_decls, |
| 3365 | 3356 | &outdated_decls, |
| 3366 | 3357 | decl_node, |
| 3367 | | decl_i, |
| 3368 | 3358 | tree.*, |
| 3369 | 3359 | 0, |
| 3370 | 3360 | tree.fnProtoMulti(decl_node), |
| ... | ... | @@ -3376,7 +3366,6 @@ pub fn analyzeContainer(mod: *Module, container_scope: *Scope.Container) !void { |
| 3376 | 3366 | &deleted_decls, |
| 3377 | 3367 | &outdated_decls, |
| 3378 | 3368 | decl_node, |
| 3379 | | decl_i, |
| 3380 | 3369 | tree.*, |
| 3381 | 3370 | 0, |
| 3382 | 3371 | tree.fnProtoOne(&params, decl_node), |
| ... | ... | @@ -3387,7 +3376,6 @@ pub fn analyzeContainer(mod: *Module, container_scope: *Scope.Container) !void { |
| 3387 | 3376 | &deleted_decls, |
| 3388 | 3377 | &outdated_decls, |
| 3389 | 3378 | decl_node, |
| 3390 | | decl_i, |
| 3391 | 3379 | tree.*, |
| 3392 | 3380 | 0, |
| 3393 | 3381 | tree.fnProto(decl_node), |
| ... | ... | @@ -3398,7 +3386,6 @@ pub fn analyzeContainer(mod: *Module, container_scope: *Scope.Container) !void { |
| 3398 | 3386 | &deleted_decls, |
| 3399 | 3387 | &outdated_decls, |
| 3400 | 3388 | decl_node, |
| 3401 | | decl_i, |
| 3402 | 3389 | tree.*, |
| 3403 | 3390 | tree.globalVarDecl(decl_node), |
| 3404 | 3391 | ), |
| ... | ... | @@ -3407,7 +3394,6 @@ pub fn analyzeContainer(mod: *Module, container_scope: *Scope.Container) !void { |
| 3407 | 3394 | &deleted_decls, |
| 3408 | 3395 | &outdated_decls, |
| 3409 | 3396 | decl_node, |
| 3410 | | decl_i, |
| 3411 | 3397 | tree.*, |
| 3412 | 3398 | tree.localVarDecl(decl_node), |
| 3413 | 3399 | ), |
| ... | ... | @@ -3416,7 +3402,6 @@ pub fn analyzeContainer(mod: *Module, container_scope: *Scope.Container) !void { |
| 3416 | 3402 | &deleted_decls, |
| 3417 | 3403 | &outdated_decls, |
| 3418 | 3404 | decl_node, |
| 3419 | | decl_i, |
| 3420 | 3405 | tree.*, |
| 3421 | 3406 | tree.simpleVarDecl(decl_node), |
| 3422 | 3407 | ), |
| ... | ... | @@ -3425,7 +3410,6 @@ pub fn analyzeContainer(mod: *Module, container_scope: *Scope.Container) !void { |
| 3425 | 3410 | &deleted_decls, |
| 3426 | 3411 | &outdated_decls, |
| 3427 | 3412 | decl_node, |
| 3428 | | decl_i, |
| 3429 | 3413 | tree.*, |
| 3430 | 3414 | tree.alignedVarDecl(decl_node), |
| 3431 | 3415 | ), |
| ... | ... | @@ -3438,35 +3422,16 @@ pub fn analyzeContainer(mod: *Module, container_scope: *Scope.Container) !void { |
| 3438 | 3422 | const name_hash = container_scope.fullyQualifiedNameHash(name); |
| 3439 | 3423 | const contents_hash = std.zig.hashSrc(tree.getNodeSource(decl_node)); |
| 3440 | 3424 | |
| 3441 | | const new_decl = try mod.createNewDecl(&container_scope.base, name, decl_i, name_hash, contents_hash); |
| 3425 | const new_decl = try mod.createNewDecl(&container_scope.base, name, decl_node, name_hash, contents_hash); |
| 3442 | 3426 | container_scope.decls.putAssumeCapacity(new_decl, {}); |
| 3443 | 3427 | mod.comp.work_queue.writeItemAssumeCapacity(.{ .analyze_decl = new_decl }); |
| 3444 | 3428 | }, |
| 3445 | 3429 | |
| 3446 | | .container_field_init => try mod.semaContainerField( |
| 3447 | | container_scope, |
| 3448 | | &deleted_decls, |
| 3449 | | decl_node, |
| 3450 | | decl_i, |
| 3451 | | tree.*, |
| 3452 | | tree.containerFieldInit(decl_node), |
| 3453 | | ), |
| 3454 | | .container_field_align => try mod.semaContainerField( |
| 3455 | | container_scope, |
| 3456 | | &deleted_decls, |
| 3457 | | decl_node, |
| 3458 | | decl_i, |
| 3459 | | tree.*, |
| 3460 | | tree.containerFieldAlign(decl_node), |
| 3461 | | ), |
| 3462 | | .container_field => try mod.semaContainerField( |
| 3463 | | container_scope, |
| 3464 | | &deleted_decls, |
| 3465 | | decl_node, |
| 3466 | | decl_i, |
| 3467 | | tree.*, |
| 3468 | | tree.containerField(decl_node), |
| 3469 | | ), |
| 3430 | // Container fields are handled in AstGen. |
| 3431 | .container_field_init, |
| 3432 | .container_field_align, |
| 3433 | .container_field, |
| 3434 | => continue, |
| 3470 | 3435 | |
| 3471 | 3436 | .test_decl => { |
| 3472 | 3437 | if (mod.comp.bin_file.options.is_test) { |
| ... | ... | @@ -3508,7 +3473,6 @@ fn semaContainerFn( |
| 3508 | 3473 | deleted_decls: *std.AutoArrayHashMap(*Decl, void), |
| 3509 | 3474 | outdated_decls: *std.AutoArrayHashMap(*Decl, void), |
| 3510 | 3475 | decl_node: ast.Node.Index, |
| 3511 | | decl_i: usize, |
| 3512 | 3476 | tree: ast.Tree, |
| 3513 | 3477 | body_node: ast.Node.Index, |
| 3514 | 3478 | fn_proto: ast.full.FnProto, |
| ... | ... | @@ -3517,25 +3481,30 @@ fn semaContainerFn( |
| 3517 | 3481 | defer tracy.end(); |
| 3518 | 3482 | |
| 3519 | 3483 | // We will create a Decl for it regardless of analysis status. |
| 3520 | | const name_tok = fn_proto.name_token orelse { |
| 3484 | const name_token = fn_proto.name_token orelse { |
| 3521 | 3485 | // This problem will go away with #1717. |
| 3522 | 3486 | @panic("TODO missing function name"); |
| 3523 | 3487 | }; |
| 3524 | | const name = tree.tokenSlice(name_tok); // TODO use identifierTokenString |
| 3488 | const name = tree.tokenSlice(name_token); // TODO use identifierTokenString |
| 3525 | 3489 | const name_hash = container_scope.fullyQualifiedNameHash(name); |
| 3526 | 3490 | const contents_hash = std.zig.hashSrc(tree.getNodeSource(decl_node)); |
| 3527 | 3491 | if (mod.decl_table.get(name_hash)) |decl| { |
| 3528 | 3492 | // Update the AST Node index of the decl, even if its contents are unchanged, it may |
| 3529 | 3493 | // have been re-ordered. |
| 3530 | | decl.src_index = decl_i; |
| 3494 | const prev_src_node = decl.src_node; |
| 3495 | decl.src_node = decl_node; |
| 3531 | 3496 | if (deleted_decls.swapRemove(decl) == null) { |
| 3532 | 3497 | decl.analysis = .sema_failure; |
| 3533 | 3498 | const msg = try ErrorMsg.create(mod.gpa, .{ |
| 3534 | 3499 | .container = .{ .file_scope = container_scope.file_scope }, |
| 3535 | | .lazy = .{ .token_abs = name_tok }, |
| 3500 | .lazy = .{ .token_abs = name_token }, |
| 3536 | 3501 | }, "redefinition of '{s}'", .{decl.name}); |
| 3537 | 3502 | errdefer msg.destroy(mod.gpa); |
| 3538 | | try mod.errNoteNonLazy(decl.srcLoc(), msg, "previous definition here", .{}); |
| 3503 | const other_src_loc: SrcLoc = .{ |
| 3504 | .container = .{ .file_scope = decl.container.file_scope }, |
| 3505 | .lazy = .{ .node_abs = prev_src_node }, |
| 3506 | }; |
| 3507 | try mod.errNoteNonLazy(other_src_loc, msg, "previous definition here", .{}); |
| 3539 | 3508 | try mod.failed_decls.putNoClobber(mod.gpa, decl, msg); |
| 3540 | 3509 | } else { |
| 3541 | 3510 | if (!srcHashEql(decl.contents_hash, contents_hash)) { |
| ... | ... | @@ -3559,7 +3528,7 @@ fn semaContainerFn( |
| 3559 | 3528 | } |
| 3560 | 3529 | } |
| 3561 | 3530 | } else { |
| 3562 | | const new_decl = try mod.createNewDecl(&container_scope.base, name, decl_i, name_hash, contents_hash); |
| 3531 | const new_decl = try mod.createNewDecl(&container_scope.base, name, decl_node, name_hash, contents_hash); |
| 3563 | 3532 | container_scope.decls.putAssumeCapacity(new_decl, {}); |
| 3564 | 3533 | if (fn_proto.extern_export_token) |maybe_export_token| { |
| 3565 | 3534 | const token_tags = tree.tokens.items(.tag); |
| ... | ... | @@ -3576,7 +3545,6 @@ fn semaContainerVar( |
| 3576 | 3545 | deleted_decls: *std.AutoArrayHashMap(*Decl, void), |
| 3577 | 3546 | outdated_decls: *std.AutoArrayHashMap(*Decl, void), |
| 3578 | 3547 | decl_node: ast.Node.Index, |
| 3579 | | decl_i: usize, |
| 3580 | 3548 | tree: ast.Tree, |
| 3581 | 3549 | var_decl: ast.full.VarDecl, |
| 3582 | 3550 | ) !void { |
| ... | ... | @@ -3590,7 +3558,8 @@ fn semaContainerVar( |
| 3590 | 3558 | if (mod.decl_table.get(name_hash)) |decl| { |
| 3591 | 3559 | // Update the AST Node index of the decl, even if its contents are unchanged, it may |
| 3592 | 3560 | // have been re-ordered. |
| 3593 | | decl.src_index = decl_i; |
| 3561 | const prev_src_node = decl.src_node; |
| 3562 | decl.src_node = decl_node; |
| 3594 | 3563 | if (deleted_decls.swapRemove(decl) == null) { |
| 3595 | 3564 | decl.analysis = .sema_failure; |
| 3596 | 3565 | const msg = try ErrorMsg.create(mod.gpa, .{ |
| ... | ... | @@ -3598,14 +3567,18 @@ fn semaContainerVar( |
| 3598 | 3567 | .lazy = .{ .token_abs = name_token }, |
| 3599 | 3568 | }, "redefinition of '{s}'", .{decl.name}); |
| 3600 | 3569 | errdefer msg.destroy(mod.gpa); |
| 3601 | | try mod.errNoteNonLazy(decl.srcLoc(), msg, "previous definition here", .{}); |
| 3570 | const other_src_loc: SrcLoc = .{ |
| 3571 | .container = .{ .file_scope = decl.container.file_scope }, |
| 3572 | .lazy = .{ .node_abs = prev_src_node }, |
| 3573 | }; |
| 3574 | try mod.errNoteNonLazy(other_src_loc, msg, "previous definition here", .{}); |
| 3602 | 3575 | try mod.failed_decls.putNoClobber(mod.gpa, decl, msg); |
| 3603 | 3576 | } else if (!srcHashEql(decl.contents_hash, contents_hash)) { |
| 3604 | 3577 | try outdated_decls.put(decl, {}); |
| 3605 | 3578 | decl.contents_hash = contents_hash; |
| 3606 | 3579 | } |
| 3607 | 3580 | } else { |
| 3608 | | const new_decl = try mod.createNewDecl(&container_scope.base, name, decl_i, name_hash, contents_hash); |
| 3581 | const new_decl = try mod.createNewDecl(&container_scope.base, name, decl_node, name_hash, contents_hash); |
| 3609 | 3582 | container_scope.decls.putAssumeCapacity(new_decl, {}); |
| 3610 | 3583 | if (var_decl.extern_export_token) |maybe_export_token| { |
| 3611 | 3584 | const token_tags = tree.tokens.items(.tag); |
| ... | ... | @@ -3616,21 +3589,6 @@ fn semaContainerVar( |
| 3616 | 3589 | } |
| 3617 | 3590 | } |
| 3618 | 3591 | |
| 3619 | | fn semaContainerField( |
| 3620 | | mod: *Module, |
| 3621 | | container_scope: *Scope.Container, |
| 3622 | | deleted_decls: *std.AutoArrayHashMap(*Decl, void), |
| 3623 | | decl_node: ast.Node.Index, |
| 3624 | | decl_i: usize, |
| 3625 | | tree: ast.Tree, |
| 3626 | | field: ast.full.ContainerField, |
| 3627 | | ) !void { |
| 3628 | | const tracy = trace(@src()); |
| 3629 | | defer tracy.end(); |
| 3630 | | |
| 3631 | | log.err("TODO: analyze container field", .{}); |
| 3632 | | } |
| 3633 | | |
| 3634 | 3592 | pub fn deleteDecl( |
| 3635 | 3593 | mod: *Module, |
| 3636 | 3594 | decl: *Decl, |
| ... | ... | @@ -3813,7 +3771,7 @@ fn markOutdatedDecl(mod: *Module, decl: *Decl) !void { |
| 3813 | 3771 | fn allocateNewDecl( |
| 3814 | 3772 | mod: *Module, |
| 3815 | 3773 | scope: *Scope, |
| 3816 | | src_index: usize, |
| 3774 | src_node: ast.Node.Index, |
| 3817 | 3775 | contents_hash: std.zig.SrcHash, |
| 3818 | 3776 | ) !*Decl { |
| 3819 | 3777 | // If we have emit-h then we must allocate a bigger structure to store the emit-h state. |
| ... | ... | @@ -3829,7 +3787,7 @@ fn allocateNewDecl( |
| 3829 | 3787 | new_decl.* = .{ |
| 3830 | 3788 | .name = "", |
| 3831 | 3789 | .container = scope.namespace(), |
| 3832 | | .src_index = src_index, |
| 3790 | .src_node = src_node, |
| 3833 | 3791 | .typed_value = .{ .never_succeeded = {} }, |
| 3834 | 3792 | .analysis = .unreferenced, |
| 3835 | 3793 | .deletion_flag = false, |
| ... | ... | @@ -3860,12 +3818,12 @@ fn createNewDecl( |
| 3860 | 3818 | mod: *Module, |
| 3861 | 3819 | scope: *Scope, |
| 3862 | 3820 | decl_name: []const u8, |
| 3863 | | src_index: usize, |
| 3821 | src_node: ast.Node.Index, |
| 3864 | 3822 | name_hash: Scope.NameHash, |
| 3865 | 3823 | contents_hash: std.zig.SrcHash, |
| 3866 | 3824 | ) !*Decl { |
| 3867 | 3825 | try mod.decl_table.ensureCapacity(mod.gpa, mod.decl_table.items().len + 1); |
| 3868 | | const new_decl = try mod.allocateNewDecl(scope, src_index, contents_hash); |
| 3826 | const new_decl = try mod.allocateNewDecl(scope, src_node, contents_hash); |
| 3869 | 3827 | errdefer mod.gpa.destroy(new_decl); |
| 3870 | 3828 | new_decl.name = try mem.dupeZ(mod.gpa, u8, decl_name); |
| 3871 | 3829 | mod.decl_table.putAssumeCapacityNoClobber(name_hash, new_decl); |
| ... | ... | @@ -4078,7 +4036,7 @@ pub fn createAnonymousDecl( |
| 4078 | 4036 | defer mod.gpa.free(name); |
| 4079 | 4037 | const name_hash = scope.namespace().fullyQualifiedNameHash(name); |
| 4080 | 4038 | const src_hash: std.zig.SrcHash = undefined; |
| 4081 | | const new_decl = try mod.createNewDecl(scope, name, scope_decl.src_index, name_hash, src_hash); |
| 4039 | const new_decl = try mod.createNewDecl(scope, name, scope_decl.src_node, name_hash, src_hash); |
| 4082 | 4040 | const decl_arena_state = try decl_arena.allocator.create(std.heap.ArenaAllocator.State); |
| 4083 | 4041 | |
| 4084 | 4042 | decl_arena_state.* = decl_arena.state; |
| ... | ... | @@ -4114,7 +4072,7 @@ pub fn createContainerDecl( |
| 4114 | 4072 | defer mod.gpa.free(name); |
| 4115 | 4073 | const name_hash = scope.namespace().fullyQualifiedNameHash(name); |
| 4116 | 4074 | const src_hash: std.zig.SrcHash = undefined; |
| 4117 | | const new_decl = try mod.createNewDecl(scope, name, scope_decl.src_index, name_hash, src_hash); |
| 4075 | const new_decl = try mod.createNewDecl(scope, name, scope_decl.src_node, name_hash, src_hash); |
| 4118 | 4076 | const decl_arena_state = try decl_arena.allocator.create(std.heap.ArenaAllocator.State); |
| 4119 | 4077 | |
| 4120 | 4078 | decl_arena_state.* = decl_arena.state; |