Revision: 17210
Author: [email protected]
Date: Tue Oct 15 09:16:33 2013 UTC
Log: Fix fetching tokens in lexer.
BUG=
[email protected]
Review URL: https://chromiumcodereview.appspot.com/26971006
http://code.google.com/p/v8/source/detail?r=17210
Modified:
/branches/experimental/parser/src/lexer/lexer.re
=======================================
--- /branches/experimental/parser/src/lexer/lexer.re Mon Oct 14 15:20:38
2013 UTC
+++ /branches/experimental/parser/src/lexer/lexer.re Tue Oct 15 09:16:33
2013 UTC
@@ -343,12 +343,13 @@
fetched_ = 0;
uint8_t chars[BUFFER_SIZE];
int n = static_cast<int>(fread(&chars, 1, BUFFER_SIZE, file_));
- scanner_->push(chars, n);
+ for (int i = n; i < BUFFER_SIZE; i++) chars[i] = 0;
+ scanner_->push(chars, BUFFER_SIZE);
}
Token::Value ExperimentalScanner::Next(int* beg_pos, int* end_pos) {
- if (current_ == fetched_) {
+ while (current_ == fetched_) {
FillTokens();
}
*beg_pos = beg_[current_];
--
--
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.