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

Unified Diff: src/lexer/lexer.h

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 | « no previous file | src/lexer/lexer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lexer/lexer.h
diff --git a/src/lexer/lexer.h b/src/lexer/lexer.h
index ebc2b77355d8d15f72b38b89384f9113faeee8cd..6b6e99a86d9a5a96a93d3ca8804149b1ee323b86 100644
--- a/src/lexer/lexer.h
+++ b/src/lexer/lexer.h
@@ -351,6 +351,11 @@ class Lexer : public LexerBase {
(sizeof(Char) == 1 && !token.is_in_primary_range);
}
+ static inline bool MustBeInBufferForAllocation(const TokenDesc& token) {
+ return MustBeInBuffer(token) ||
+ (sizeof(Char) == 2 && token.is_in_primary_range);
+ }
+
protected:
virtual void Scan();
« no previous file with comments | « no previous file | src/lexer/lexer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698