Switch GetNodeBlock and GetTypeBlock to return an ArrayRef (#3220)

This removes the risk of accidentally performing a vector copy when
calling these functions, and is a preparation step towards the new node
block allocation design.

This required changing how we build call expressions. Instead of
finishing the argument block and then later adding a return slot, we now
delay finishing the argument block and checking for conversions to
parameter types until after we've added the return slot to it.
This commit is contained in:
Richard Smith
2023-09-13 20:47:53 +00:00
committed by GitHub
parent a05018a6ba
commit d63fceff8e
8 changed files with 130 additions and 48 deletions
@@ -81,6 +81,7 @@ fn Main() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc18_8.1: i32 = int_literal 1
// CHECK:STDOUT: %.loc18_8.2: i32 = stub_reference %.loc18_8.1
// CHECK:STDOUT: %.loc18_7: type = tuple_type ()
// CHECK:STDOUT: %.loc25_8.1: i32 = int_literal 0
// CHECK:STDOUT: %.loc25_8.2: i32 = stub_reference %.loc25_8.1
// CHECK:STDOUT: %.loc25_11.1: i32 = int_literal 1