mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
0.5.4: Hash variables accept designated initializers. @safemacro overrides the need for @ in macro names. Fixes to macro context evaluation. Updated allocator api. Removed install_win_reqs.bat. Deterministic @init for MacOS. Fixed temp memory issue with formatter. Support LLVM 19. Add support to compare bitstructs using == and !=. Support Windows .def files. Removed invalid grammar from grammar.y. Support compile time folding of &|^~ for bitstructs. output project setting now respected. Fix issue where constants were not properly constant folded. Add temp_push/pop. Aliased declarations caused errors when used in initializers. Fix export output. Fix of const ternary #1118. Fix of $$MODULE in nested macros #1117. Fix debug info on globals. out now correctly detects subscript[] use #1116. Lateral implicit imports removed. Default to '.' if no libdir is specified. Improved error messages for --lib. Fix raylib snake example. Overzealous local escape check corrected #1127. Improved yacc grammar #1128. --linker argument #1067. Fixes to the matrix operations #1130. Added GenericList.
This commit is contained in:
committed by
Christoffer Lerno
parent
c673101bbb
commit
748c737e8f
@@ -1,8 +1,5 @@
|
||||
module std::os::linux @if(env::LINUX);
|
||||
import libc;
|
||||
import std::os::posix;
|
||||
import std::io;
|
||||
import std::collections::list;
|
||||
import libc, std::os, std::io, std::collections::list;
|
||||
|
||||
extern fn isz readlink(ZString path, char* buf, usz bufsize);
|
||||
|
||||
@@ -133,7 +130,7 @@ fn ulong! elf_module_image_base(String path) @local
|
||||
|
||||
fn Backtrace! backtrace_load_from_exec(void* addr, Allocator* allocator) @local
|
||||
{
|
||||
char[] buf = mem::temp_array(char, 1024);
|
||||
char[] buf = mem::temp_alloc_array(char, 1024);
|
||||
|
||||
String exec_path = process::execute_stdout_to_buffer(buf, {"realpath", "-e", string::tformat("/proc/%d/exe", posix::getpid())})!;
|
||||
String obj_name = exec_path.copy(allocator);
|
||||
@@ -143,7 +140,7 @@ fn Backtrace! backtrace_load_from_exec(void* addr, Allocator* allocator) @local
|
||||
|
||||
fn Backtrace! backtrace_load_from_dlinfo(void* addr, Linux_Dl_info* info, Allocator* allocator) @local
|
||||
{
|
||||
char[] buf = mem::temp_array(char, 1024);
|
||||
char[] buf = mem::temp_alloc_array(char, 1024);
|
||||
|
||||
void* obj_addr = addr - (uptr)info.dli_fbase + (uptr)elf_module_image_base(info.dli_fname.str_view())!;
|
||||
ZString obj_path = info.dli_fname;
|
||||
@@ -185,7 +182,7 @@ fn Backtrace! backtrace_from_addr2line(void* addr, String addr2line, String obj_
|
||||
};
|
||||
}
|
||||
|
||||
fn Backtrace! backtrace_load_element(void* addr, Allocator* allocator = mem::heap()) @local
|
||||
fn Backtrace! backtrace_load_element(void* addr, Allocator* allocator = allocator::heap()) @local
|
||||
{
|
||||
if (!addr) return backtrace::BACKTRACE_UNKNOWN;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user