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

Unified Diff: tools/lexer_generator/code_generator.jinja

Issue 135853012: Experimental parser: remove unnecessary reads (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 6 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/lexer_generator/code_generator.jinja
diff --git a/tools/lexer_generator/code_generator.jinja b/tools/lexer_generator/code_generator.jinja
index 75d95b0c412807a6b803898bcaf049ad6d242f6c..9b99de4b3276b2a9fde092b714456fe7fe3c9938 100644
--- a/tools/lexer_generator/code_generator.jinja
+++ b/tools/lexer_generator/code_generator.jinja
@@ -205,6 +205,8 @@
{{ write_label('state_entry', node_number_chain) }}
+ READ_CURSOR();
+
{% if debug_print %}
fprintf(stderr,
"state {{state.node_number}}, start %d, cursor %d\n",
@@ -295,12 +297,10 @@
#define FORWARD() { \
cursor_++; \
- READ_CURSOR(); \
}
#define BACKWARD(n) { \
cursor_ -= n; \
- READ_CURSOR(); \
}
#define READ_CURSOR() { \
@@ -324,7 +324,6 @@ void ExperimentalScanner<{{char_type}}>::Scan() {
Token::Value stored_token;
const {{char_type}} * marker;
{{char_type}} primary_char;
- READ_CURSOR();
{# first node is start node #}
{% for dfa_state in dfa_states -%}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698