remove type coercion from array values to references

* Implements #3768. This is a sweeping breaking change that requires
   many (trivial) edits to Zig source code. Array values no longer
   coerced to slices; however one may use `&` to obtain a reference to
   an array value, which may then be coerced to a slice.

 * Adds `IrInstruction::dump`, for debugging purposes. It's useful to
   call to inspect the instruction when debugging Zig IR.

 * Fixes bugs with result location semantics. See the new behavior test
   cases, and compile error test cases.

 * Fixes bugs with `@typeInfo` not properly resolving const values.

 * Behavior tests are passing but std lib tests are not yet. There
   is more work to do before merging this branch.
This commit is contained in:
Andrew Kelley
2019-11-27 03:30:39 -05:00
parent 379d547603
commit bf3ac66150
67 changed files with 727 additions and 837 deletions

View File

@@ -465,7 +465,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void {
\\
);
tc.setCommandLineArgs([_][]const u8{
tc.setCommandLineArgs(&[_][]const u8{
"first arg",
"'a' 'b' \\",
"bare",
@@ -506,7 +506,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void {
\\
);
tc.setCommandLineArgs([_][]const u8{
tc.setCommandLineArgs(&[_][]const u8{
"first arg",
"'a' 'b' \\",
"bare",