Repository navigation
Commit b0f6ad0
[parser] Factor magic comment value scanning into a helper
Follow-up to https://crrev.com/c/8472768, addressing the review comment
that the is_compile_hints handling in TryToParseMagicComment was "a bit
nasty".
Move the value scanning into ScanMagicCommentValue, which takes a
per-character callback and returns the value's Location, or an invalid
Location if anything but whitespace follows the value on the line. The
debug magic comments pass a no-op callback and store the Location; the
compile hints path buffers the characters into a local LiteralBuffer.
This removes the scattered is_compile_hints checks from the scanning
loops.
No behaviour change.
[email protected], [email protected]
Bug: 566467883
Change-Id: I276b3f6646abef42ffd9d75b0261a519887b026c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8569278
Reviewed-by: Toon Verwaest <[email protected]>
Commit-Queue: Toon Verwaest <[email protected]>
Auto-Submit: eliau elkouby (אליהו אלקובי) <[email protected]>
Reviewed-by: Leszek Swirski <[email protected]>
Cr-Commit-Position: refs/heads/main@{#110652}1 parent df14fa3 commit b0f6ad0
2 files changed
Lines changed: 43 additions & 32 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
280 | 301 | | |
281 | 302 | | |
282 | 303 | | |
| |||
297 | 318 | | |
298 | 319 | | |
299 | 320 | | |
300 | | - | |
301 | 321 | | |
302 | 322 | | |
303 | 323 | | |
| |||
322 | 342 | | |
323 | 343 | | |
324 | 344 | | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
356 | 349 | | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
357 | 362 | | |
358 | 363 | | |
359 | 364 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
728 | 728 | | |
729 | 729 | | |
730 | 730 | | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
731 | 737 | | |
732 | 738 | | |
733 | 739 | | |
| |||
0 commit comments