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

Unified Diff: src/lexer/lexer.h

Issue 50573003: Experimental parser: don't hardcode 8-bit char type. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 7 years, 2 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 | src/lexer/lexer.re » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lexer/lexer.h
diff --git a/src/lexer/lexer.h b/src/lexer/lexer.h
index 087b46c3ec884c791d9095c068f587dab8623eb5..c9b762302e162d6e1f2f9699db544960a61d9668 100644
--- a/src/lexer/lexer.h
+++ b/src/lexer/lexer.h
@@ -30,9 +30,28 @@
#ifndef V8_LEXER_LEXER_H
#define V8_LEXER_LEXER_H
+#if defined(WIN32) // FIXME: does this work?
+
+typedef signed char int8_t;
+typedef signed short int16_t;
+typedef signed int int32_t;
+
+typedef unsigned char uint8_t;
+typedef unsigned short uint16_t;
+typedef unsigned int uint32_t;
+
+#else
+
+#include <stdint.h>
+#include <unistd.h>
+
+#endif // defined(WIN32)
+
#include "token.h"
#include "flags.h"
+#define YYCTYPE uint8_t
+
namespace v8 {
namespace internal {
@@ -59,16 +78,16 @@ class PushScanner {
int32_t state_;
int32_t condition_;
- uint8_t* limit_;
- uint8_t* start_;
- uint8_t* cursor_;
- uint8_t* marker_;
+ YYCTYPE* limit_;
+ YYCTYPE* start_;
+ YYCTYPE* cursor_;
+ YYCTYPE* marker_;
int real_start_;
- uint8_t* buffer_;
- uint8_t* buffer_end_;
+ YYCTYPE* buffer_;
+ YYCTYPE* buffer_end_;
- uint8_t yych;
+ YYCTYPE yych;
uint32_t yyaccept;
bool just_seen_line_terminator_;
« no previous file with comments | « no previous file | src/lexer/lexer.re » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698