File tree Expand file tree Collapse file tree 3 files changed +8
-0
lines changed
Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -325,12 +325,14 @@ a copy of the compiler rather than replacing it with `v self`.
325325| ` trace_scanner ` | Prints details about the recognized tokens. * Very* verbose. Use with ` ./vnew -no-builtin -check-syntax file.v ` . |
326326| ` trace_parse ` | Prints details about the parsed files (number of tokens, lines, bytes). Use it for parsing order issues. |
327327| ` trace_parser ` | Prints details about parsed statements and expressions. Very verbose. Use it for panics in the parser. |
328+ | ` trace_check ` | Prints the .v file which is checked. Use it to diagnose checker order issues. |
328329| ` trace_checker ` | Prints details about the statements being checked. Very verbose. Use it for panics in the checker. |
329330| ` trace_transformer ` | Prints details about the statements being transformed. Very verbose. Use it for panics in the transformer stage. |
330331| | |
331332| ` trace_gen ` | Prints all the strings written to the generated C file. Very verbose. |
332333| ` trace_gen_wanted_value ` | Prints a backtrace, when a specific * wanted* value, is part of what is printed in the generated C file. |
333334| | Use: ` v -g -o vgen -d trace_gen_wanted -d trace_gen_wanted_value="message = _SLIT0" cmd/v && ./vgen bug.v ` |
335+ | ` trace_cgen ` | Prints the .v file for which C code generation runs. Use it to diagnose cgen order issues. |
334336| ` trace_cgen_stmt ` | Prints details about the statements that are being processed by cgen. |
335337| | Use it for panics in cgen, to see the closest input V source line, that caused the panic. |
336338| | Note: you need ` v -no-parallel -d trace_cgen_stmt -o w cmd/v ` to make sense of the output of that, |
Original file line number Diff line number Diff line change @@ -218,6 +218,9 @@ fn (mut c Checker) reset_checker_state_at_start_of_new_file() {
218218}
219219
220220pub fn (mut c Checker) check (mut ast_file ast.File) {
221+ $if trace_check ? {
222+ eprintln ('> ${@FILE} :${@LINE} | ast_file.path: ${ast_file.path} ' )
223+ }
221224 $if trace_checker ? {
222225 eprintln ('start checking file: ${ast_file.path} ' )
223226 }
Original file line number Diff line number Diff line change @@ -924,6 +924,9 @@ pub fn (mut g Gen) free_builders() {
924924}
925925
926926pub fn (mut g Gen) gen_file () {
927+ $if trace_cgen ? {
928+ eprintln ('> ${@FILE} :${@LINE} | g.file.path: ${g.file.path} ' )
929+ }
927930 g.timers.start ('cgen_file ${g.file.path} ' )
928931 g.unique_file_path_hash = fnv1 a.sum64_string (g.file.path)
929932 if g.pref.is_vlines {
You can’t perform that action at this time.
0 commit comments