Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Unified Diff: src/lexer/lexer.cc

Issue 202953004: Experimental parser: fix two byte to one byte allocation (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/lexer/lexer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lexer/lexer.cc
diff --git a/src/lexer/lexer.cc b/src/lexer/lexer.cc
index 4c565a060a8f72a88d3398bc575709a642534f4a..c8c43b9f0d9717444f5af5dcddeab10827fd3393 100644
--- a/src/lexer/lexer.cc
+++ b/src/lexer/lexer.cc
@@ -708,7 +708,7 @@ Handle<String> Lexer<Char>::AllocateInternalizedString(
LiteralDesc* literal = current_literal_;
const TokenDesc& token = current_;
// TODO(dcarney): handle utf8 directly.
- if (source_handle_.is_null() || MustBeInBuffer(token)) {
+ if (source_handle_.is_null() || MustBeInBufferForAllocation(token)) {
EnsureLiteralIsValid(token, literal);
return literal->is_one_byte() ?
factory->InternalizeOneByteString(literal->one_byte_string()) :
@@ -733,7 +733,7 @@ Handle<String> Lexer<Char>::AllocateNextLiteralString(Isolate* isolate,
LiteralDesc* literal = next_literal_;
const TokenDesc& token = next_;
// TODO(dcarney): handle utf8 directly.
- if (source_handle_.is_null() || MustBeInBuffer(token)) {
+ if (source_handle_.is_null() || MustBeInBufferForAllocation(token)) {
EnsureLiteralIsValid(token, literal);
return literal->is_one_byte() ?
factory->NewStringFromOneByte(literal->one_byte_string(), tenured) :
« no previous file with comments | « src/lexer/lexer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698