Revision: 18080
Author: [email protected]
Date: Tue Nov 26 14:07:28 2013 UTC
Log: Experimental parser: rename YYCTYPE
[email protected]
BUG=
Review URL: https://codereview.chromium.org/88383003
http://code.google.com/p/v8/source/detail?r=18080
Modified:
/branches/experimental/parser/src/lexer/experimental-scanner.h
/branches/experimental/parser/src/lexer/lexer-shell.cc
=======================================
--- /branches/experimental/parser/src/lexer/experimental-scanner.h Tue Nov
26 13:46:57 2013 UTC
+++ /branches/experimental/parser/src/lexer/experimental-scanner.h Tue Nov
26 14:07:28 2013 UTC
@@ -229,7 +229,7 @@
};
-template<typename YYCTYPE>
+template<typename Char>
class ExperimentalScanner : public ScannerBase {
public:
explicit ExperimentalScanner(
@@ -256,7 +256,7 @@
// 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 @@
}
}
- 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;
=======================================
--- /branches/experimental/parser/src/lexer/lexer-shell.cc Tue Nov 26
13:37:30 2013 UTC
+++ /branches/experimental/parser/src/lexer/lexer-shell.cc Tue Nov 26
14:07:28 2013 UTC
@@ -210,7 +210,7 @@
}
-template<typename YYCTYPE>
+template<typename Char>
TimeDelta RunExperimentalScanner(Handle<String> source,
Isolate* isolate,
Encoding encoding,
@@ -220,7 +220,7 @@
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.