The cost of scanning `src` as C#: text positions, brace-stack entries and * modifier children visited, bytes taken from the scratch arena. false when the file has no scope. */
| 6081 | * modifier children visited, bytes taken from the scratch arena. false when the file has no scope. |
| 6082 | */ |
| 6083 | static bool dm_scan_cost(const char *src, uint64_t *steps, uint64_t *bytes) { |
| 6084 | cbm_doclink_cs_test_cost_reset(); |
| 6085 | CBMFileResult *r = src ? dm_extract(src, CBM_LANG_CSHARP, "Cost.cs") : NULL; |
| 6086 | bool ok = r && r->doc_scope; |
| 6087 | cbm_doclink_cs_test_cost(steps, bytes); |
| 6088 | if (r) { |
| 6089 | cbm_free_result(r); |
| 6090 | } |
| 6091 | return ok; |
| 6092 | } |
| 6093 | |
| 6094 | /* The scan's cost of an input twice as large, as a multiple of the smaller |
| 6095 | * one's: about 2 for a scan that is linear, 4 for a quadratic one. -1 when a |
no test coverage detected