aboutsummaryrefslogtreecommitdiff
path: root/src/ir_print.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-07-25 01:47:56 -0400
committerAndrew Kelley <andrew@ziglang.org>2019-07-25 01:47:56 -0400
commit70bced5dcffccc2f8029d8c3d7f2d18b48d993f5 (patch)
tree17672a7a6787d9de275d6cad00b9854ea168e409 /src/ir_print.cpp
parentead2d32be871411685f846e604ec7e4253b9f25a (diff)
downloadzig-70bced5dcffccc2f8029d8c3d7f2d18b48d993f5.tar.gz
zig-70bced5dcffccc2f8029d8c3d7f2d18b48d993f5.zip
implement `@frame` and `@Frame`
Diffstat (limited to 'src/ir_print.cpp')
-rw-r--r--src/ir_print.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp
index e14647ea82..5b3bba2271 100644
--- a/src/ir_print.cpp
+++ b/src/ir_print.cpp
@@ -906,8 +906,14 @@ static void ir_print_frame_address(IrPrint *irp, IrInstructionFrameAddress *inst
fprintf(irp->f, "@frameAddress()");
}
-static void ir_print_handle(IrPrint *irp, IrInstructionHandle *instruction) {
- fprintf(irp->f, "@handle()");
+static void ir_print_handle(IrPrint *irp, IrInstructionFrameHandle *instruction) {
+ fprintf(irp->f, "@frame()");
+}
+
+static void ir_print_frame_type(IrPrint *irp, IrInstructionFrameType *instruction) {
+ fprintf(irp->f, "@Frame(");
+ ir_print_other_instruction(irp, instruction->fn);
+ fprintf(irp->f, ")");
}
static void ir_print_return_address(IrPrint *irp, IrInstructionReturnAddress *instruction) {
@@ -1764,8 +1770,11 @@ static void ir_print_instruction(IrPrint *irp, IrInstruction *instruction) {
case IrInstructionIdFrameAddress:
ir_print_frame_address(irp, (IrInstructionFrameAddress *)instruction);
break;
- case IrInstructionIdHandle:
- ir_print_handle(irp, (IrInstructionHandle *)instruction);
+ case IrInstructionIdFrameHandle:
+ ir_print_handle(irp, (IrInstructionFrameHandle *)instruction);
+ break;
+ case IrInstructionIdFrameType:
+ ir_print_frame_type(irp, (IrInstructionFrameType *)instruction);
break;
case IrInstructionIdAlignOf:
ir_print_align_of(irp, (IrInstructionAlignOf *)instruction);