Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some optimizations when cloning constants with pointers in them
- Loading branch information
1 parent
2a55b12
commit 40e3b78
Showing
4 changed files
with
65 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
std :: import "std"; | ||
|
||
{ | ||
my_string := "x\n"; | ||
buffer := bit_cast { pointer: &U8, _: U64 } (my_string); | ||
|
||
a := *(buffer.pointer + bit_cast &U8 (0)); | ||
put_char(a); | ||
b := *(buffer.pointer + bit_cast &U8 (1)); | ||
put_char(b); | ||
std\print("Hello, World!\n"); | ||
}; | ||
|
||
|
||
|
||
|
||
|