[svn:parrot] r49464 - in branches/gsoc_nci: . compilers/imcc compilers/pct/src/POST config/auto config/auto/timespec config/gen/makefiles include/parrot lib/Parrot/Configure/Step src/gc t/codingstd t/op
ash at svn.parrot.org
ash at svn.parrot.org
Wed Oct 6 19:43:59 UTC 2010
Author: ash
Date: Wed Oct 6 19:43:58 2010
New Revision: 49464
URL: https://trac.parrot.org/parrot/changeset/49464
Log:
Merge branch 'master' into gsoc_nci
Added:
branches/gsoc_nci/config/auto/timespec/
branches/gsoc_nci/config/auto/timespec.pm
branches/gsoc_nci/config/auto/timespec/test_c.in
branches/gsoc_nci/t/codingstd/c_enum.t
Modified:
branches/gsoc_nci/CREDITS
branches/gsoc_nci/MANIFEST
branches/gsoc_nci/compilers/imcc/imc.h
branches/gsoc_nci/compilers/imcc/imcc.l
branches/gsoc_nci/compilers/imcc/imclexer.c
branches/gsoc_nci/compilers/pct/src/POST/Compiler.pir
branches/gsoc_nci/config/gen/makefiles/root.in
branches/gsoc_nci/include/parrot/hash.h
branches/gsoc_nci/include/parrot/imageio.h
branches/gsoc_nci/include/parrot/memory.h
branches/gsoc_nci/include/parrot/runcore_api.h
branches/gsoc_nci/include/parrot/thr_windows.h
branches/gsoc_nci/include/parrot/thread.h
branches/gsoc_nci/lib/Parrot/Configure/Step/List.pm
branches/gsoc_nci/src/gc/alloc_memory.c
branches/gsoc_nci/src/gc/gc_inf.c
branches/gsoc_nci/src/gc/gc_ms.c
branches/gsoc_nci/src/gc/gc_ms2.c
branches/gsoc_nci/t/op/gc-non-recursive.t
Modified: branches/gsoc_nci/CREDITS
==============================================================================
--- branches/gsoc_nci/CREDITS Wed Oct 6 16:41:06 2010 (r49463)
+++ branches/gsoc_nci/CREDITS Wed Oct 6 19:43:58 2010 (r49464)
@@ -400,6 +400,12 @@
N: Gerard Goossen
D: Documentation patch for Parrot_PMC_get_pointer_intkey()
+N: Géraud Continsouzas
+U: GeJ
+A: geraud
+D: Perl2Pir tests conversion
+D: Miscellaneous codingstd fixes
+
N: Gerd Pokorra
E: pokorra at uni-siegen.de
D: Release manager for 1.9.0, 2.3.0, 2.5.0 and 2.8.0
@@ -450,7 +456,7 @@
N: isop
D: various Pynie patches
-N: James E Keenan (Jim)
+N: James E Keenan (Jim) (aka kid51)
E: jkeenan at cpan.org
U: jkeenan
D: Testing of configuration and build tools
Modified: branches/gsoc_nci/MANIFEST
==============================================================================
--- branches/gsoc_nci/MANIFEST Wed Oct 6 16:41:06 2010 (r49463)
+++ branches/gsoc_nci/MANIFEST Wed Oct 6 19:43:58 2010 (r49464)
@@ -1,7 +1,7 @@
# ex: set ro:
# $Id$
#
-# generated by tools/dev/mk_manifest_and_skip.pl Sat Sep 25 01:48:30 2010 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Wed Sep 29 04:41:54 2010 UT
#
# See below for documentation on the format of this file.
#
@@ -248,6 +248,8 @@
config/auto/snprintf/test_c.in []
config/auto/socklen_t.pm []
config/auto/thread.pm []
+config/auto/timespec.pm []
+config/auto/timespec/test_c.in []
config/auto/va_ptr.pm []
config/auto/va_ptr/test_c.in []
config/auto/warnings.pm []
@@ -1476,6 +1478,7 @@
t/codingstd/c_arg_assert.t [test]
t/codingstd/c_code_coda.t [test]
t/codingstd/c_cppcomments.t [test]
+t/codingstd/c_enum.t [test]
t/codingstd/c_function_docs.t [test]
t/codingstd/c_header_guards.t [test]
t/codingstd/c_indent.t [test]
Modified: branches/gsoc_nci/compilers/imcc/imc.h
==============================================================================
--- branches/gsoc_nci/compilers/imcc/imc.h Wed Oct 6 16:41:06 2010 (r49463)
+++ branches/gsoc_nci/compilers/imcc/imc.h Wed Oct 6 19:43:58 2010 (r49464)
@@ -59,7 +59,7 @@
enum {
IMCC_FATAL_EXCEPTION = 1,
IMCC_FATALY_EXCEPTION = 2,
- IMCC_PARSEFAIL_EXCEPTION = 3,
+ IMCC_PARSEFAIL_EXCEPTION = 3
};
#define N_ELEMENTS(x) (sizeof (x)/sizeof ((x)[0]))
Modified: branches/gsoc_nci/compilers/imcc/imcc.l
==============================================================================
--- branches/gsoc_nci/compilers/imcc/imcc.l Wed Oct 6 16:41:06 2010 (r49463)
+++ branches/gsoc_nci/compilers/imcc/imcc.l Wed Oct 6 19:43:58 2010 (r49464)
@@ -17,6 +17,9 @@
# define __STDC_VERSION__ 0
#endif
+#include "imc.h"
+#include "parser.h"
+
}
%{
@@ -34,13 +37,6 @@
*
*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "imc.h"
-#include "parser.h"
-
typedef struct parser_state_t parser_state_t;
/* parser state structure
Modified: branches/gsoc_nci/compilers/imcc/imclexer.c
==============================================================================
--- branches/gsoc_nci/compilers/imcc/imclexer.c Wed Oct 6 16:41:06 2010 (r49463)
+++ branches/gsoc_nci/compilers/imcc/imclexer.c Wed Oct 6 19:43:58 2010 (r49464)
@@ -18,10 +18,13 @@
# define __STDC_VERSION__ 0
#endif
+#include "imc.h"
+#include "parser.h"
-#line 25 "compilers/imcc/imclexer.c"
+
+#line 28 "compilers/imcc/imclexer.c"
#define YY_INT_ALIGNED short int
@@ -75,6 +78,7 @@
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
+#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -105,8 +109,6 @@
#define UINT32_MAX (4294967295U)
#endif
-#endif /* ! C99 */
-
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -180,15 +182,7 @@
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k.
- * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
- * Ditto for the __ia64__ case accordingly.
- */
-#define YY_BUF_SIZE 32768
-#else
#define YY_BUF_SIZE 16384
-#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -2423,7 +2417,7 @@
#define YY_RESTORE_YY_MORE_OFFSET
#line 1 "compilers/imcc/imcc.l"
-#line 23 "compilers/imcc/imcc.l"
+#line 26 "compilers/imcc/imcc.l"
/*
* imcc.l
*
@@ -2438,13 +2432,6 @@
*
*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "imc.h"
-#include "parser.h"
-
typedef struct parser_state_t parser_state_t;
/* parser state structure
@@ -2523,7 +2510,7 @@
-#line 2527 "compilers/imcc/imclexer.c"
+#line 2514 "compilers/imcc/imclexer.c"
#define INITIAL 0
#define emit 1
@@ -2658,12 +2645,7 @@
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k */
-#define YY_READ_BUF_SIZE 16384
-#else
#define YY_READ_BUF_SIZE 8192
-#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -2671,7 +2653,7 @@
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
+#define ECHO fwrite( yytext, yyleng, 1, yyout )
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -2682,7 +2664,7 @@
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- size_t n; \
+ int n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -2768,7 +2750,7 @@
register int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-#line 154 "compilers/imcc/imcc.l"
+#line 150 "compilers/imcc/imcc.l"
/* for emacs "*/
if (IMCC_INFO(interp)->expect_pasm == 1 && !IMCC_INFO(interp)->in_pod) {
@@ -2787,7 +2769,7 @@
return 0;
}
-#line 2791 "compilers/imcc/imclexer.c"
+#line 2773 "compilers/imcc/imclexer.c"
if ( !yyg->yy_init )
{
@@ -2881,13 +2863,13 @@
case 1:
YY_RULE_SETUP
-#line 172 "compilers/imcc/imcc.l"
+#line 168 "compilers/imcc/imcc.l"
{ SET_LINE_NUMBER; }
YY_BREAK
case 2:
/* rule 2 can match eol */
YY_RULE_SETUP
-#line 174 "compilers/imcc/imcc.l"
+#line 170 "compilers/imcc/imcc.l"
{
SET_LINE_NUMBER;
IMCC_INFO(interp)->frames->heredoc_rest = mem_sys_strdup(yytext);
@@ -2897,7 +2879,7 @@
case 3:
/* rule 3 can match eol */
YY_RULE_SETUP
-#line 180 "compilers/imcc/imcc.l"
+#line 176 "compilers/imcc/imcc.l"
{
/* heredocs have highest priority
* arrange them before all wildcard state matches */
@@ -2913,7 +2895,7 @@
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 193 "compilers/imcc/imcc.l"
+#line 189 "compilers/imcc/imcc.l"
{
SET_LINE_NUMBER;
/* Are we at the end of the heredoc? */
@@ -2954,7 +2936,7 @@
case 5:
/* rule 5 can match eol */
YY_RULE_SETUP
-#line 230 "compilers/imcc/imcc.l"
+#line 226 "compilers/imcc/imcc.l"
{
yy_pop_state(yyscanner);
yy_push_state(cmt3, yyscanner);
@@ -2967,7 +2949,7 @@
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 240 "compilers/imcc/imcc.l"
+#line 236 "compilers/imcc/imcc.l"
{
yy_pop_state(yyscanner);
yy_push_state(cmt4, yyscanner);
@@ -2975,17 +2957,17 @@
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 245 "compilers/imcc/imcc.l"
+#line 241 "compilers/imcc/imcc.l"
{ yy_push_state(cmt2, yyscanner); }
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 247 "compilers/imcc/imcc.l"
+#line 243 "compilers/imcc/imcc.l"
{ yy_push_state(cmt1, yyscanner); }
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 249 "compilers/imcc/imcc.l"
+#line 245 "compilers/imcc/imcc.l"
{
yylineno = IMCC_INFO(interp)->line = atoi(yytext);
yy_pop_state(yyscanner);
@@ -2996,7 +2978,7 @@
case 10:
/* rule 10 can match eol */
YY_RULE_SETUP
-#line 256 "compilers/imcc/imcc.l"
+#line 252 "compilers/imcc/imcc.l"
{
yy_pop_state(yyscanner);
}
@@ -3004,7 +2986,7 @@
case 11:
/* rule 11 can match eol */
YY_RULE_SETUP
-#line 260 "compilers/imcc/imcc.l"
+#line 256 "compilers/imcc/imcc.l"
{
if (IMCC_INFO(interp)->expect_pasm == 2)
BEGIN(INITIAL);
@@ -3016,7 +2998,7 @@
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 269 "compilers/imcc/imcc.l"
+#line 265 "compilers/imcc/imcc.l"
{
yy_push_state(cmt5, yyscanner);
}
@@ -3024,7 +3006,7 @@
case 13:
/* rule 13 can match eol */
YY_RULE_SETUP
-#line 273 "compilers/imcc/imcc.l"
+#line 269 "compilers/imcc/imcc.l"
{
if (IMCC_INFO(interp)->expect_pasm == 2)
BEGIN(INITIAL);
@@ -3039,7 +3021,7 @@
case 14:
/* rule 14 can match eol */
YY_RULE_SETUP
-#line 285 "compilers/imcc/imcc.l"
+#line 281 "compilers/imcc/imcc.l"
{
/* this is a stand-alone =cut, but we're not in POD mode, so ignore. */
SET_LINE_NUMBER;
@@ -3048,7 +3030,7 @@
case 15:
/* rule 15 can match eol */
YY_RULE_SETUP
-#line 290 "compilers/imcc/imcc.l"
+#line 286 "compilers/imcc/imcc.l"
{
SET_LINE_NUMBER;
IMCC_INFO(interp)->in_pod = 1;
@@ -3058,7 +3040,7 @@
case 16:
/* rule 16 can match eol */
YY_RULE_SETUP
-#line 296 "compilers/imcc/imcc.l"
+#line 292 "compilers/imcc/imcc.l"
{
SET_LINE_NUMBER;
IMCC_INFO(interp)->in_pod = 0;
@@ -3067,478 +3049,478 @@
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 302 "compilers/imcc/imcc.l"
+#line 298 "compilers/imcc/imcc.l"
{ SET_LINE_NUMBER; }
YY_BREAK
case 18:
/* rule 18 can match eol */
YY_RULE_SETUP
-#line 304 "compilers/imcc/imcc.l"
+#line 300 "compilers/imcc/imcc.l"
{ /* ignore */ }
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 306 "compilers/imcc/imcc.l"
+#line 302 "compilers/imcc/imcc.l"
return TK_LINE;
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 307 "compilers/imcc/imcc.l"
+#line 303 "compilers/imcc/imcc.l"
return TK_FILE;
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 308 "compilers/imcc/imcc.l"
+#line 304 "compilers/imcc/imcc.l"
return ANNOTATE;
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 309 "compilers/imcc/imcc.l"
+#line 305 "compilers/imcc/imcc.l"
return LEXICAL;
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 310 "compilers/imcc/imcc.l"
+#line 306 "compilers/imcc/imcc.l"
return ARG;
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 311 "compilers/imcc/imcc.l"
+#line 307 "compilers/imcc/imcc.l"
return SUB;
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 312 "compilers/imcc/imcc.l"
+#line 308 "compilers/imcc/imcc.l"
return ESUB;
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 313 "compilers/imcc/imcc.l"
+#line 309 "compilers/imcc/imcc.l"
return PCC_BEGIN;
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 314 "compilers/imcc/imcc.l"
+#line 310 "compilers/imcc/imcc.l"
return PCC_END;
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 315 "compilers/imcc/imcc.l"
+#line 311 "compilers/imcc/imcc.l"
return PCC_CALL;
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 316 "compilers/imcc/imcc.l"
+#line 312 "compilers/imcc/imcc.l"
return NCI_CALL;
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 317 "compilers/imcc/imcc.l"
+#line 313 "compilers/imcc/imcc.l"
return METH_CALL;
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 318 "compilers/imcc/imcc.l"
+#line 314 "compilers/imcc/imcc.l"
return INVOCANT;
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 319 "compilers/imcc/imcc.l"
+#line 315 "compilers/imcc/imcc.l"
return PCC_SUB;
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 320 "compilers/imcc/imcc.l"
+#line 316 "compilers/imcc/imcc.l"
return PCC_BEGIN_RETURN;
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 321 "compilers/imcc/imcc.l"
+#line 317 "compilers/imcc/imcc.l"
return PCC_END_RETURN;
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 322 "compilers/imcc/imcc.l"
+#line 318 "compilers/imcc/imcc.l"
return PCC_BEGIN_YIELD;
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 323 "compilers/imcc/imcc.l"
+#line 319 "compilers/imcc/imcc.l"
return PCC_END_YIELD;
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 325 "compilers/imcc/imcc.l"
+#line 321 "compilers/imcc/imcc.l"
return METHOD;
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 326 "compilers/imcc/imcc.l"
+#line 322 "compilers/imcc/imcc.l"
return MULTI;
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 327 "compilers/imcc/imcc.l"
+#line 323 "compilers/imcc/imcc.l"
return MAIN;
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 328 "compilers/imcc/imcc.l"
+#line 324 "compilers/imcc/imcc.l"
return LOAD;
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 329 "compilers/imcc/imcc.l"
+#line 325 "compilers/imcc/imcc.l"
return INIT;
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 330 "compilers/imcc/imcc.l"
+#line 326 "compilers/imcc/imcc.l"
return IMMEDIATE;
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 331 "compilers/imcc/imcc.l"
+#line 327 "compilers/imcc/imcc.l"
return POSTCOMP;
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 332 "compilers/imcc/imcc.l"
+#line 328 "compilers/imcc/imcc.l"
return ANON;
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 333 "compilers/imcc/imcc.l"
+#line 329 "compilers/imcc/imcc.l"
return OUTER;
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 334 "compilers/imcc/imcc.l"
+#line 330 "compilers/imcc/imcc.l"
return NEED_LEX;
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 335 "compilers/imcc/imcc.l"
+#line 331 "compilers/imcc/imcc.l"
return VTABLE_METHOD;
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 336 "compilers/imcc/imcc.l"
+#line 332 "compilers/imcc/imcc.l"
return NS_ENTRY;
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 337 "compilers/imcc/imcc.l"
+#line 333 "compilers/imcc/imcc.l"
return UNIQUE_REG;
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 338 "compilers/imcc/imcc.l"
+#line 334 "compilers/imcc/imcc.l"
return SUB_INSTANCE_OF;
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 339 "compilers/imcc/imcc.l"
+#line 335 "compilers/imcc/imcc.l"
return SUBID;
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 341 "compilers/imcc/imcc.l"
+#line 337 "compilers/imcc/imcc.l"
return RESULT;
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 342 "compilers/imcc/imcc.l"
+#line 338 "compilers/imcc/imcc.l"
return GET_RESULTS;
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 343 "compilers/imcc/imcc.l"
+#line 339 "compilers/imcc/imcc.l"
return YIELDT;
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 344 "compilers/imcc/imcc.l"
+#line 340 "compilers/imcc/imcc.l"
return SET_YIELD;
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 345 "compilers/imcc/imcc.l"
+#line 341 "compilers/imcc/imcc.l"
return RETURN;
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 346 "compilers/imcc/imcc.l"
+#line 342 "compilers/imcc/imcc.l"
return SET_RETURN;
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 347 "compilers/imcc/imcc.l"
+#line 343 "compilers/imcc/imcc.l"
return TAILCALL;
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 348 "compilers/imcc/imcc.l"
+#line 344 "compilers/imcc/imcc.l"
return LOADLIB;
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 350 "compilers/imcc/imcc.l"
+#line 346 "compilers/imcc/imcc.l"
return ADV_FLAT;
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 351 "compilers/imcc/imcc.l"
+#line 347 "compilers/imcc/imcc.l"
return ADV_SLURPY;
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 352 "compilers/imcc/imcc.l"
+#line 348 "compilers/imcc/imcc.l"
return ADV_OPTIONAL;
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 353 "compilers/imcc/imcc.l"
+#line 349 "compilers/imcc/imcc.l"
return ADV_OPT_FLAG;
YY_BREAK
case 64:
YY_RULE_SETUP
-#line 354 "compilers/imcc/imcc.l"
+#line 350 "compilers/imcc/imcc.l"
return ADV_NAMED;
YY_BREAK
case 65:
YY_RULE_SETUP
-#line 355 "compilers/imcc/imcc.l"
+#line 351 "compilers/imcc/imcc.l"
return ADV_ARROW;
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 356 "compilers/imcc/imcc.l"
+#line 352 "compilers/imcc/imcc.l"
return ADV_INVOCANT;
YY_BREAK
case 67:
YY_RULE_SETUP
-#line 357 "compilers/imcc/imcc.l"
+#line 353 "compilers/imcc/imcc.l"
return ADV_CALL_SIG;
YY_BREAK
case 68:
YY_RULE_SETUP
-#line 359 "compilers/imcc/imcc.l"
+#line 355 "compilers/imcc/imcc.l"
return NAMESPACE;
YY_BREAK
case 69:
YY_RULE_SETUP
-#line 360 "compilers/imcc/imcc.l"
+#line 356 "compilers/imcc/imcc.l"
return HLL;
YY_BREAK
case 70:
YY_RULE_SETUP
-#line 362 "compilers/imcc/imcc.l"
+#line 358 "compilers/imcc/imcc.l"
return LOCAL;
YY_BREAK
case 71:
YY_RULE_SETUP
-#line 363 "compilers/imcc/imcc.l"
+#line 359 "compilers/imcc/imcc.l"
return CONST;
YY_BREAK
case 72:
YY_RULE_SETUP
-#line 364 "compilers/imcc/imcc.l"
+#line 360 "compilers/imcc/imcc.l"
return GLOBAL_CONST;
YY_BREAK
case 73:
YY_RULE_SETUP
-#line 365 "compilers/imcc/imcc.l"
+#line 361 "compilers/imcc/imcc.l"
return PARAM;
YY_BREAK
case 74:
YY_RULE_SETUP
-#line 366 "compilers/imcc/imcc.l"
+#line 362 "compilers/imcc/imcc.l"
return GOTO;
YY_BREAK
case 75:
YY_RULE_SETUP
-#line 367 "compilers/imcc/imcc.l"
+#line 363 "compilers/imcc/imcc.l"
return IF;
YY_BREAK
case 76:
YY_RULE_SETUP
-#line 368 "compilers/imcc/imcc.l"
+#line 364 "compilers/imcc/imcc.l"
return UNLESS;
YY_BREAK
case 77:
YY_RULE_SETUP
-#line 369 "compilers/imcc/imcc.l"
+#line 365 "compilers/imcc/imcc.l"
return PNULL;
YY_BREAK
case 78:
YY_RULE_SETUP
-#line 370 "compilers/imcc/imcc.l"
+#line 366 "compilers/imcc/imcc.l"
return INTV;
YY_BREAK
case 79:
YY_RULE_SETUP
-#line 371 "compilers/imcc/imcc.l"
+#line 367 "compilers/imcc/imcc.l"
return FLOATV;
YY_BREAK
case 80:
YY_RULE_SETUP
-#line 373 "compilers/imcc/imcc.l"
+#line 369 "compilers/imcc/imcc.l"
return PMCV;
YY_BREAK
case 81:
YY_RULE_SETUP
-#line 374 "compilers/imcc/imcc.l"
+#line 370 "compilers/imcc/imcc.l"
return STRINGV;
YY_BREAK
case 82:
YY_RULE_SETUP
-#line 375 "compilers/imcc/imcc.l"
+#line 371 "compilers/imcc/imcc.l"
return SHIFT_LEFT;
YY_BREAK
case 83:
YY_RULE_SETUP
-#line 376 "compilers/imcc/imcc.l"
+#line 372 "compilers/imcc/imcc.l"
return SHIFT_RIGHT;
YY_BREAK
case 84:
YY_RULE_SETUP
-#line 377 "compilers/imcc/imcc.l"
+#line 373 "compilers/imcc/imcc.l"
return SHIFT_RIGHT_U;
YY_BREAK
case 85:
YY_RULE_SETUP
-#line 378 "compilers/imcc/imcc.l"
+#line 374 "compilers/imcc/imcc.l"
return LOG_AND;
YY_BREAK
case 86:
YY_RULE_SETUP
-#line 379 "compilers/imcc/imcc.l"
+#line 375 "compilers/imcc/imcc.l"
return LOG_OR;
YY_BREAK
case 87:
YY_RULE_SETUP
-#line 380 "compilers/imcc/imcc.l"
+#line 376 "compilers/imcc/imcc.l"
return LOG_XOR;
YY_BREAK
case 88:
YY_RULE_SETUP
-#line 381 "compilers/imcc/imcc.l"
+#line 377 "compilers/imcc/imcc.l"
return RELOP_LT;
YY_BREAK
case 89:
YY_RULE_SETUP
-#line 382 "compilers/imcc/imcc.l"
+#line 378 "compilers/imcc/imcc.l"
return RELOP_LTE;
YY_BREAK
case 90:
YY_RULE_SETUP
-#line 383 "compilers/imcc/imcc.l"
+#line 379 "compilers/imcc/imcc.l"
return RELOP_GT;
YY_BREAK
case 91:
YY_RULE_SETUP
-#line 384 "compilers/imcc/imcc.l"
+#line 380 "compilers/imcc/imcc.l"
return RELOP_GTE;
YY_BREAK
case 92:
YY_RULE_SETUP
-#line 385 "compilers/imcc/imcc.l"
+#line 381 "compilers/imcc/imcc.l"
return RELOP_EQ;
YY_BREAK
case 93:
YY_RULE_SETUP
-#line 386 "compilers/imcc/imcc.l"
+#line 382 "compilers/imcc/imcc.l"
return RELOP_NE;
YY_BREAK
case 94:
YY_RULE_SETUP
-#line 387 "compilers/imcc/imcc.l"
+#line 383 "compilers/imcc/imcc.l"
return POW;
YY_BREAK
case 95:
YY_RULE_SETUP
-#line 389 "compilers/imcc/imcc.l"
+#line 385 "compilers/imcc/imcc.l"
return CONCAT;
YY_BREAK
case 96:
YY_RULE_SETUP
-#line 390 "compilers/imcc/imcc.l"
+#line 386 "compilers/imcc/imcc.l"
return DOT;
YY_BREAK
case 97:
YY_RULE_SETUP
-#line 392 "compilers/imcc/imcc.l"
+#line 388 "compilers/imcc/imcc.l"
return PLUS_ASSIGN;
YY_BREAK
case 98:
YY_RULE_SETUP
-#line 393 "compilers/imcc/imcc.l"
+#line 389 "compilers/imcc/imcc.l"
return MINUS_ASSIGN;
YY_BREAK
case 99:
YY_RULE_SETUP
-#line 394 "compilers/imcc/imcc.l"
+#line 390 "compilers/imcc/imcc.l"
return MUL_ASSIGN;
YY_BREAK
case 100:
YY_RULE_SETUP
-#line 395 "compilers/imcc/imcc.l"
+#line 391 "compilers/imcc/imcc.l"
return DIV_ASSIGN;
YY_BREAK
case 101:
YY_RULE_SETUP
-#line 396 "compilers/imcc/imcc.l"
+#line 392 "compilers/imcc/imcc.l"
return MOD_ASSIGN;
YY_BREAK
case 102:
YY_RULE_SETUP
-#line 397 "compilers/imcc/imcc.l"
+#line 393 "compilers/imcc/imcc.l"
return FDIV;
YY_BREAK
case 103:
YY_RULE_SETUP
-#line 398 "compilers/imcc/imcc.l"
+#line 394 "compilers/imcc/imcc.l"
return FDIV_ASSIGN;
YY_BREAK
case 104:
YY_RULE_SETUP
-#line 399 "compilers/imcc/imcc.l"
+#line 395 "compilers/imcc/imcc.l"
return BAND_ASSIGN;
YY_BREAK
case 105:
YY_RULE_SETUP
-#line 400 "compilers/imcc/imcc.l"
+#line 396 "compilers/imcc/imcc.l"
return BOR_ASSIGN;
YY_BREAK
case 106:
YY_RULE_SETUP
-#line 401 "compilers/imcc/imcc.l"
+#line 397 "compilers/imcc/imcc.l"
return BXOR_ASSIGN;
YY_BREAK
case 107:
YY_RULE_SETUP
-#line 402 "compilers/imcc/imcc.l"
+#line 398 "compilers/imcc/imcc.l"
return SHR_ASSIGN;
YY_BREAK
case 108:
YY_RULE_SETUP
-#line 403 "compilers/imcc/imcc.l"
+#line 399 "compilers/imcc/imcc.l"
return SHL_ASSIGN;
YY_BREAK
case 109:
YY_RULE_SETUP
-#line 404 "compilers/imcc/imcc.l"
+#line 400 "compilers/imcc/imcc.l"
return SHR_U_ASSIGN;
YY_BREAK
case 110:
YY_RULE_SETUP
-#line 405 "compilers/imcc/imcc.l"
+#line 401 "compilers/imcc/imcc.l"
return CONCAT_ASSIGN;
YY_BREAK
case 111:
YY_RULE_SETUP
-#line 407 "compilers/imcc/imcc.l"
+#line 403 "compilers/imcc/imcc.l"
{
char *macro_name = NULL;
int start_cond = YY_START;
@@ -3584,7 +3566,7 @@
YY_BREAK
case 112:
YY_RULE_SETUP
-#line 450 "compilers/imcc/imcc.l"
+#line 446 "compilers/imcc/imcc.l"
{
/* the initial whitespace catcher misses this one */
SET_LINE_NUMBER;
@@ -3593,7 +3575,7 @@
YY_BREAK
case 113:
YY_RULE_SETUP
-#line 456 "compilers/imcc/imcc.l"
+#line 452 "compilers/imcc/imcc.l"
{
const int c = yylex(valp,yyscanner,interp);
@@ -3608,7 +3590,7 @@
YY_BREAK
case 114:
YY_RULE_SETUP
-#line 468 "compilers/imcc/imcc.l"
+#line 464 "compilers/imcc/imcc.l"
{
if (valp) {
char *label;
@@ -3633,7 +3615,7 @@
YY_BREAK
case 115:
YY_RULE_SETUP
-#line 490 "compilers/imcc/imcc.l"
+#line 486 "compilers/imcc/imcc.l"
{
if (valp) {
char *label;
@@ -3656,12 +3638,12 @@
YY_BREAK
case 116:
YY_RULE_SETUP
-#line 510 "compilers/imcc/imcc.l"
+#line 506 "compilers/imcc/imcc.l"
return COMMA;
YY_BREAK
case 117:
YY_RULE_SETUP
-#line 512 "compilers/imcc/imcc.l"
+#line 508 "compilers/imcc/imcc.l"
{
/* trim last ':' */
YYCHOP();
@@ -3674,7 +3656,7 @@
YY_BREAK
case 118:
YY_RULE_SETUP
-#line 522 "compilers/imcc/imcc.l"
+#line 518 "compilers/imcc/imcc.l"
{
char * const macro_name = mem_sys_strdup(yytext + 1);
int failed = expand_macro(interp, macro_name, yyscanner);
@@ -3687,32 +3669,32 @@
YY_BREAK
case 119:
YY_RULE_SETUP
-#line 534 "compilers/imcc/imcc.l"
+#line 530 "compilers/imcc/imcc.l"
DUP_AND_RET(valp, FLOATC);
YY_BREAK
case 120:
YY_RULE_SETUP
-#line 535 "compilers/imcc/imcc.l"
+#line 531 "compilers/imcc/imcc.l"
DUP_AND_RET(valp, INTC);
YY_BREAK
case 121:
YY_RULE_SETUP
-#line 536 "compilers/imcc/imcc.l"
+#line 532 "compilers/imcc/imcc.l"
DUP_AND_RET(valp, INTC);
YY_BREAK
case 122:
YY_RULE_SETUP
-#line 537 "compilers/imcc/imcc.l"
+#line 533 "compilers/imcc/imcc.l"
DUP_AND_RET(valp, INTC);
YY_BREAK
case 123:
YY_RULE_SETUP
-#line 538 "compilers/imcc/imcc.l"
+#line 534 "compilers/imcc/imcc.l"
DUP_AND_RET(valp, INTC);
YY_BREAK
case 124:
YY_RULE_SETUP
-#line 540 "compilers/imcc/imcc.l"
+#line 536 "compilers/imcc/imcc.l"
{
valp->s = mem_sys_strdup(yytext);
@@ -3721,7 +3703,7 @@
YY_BREAK
case 125:
YY_RULE_SETUP
-#line 546 "compilers/imcc/imcc.l"
+#line 542 "compilers/imcc/imcc.l"
{
macro_frame_t *frame;
@@ -3752,7 +3734,7 @@
YY_BREAK
case 126:
YY_RULE_SETUP
-#line 574 "compilers/imcc/imcc.l"
+#line 570 "compilers/imcc/imcc.l"
{
/* charset:"..." */
valp->s = mem_sys_strdup(yytext);
@@ -3763,7 +3745,7 @@
YY_BREAK
case 127:
YY_RULE_SETUP
-#line 582 "compilers/imcc/imcc.l"
+#line 578 "compilers/imcc/imcc.l"
{
if (valp) (valp)->s = yytext;
if (IMCC_INFO(interp)->state->pasm_file)
@@ -3774,7 +3756,7 @@
YY_BREAK
case 128:
YY_RULE_SETUP
-#line 590 "compilers/imcc/imcc.l"
+#line 586 "compilers/imcc/imcc.l"
{
if (valp) (valp)->s = yytext;
if (IMCC_INFO(interp)->state->pasm_file)
@@ -3785,7 +3767,7 @@
YY_BREAK
case 129:
YY_RULE_SETUP
-#line 598 "compilers/imcc/imcc.l"
+#line 594 "compilers/imcc/imcc.l"
{
if (valp) (valp)->s = yytext;
if (IMCC_INFO(interp)->state->pasm_file)
@@ -3796,7 +3778,7 @@
YY_BREAK
case 130:
YY_RULE_SETUP
-#line 606 "compilers/imcc/imcc.l"
+#line 602 "compilers/imcc/imcc.l"
{
if (valp) (valp)->s = yytext;
if (IMCC_INFO(interp)->state->pasm_file)
@@ -3807,7 +3789,7 @@
YY_BREAK
case 131:
YY_RULE_SETUP
-#line 614 "compilers/imcc/imcc.l"
+#line 610 "compilers/imcc/imcc.l"
{
IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
"'%s' is not a valid register name", yytext);
@@ -3815,7 +3797,7 @@
YY_BREAK
case 132:
YY_RULE_SETUP
-#line 619 "compilers/imcc/imcc.l"
+#line 615 "compilers/imcc/imcc.l"
{
if (IMCC_INFO(interp)->state->pasm_file == 0)
IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
@@ -3829,24 +3811,24 @@
YY_BREAK
case 133:
YY_RULE_SETUP
-#line 631 "compilers/imcc/imcc.l"
+#line 627 "compilers/imcc/imcc.l"
{ return handle_identifier(interp, valp, yytext); }
YY_BREAK
case 134:
YY_RULE_SETUP
-#line 633 "compilers/imcc/imcc.l"
+#line 629 "compilers/imcc/imcc.l"
/* skip */;
YY_BREAK
case 135:
YY_RULE_SETUP
-#line 635 "compilers/imcc/imcc.l"
+#line 631 "compilers/imcc/imcc.l"
{
/* catch all except for state macro */
return yytext[0];
}
YY_BREAK
case YY_STATE_EOF(emit):
-#line 640 "compilers/imcc/imcc.l"
+#line 636 "compilers/imcc/imcc.l"
{
BEGIN(INITIAL);
@@ -3859,12 +3841,12 @@
}
YY_BREAK
case YY_STATE_EOF(INITIAL):
-#line 651 "compilers/imcc/imcc.l"
+#line 647 "compilers/imcc/imcc.l"
yyterminate();
YY_BREAK
case 136:
YY_RULE_SETUP
-#line 653 "compilers/imcc/imcc.l"
+#line 649 "compilers/imcc/imcc.l"
{
/* the initial whitespace catcher misses this one */
SET_LINE_NUMBER;
@@ -3874,19 +3856,19 @@
case 137:
/* rule 137 can match eol */
YY_RULE_SETUP
-#line 659 "compilers/imcc/imcc.l"
+#line 655 "compilers/imcc/imcc.l"
{
DUP_AND_RET(valp, '\n');
}
YY_BREAK
case 138:
YY_RULE_SETUP
-#line 663 "compilers/imcc/imcc.l"
+#line 659 "compilers/imcc/imcc.l"
return LABEL;
YY_BREAK
case 139:
YY_RULE_SETUP
-#line 665 "compilers/imcc/imcc.l"
+#line 661 "compilers/imcc/imcc.l"
{
if (yylex(valp,yyscanner,interp) != LABEL)
@@ -3913,7 +3895,7 @@
YY_BREAK
case 140:
YY_RULE_SETUP
-#line 689 "compilers/imcc/imcc.l"
+#line 685 "compilers/imcc/imcc.l"
{
if (valp) {
if (!IMCC_INFO(interp)->cur_macro_name) {
@@ -3944,44 +3926,44 @@
YY_BREAK
case 141:
YY_RULE_SETUP
-#line 717 "compilers/imcc/imcc.l"
+#line 713 "compilers/imcc/imcc.l"
DUP_AND_RET(valp, ' ');
YY_BREAK
case 142:
YY_RULE_SETUP
-#line 718 "compilers/imcc/imcc.l"
+#line 714 "compilers/imcc/imcc.l"
DUP_AND_RET(valp, REG);
YY_BREAK
case 143:
YY_RULE_SETUP
-#line 719 "compilers/imcc/imcc.l"
+#line 715 "compilers/imcc/imcc.l"
DUP_AND_RET(valp, REG);
YY_BREAK
case 144:
YY_RULE_SETUP
-#line 720 "compilers/imcc/imcc.l"
+#line 716 "compilers/imcc/imcc.l"
DUP_AND_RET(valp, IDENTIFIER);
YY_BREAK
case 145:
YY_RULE_SETUP
-#line 721 "compilers/imcc/imcc.l"
+#line 717 "compilers/imcc/imcc.l"
DUP_AND_RET(valp, MACRO);
YY_BREAK
case 146:
YY_RULE_SETUP
-#line 722 "compilers/imcc/imcc.l"
+#line 718 "compilers/imcc/imcc.l"
DUP_AND_RET(valp, yytext[0]);
YY_BREAK
case YY_STATE_EOF(macro):
-#line 723 "compilers/imcc/imcc.l"
+#line 719 "compilers/imcc/imcc.l"
yyterminate();
YY_BREAK
case 147:
YY_RULE_SETUP
-#line 725 "compilers/imcc/imcc.l"
+#line 721 "compilers/imcc/imcc.l"
ECHO;
YY_BREAK
-#line 3985 "compilers/imcc/imclexer.c"
+#line 3967 "compilers/imcc/imclexer.c"
case YY_STATE_EOF(pod):
case YY_STATE_EOF(cmt1):
case YY_STATE_EOF(cmt2):
@@ -4770,8 +4752,8 @@
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
- * @param yybytes the byte buffer to scan
- * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
+ * @param bytes the byte buffer to scan
+ * @param len the number of bytes in the buffer pointed to by @a bytes.
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
@@ -5193,7 +5175,7 @@
#define YYTABLES_NAME "yytables"
-#line 725 "compilers/imcc/imcc.l"
+#line 721 "compilers/imcc/imcc.l"
Modified: branches/gsoc_nci/compilers/pct/src/POST/Compiler.pir
==============================================================================
--- branches/gsoc_nci/compilers/pct/src/POST/Compiler.pir Wed Oct 6 16:41:06 2010 (r49463)
+++ branches/gsoc_nci/compilers/pct/src/POST/Compiler.pir Wed Oct 6 19:43:58 2010 (r49464)
@@ -130,9 +130,8 @@
pos = cpost['pos']
if null pos goto done_subline
source = cpost['source']
- $I0 = can source, 'lineof'
- unless $I0 goto done_subline
- line = source.'lineof'(pos)
+ if null source goto done_subline
+ line = self.'lineof'(source, pos, 'cache'=>1)
inc line
done_subline:
self.'pir'(cpost)
Added: branches/gsoc_nci/config/auto/timespec.pm
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/gsoc_nci/config/auto/timespec.pm Wed Oct 6 19:43:58 2010 (r49464)
@@ -0,0 +1,57 @@
+# Copyright (C) 2010, Parrot Foundation.
+# $Id$
+
+=head1 NAME
+
+config/auto/timespec.pm - Timespec detection
+
+=head1 DESCRIPTION
+
+Determining if the system has C<struct timespec> defined.
+
+=cut
+
+package auto::timespec;
+
+use strict;
+use warnings;
+
+use base qw(Parrot::Configure::Step);
+
+use Parrot::Configure::Utils ':auto';
+
+sub _init {
+ my $self = shift;
+ my %data;
+ $data{description} = q{Does your system has timespec};
+ $data{result} = q{};
+ return \%data;
+}
+
+sub runstep {
+ my ( $self, $conf ) = @_;
+
+ $conf->cc_gen('config/auto/timespec/test_c.in');
+ eval { $conf->cc_build(); };
+ if ($@) {
+ $conf->data->set( HAS_TIMESPEC => 0 );
+ $self->set_result('no');
+ }
+ else {
+ $conf->data->set( HAS_TIMESPEC => 1 );
+ $self->set_result('yes');
+ }
+ $conf->cc_clean();
+
+ return 1;
+}
+
+1;
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
+
Added: branches/gsoc_nci/config/auto/timespec/test_c.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/gsoc_nci/config/auto/timespec/test_c.in Wed Oct 6 19:43:58 2010 (r49464)
@@ -0,0 +1,26 @@
+/*
+Copyright (C) 2008-2009, Parrot Foundation.
+$Id$
+
+seeing if struct timespec exists
+
+*/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <time.h>
+
+int
+main()
+{
+ struct timespec ts;
+ printf("OK: %d", sizeof ts);
+ return EXIT_SUCCESS;
+}
+
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
Modified: branches/gsoc_nci/config/gen/makefiles/root.in
==============================================================================
--- branches/gsoc_nci/config/gen/makefiles/root.in Wed Oct 6 16:41:06 2010 (r49463)
+++ branches/gsoc_nci/config/gen/makefiles/root.in Wed Oct 6 19:43:58 2010 (r49464)
@@ -617,7 +617,7 @@
corevm \
docs \
#IF(has_glut): $(LIBGLUTCB_SO) \
- $(EXTRANCITHUNKS_SO) \
+#IF(has_dynamic_linking): $(EXTRANCITHUNKS_SO) \
$(DIS) \
$(PARROT_CONFIG) \
$(PBC_TO_EXE) \
@@ -630,9 +630,9 @@
$(PCT_LIB_PBCS) \
$(DATA_JSON_LIB_PBCS) \
$(NQP_LIB_PBCS) \
+#IF(has_dynamic_linking): $(DYNOPLIBS_TARGETS) \
+#IF(has_dynamic_linking): $(LIBNCI_TEST_SO) \
$(GEN_LIBRARY) \
- $(DYNOPLIBS_TARGETS) \
- $(LIBNCI_TEST_SO)
# We build DYNPMC_TARGET in corevm. It's kinda hack to test t/pmc/threads.t CLONE_LIBRARIES
corevm : \
@@ -641,7 +641,7 @@
$(PARROT) \
runtime/parrot/include/parrotlib.pbc \
runtime/parrot/include/config.fpmc \
- $(DYNPMC_TARGETS) \
+#IF(has_dynamic_linking): $(DYNPMC_TARGETS) \
$(LIBRARY_DIR)/Test/More.pbc
$(GEN_LIBRARY) : $(PARROT) $(GEN_PASM_INCLUDES)
Modified: branches/gsoc_nci/include/parrot/hash.h
==============================================================================
--- branches/gsoc_nci/include/parrot/hash.h Wed Oct 6 16:41:06 2010 (r49463)
+++ branches/gsoc_nci/include/parrot/hash.h Wed Oct 6 19:43:58 2010 (r49464)
@@ -34,7 +34,7 @@
Hash_key_type_PMC,
Hash_key_type_ptr,
Hash_key_type_PMC_ptr,
- Hash_key_type_STRING_enc,
+ Hash_key_type_STRING_enc
} Hash_key_type;
/* &end_gen */
Modified: branches/gsoc_nci/include/parrot/imageio.h
==============================================================================
--- branches/gsoc_nci/include/parrot/imageio.h Wed Oct 6 16:41:06 2010 (r49463)
+++ branches/gsoc_nci/include/parrot/imageio.h Wed Oct 6 19:43:58 2010 (r49464)
@@ -20,7 +20,7 @@
enum {
enum_PackID_normal = 0,
- enum_PackID_seen = 1,
+ enum_PackID_seen = 1
};
#endif /* PARROT_IMAGEIO_H_GUARD */
Modified: branches/gsoc_nci/include/parrot/memory.h
==============================================================================
--- branches/gsoc_nci/include/parrot/memory.h Wed Oct 6 16:41:06 2010 (r49463)
+++ branches/gsoc_nci/include/parrot/memory.h Wed Oct 6 19:43:58 2010 (r49464)
@@ -81,7 +81,7 @@
PARROT_EXPORT
PARROT_MALLOC
-PARROT_CANNOT_RETURN_NULL
+PARROT_CAN_RETURN_NULL
void * mem_sys_allocate_zeroed(size_t size);
PARROT_EXPORT
@@ -89,7 +89,7 @@
PARROT_EXPORT
PARROT_MALLOC
-PARROT_CANNOT_RETURN_NULL
+PARROT_CAN_RETURN_NULL
void * mem_sys_realloc(ARGFREE(void *from), size_t size);
PARROT_EXPORT
Modified: branches/gsoc_nci/include/parrot/runcore_api.h
==============================================================================
--- branches/gsoc_nci/include/parrot/runcore_api.h Wed Oct 6 16:41:06 2010 (r49463)
+++ branches/gsoc_nci/include/parrot/runcore_api.h Wed Oct 6 19:43:58 2010 (r49464)
@@ -37,7 +37,7 @@
typedef enum Parrot_runcore_flags {
RUNCORE_REENTRANT_FLAG = 1 << 0,
- RUNCORE_FUNC_TABLE_FLAG = 1 << 1,
+ RUNCORE_FUNC_TABLE_FLAG = 1 << 1
} Parrot_runcore_flags;
Modified: branches/gsoc_nci/include/parrot/thr_windows.h
==============================================================================
--- branches/gsoc_nci/include/parrot/thr_windows.h Wed Oct 6 16:41:06 2010 (r49463)
+++ branches/gsoc_nci/include/parrot/thr_windows.h Wed Oct 6 19:43:58 2010 (r49464)
@@ -119,13 +119,12 @@
typedef void (*Cleanup_Handler)(void *);
-#ifndef _TIMESPEC_DEFINED
-# define _TIMESPEC_DEFINED
+#if ! PARROT_HAS_TIMESPEC
struct timespec {
time_t tv_sec;
long tv_nsec;
};
-#endif /* _TIMESPEC_DEFINED */
+#endif /* PARROT_HAS_TIMESPEC */
#endif /* PARROT_THR_WINDOWS_H_GUARD */
Modified: branches/gsoc_nci/include/parrot/thread.h
==============================================================================
--- branches/gsoc_nci/include/parrot/thread.h Wed Oct 6 16:41:06 2010 (r49463)
+++ branches/gsoc_nci/include/parrot/thread.h Wed Oct 6 19:43:58 2010 (r49464)
@@ -46,13 +46,12 @@
typedef void (*Cleanup_Handler)(void *);
-# ifndef __timespec_defined
-# define __timespec_defined
+# if ! PARROT_HAS_TIMESPEC
struct timespec {
time_t tv_sec;
long tv_nsec;
};
-# endif /* __timespec_defined */
+# endif /* PARROT_HAS_TIMESPEC */
#endif /* PARROT_HAS_THREADS */
Modified: branches/gsoc_nci/lib/Parrot/Configure/Step/List.pm
==============================================================================
--- branches/gsoc_nci/lib/Parrot/Configure/Step/List.pm Wed Oct 6 16:41:06 2010 (r49463)
+++ branches/gsoc_nci/lib/Parrot/Configure/Step/List.pm Wed Oct 6 19:43:58 2010 (r49464)
@@ -47,6 +47,7 @@
auto::socklen_t
auto::neg_0
auto::env
+ auto::timespec
auto::thread
auto::gmp
auto::readline
Modified: branches/gsoc_nci/src/gc/alloc_memory.c
==============================================================================
--- branches/gsoc_nci/src/gc/alloc_memory.c Wed Oct 6 16:41:06 2010 (r49463)
+++ branches/gsoc_nci/src/gc/alloc_memory.c Wed Oct 6 19:43:58 2010 (r49464)
@@ -75,7 +75,7 @@
PARROT_EXPORT
PARROT_MALLOC
-PARROT_CANNOT_RETURN_NULL
+PARROT_CAN_RETURN_NULL
void *
mem_sys_allocate_zeroed(size_t size)
{
@@ -84,7 +84,7 @@
#ifdef DETAIL_MEMORY_DEBUG
fprintf(stderr, "Allocated %i at %p\n", size, ptr);
#endif
- if (!ptr)
+ if (!ptr && size)
PANIC_OUT_OF_MEM(size);
return ptr;
}
@@ -103,7 +103,7 @@
PARROT_EXPORT
PARROT_MALLOC
-PARROT_CANNOT_RETURN_NULL
+PARROT_CAN_RETURN_NULL
void *
mem_sys_realloc(ARGFREE(void *from), size_t size)
{
@@ -119,7 +119,7 @@
#ifdef DETAIL_MEMORY_DEBUG
fprintf(stderr, "Allocated %i at %p\n", size, ptr);
#endif
- if (!ptr)
+ if (!ptr && size)
PANIC_OUT_OF_MEM(size);
return ptr;
}
Modified: branches/gsoc_nci/src/gc/gc_inf.c
==============================================================================
--- branches/gsoc_nci/src/gc/gc_inf.c Wed Oct 6 16:41:06 2010 (r49463)
+++ branches/gsoc_nci/src/gc/gc_inf.c Wed Oct 6 19:43:58 2010 (r49464)
@@ -61,7 +61,7 @@
static void * gc_inf_allocate_memory_chunk(SHIM_INTERP, size_t size);
PARROT_MALLOC
-PARROT_CANNOT_RETURN_NULL
+PARROT_CAN_RETURN_NULL
static void * gc_inf_allocate_memory_chunk_zeroed(SHIM_INTERP, size_t size);
PARROT_MALLOC
@@ -112,7 +112,7 @@
FUNC_MODIFIES(*buffer);
PARROT_MALLOC
-PARROT_CANNOT_RETURN_NULL
+PARROT_CAN_RETURN_NULL
static void * gc_inf_reallocate_memory_chunk(SHIM_INTERP,
ARGFREE(void *from),
size_t size);
@@ -524,7 +524,7 @@
}
PARROT_MALLOC
-PARROT_CANNOT_RETURN_NULL
+PARROT_CAN_RETURN_NULL
static void *
gc_inf_reallocate_memory_chunk(SHIM_INTERP, ARGFREE(void *from), size_t size)
{
@@ -540,13 +540,13 @@
#ifdef DETAIL_MEMORY_DEBUG
fprintf(stderr, "Allocated %i at %p\n", size, ptr);
#endif
- if (!ptr)
+ if (!ptr && size)
PANIC_OUT_OF_MEM(size);
return ptr;
}
PARROT_MALLOC
-PARROT_CANNOT_RETURN_NULL
+PARROT_CAN_RETURN_NULL
static void *
gc_inf_allocate_memory_chunk_zeroed(SHIM_INTERP, size_t size)
{
@@ -555,7 +555,7 @@
#ifdef DETAIL_MEMORY_DEBUG
fprintf(stderr, "Allocated %i at %p\n", size, ptr);
#endif
- if (!ptr)
+ if (!ptr && size)
PANIC_OUT_OF_MEM(size);
return ptr;
}
Modified: branches/gsoc_nci/src/gc/gc_ms.c
==============================================================================
--- branches/gsoc_nci/src/gc/gc_ms.c Wed Oct 6 16:41:06 2010 (r49463)
+++ branches/gsoc_nci/src/gc/gc_ms.c Wed Oct 6 19:43:58 2010 (r49464)
@@ -73,7 +73,7 @@
static void * gc_ms_allocate_memory_chunk(SHIM_INTERP, size_t size);
PARROT_MALLOC
-PARROT_CANNOT_RETURN_NULL
+PARROT_CAN_RETURN_NULL
static void * gc_ms_allocate_memory_chunk_zeroed(SHIM_INTERP, size_t size);
PARROT_CANNOT_RETURN_NULL
@@ -192,7 +192,7 @@
FUNC_MODIFIES(*pool);
PARROT_MALLOC
-PARROT_CANNOT_RETURN_NULL
+PARROT_CAN_RETURN_NULL
static void * gc_ms_reallocate_memory_chunk(SHIM_INTERP,
ARGFREE(void *from),
size_t size);
@@ -1351,7 +1351,7 @@
}
PARROT_MALLOC
-PARROT_CANNOT_RETURN_NULL
+PARROT_CAN_RETURN_NULL
static void *
gc_ms_reallocate_memory_chunk(SHIM_INTERP, ARGFREE(void *from), size_t size)
{
@@ -1367,13 +1367,13 @@
#ifdef DETAIL_MEMORY_DEBUG
fprintf(stderr, "Allocated %i at %p\n", size, ptr);
#endif
- if (!ptr)
+ if (!ptr && size)
PANIC_OUT_OF_MEM(size);
return ptr;
}
PARROT_MALLOC
-PARROT_CANNOT_RETURN_NULL
+PARROT_CAN_RETURN_NULL
static void *
gc_ms_allocate_memory_chunk_zeroed(SHIM_INTERP, size_t size)
{
@@ -1382,7 +1382,7 @@
#ifdef DETAIL_MEMORY_DEBUG
fprintf(stderr, "Allocated %i at %p\n", size, ptr);
#endif
- if (!ptr)
+ if (!ptr && size)
PANIC_OUT_OF_MEM(size);
return ptr;
}
Modified: branches/gsoc_nci/src/gc/gc_ms2.c
==============================================================================
--- branches/gsoc_nci/src/gc/gc_ms2.c Wed Oct 6 16:41:06 2010 (r49463)
+++ branches/gsoc_nci/src/gc/gc_ms2.c Wed Oct 6 19:43:58 2010 (r49464)
@@ -84,7 +84,7 @@
static void * gc_ms2_allocate_memory_chunk(SHIM_INTERP, size_t size);
PARROT_MALLOC
-PARROT_CANNOT_RETURN_NULL
+PARROT_CAN_RETURN_NULL
static void * gc_ms2_allocate_memory_chunk_zeroed(SHIM_INTERP, size_t size);
PARROT_MALLOC
@@ -211,7 +211,7 @@
__attribute__nonnull__(2);
PARROT_MALLOC
-PARROT_CANNOT_RETURN_NULL
+PARROT_CAN_RETURN_NULL
static void * gc_ms2_reallocate_memory_chunk(SHIM_INTERP,
ARGFREE(void *from),
size_t size);
@@ -814,11 +814,12 @@
if (PObj_on_free_list_TEST(s))
return;
Parrot_list_remove(interp, self->strings, Obj2LLH(s));
- PObj_on_free_list_SET(s);
if (Buffer_bufstart(s) && !PObj_external_TEST(s))
Parrot_gc_str_free_buffer_storage(interp, &self->string_gc, (Buffer *)s);
+ PObj_on_free_list_SET(s);
+
Parrot_gc_pool_free(interp, self->string_allocator, Obj2LLH(s));
--interp->gc_sys->stats.header_allocs_since_last_collect;
@@ -1093,11 +1094,12 @@
PObj_live_CLEAR(obj);
}
else if (!PObj_constant_TEST(obj)) {
- PObj_on_free_list_SET(obj);
LIST_REMOVE(list, tmp);
callback(interp, obj);
+ PObj_on_free_list_SET(obj);
+
Parrot_gc_pool_free(interp, pool, tmp);
}
tmp = next;
@@ -1264,7 +1266,7 @@
}
PARROT_MALLOC
-PARROT_CANNOT_RETURN_NULL
+PARROT_CAN_RETURN_NULL
static void *
gc_ms2_reallocate_memory_chunk(SHIM_INTERP, ARGFREE(void *from), size_t size)
{
@@ -1280,13 +1282,13 @@
#ifdef DETAIL_MEMORY_DEBUG
fprintf(stderr, "Allocated %i at %p\n", size, ptr);
#endif
- if (!ptr)
+ if (!ptr && size)
PANIC_OUT_OF_MEM(size);
return ptr;
}
PARROT_MALLOC
-PARROT_CANNOT_RETURN_NULL
+PARROT_CAN_RETURN_NULL
static void *
gc_ms2_allocate_memory_chunk_zeroed(SHIM_INTERP, size_t size)
{
@@ -1295,7 +1297,7 @@
#ifdef DETAIL_MEMORY_DEBUG
fprintf(stderr, "Allocated %i at %p\n", size, ptr);
#endif
- if (!ptr)
+ if (!ptr && size)
PANIC_OUT_OF_MEM(size);
return ptr;
}
Added: branches/gsoc_nci/t/codingstd/c_enum.t
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/gsoc_nci/t/codingstd/c_enum.t Wed Oct 6 19:43:58 2010 (r49464)
@@ -0,0 +1,71 @@
+#! perl
+# Copyright (C) 2010, Parrot Foundation.
+# $Id$
+
+use strict;
+use warnings;
+
+use lib qw[ . lib ../lib ../../lib ];
+use Test::More tests => 1;
+use Parrot::Distribution;
+
+=head1 NAME
+
+t/codingstd/c_enum.t - checks for rules related to enums in C source
+
+=head1 SYNOPSIS
+
+ # test all files
+ % prove t/codingstd/c_enum.t
+
+ # test specific files
+ % perl t/codingstd/c_enum.t src/foo.c include/parrot/bar.h
+
+
+=head1 DESCRIPTION
+
+Checks that all C language source files use enums appropriately (eg: C89-compliant).
+
+=cut
+
+my $DIST = Parrot::Distribution->new;
+my @files = @ARGV ? <@ARGV> : $DIST->get_c_language_files();
+
+check_enums(@files);
+
+exit;
+
+sub check_enums {
+ my @trailing_comma;
+
+ foreach my $file (@_) {
+ my $path = @ARGV ? $file : $file->path();
+ my $buf = $DIST->slurp($path);
+
+ # strip ', ", and C comments
+ $buf =~ s{ (?:
+ (?: (') (?: \\\\ | \\' | [^'] )* (') ) # remove ' string
+ | (?: (") (?: \\\\ | \\" | [^"] )* (") ) # remove " string
+ | /(\*) .*? (\*)/ # remove C comment
+ )
+ }{defined $1 ? "$1$2" : defined $3 ? "$3$4" : "$5$6"}egsx;
+
+ if ($buf =~ /enum \s+ (?: (\w+) \s+ )? {
+ [^}]+,
+ \s+ } (?: \s+ (\w+) )?/x) {
+ my $name = $1 || $2 || '(anonymous)';
+ push @trailing_comma => "$path: $name";
+ }
+ }
+
+ is( join("\n", @trailing_comma), "", <<END_DESCRIPTION );
+trailing commas in enums are not legal C89
+END_DESCRIPTION
+}
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
Modified: branches/gsoc_nci/t/op/gc-non-recursive.t
==============================================================================
--- branches/gsoc_nci/t/op/gc-non-recursive.t Wed Oct 6 16:41:06 2010 (r49463)
+++ branches/gsoc_nci/t/op/gc-non-recursive.t Wed Oct 6 19:43:58 2010 (r49464)
@@ -35,7 +35,7 @@
next = head
loop:
($I0, next) = next.'reify'()
- if $I1 < 10000000 goto loop
+ if $I0 < 500000 goto loop
sweep 1
ok(1, "Marking of large list doesn't exhaust C stack")
done_testing()
More information about the parrot-commits
mailing list