Permalink
Browse files

[html_cleanup] merge in origin/master

  • Loading branch information...
2 parents ebdd612 + 54364ee commit 4352c132a41dd9b593ec18311a0566c939b6fa9a @mikehh mikehh committed Jan 11, 2011
Showing with 6,665 additions and 6,407 deletions.
  1. +2 −0 MANIFEST
  2. +11 −21 compilers/imcc/imclexer.c
  3. +9 −1 config/auto/pmc.pm
  4. +20 −9 config/gen/makefiles/root.in
  5. +1 −0 config/gen/platform.pm
  6. +70 −0 config/gen/platform/generic/encoding.c
  7. +15 −22 config/gen/platform/generic/env.c
  8. +84 −0 config/gen/platform/linux/encoding.c
  9. +10 −9 config/gen/platform/win32/env.c
  10. +4 −3 config/gen/platform/win32/exec.c
  11. +4 −2 config/init/hints/darwin.pm
  12. +34 −0 docs/submissions.pod
  13. +325 −325 ext/nqp-rx/src/stage0/HLL-s0.pir
  14. +4,912 −4,880 ext/nqp-rx/src/stage0/NQP-s0.pir
  15. +477 −477 ext/nqp-rx/src/stage0/P6Regex-s0.pir
  16. +2 −2 ext/nqp-rx/src/stage0/nqp-setting.nqp
  17. +2 −1 frontend/parrot/main.c
  18. +0 −19 frontend/pbc_dump/packdump.c
  19. +0 −8 include/parrot/api.h
  20. +1 −0 include/parrot/encoding.h
  21. +0 −14 include/parrot/io.h
  22. +0 −28 include/parrot/key.h
  23. +0 −19 include/parrot/packfile.h
  24. +7 −12 include/parrot/platform_interface.h
  25. +14 −0 include/parrot/string_funcs.h
  26. +13 −15 lib/Parrot/Install.pm
  27. +16 −12 runtime/parrot/library/Digest/sha256.pir
  28. +4 −0 runtime/parrot/library/distutils.pir
  29. +0 −12 src/debug.c
  30. +10 −8 src/dynoplibs/bit.ops
  31. +8 −0 src/dynpmc/Defines.in
  32. +1 −11 src/dynpmc/os.pmc
  33. +1 −1 src/embed/api.c
  34. +1 −2 src/embed/pmc.c
  35. +0 −3 src/hash.c
  36. +4 −4 src/interp/inter_create.c
  37. +70 −65 src/io/buffer.c
  38. +0 −51 src/io/filehandle.c
  39. +0 −124 src/key.c
  40. +9 −16 src/library.c
  41. +1 −1 src/pmc/bignum.pmc
  42. +12 −19 src/pmc/env.pmc
  43. +0 −3 src/pmc/filehandle.pmc
  44. +0 −47 src/pmc/key.pmc
  45. +0 −58 src/pmc/packfilebytecodesegment.pmc
  46. +0 −28 src/pmc/packfilesegment.pmc
  47. +13 −11 src/runcore/profiling.c
  48. +0 −9 src/runcore/trace.c
  49. +72 −0 src/string/api.c
  50. +6 −1 src/string/encoding.c
  51. +15 −11 t/dynpmc/os.t
  52. +11 −1 t/dynpmc/rational.t
  53. +46 −1 t/pmc/complex.t
  54. +149 −1 t/pmc/filehandle.t
  55. +30 −2 t/pmc/float.t
  56. +7 −23 t/pmc/key.t
  57. +33 −1 t/pmc/packfilebytecodesegment.t
  58. +12 −0 t/pmc/packfileopmap.t
  59. +4 −1 t/src/checkdepend.t
  60. +24 −10 t/tools/mk_language_shell.t
  61. +86 −3 t/tools/pbc_dump.t
  62. +3 −0 tools/dev/pbc_to_exe.pir
View
@@ -247,6 +247,7 @@ config/gen/platform/darwin/sysmem.c []
config/gen/platform/freebsd/uid.c []
config/gen/platform/generic/dl.c []
config/gen/platform/generic/dl.h []
+config/gen/platform/generic/encoding.c []
config/gen/platform/generic/env.c []
config/gen/platform/generic/exec.c []
config/gen/platform/generic/hires_timer.c []
@@ -265,6 +266,7 @@ config/gen/platform/generic/threads.h []
config/gen/platform/generic/time.c []
config/gen/platform/generic/uid.c []
config/gen/platform/ia64/asm.s []
+config/gen/platform/linux/encoding.c []
config/gen/platform/netbsd/math.c []
config/gen/platform/netbsd/misc.c []
config/gen/platform/netbsd/misc.h []
View
@@ -78,6 +78,7 @@ typedef int flex_int32_t;
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
@@ -108,8 +109,6 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
-#endif /* ! C99 */
-
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -183,15 +182,7 @@ typedef void* yyscan_t;
/* 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.
@@ -2487,7 +2478,7 @@ static int handle_identifier(PARROT_INTERP, YYSTYPE *valp, ARGIN(const char *id)
-#line 2491 "compilers/imcc/imclexer.c"
+#line 2482 "compilers/imcc/imclexer.c"
#define INITIAL 0
#define emit 1
@@ -2582,6 +2573,10 @@ int yyget_lineno (yyscan_t yyscanner );
void yyset_lineno (int line_number ,yyscan_t yyscanner );
+int yyget_column (yyscan_t yyscanner );
+
+void yyset_column (int column_no ,yyscan_t yyscanner );
+
/* Macros after this point can all be overridden by user definitions in
* section 1.
*/
@@ -2622,12 +2617,7 @@ static int input (yyscan_t yyscanner );
/* 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. */
@@ -2646,7 +2636,7 @@ static int input (yyscan_t yyscanner );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- size_t n; \
+ unsigned n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -2751,7 +2741,7 @@ YY_DECL
return 0;
}
-#line 2755 "compilers/imcc/imclexer.c"
+#line 2745 "compilers/imcc/imclexer.c"
if ( !yyg->yy_init )
{
@@ -3930,7 +3920,7 @@ YY_RULE_SETUP
#line 717 "compilers/imcc/imcc.l"
ECHO;
YY_BREAK
-#line 3934 "compilers/imcc/imclexer.c"
+#line 3924 "compilers/imcc/imclexer.c"
case YY_STATE_EOF(pod):
case YY_STATE_EOF(cmt1):
case YY_STATE_EOF(cmt2):
@@ -4719,8 +4709,8 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
/** 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.
*/
View
@@ -332,7 +332,7 @@ sub get_includes {
my @retval;
local $_;
while (<$fh>) {
- next unless /^\s*#include\s+"(.*)"\s+$/;
+ next unless /^\s*# *include\s+"(.*)"\s+$/;
my $include = $1;
if ($include =~ m{^parrot}) { # main parrot include dir
next if $include eq "parrot/parrot.h"; # already implicit everywhere.
@@ -392,6 +392,11 @@ include/parrot/feature.h
include/parrot/oplib.h
include/parrot/library.h
include/parrot/thread.h
+include/parrot/atomic.h
+include/parrot/atomic/fallback.h
+include/parrot/atomic/gcc_pcc.h
+include/parrot/atomic/gcc_x86.h
+include/parrot/atomic/sparc.h
include/parrot/string.h
include/parrot/settings.h
include/parrot/namespace.h
@@ -400,6 +405,9 @@ include/parrot/pbcversion.h
include/parrot/core_types.h
include/parrot/interpreter.h
include/parrot/io.h
+include/parrot/io_portable.h
+include/parrot/io_unix.h
+include/parrot/io_win32.h
include/parrot/context.h
include/parrot/parrot.h
include/parrot/dynext.h
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2010, Parrot Foundation.
+# Copyright (C) 2001-2011, Parrot Foundation.
###############################################################################
#
@@ -377,6 +377,9 @@ PARROT_H_HEADERS = \
$(INC_DIR)/memory.h \
$(INC_DIR)/packfile.h \
$(INC_DIR)/io.h \
+ $(INC_DIR)/io_portable.h \
+ $(INC_DIR)/io_unix.h \
+ $(INC_DIR)/io_win32.h \
$(INC_DIR)/op.h \
$(INC_DIR)/pmc.h \
$(INC_DIR)/gc_api.h \
@@ -388,6 +391,11 @@ PARROT_H_HEADERS = \
$(INC_DIR)/exit.h \
$(INC_DIR)/nci.h \
$(INC_DIR)/thread.h \
+ $(INC_DIR)/atomic.h \
+ $(INC_DIR)/atomic/fallback.h \
+ $(INC_DIR)/atomic/gcc_pcc.h \
+ $(INC_DIR)/atomic/gcc_x86.h \
+ $(INC_DIR)/atomic/sparc.h \
$(INC_DIR)/scheduler.h \
$(INC_DIR)/oo.h \
$(INC_DIR)/vtables.h \
@@ -794,7 +802,7 @@ help :
@echo "Smoke Testing:"
@echo " smolder_test: Run the test suite and send report to the smolder server"
@echo " smolder_coretest: Run the minimal 'core functionality' suite and send report to the smolder server."
- @echo " smoke: Alias for smolder_test"
+ @echo " smoke: Alias for smolder_test."
@echo ""
@echo "Benchmarks:"
@echo " mopsbench: Million operations"
@@ -803,7 +811,7 @@ help :
@echo " clean: Basic cleaning up."
@echo " archclean: Remove any platform dependent files."
@echo " realclean: Removes also files generated by 'Configure.pl'"
- @echo " distclean: Removes also anything built, in theory."
+ @echo " distclean: Alias for realclean."
@echo " reconfig: 'clean' and redo configuration."
@echo ""
@echo "Fetch from source repository:"
@@ -1462,7 +1470,6 @@ src/exceptions$(O) : $(PARROT_H_HEADERS) \
src/thread$(O) : \
$(PARROT_H_HEADERS) \
- $(INC_DIR)/atomic.h \
$(INC_DIR)/extend.h \
$(INC_DIR)/extend_vtable.h \
src/thread.c \
@@ -1489,7 +1496,10 @@ src/runcore/profiling$(O) : src/runcore/profiling.str src/runcore/profiling.c \
include/pmc/pmc_namespace.h \
$(INC_DIR)/oplib/core_ops.h $(INC_DIR)/runcore_api.h \
$(INC_DIR)/runcore_profiling.h $(INC_DIR)/embed.h \
- $(PARROT_H_HEADERS)
+ $(PARROT_H_HEADERS) \
+ $(INC_DIR)/extend.h \
+ $(INC_DIR)/extend_vtable.h
+
src/call/args$(O) : \
$(PARROT_H_HEADERS) $(INC_DIR)/oplib/ops.h \
@@ -1684,7 +1694,8 @@ src/nci/api$(O) : src/nci/api.str \
src/nci/api.c \
$(PARROT_H_HEADERS)
-src/nci/core_thunks$(O) : src/nci/core_thunks.c \
+src/nci/core_thunks$(O) : src/nci/core_thunks.str \
+ src/nci/core_thunks.c \
$(PARROT_H_HEADERS) \
include/pmc/pmc_nci.h
@@ -1698,6 +1709,7 @@ src/nci/libffi$(O) : src/nci/libffi.c \
src/nci/extra_thunks$(O) : \
$(PARROT_H_HEADERS) \
include/pmc/pmc_nci.h \
+ src/nci/extra_thunks.str \
src/nci/extra_thunks.c
$(CC) $(CFLAGS) @optimize::src/nci/extra_thunks.c@ @ccwarn::src/nci/extra_thunks.c@ @cc_shared@ -I$(@D) @cc_o_out@$@ -c src/nci/extra_thunks.c
@@ -1823,8 +1835,7 @@ src/gc/malloc_trace$(O) : src/gc/malloc.c src/gc/malloc_trace.c
src/packfile/pf_items$(O) : $(PARROT_H_HEADERS) src/packfile/pf_items.c
-src/atomic/gcc_x86$(O) : $(PARROT_H_HEADERS) $(INC_DIR)/atomic/gcc_x86.h \
- src/atomic/gcc_x86.c
+src/atomic/gcc_x86$(O) : $(PARROT_H_HEADERS) src/atomic/gcc_x86.c
# core_ops depends upon config.h so that it gets updated along with
# updates to config.h's version numbers
@@ -2013,7 +2024,7 @@ test_runcore: test_prep
smolder_test : test_prep
$(PERL) t/harness $(EXTRA_TEST_ARGS) --archive --send-to-smolder
-smolder_coretest : corevm
+smolder_coretest : corevm pbctestfiles
$(PERL) t/harness $(EXTRA_TEST_ARGS) --core-tests --archive --send-to-smolder
smoke : smolder_test
View
@@ -186,6 +186,7 @@ sub _set_implementations {
my $platform = $conf->data->get('platform');
my @impls = qw/
time.c
+ encoding.c
env.c
dl.c
stat.c
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2011, Parrot Foundation.
+ */
+
+/*
+
+=head1 NAME
+
+config/gen/platform/generic/encoding.c
+
+=head1 DESCRIPTION
+
+Platform C string encoding management
+
+=head2 Functions
+
+=over 4
+
+=cut
+
+*/
+
+/*
+
+=item C<void Parrot_init_platform_encoding(PARROT_INTERP)>
+
+Set the platform encoding pointer, used for encoding/decoding strings passed to
+the OS, to an appropriate value.
+
+=cut
+
+*/
+
+void
+Parrot_init_platform_encoding(PARROT_INTERP)
+{
+ Parrot_platform_encoding_ptr = Parrot_ascii_encoding_ptr;
+}
+
+
+/*
+
+=item C<size_t Parrot_str_platform_strlen(PARROT_INTERP, const char *s)>
+
+Get the length of a platform-encoded C string.
+
+=cut
+
+*/
+
+size_t
+Parrot_str_platform_strlen(PARROT_INTERP, const char *s)
+{
+ return strlen(s);
+}
+
+/*
+
+=back
+
+=cut
+
+*/
+
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4 cinoptions='\:2=2' :
+ */
Oops, something went wrong.

0 comments on commit 4352c13

Please sign in to comment.