Commit Graph

6 Commits

Author SHA1 Message Date
Rintaro Ishizaki
fb08a92f48 [ASTGen] Infrastructure to implment ASTGen Incrementally
* 'ASTGenVisitor' has a reference to a legacy C++ Parser configured for
  ASTGen.
* If 'ASTGenVisitor' encounters a AST node that hasn't been migrated,
  call parse(Decl|Stmt|Expr|Type) to parse the position using the legacy
  parser.
* The legacy parser calls ASTGen's
  'swift_ASTGen_build(Decl|Stmt|Expr|Type)' for each ASTNode "parsing"
  (unless the call is not directly from the ASTGen.)

rdar://117151886
2023-11-12 21:43:08 -08:00
Saleem Abdulrasool
8caa60cefa Update swift_parse_test_main.cpp
Add missing `;`
2023-11-05 11:37:33 -08:00
Rintaro Ishizaki
cb5fd7db7b [swift-parse-test] Tweak for review
* 'iteration' -> 'iterations'
* Comment to clarify cpu time vs wall clock time
* Return 'Error' from the executors
2023-11-03 15:43:09 -07:00
Rintaro Ishizaki
024726f1f1 [swift-parse-test] Dont show throughput if it the elasped time is zero
Fix division by zero.

rdar://117750086
2023-11-03 09:47:29 -07:00
Rintaro Ishizaki
66b8946eb4 [swift-parse-test] Add -skip-bodies option
This is no-op for SwiftParser. Also add a sanity check test file.
2023-10-30 13:18:04 -07:00
Rintaro Ishizaki
e01df929c2 [swift-parse-test] A parser performance check utility
```
% swift-parse-test -swift-parser -lib-parse -n 20 ../swift-syntax/Sources
files count: 228
total bytes: 5662399
total lines: 158428
iteration: 20
----
parser:  SwiftParser
wall clock time (ms): 3848
cpu time (ms): 3843
throughput (byte/sec): 355824
throughput (line/sec): 41225
----
parser:  libParse
wall clock time (ms): 296
cpu time (ms): 290
throughput (byte/sec): 4715281
throughput (line/sec): 546303
```
2023-10-28 20:23:26 -07:00