[from more offline discussion / debugging:]
The scanner/stream state at the point of bookmarking looks something like
this:
characters: ... function bla() { var x = blubb; ...
...................C.NNNc|...............
with: C: current_, token LBRACE
N: next_, token VAR
c: c0_, the space after N
| : the position in the underlying stream.
In other words, current_, next_, c0_ cache the state *before* the current
stream
position. So I either need to copy all of them, or I need to be able to
rewind
the stream behind its current position and then re-parse those last two
tokens.
While both are certainly doable, doing the latter isn't going to be
particularly
pretty.
On fail-able ResetToBookmark: This shouldn't be necessary. None of the
current
implementations needs it. The streaming implementation will need to change
the
blink-side API to be able to reset, though.
https://codereview.chromium.org/1102523003/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.