Skip to content

Commit

Permalink
[gc_api] merge to trunk HEAD (38652). found the error
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.parrot.org/parrot/branches/gc_api@38653 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
whiteknight committed May 9, 2009
1 parent 67df080 commit 3ce1c9b
Show file tree
Hide file tree
Showing 35 changed files with 386 additions and 289 deletions.
4 changes: 4 additions & 0 deletions CREDITS
Expand Up @@ -400,6 +400,10 @@ E: he@NetBSD.org
N: H.Merijn Brand
D: HP-UX fixes and smoke tests

N: Igor Rafael Sanchez-Puls
D: extending test_file_coverage to test PMC coverage
E: quevlar@ymail.com

N: Ibotty
D: parrotbench ruby benchmarks

Expand Down
3 changes: 2 additions & 1 deletion MANIFEST
@@ -1,7 +1,7 @@
# ex: set ro:
# $Id$
#
# generated by tools/dev/mk_manifest_and_skip.pl Tue May 5 05:00:39 2009 UT
# generated by tools/dev/mk_manifest_and_skip.pl Fri May 8 15:20:54 2009 UT
#
# See tools/dev/install_files.pl for documentation on the
# format of this file.
Expand Down Expand Up @@ -2060,6 +2060,7 @@ tools/build/vtable_h.pl []
tools/dev/.gdbinit []
tools/dev/as2c.pl []
tools/dev/bench_op.pir []
tools/dev/branch_status.pl []
tools/dev/cc_flags.pl []
tools/dev/create_language.pl []
tools/dev/debian_docs.sh []
Expand Down
6 changes: 4 additions & 2 deletions compilers/imcc/pbc.c
Expand Up @@ -1084,8 +1084,10 @@ add_const_num(PARROT_INTERP, ARGIN_NULLOK(const char *buf))
const int k = add_const_table(interp);
STRING * const s = Parrot_str_new(interp, buf, 0);

interp->code->const_table->constants[k]->type = PFC_NUMBER;
interp->code->const_table->constants[k]->u.number = Parrot_str_to_num(interp, s);
PackFile_Constant * const constant = interp->code->const_table->constants[k];

constant->type = PFC_NUMBER;
constant->u.number = Parrot_str_to_num(interp, s);

return k;
}
Expand Down
4 changes: 2 additions & 2 deletions config/auto/arch.pm
Expand Up @@ -39,10 +39,10 @@ sub runstep {
$verbose and print "\n";

my $archname = $conf->data->get('archname');
# This was added to convert IA64.ARCHREV_0 on HP-UX, TT #645, TT #653
$archname =~ s|\.|_|g;
my ( $cpuarch, $osname ) = split( /-/, $archname );

# This was added to convert IA64.ARCHREV_0 on HP-UX, TT #645
$archname =~ s|\.|_|g;

if ($verbose) {
print "determining operating system and cpu architecture\n";
Expand Down
3 changes: 3 additions & 0 deletions config/auto/gmp/gmp_c.in
Expand Up @@ -6,6 +6,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <gmp.h>
#ifdef WIN32
# include <windows.h>
#endif

int
main(int argc, char *argv[])
Expand Down
104 changes: 37 additions & 67 deletions config/gen/makefiles/root.in
Expand Up @@ -1948,14 +1948,13 @@ SPLINTFLAGS = \
\
-show-summary \
+show-scan \
+time-dist

# Watch for naming conflicts, but don't complain about str*() functions
SPLINTFLAGS := $(SPLINTFLAGS) \
+time-dist \
\
+ansi-reserved \
+ansi-reserved-internal \
-iso-reserved \
-iso-reserved-internal
-iso-reserved-internal \
-include-nest 10

# Memory safety checks
SPLINTFLAGS := $(SPLINTFLAGS) \
Expand Down Expand Up @@ -1985,90 +1984,64 @@ SPLINTFLAGS := $(SPLINTFLAGS) \
-pred-bool-others \
-boolops \

# Report qualifier mismatches only if dangerous
SPLINTFLAGS := $(SPLINTFLAGS) \
+relax-quals

# Pointer arithmetic is OK, but watch for null pointers
SPLINTFLAGS := $(SPLINTFLAGS) \
-ptr-arith \
+nullptrarith \
+ptr-negate
+ptr-negate \
-zero-ptr

# Check on consistency of defs
# Symbol definitions
SPLINTFLAGS := $(SPLINTFLAGS) \
+decl-undef \
+incon-defs \
+incon-defs-lib \

# The rest of the flags to be organized.
# Check for conflicts with C++ compilers
SPLINTFLAGS := $(SPLINTFLAGS) \
+char-index \
+cpp-names \
+decl-undef \

# Format codes
SPLINTFLAGS := $(SPLINTFLAGS) \
+format-code \
+format-type \

# Problems with evaluation and control structions
SPLINTFLAGS := $(SPLINTFLAGS) \
+controlnestdepth 15 \
+duplicate-case \
+enum-members \
+eval-order \
+eval-order-uncon \
+format-code \
+format-type \

# Types and stuff
SPLINTFLAGS := $(SPLINTFLAGS) \
+enum-members \
+ignore-signs \
+match-fields \
+null \
+nullret \
+strict-destroy \
\
+use-released \
+strict-use-released \
-abstract \

# TODO: Miscellaneous other flags
SPLINTFLAGS := $(SPLINTFLAGS) \
+aliasunique \
+assignexpose \
-casebreak \
-castfcnptr \
-charint \
+continuecomment \
+controlnestdepth 15 \
-exportlocal \
-fcnuse \
+fielduse \
-globs \
+imptype \
-initallelements \
+longintegral \
+matchanyintegral \
+match-fields \
+nestedextern \
-noeffect \
-paramuse \
+ptrnegate \
+null \
+nullret \
+paramuse \
+readonlystrings \
-redef \
-retvalint \
-retvalother \
+shadow \
-shiftimplementation \
-shiftnegative \
-showsourceloc \
-type \
\
-branchstate \
-compdef \
-compdestroy \
-compmempass \
-globstate \
-mustfreefresh \
-mustfreeonly \
-nullstate \
-redecl \
-retalias \
\
-immediatetrans \
-kepttrans \
-observertrans \
-onlytrans \
-readonlytrans \
-statictrans \
-temptrans \
-unqualifiedtrans \

+strict-destroy \
+strict-use-released \
+use-released \

# Other options we'd like to add back
# +paramuse: As soon as we get SHIM()s in the ops
# -includedepth 8 : Let's investigate why we do so many includes.
# +initallelements : Right now, the *.ops files don't initialize all
# values of the arrays
# +casebreak: Auto-generated ops have way too case fallthrus right now
Expand All @@ -2080,9 +2053,6 @@ SPLINTFLAGS := $(SPLINTFLAGS) \
# added to splint target to simplify experimentation,
# ex: make SPLINTFLAGS_TEST='-posixstrictlib +posixlib' splint

# Don't complain about using pointers and ints as booleans
SPLINTFLAGS_TEST := $(SPLINTFLAGS_TEST) -pred-bool

splint : $(PARROT)
$(MKPATH) $(SPLINT_TMP)
$(SPLINT) $(CC_INC) @cc_hasjit@ "-Isrc/pmc" "-Icompilers/ast" $(SPLINTFLAGS) $(SPLINTFLAGS_TEST) `echo $(O_FILES) | $(PERL) -pe @PQ@s/\.o/\.c/g@PQ@`
Expand All @@ -2092,7 +2062,7 @@ splint-andy :
$(MKPATH) $(SPLINT_TMP)
splint $(CC_INC) @cc_hasjit@ -DNDEBUG "-Isrc/pmc" "-Icompilers/ast" $(SPLINTFLAGS) $(SPLINTFLAGS_TEST) \
+partial -memchecks \
src/s*.c \
src/p*.c \
| grep -v 'Source code error generation point'

COVER_FLAGS := -fprofile-arcs -ftest-coverage
Expand Down
2 changes: 1 addition & 1 deletion docs/embed.pod
Expand Up @@ -386,7 +386,7 @@ Call a Parrot subroutine that returns an float using the supplied signature.

Returns the class corresponding to the supplied namespace.

=item C<Parrot_PMC Parrot_Class_instantiate(PARROT_INTERP, Parrot_PMC the_class Parrot_PMC arg)>
=item C<Parrot_PMC VTABLE_instantiate(PARROT_INTERP, Parrot_PMC the_class Parrot_PMC arg)>

Instantiates a new object of class C<the_class>, which can be obtained from
C<Parrot_oo_get_class()>. Passes an optional PMC argument C<arg> to the
Expand Down
8 changes: 4 additions & 4 deletions include/parrot/exceptions.h
Expand Up @@ -283,11 +283,11 @@ void Parrot_print_backtrace(void);
# define PARROT_ASSERT(x) (x) ? ((void)0) : Parrot_confess(#x, __FILE__, __LINE__)
# define PARROT_ASSERT_ARG(x) ((x) ? (0) : (Parrot_confess(#x, __FILE__, __LINE__), 0))

# ifdef _MSC_VER
# define ASSERT_ARGS(a)
# else
# ifdef __GNUC__
# define ASSERT_ARGS(a) ASSERT_ARGS_ ## a ;
# endif /* _MSC_VER */
# else
# define ASSERT_ARGS(a)
# endif /* __GNUC__ */

#endif /* NDEBUG */

Expand Down
12 changes: 4 additions & 8 deletions include/parrot/hash.h
Expand Up @@ -81,8 +81,7 @@ typedef void (*value_free)(void *);
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */

PARROT_EXPORT
void parrot_dump_hash(SHIM_INTERP, ARGIN(const Hash *hash))
__attribute__nonnull__(2);
void parrot_dump_hash(SHIM_INTERP, SHIM(const Hash *hash));

PARROT_EXPORT
void parrot_hash_clone(PARROT_INTERP,
Expand Down Expand Up @@ -160,8 +159,7 @@ HashBucket* parrot_hash_put(PARROT_INTERP,
PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
PARROT_PURE_FUNCTION
INTVAL parrot_hash_size(PARROT_INTERP, ARGIN(const Hash *hash))
__attribute__nonnull__(1)
INTVAL parrot_hash_size(SHIM_INTERP, ARGIN(const Hash *hash))
__attribute__nonnull__(2);

PARROT_EXPORT
Expand Down Expand Up @@ -242,8 +240,7 @@ Hash * parrot_create_hash(PARROT_INTERP,
__attribute__nonnull__(4)
__attribute__nonnull__(5);

#define ASSERT_ARGS_parrot_dump_hash __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(hash)
#define ASSERT_ARGS_parrot_dump_hash __attribute__unused__ int _ASSERT_ARGS_CHECK = 0
#define ASSERT_ARGS_parrot_hash_clone __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(hash) \
Expand Down Expand Up @@ -275,8 +272,7 @@ Hash * parrot_create_hash(PARROT_INTERP,
|| PARROT_ASSERT_ARG(hash) \
|| PARROT_ASSERT_ARG(key)
#define ASSERT_ARGS_parrot_hash_size __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(hash)
PARROT_ASSERT_ARG(hash)
#define ASSERT_ARGS_parrot_hash_visit __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(hash) \
Expand Down
17 changes: 15 additions & 2 deletions include/parrot/io.h
Expand Up @@ -184,7 +184,9 @@ void Parrot_io_flush(PARROT_INTERP, ARGMOD(PMC *pmc))
FUNC_MODIFIES(*pmc);

PARROT_EXPORT
INTVAL Parrot_io_fprintf(PARROT_INTERP,
PARROT_IGNORABLE_RESULT
INTVAL /*@alt void@*/
Parrot_io_fprintf(PARROT_INTERP,
ARGMOD(PMC *pmc),
ARGIN(const char *s),
...)
Expand All @@ -201,6 +203,7 @@ PIOHANDLE Parrot_io_getfd(PARROT_INTERP, ARGMOD(PMC *pmc))
FUNC_MODIFIES(*pmc);

PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
INTVAL Parrot_io_is_closed(PARROT_INTERP, ARGMOD(PMC *pmc))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
Expand All @@ -214,6 +217,7 @@ INTVAL Parrot_io_is_tty(PARROT_INTERP, ARGMOD(PMC *pmc))
FUNC_MODIFIES(*pmc);

PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
PIOOFF_T Parrot_io_make_offset(INTVAL offset);

PARROT_EXPORT
Expand All @@ -233,6 +237,7 @@ PMC * Parrot_io_open(PARROT_INTERP,
__attribute__nonnull__(3);

PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
INTVAL Parrot_io_peek(PARROT_INTERP,
ARGMOD(PMC *pmc),
ARGOUT(STRING **buffer))
Expand All @@ -243,7 +248,11 @@ INTVAL Parrot_io_peek(PARROT_INTERP,
FUNC_MODIFIES(*buffer);

PARROT_EXPORT
INTVAL Parrot_io_printf(PARROT_INTERP, ARGIN(const char *s), ...)
PARROT_IGNORABLE_RESULT
INTVAL /*@alt void@*/
Parrot_io_printf(PARROT_INTERP,
ARGIN(const char *s),
...)
__attribute__nonnull__(1)
__attribute__nonnull__(2);

Expand Down Expand Up @@ -296,6 +305,7 @@ PMC * Parrot_io_STDERR(PARROT_INTERP)
__attribute__nonnull__(1);

PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
PMC * Parrot_io_stdhandle(PARROT_INTERP,
INTVAL fileno,
Expand Down Expand Up @@ -332,7 +342,10 @@ INTVAL Parrot_io_write(PARROT_INTERP,
__attribute__nonnull__(3)
FUNC_MODIFIES(*pmc);

PARROT_WARN_UNUSED_RESULT
PIOOFF_T Parrot_io_make_offset32(INTVAL hi, INTVAL lo);

PARROT_WARN_UNUSED_RESULT
PIOOFF_T Parrot_io_make_offset_pmc(PARROT_INTERP, ARGMOD(PMC *pmc))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
Expand Down
12 changes: 6 additions & 6 deletions include/parrot/misc.h
Expand Up @@ -268,12 +268,12 @@ STRING * Parrot_vsprintf_s(PARROT_INTERP, ARGIN(STRING *pat), va_list args)

typedef struct sprintf_obj SPRINTF_OBJ;

typedef STRING *(*sprintf_getchar_t) (PARROT_INTERP, INTVAL, SPRINTF_OBJ *);
typedef HUGEINTVAL(*sprintf_getint_t) (PARROT_INTERP, INTVAL, SPRINTF_OBJ *);
typedef UHUGEINTVAL(*sprintf_getuint_t) (PARROT_INTERP, INTVAL, SPRINTF_OBJ *);
typedef HUGEFLOATVAL(*sprintf_getfloat_t) (PARROT_INTERP, INTVAL, SPRINTF_OBJ *);
typedef STRING *(*sprintf_getstring_t) (PARROT_INTERP, INTVAL, SPRINTF_OBJ *);
typedef void *(*sprintf_getptr_t) (PARROT_INTERP, INTVAL, SPRINTF_OBJ *);
typedef STRING *(*sprintf_getchar_t) (PARROT_INTERP, INTVAL, ARGIN(SPRINTF_OBJ *));
typedef HUGEINTVAL(*sprintf_getint_t) (PARROT_INTERP, INTVAL, ARGIN(SPRINTF_OBJ *));
typedef UHUGEINTVAL(*sprintf_getuint_t) (PARROT_INTERP, INTVAL, ARGIN(SPRINTF_OBJ *));
typedef HUGEFLOATVAL(*sprintf_getfloat_t) (PARROT_INTERP, INTVAL, ARGIN(SPRINTF_OBJ *));
typedef STRING *(*sprintf_getstring_t) (PARROT_INTERP, INTVAL, ARGIN(SPRINTF_OBJ *));
typedef void *(*sprintf_getptr_t) (PARROT_INTERP, INTVAL, ARGIN(SPRINTF_OBJ *));

struct sprintf_obj {
void *data;
Expand Down
2 changes: 1 addition & 1 deletion include/parrot/stacks.h
Expand Up @@ -21,7 +21,7 @@
typedef struct Stack_Entry {
UnionVal entry;
Stack_entry_type entry_type;
void (*cleanup)(PARROT_INTERP, struct Stack_Entry *);
void (*cleanup)(PARROT_INTERP, ARGIN(struct Stack_Entry *));
} Stack_Entry_t;

typedef struct Stack_Chunk {
Expand Down

0 comments on commit 3ce1c9b

Please sign in to comment.