mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
markused,builtin,strconv,vlib: reduce generated C sizes for compilers != tcc, for short programs, by simplifying the generation of backtraces, and reducing string interpolations in panics (#23380)
This commit is contained in:
parent
738f847f89
commit
e983d75b64
31 changed files with 278 additions and 191 deletions
|
@ -72,7 +72,7 @@ pub fn (mut l Log) set_output_path(output_file_path string) {
|
|||
l.output_target = .file
|
||||
l.output_file_name = os.join_path(os.real_path(output_file_path), l.output_label)
|
||||
ofile := os.open_append(l.output_file_name) or {
|
||||
panic('error while opening log file ${l.output_file_name} for appending')
|
||||
panic('error while opening log file ' + l.output_file_name + ' for appending')
|
||||
}
|
||||
l.ofile = ofile
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ pub fn (mut l Log) fatal(s string) {
|
|||
l.send_output(s, .fatal)
|
||||
l.ofile.close()
|
||||
}
|
||||
panic('${l.output_label}: ${s}')
|
||||
panic(l.output_label + ': ' + s)
|
||||
}
|
||||
|
||||
// error logs line `s` via `send_output` if `Log.level` is greater than or equal to the `Level.error` category.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue