https://codereview.chromium.org/140913009/diff/50001/src/lexer/experimental-scanner.cc
File src/lexer/experimental-scanner.cc (right):
https://codereview.chromium.org/140913009/diff/50001/src/lexer/experimental-scanner.cc#newcode68
src/lexer/experimental-scanner.cc:68: if (*cursor >=
unibrow::Latin1::kMaxChar) return true;
On 2014/01/20 07:54:33, marja wrote:
Wut? true and false reversed maybe?
This should be correct. In a two-byte string, a substring that contains
a non-ascii character can be referenced as (offset, length) pair, i.e.
it is a real substring of the source. A substring that contains only
ascii characters is currently copied into a one-byte buffer (we do not
implement yet that optimization that handles ascii substrings of a
two-byte string).
https://codereview.chromium.org/140913009/diff/50001/src/lexer/experimental-scanner.cc#newcode206
src/lexer/experimental-scanner.cc:206: int from = literal->offset;
On 2014/01/20 07:54:33, marja wrote:
Can you add a comment here (or to a more suitable file) describing why
and how.
I suppose NewRawOneByte can cause GC, and this works because we only
get the
offset before the possible GC, and then after GC read the actual data
from the
string....
Done.
https://codereview.chromium.org/140913009/diff/50001/src/lexer/experimental-scanner.h
File src/lexer/experimental-scanner.h (right):
https://codereview.chromium.org/140913009/diff/50001/src/lexer/experimental-scanner.h#newcode261
src/lexer/experimental-scanner.h:261: if (!next_literal_->is_in_buffer)
next_literal_->beg_pos = -1;
On 2014/01/20 07:54:33, marja wrote:
Shouldn't we reset is_in_buffer here too? Why not?
beg_pos == -1 indicates an invalid buffer, for invalid buffer we do not
look at is_in_buffer.
https://codereview.chromium.org/140913009/
--
--
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/groups/opt_out.