-
Charles Kerr authored
Halve the number of lookups in ExtractLocationForJSFunction() by calling GetPositionInfo() directly instead of making separate calls for column and line number. Improve the efficiency of position lookups in slow mode. The current code does a linear walk through the source by calling String::Get() for each character. This PR also does a linear walk, but avoids the overhead of multiple Get() calls by pulling the String's flat content into a local vector and walking through that. Downstream Electron discussion of this can be found at https://github.com/electron/electron/issues/24509 Apologies in advance if I've missed anything; this is my first V8 CL... Change-Id: I22b034dc1bfe967164d2f8515a9a0c1d7f043c83 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2496065 Commit-Queue: Simon Zünd <szuend@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Simon Zünd <szuend@chromium.org> Cr-Commit-Position: refs/heads/master@{#70783}
2e2dc986