-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds rudimentary support for constructing MIR `str` slice references via the new `mir_str_slice_value` and `mir_str_slice_range_value` SAWScript functions. These behave much like their cousins `mir_slice_value` and `mir_slice_range_value` (which work for array slices), except that they return something of type `&str` instead of, say, `&[u8]`. See the manual for the full details and current limitations of the approach. The `mir_str_slice_value`/`mir_str_slice_range_value` functions mostly share the same implementation as `mir_slice_value`/`mir_slice_range_value`, except for some minor differences regarding how the underlying types are handled. There is now a new `MirSliceInfo` data type that signals whether we are dealing with a `str` slice or an array slice. Fixes #1997.
- Loading branch information
1 parent
5ea9e1e
commit 5b7a22c
Showing
29 changed files
with
663 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
all: test.linked-mir.json | ||
|
||
test.linked-mir.json: test.rs | ||
saw-rustc $< | ||
$(MAKE) remove-unused-build-artifacts | ||
|
||
.PHONY: remove-unused-build-artifacts | ||
remove-unused-build-artifacts: | ||
rm -f test libtest.mir libtest.rlib | ||
|
||
.PHONY: clean | ||
clean: remove-unused-build-artifacts | ||
rm -f test.linked-mir.json |
Oops, something went wrong.