Upstream various build fixes from WebKit to ANGLE to make updating ANGLE in WebKit easier.
a) http://trac.webkit.org/changeset/127747
b) http://trac.webkit.org/changeset/128539
c) http://trac.webkit.org/changeset/122870 - Specifically, items #3 and #4 in this changeset's commit message.
Review URL: https://codereview.appspot.com/7040045
Author: maxvujovic@gmail.com
------
Upodate preprocessor.vcxproj to reflect changes in r1640.
Review URL: https://codereview.appspot.com/7061044
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1703 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/compiler/preprocessor/Diagnostics.cpp b/src/compiler/preprocessor/DiagnosticsBase.cpp
similarity index 98%
rename from src/compiler/preprocessor/Diagnostics.cpp
rename to src/compiler/preprocessor/DiagnosticsBase.cpp
index 3f50dfc..3e22e1f 100644
--- a/src/compiler/preprocessor/Diagnostics.cpp
+++ b/src/compiler/preprocessor/DiagnosticsBase.cpp
@@ -4,7 +4,7 @@
// found in the LICENSE file.
//
-#include "Diagnostics.h"
+#include "DiagnosticsBase.h"
#include <cassert>
diff --git a/src/compiler/preprocessor/Diagnostics.h b/src/compiler/preprocessor/DiagnosticsBase.h
similarity index 100%
rename from src/compiler/preprocessor/Diagnostics.h
rename to src/compiler/preprocessor/DiagnosticsBase.h
diff --git a/src/compiler/preprocessor/DirectiveHandler.cpp b/src/compiler/preprocessor/DirectiveHandlerBase.cpp
similarity index 88%
rename from src/compiler/preprocessor/DirectiveHandler.cpp
rename to src/compiler/preprocessor/DirectiveHandlerBase.cpp
index ca91e1c..ef35c6e 100644
--- a/src/compiler/preprocessor/DirectiveHandler.cpp
+++ b/src/compiler/preprocessor/DirectiveHandlerBase.cpp
@@ -4,7 +4,7 @@
// found in the LICENSE file.
//
-#include "DirectiveHandler.h"
+#include "DirectiveHandlerBase.h"
namespace pp
{
diff --git a/src/compiler/preprocessor/DirectiveHandler.h b/src/compiler/preprocessor/DirectiveHandlerBase.h
similarity index 100%
rename from src/compiler/preprocessor/DirectiveHandler.h
rename to src/compiler/preprocessor/DirectiveHandlerBase.h
diff --git a/src/compiler/preprocessor/DirectiveParser.cpp b/src/compiler/preprocessor/DirectiveParser.cpp
index f2e42d0..94dfdf5 100644
--- a/src/compiler/preprocessor/DirectiveParser.cpp
+++ b/src/compiler/preprocessor/DirectiveParser.cpp
@@ -10,8 +10,8 @@
#include <cstdlib>
#include <sstream>
-#include "Diagnostics.h"
-#include "DirectiveHandler.h"
+#include "DiagnosticsBase.h"
+#include "DirectiveHandlerBase.h"
#include "ExpressionParser.h"
#include "MacroExpander.h"
#include "Token.h"
diff --git a/src/compiler/preprocessor/ExpressionParser.cpp b/src/compiler/preprocessor/ExpressionParser.cpp
index 228639f..dee6029 100644
--- a/src/compiler/preprocessor/ExpressionParser.cpp
+++ b/src/compiler/preprocessor/ExpressionParser.cpp
@@ -84,8 +84,11 @@
// This file is auto-generated by generate_parser.sh. DO NOT EDIT!
#if defined(__GNUC__)
+#pragma GCC diagnostic ignored "-Wunknown-pragmas"
// Triggered by the auto-generated pplval variable.
#pragma GCC diagnostic ignored "-Wuninitialized"
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+#pragma GCC diagnostic warning "-Wunknown-pragmas"
#elif defined(_MSC_VER)
#pragma warning(disable: 4065 4701)
#endif
@@ -95,7 +98,7 @@
#include <cassert>
#include <sstream>
-#include "Diagnostics.h"
+#include "DiagnosticsBase.h"
#include "Lexer.h"
#include "Token.h"
@@ -105,6 +108,8 @@
#include <stdint.h>
typedef intmax_t YYSTYPE;
#endif // _MSC_VER
+#define YYENABLE_NLS 0
+#define YYLTYPE_IS_TRIVIAL 1
#define YYSTYPE_IS_TRIVIAL 1
#define YYSTYPE_IS_DECLARED 1
@@ -467,9 +472,9 @@
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint8 yyrline[] =
{
- 0, 85, 85, 92, 93, 96, 99, 102, 105, 108,
- 111, 114, 117, 120, 123, 126, 129, 132, 135, 138,
- 151, 164, 167, 170, 173, 176, 179
+ 0, 90, 90, 97, 98, 101, 104, 107, 110, 113,
+ 116, 119, 122, 125, 128, 131, 134, 137, 140, 143,
+ 156, 169, 172, 175, 178, 181, 184
};
#endif
diff --git a/src/compiler/preprocessor/ExpressionParser.y b/src/compiler/preprocessor/ExpressionParser.y
index 832ad40..7a7f534 100644
--- a/src/compiler/preprocessor/ExpressionParser.y
+++ b/src/compiler/preprocessor/ExpressionParser.y
@@ -21,8 +21,11 @@
// This file is auto-generated by generate_parser.sh. DO NOT EDIT!
#if defined(__GNUC__)
+#pragma GCC diagnostic ignored "-Wunknown-pragmas"
// Triggered by the auto-generated pplval variable.
#pragma GCC diagnostic ignored "-Wuninitialized"
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+#pragma GCC diagnostic warning "-Wunknown-pragmas"
#elif defined(_MSC_VER)
#pragma warning(disable: 4065 4701)
#endif
@@ -32,7 +35,7 @@
#include <cassert>
#include <sstream>
-#include "Diagnostics.h"
+#include "DiagnosticsBase.h"
#include "Lexer.h"
#include "Token.h"
@@ -42,6 +45,8 @@
#include <stdint.h>
typedef intmax_t YYSTYPE;
#endif // _MSC_VER
+#define YYENABLE_NLS 0
+#define YYLTYPE_IS_TRIVIAL 1
#define YYSTYPE_IS_TRIVIAL 1
#define YYSTYPE_IS_DECLARED 1
diff --git a/src/compiler/preprocessor/MacroExpander.cpp b/src/compiler/preprocessor/MacroExpander.cpp
index 086cd78..1116c51 100644
--- a/src/compiler/preprocessor/MacroExpander.cpp
+++ b/src/compiler/preprocessor/MacroExpander.cpp
@@ -9,7 +9,7 @@
#include <algorithm>
#include <sstream>
-#include "Diagnostics.h"
+#include "DiagnosticsBase.h"
#include "Token.h"
namespace pp
diff --git a/src/compiler/preprocessor/Preprocessor.cpp b/src/compiler/preprocessor/Preprocessor.cpp
index ffa7225..de024fe 100644
--- a/src/compiler/preprocessor/Preprocessor.cpp
+++ b/src/compiler/preprocessor/Preprocessor.cpp
@@ -9,7 +9,7 @@
#include <cassert>
#include <sstream>
-#include "Diagnostics.h"
+#include "DiagnosticsBase.h"
#include "DirectiveParser.h"
#include "Macro.h"
#include "MacroExpander.h"
diff --git a/src/compiler/preprocessor/Tokenizer.cpp b/src/compiler/preprocessor/Tokenizer.cpp
index eca9c3d..4a57647 100644
--- a/src/compiler/preprocessor/Tokenizer.cpp
+++ b/src/compiler/preprocessor/Tokenizer.cpp
@@ -56,6 +56,7 @@
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
+typedef uint64_t flex_uint64_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
@@ -179,6 +180,11 @@
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
@@ -201,11 +207,6 @@
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
@@ -223,7 +224,7 @@
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- int yy_n_chars;
+ yy_size_t yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
@@ -302,7 +303,7 @@
YY_BUFFER_STATE pp_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
YY_BUFFER_STATE pp_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE pp_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
+YY_BUFFER_STATE pp_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
void *ppalloc (yy_size_t ,yyscan_t yyscanner );
void *pprealloc (void *,yy_size_t ,yyscan_t yyscanner );
@@ -353,7 +354,7 @@
*/
#define YY_DO_BEFORE_ACTION \
yyg->yytext_ptr = yy_bp; \
- yyleng = (size_t) (yy_cp - yy_bp); \
+ yyleng = (yy_size_t) (yy_cp - yy_bp); \
yyg->yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp;
@@ -516,7 +517,7 @@
#include "Tokenizer.h"
-#include "Diagnostics.h"
+#include "DiagnosticsBase.h"
#include "Token.h"
#if defined(__GNUC__)
@@ -575,8 +576,8 @@
size_t yy_buffer_stack_max; /**< capacity of stack. */
YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
char yy_hold_char;
- int yy_n_chars;
- int yyleng_r;
+ yy_size_t yy_n_chars;
+ yy_size_t yyleng_r;
char *yy_c_buf_p;
int yy_init;
int yy_start;
@@ -633,7 +634,7 @@
void ppset_out (FILE * out_str ,yyscan_t yyscanner );
-int ppget_leng (yyscan_t yyscanner );
+yy_size_t ppget_leng (yyscan_t yyscanner );
char *ppget_text (yyscan_t yyscanner );
@@ -700,7 +701,7 @@
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- int n; \
+ yy_size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -1328,7 +1329,7 @@
else
{
- int num_to_read =
+ yy_size_t num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
@@ -1342,7 +1343,7 @@
if ( b->yy_is_our_buffer )
{
- int new_size = b->yy_buf_size * 2;
+ yy_size_t new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
@@ -1373,7 +1374,7 @@
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- yyg->yy_n_chars, (size_t) num_to_read );
+ yyg->yy_n_chars, num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
}
@@ -1498,7 +1499,7 @@
else
{ /* need more input */
- int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
+ yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
++yyg->yy_c_buf_p;
switch ( yy_get_next_buffer( yyscanner ) )
@@ -1522,7 +1523,7 @@
case EOB_ACT_END_OF_FILE:
{
if ( ppwrap(yyscanner ) )
- return EOF;
+ return 0;
if ( ! yyg->yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
@@ -1778,7 +1779,7 @@
*/
static void ppensure_buffer_stack (yyscan_t yyscanner)
{
- int num_to_alloc;
+ yy_size_t num_to_alloc;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!yyg->yy_buffer_stack) {
@@ -1876,12 +1877,11 @@
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE pp_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
+YY_BUFFER_STATE pp_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
char *buf;
- yy_size_t n;
- int i;
+ yy_size_t n, i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
@@ -1991,7 +1991,7 @@
/** Get the length of the current token.
* @param yyscanner The scanner object.
*/
-int ppget_leng (yyscan_t yyscanner)
+yy_size_t ppget_leng (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyleng;
diff --git a/src/compiler/preprocessor/Tokenizer.l b/src/compiler/preprocessor/Tokenizer.l
index 9762988..689ae64 100644
--- a/src/compiler/preprocessor/Tokenizer.l
+++ b/src/compiler/preprocessor/Tokenizer.l
@@ -25,7 +25,7 @@
%{
#include "Tokenizer.h"
-#include "Diagnostics.h"
+#include "DiagnosticsBase.h"
#include "Token.h"
#if defined(__GNUC__)
diff --git a/src/compiler/preprocessor/preprocessor.vcxproj b/src/compiler/preprocessor/preprocessor.vcxproj
index b39b0e7..dccce7d 100644
--- a/src/compiler/preprocessor/preprocessor.vcxproj
+++ b/src/compiler/preprocessor/preprocessor.vcxproj
@@ -134,8 +134,8 @@
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
- <ClCompile Include="Diagnostics.cpp" />
- <ClCompile Include="DirectiveHandler.cpp" />
+ <ClCompile Include="DiagnosticsBase.cpp" />
+ <ClCompile Include="DirectiveHandlerBase.cpp" />
<ClCompile Include="DirectiveParser.cpp" />
<ClCompile Include="ExpressionParser.cpp" />
<ClCompile Include="Input.cpp" />
@@ -148,8 +148,8 @@
</ItemGroup>
<ItemGroup>
<ClInclude Include="length_limits.h" />
- <ClInclude Include="Diagnostics.h" />
- <ClInclude Include="DirectiveHandler.h" />
+ <ClInclude Include="DiagnosticsBase.h" />
+ <ClInclude Include="DirectiveHandlerBase.h" />
<ClInclude Include="DirectiveParser.h" />
<ClInclude Include="ExpressionParser.h" />
<ClInclude Include="Input.h" />