trace.carbon 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // A lot of output is elided: this is only checking for a few things for simple
  6. // sanity checking on --parser_debug --trace_file=- along with filter flags output.
  7. //
  8. // NOAUTOUPDATE
  9. // RUN: %{explorer} --parser_debug --trace_file=- -trace_file_context=all | %{FileCheck-allow-unmatched} --check-prefixes=NO-SOURCE,NO-NAMES,NO-PRELUDE,NO-FLOW,NO-TYPE,NO-UNFORMED,NO-DECLS,EXEC,NO-TIMING
  10. // RUN: %{explorer} --parser_debug --trace_file=- -trace_file_context=all -trace_phase=execution | %{FileCheck-allow-unmatched} --check-prefixes=NO-SOURCE,NO-NAMES,NO-PRELUDE,NO-FLOW,NO-TYPE,NO-UNFORMED,NO-DECLS,EXEC,NO-TIMING
  11. // RUN: %{explorer} --parser_debug --trace_file=- -trace_file_context=all -trace_phase=source_program | %{FileCheck-allow-unmatched} --check-prefixes=SOURCE,NO-NAMES,NO-PRELUDE,NO-FLOW,NO-TYPE,NO-UNFORMED,NO-DECLS,NO-EXEC,NO-TIMING
  12. // RUN: %{explorer} --parser_debug --trace_file=- -trace_file_context=all -trace_phase=name_resolution | %{FileCheck-allow-unmatched} --check-prefixes=NO-SOURCE,NAMES,NO-PRELUDE,NO-FLOW,NO-TYPE,NO-UNFORMED,NO-DECLS,NO-EXEC,NO-TIMING
  13. // RUN: %{explorer} --parser_debug --trace_file=- -trace_file_context=all -trace_phase=control_flow_resolution | %{FileCheck-allow-unmatched} --check-prefixes=NO-SOURCE,NO-NAMES,NO-PRELUDE,FLOW,NO-TYPE,NO-UNFORMED,NO-DECLS,NO-EXEC,NO-TIMING
  14. // RUN: %{explorer} --parser_debug --trace_file=- -trace_file_context=all -trace_phase=type_checking | %{FileCheck-allow-unmatched} --check-prefixes=NO-SOURCE,NO-NAMES,NO-PRELUDE,NO-FLOW,TYPE,NO-UNFORMED,NO-DECLS,NO-EXEC,NO-TIMING
  15. // RUN: %{explorer} --parser_debug --trace_file=- -trace_file_context=all -trace_phase=unformed_variables_resolution | %{FileCheck-allow-unmatched} --check-prefixes=NO-SOURCE,NO-NAMES,NO-PRELUDE,NO-FLOW,NO-TYPE,UNFORMED,NO-DECLS,NO-EXEC,NO-TIMING
  16. // RUN: %{explorer} --parser_debug --trace_file=- -trace_file_context=all -trace_phase=declarations | %{FileCheck-allow-unmatched} --check-prefixes=NO-SOURCE,NO-NAMES,NO-PRELUDE,NO-FLOW,NO-TYPE,NO-UNFORMED,DECLS,NO-EXEC,NO-TIMING
  17. // RUN: %{explorer} --parser_debug --trace_file=- -trace_file_context=all -trace_phase=timing | %{FileCheck-allow-unmatched} --check-prefixes=NO-SOURCE,NO-NAMES,NO-PRELUDE,NO-FLOW,NO-TYPE,NO-UNFORMED,NO-DECLS,NO-EXEC,TIMING
  18. // RUN: %{explorer} --parser_debug --trace_file=- -trace_file_context=all -trace_phase=all | %{FileCheck-allow-unmatched} --check-prefixes=SOURCE,NAMES,NO-PRELUDE,FLOW,TYPE,UNFORMED,DECLS,EXEC,TIMING
  19. // RUN: %{explorer} --parser_debug --trace_file=- -trace_file_context=all -trace_phase=source_program,declarations | %{FileCheck-allow-unmatched} --check-prefixes=SOURCE,NO-NAMES,NO-PRELUDE,NO-FLOW,NO-TYPE,NO-UNFORMED,DECLS,NO-EXEC,NO-TIMING
  20. // NO-SOURCE-NOT:STDOUT: ********** source program **********
  21. // SOURCE:STDOUT: ********** source program **********
  22. // NO-SOURCE-NOT:STDOUT: interface TestInterface {
  23. // SOURCE:STDOUT: interface TestInterface {
  24. // NO-NAMES-NOT:STDOUT: ********** resolving names **********
  25. // NAMES:STDOUT: ********** resolving names **********
  26. // NO-PRELUDE-NOT:STDOUT: interface ImplicitAs {
  27. // NO-FLOW-NOT:STDOUT: ********** resolving control flow **********
  28. // FLOW:STDOUT: ********** resolving control flow **********
  29. // NO-TYPE-NOT:STDOUT: ********** type checking **********
  30. // TYPE:STDOUT: ********** type checking **********
  31. // NO-TYPE-NOT:STDOUT: ** declaring interface TestInterface
  32. // TYPE:STDOUT: ** declaring interface TestInterface
  33. // NO-UNFORMED-NOT:STDOUT: ********** resolving unformed variables **********
  34. // UNFORMED:STDOUT: ********** resolving unformed variables **********
  35. // NO-DECLS-NOT:STDOUT: ********** printing declarations **********
  36. // DECLS:STDOUT: ********** printing declarations **********
  37. // NO-DECLS-NOT:STDOUT: interface TestInterface {
  38. // DECLS:STDOUT: interface TestInterface {
  39. // NO-EXEC-NOT:STDOUT: ********** starting execution **********
  40. // EXEC:STDOUT: ********** starting execution **********
  41. // NO-EXEC-NOT:STDOUT: ********** initializing globals **********
  42. // EXEC:STDOUT: ********** initializing globals **********
  43. // NO-EXEC-NOT:STDOUT: ********** calling main function **********
  44. // EXEC:STDOUT: ********** calling main function **********
  45. // NO-EXEC-NOT:STDOUT: --- step exp Main() .0. (<Main()>:0) --->
  46. // EXEC:STDOUT: --- step exp Main() .0. (<Main()>:0) --->
  47. // NO-EXEC-NOT:STDOUT: interpreter result: 0
  48. // EXEC:STDOUT: interpreter result: 0
  49. // NO-TIMING-NOT:STDOUT: ********** printing timing **********
  50. // TIMING:STDOUT: ********** printing timing **********
  51. // NO-TIMING-NOT:STDOUT: Time elapsed in ExecProgram: {{[0-9]+}}ms
  52. // TIMING:STDOUT: Time elapsed in ExecProgram: {{[0-9]+}}ms
  53. // NO-TIMING-NOT:STDOUT: Time elapsed in AnalyzeProgram: {{[0-9]+}}ms
  54. // TIMING:STDOUT: Time elapsed in AnalyzeProgram: {{[0-9]+}}ms
  55. // NO-TIMING-NOT:STDOUT: Time elapsed in AddPrelude: {{[0-9]+}}ms
  56. // TIMING:STDOUT: Time elapsed in AddPrelude: {{[0-9]+}}ms
  57. // NO-TIMING-NOT:STDOUT: Time elapsed in Parse: {{[0-9]+}}ms
  58. // TIMING:STDOUT: Time elapsed in Parse: {{[0-9]+}}ms
  59. package ExplorerTest api;
  60. interface TestInterface {}
  61. fn Main() -> i32 {
  62. return 0;
  63. }