Revision: 18608
Author:   [email protected]
Date:     Wed Jan 15 09:00:41 2014 UTC
Log:      Experimental parser: remove unnecessary reads

[email protected]

BUG=

Review URL: https://codereview.chromium.org/135853012
http://code.google.com/p/v8/source/detail?r=18608

Modified:
 /branches/experimental/parser/tools/lexer_generator/code_generator.jinja

=======================================
--- /branches/experimental/parser/tools/lexer_generator/code_generator.jinja Wed Jan 15 08:23:00 2014 UTC +++ /branches/experimental/parser/tools/lexer_generator/code_generator.jinja Wed Jan 15 09:00:41 2014 UTC
@@ -204,6 +204,8 @@
   {%- set state = dfa_states[node_number] -%}

   {{ write_label('state_entry', node_number_chain) }}
+
+  READ_CURSOR();

   {% if debug_print %}
     fprintf(stderr,
@@ -295,12 +297,10 @@

 #define FORWARD() {                               \
   cursor_++;                                      \
-  READ_CURSOR();                                  \
 }

 #define BACKWARD(n) {                             \
   cursor_ -= n;                                   \
-  READ_CURSOR();                                  \
 }

 #define READ_CURSOR() {                           \
@@ -324,7 +324,6 @@
   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 -%}

--
--
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.

Reply via email to