Reviewers: marja,

Message:
Committed patchset #1 manually as r18080 (presubmit successful).

Description:
Experimental parser: rename YYCTYPE

[email protected]

BUG=

Committed: https://code.google.com/p/v8/source/detail?r=18080

Please review this at https://codereview.chromium.org/88383003/

SVN Base: https://v8.googlecode.com/svn/branches/experimental/parser

Affected files (+13, -13 lines):
  M src/lexer/experimental-scanner.h
  M src/lexer/lexer-shell.cc


Index: src/lexer/experimental-scanner.h
diff --git a/src/lexer/experimental-scanner.h b/src/lexer/experimental-scanner.h index f698f622313752465267dcdd70dfa9713eb6baf8..886da1867b5f4fa0fd40ba72e292e276bc145887 100644
--- a/src/lexer/experimental-scanner.h
+++ b/src/lexer/experimental-scanner.h
@@ -229,7 +229,7 @@ class ScannerBase {
 };


-template<typename YYCTYPE>
+template<typename Char>
 class ExperimentalScanner : public ScannerBase {
  public:
   explicit ExperimentalScanner(
@@ -256,7 +256,7 @@ class ExperimentalScanner : public ScannerBase {
// We get a raw pointer from the Handle, but we also update it every time
     // there is a GC, so it is safe.
     DisallowHeapAllocation no_gc;
-    const YYCTYPE* new_buffer = GetNewBufferBasedOnHandle();
+    const Char* new_buffer = GetNewBufferBasedOnHandle();
     if (new_buffer != buffer_) {
       int start_offset = start_ - buffer_;
       int cursor_offset = cursor_ - buffer_;
@@ -269,25 +269,25 @@ class ExperimentalScanner : public ScannerBase {
     }
   }

-  const YYCTYPE* GetNewBufferBasedOnHandle() const;
+  const Char* GetNewBufferBasedOnHandle() const;

  private:
   Handle<String> source_handle_;
-  const YYCTYPE* buffer_;
-  const YYCTYPE* buffer_end_;
-  const YYCTYPE* start_;
-  const YYCTYPE* cursor_;
-  const YYCTYPE* marker_;
+  const Char* buffer_;
+  const Char* buffer_end_;
+  const Char* start_;
+  const Char* cursor_;
+  const Char* marker_;
 };


-template<typename YYCTYPE>
-uc32 ExperimentalScanner<YYCTYPE>::ScanHexNumber(int length) {
+template<typename Char>
+uc32 ExperimentalScanner<Char>::ScanHexNumber(int length) {
   // We have seen \uXXXX, let's see what it is.
// FIXME: we never end up in here if only a subset of the 4 chars are valid
   // hex digits -> handle the case where they're not.
   uc32 x = 0;
-  for (const YYCTYPE* s = cursor_ - length; s != cursor_; ++s) {
+  for (const Char* s = cursor_ - length; s != cursor_; ++s) {
     int d = HexValue(*s);
     if (d < 0) {
       return -1;
Index: src/lexer/lexer-shell.cc
diff --git a/src/lexer/lexer-shell.cc b/src/lexer/lexer-shell.cc
index e1e89ca54f2c61424c88dd4402d7de2b0322f0c2..266727ff3ffaa9bec51d889c907e15d0e38b92b6 100644
--- a/src/lexer/lexer-shell.cc
+++ b/src/lexer/lexer-shell.cc
@@ -210,7 +210,7 @@ TimeDelta RunBaselineScanner(const char* fname,
 }


-template<typename YYCTYPE>
+template<typename Char>
 TimeDelta RunExperimentalScanner(Handle<String> source,
                                  Isolate* isolate,
                                  Encoding encoding,
@@ -220,7 +220,7 @@ TimeDelta RunExperimentalScanner(Handle<String> source,
                                  HarmonySettings harmony_settings) {
   ElapsedTimer timer;
   timer.Start();
-  ExperimentalScanner<YYCTYPE> scanner(source, isolate);
+  ExperimentalScanner<Char> scanner(source, isolate);
   scanner.SetHarmonyNumericLiterals(harmony_settings.numeric_literals);
   scanner.SetHarmonyModules(harmony_settings.modules);
   scanner.SetHarmonyScoping(harmony_settings.scoping);


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