Skip to content

Commit

Permalink
Merge branch 'master' into string_checks
Browse files Browse the repository at this point in the history
  • Loading branch information
nwellnhof committed Nov 28, 2010
2 parents 392bcec + 8aa40c9 commit 0e34170
Show file tree
Hide file tree
Showing 28 changed files with 206 additions and 177 deletions.
10 changes: 5 additions & 5 deletions compilers/imcc/pbc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1636,9 +1636,9 @@ build_key(PARROT_INTERP, ARGIN(SymReg *key_reg))
regno = r->color >= 0 ? r->color : -1 - r->color;

if (r->set == 'I')
key_set_register(interp, tail, regno, KEY_integer_FLAG);
Parrot_key_set_register(interp, tail, regno, KEY_integer_FLAG);
else if (r->set == 'S')
key_set_register(interp, tail, regno, KEY_string_FLAG);
Parrot_key_set_register(interp, tail, regno, KEY_string_FLAG);
else
IMCC_fatal(interp, 1, "build_key: wrong register set\n");

Expand All @@ -1654,11 +1654,11 @@ build_key(PARROT_INTERP, ARGIN(SymReg *key_reg))
switch (r->set) {
case 'S': /* P["key"] */
/* str constant */
key_set_string(interp, tail, ct->str.constants[r->color]);
Parrot_key_set_string(interp, tail, ct->str.constants[r->color]);
break;
case 'I': /* P[;42;..] */
/* int constant */
key_set_integer(interp, tail, atol(r->name));
Parrot_key_set_integer(interp, tail, atol(r->name));
break;
default:
IMCC_fatal(interp, 1, "build_key: unknown set\n");
Expand All @@ -1671,7 +1671,7 @@ build_key(PARROT_INTERP, ARGIN(SymReg *key_reg))
}

{
STRING *name = key_set_to_string(interp, head);
STRING *name = Parrot_key_set_to_string(interp, head);
const char *cname = Parrot_str_to_cstring(interp, name);
SymReg * const r = _get_sym(&IMCC_INFO(interp)->globals->cs->key_consts, cname);

Expand Down
2 changes: 1 addition & 1 deletion config/auto/revision.pm
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ sub runstep {
$conf->data->set( revision => $revision );

if ( defined $revision ) {
$self->set_result("$revision");
$self->set_result($revision);
}
else {
$self->set_result("done");
Expand Down
74 changes: 38 additions & 36 deletions include/parrot/key.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,88 +42,88 @@ typedef enum {
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PARROT_IGNORABLE_RESULT
PMC * key_append(PARROT_INTERP, ARGMOD(PMC *key1), ARGIN(PMC *key2))
PMC * Parrot_key_append(PARROT_INTERP, ARGMOD(PMC *key1), ARGIN(PMC *key2))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
__attribute__nonnull__(3)
FUNC_MODIFIES(*key1);

PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
INTVAL key_integer(PARROT_INTERP, ARGIN(PMC *key))
INTVAL Parrot_key_integer(PARROT_INTERP, ARGIN(PMC *key))
__attribute__nonnull__(1)
__attribute__nonnull__(2);

PARROT_EXPORT
void key_mark(PARROT_INTERP, ARGIN(PMC *key))
void Parrot_key_mark(PARROT_INTERP, ARGIN(PMC *key))
__attribute__nonnull__(1)
__attribute__nonnull__(2);

PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
PMC * key_new(PARROT_INTERP)
PMC * Parrot_key_new(PARROT_INTERP)
__attribute__nonnull__(1);

PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
PMC * key_new_cstring(PARROT_INTERP, ARGIN_NULLOK(const char *value))
PMC * Parrot_key_new_cstring(PARROT_INTERP, ARGIN_NULLOK(const char *value))
__attribute__nonnull__(1);

PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
PMC * key_new_integer(PARROT_INTERP, INTVAL value)
PMC * Parrot_key_new_integer(PARROT_INTERP, INTVAL value)
__attribute__nonnull__(1);

PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
PMC * key_new_number(PARROT_INTERP, FLOATVAL value)
PMC * Parrot_key_new_number(PARROT_INTERP, FLOATVAL value)
__attribute__nonnull__(1);

PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
PMC * key_new_string(PARROT_INTERP, ARGIN(STRING *value))
PMC * Parrot_key_new_string(PARROT_INTERP, ARGIN(STRING *value))
__attribute__nonnull__(1)
__attribute__nonnull__(2);

PARROT_EXPORT
PARROT_CAN_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
PMC * key_next(PARROT_INTERP, ARGIN(PMC *key))
PMC * Parrot_key_next(PARROT_INTERP, ARGIN(PMC *key))
__attribute__nonnull__(1)
__attribute__nonnull__(2);

PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
FLOATVAL key_number(PARROT_INTERP, ARGIN(PMC *key))
FLOATVAL Parrot_key_number(PARROT_INTERP, ARGIN(PMC *key))
__attribute__nonnull__(1)
__attribute__nonnull__(2);

PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
PMC * key_pmc(PARROT_INTERP, ARGIN(PMC *key))
PMC * Parrot_key_pmc(PARROT_INTERP, ARGIN(PMC *key))
__attribute__nonnull__(1)
__attribute__nonnull__(2);

PARROT_EXPORT
void key_set_integer(PARROT_INTERP, ARGMOD(PMC *key), INTVAL value)
void Parrot_key_set_integer(PARROT_INTERP, ARGMOD(PMC *key), INTVAL value)
__attribute__nonnull__(1)
__attribute__nonnull__(2)
FUNC_MODIFIES(*key);

PARROT_EXPORT
void key_set_number(PARROT_INTERP, ARGMOD(PMC *key), FLOATVAL value)
void Parrot_key_set_number(PARROT_INTERP, ARGMOD(PMC *key), FLOATVAL value)
__attribute__nonnull__(1)
__attribute__nonnull__(2)
FUNC_MODIFIES(*key);

PARROT_EXPORT
void key_set_register(PARROT_INTERP,
void Parrot_key_set_register(PARROT_INTERP,
ARGMOD(PMC *key),
INTVAL value,
INTVAL flag)
Expand All @@ -132,7 +132,9 @@ void key_set_register(PARROT_INTERP,
FUNC_MODIFIES(*key);

PARROT_EXPORT
void key_set_string(PARROT_INTERP, ARGMOD(PMC *key), ARGIN(STRING *value))
void Parrot_key_set_string(PARROT_INTERP,
ARGMOD(PMC *key),
ARGIN(STRING *value))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
__attribute__nonnull__(3)
Expand All @@ -141,71 +143,71 @@ void key_set_string(PARROT_INTERP, ARGMOD(PMC *key), ARGIN(STRING *value))
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
STRING * key_set_to_string(PARROT_INTERP, ARGIN_NULLOK(PMC *key))
STRING * Parrot_key_set_to_string(PARROT_INTERP, ARGIN_NULLOK(PMC *key))
__attribute__nonnull__(1);

PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
STRING * key_string(PARROT_INTERP, ARGIN(PMC *key))
STRING * Parrot_key_string(PARROT_INTERP, ARGIN(PMC *key))
__attribute__nonnull__(1)
__attribute__nonnull__(2);

PARROT_EXPORT
PARROT_PURE_FUNCTION
PARROT_WARN_UNUSED_RESULT
INTVAL key_type(SHIM_INTERP, ARGIN(const PMC *key))
INTVAL Parrot_key_type(SHIM_INTERP, ARGIN(const PMC *key))
__attribute__nonnull__(2);

#define ASSERT_ARGS_key_append __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
#define ASSERT_ARGS_Parrot_key_append __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(key1) \
, PARROT_ASSERT_ARG(key2))
#define ASSERT_ARGS_key_integer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
#define ASSERT_ARGS_Parrot_key_integer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(key))
#define ASSERT_ARGS_key_mark __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
#define ASSERT_ARGS_Parrot_key_mark __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(key))
#define ASSERT_ARGS_key_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
#define ASSERT_ARGS_Parrot_key_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_key_new_cstring __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
#define ASSERT_ARGS_Parrot_key_new_cstring __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_key_new_integer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
#define ASSERT_ARGS_Parrot_key_new_integer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_key_new_number __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
#define ASSERT_ARGS_Parrot_key_new_number __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_key_new_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
#define ASSERT_ARGS_Parrot_key_new_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(value))
#define ASSERT_ARGS_key_next __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
#define ASSERT_ARGS_Parrot_key_next __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(key))
#define ASSERT_ARGS_key_number __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
#define ASSERT_ARGS_Parrot_key_number __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(key))
#define ASSERT_ARGS_key_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
#define ASSERT_ARGS_Parrot_key_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(key))
#define ASSERT_ARGS_key_set_integer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
#define ASSERT_ARGS_Parrot_key_set_integer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(key))
#define ASSERT_ARGS_key_set_number __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
#define ASSERT_ARGS_Parrot_key_set_number __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(key))
#define ASSERT_ARGS_key_set_register __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
#define ASSERT_ARGS_Parrot_key_set_register __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(key))
#define ASSERT_ARGS_key_set_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
#define ASSERT_ARGS_Parrot_key_set_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(key) \
, PARROT_ASSERT_ARG(value))
#define ASSERT_ARGS_key_set_to_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
#define ASSERT_ARGS_Parrot_key_set_to_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_key_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
#define ASSERT_ARGS_Parrot_key_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(key))
#define ASSERT_ARGS_key_type __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
#define ASSERT_ARGS_Parrot_key_type __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(key))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: src/key.c */
Expand Down
2 changes: 1 addition & 1 deletion include/parrot/pointer_array.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void Parrot_pa_remove(PARROT_INTERP,
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(self) \
, PARROT_ASSERT_ARG(ptr))
#define ASSERT_ARGS_Parrot_pa_is_owned __attribute__unused__ int _ASSERT_ARGS_C = (\
#define ASSERT_ARGS_Parrot_pa_is_owned __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(self) \
, PARROT_ASSERT_ARG(orig))
Expand Down
11 changes: 11 additions & 0 deletions ports/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
parrot (2.9.1-1) unstable; urgency=low
* New upstream release (Closes: #601704)
* debian/rules:
- Fix script-not-executable lintian warning.
* debian/patches:
- Added 05_fix_gc_ftbfs_ia64.patch, from upstream, resolve
FTBFS on ia64 arch, missing argument to trace_mem_block
function (Closes: #597138).

-- Allison Randal <allison@parrot.org> Sat, 27 Nov 2010 17:17:58 -0800

parrot (2.6.0-1) unstable; urgency=low
* New upstream release
* debian/parrot-devel.install.in:
Expand Down
4 changes: 2 additions & 2 deletions ports/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Description: A minimal install of the Parrot VM
to get up and running in the average use case, and is sufficient to run most
language implementations.

Package: libparrot2.6.0
Package: libparrot2.9.1
Architecture: any
Section: libs
Depends: ${shlibs:Depends}, ${misc:Depends}
Expand All @@ -37,7 +37,7 @@ Description: Parrot shared library
Package: libparrot-dev
Architecture: any
Section: libdevel
Depends: ${misc:Depends}, libparrot2.6.0 (= ${binary:Version}), parrot
Depends: ${misc:Depends}, libparrot2.9.1 (= ${binary:Version}), parrot
Description: Parrot shared library development files
This package contains header files and a static library, needed to develop
applications which embed Parrot.
Expand Down
13 changes: 13 additions & 0 deletions ports/debian/patches/05_fix_gc_ftbfs_ia64.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Index: parrot-2.9.1/src/gc/system.c
===================================================================
--- parrot-2.9.1.orig/src/gc/system.c 2010-11-28 00:56:24.000000000 +0000
+++ parrot-2.9.1/src/gc/system.c 2010-11-28 00:57:57.000000000 +0000
@@ -188,7 +188,7 @@

# endif /* __hpux */

- trace_mem_block(interp, base,
+ trace_mem_block(interp, mem_pools, base,
(size_t)current_regstore_top);

#else /* !__ia64__ */
1 change: 1 addition & 0 deletions ports/debian/patches/series
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
03_fix_nqp_man.patch
04_fix_opsc_man.patch
05_fix_gc_ftbfs_ia64.patch
1 change: 1 addition & 0 deletions ports/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ binary-indep: build install
dh_compress -pparrot-doc -X.pod
dh_compress -plibparrot-dev
dh_fixperms -i
chmod +x debian/parrot-devel/usr/lib/parrot/$(VERSION)/tools/dev/mk_language_shell.pl
dh_installdeb -i
dh_gencontrol -i
dh_md5sums -i
Expand Down
2 changes: 1 addition & 1 deletion src/call/args.c
Original file line number Diff line number Diff line change
Expand Up @@ -1814,7 +1814,7 @@ clone_key_arg(PARROT_INTERP, ARGIN(PMC *key))
if (key->vtable->base_type != enum_class_Key)
return key;

for (t = key; t; t=key_next(interp, t)) {
for (t = key; t; t=Parrot_key_next(interp, t)) {
/* register keys have to be cloned */
if (PObj_get_FLAGS(key) & KEY_register_FLAG) {
return VTABLE_clone(interp, key);
Expand Down
7 changes: 5 additions & 2 deletions src/dynext.c
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,10 @@ PMC *
Parrot_dyn_load_lib(PARROT_INTERP, ARGIN_NULLOK(STRING *lib), ARGIN_NULLOK(PMC *parameters))
{
ASSERT_ARGS(Parrot_dyn_load_lib)
void *handle;
/* NULL intializa handle to protect against pitfalls in called functions.
* This function should not be so speed critical that this has any impact.
*/
void *handle = NULL;
PMC *lib_pmc;
STRING *path;
STRING *lib_name, *wo_ext, *ext; /* library stem without path
Expand Down Expand Up @@ -720,7 +723,7 @@ Parrot_dyn_load_lib(PARROT_INTERP, ARGIN_NULLOK(STRING *lib), ARGIN_NULLOK(PMC *
* XXX Parrot_ex_throw_from_c_args? return PMCNULL?
* PMC Undef seems convenient, because it can be queried with get_bool()
*/
if (!path || !handle)
if (STRING_IS_NULL(path) || !handle)
return Parrot_pmc_new(interp, enum_class_Undef);

return run_init_lib(interp, handle, lib_name, wo_ext);
Expand Down
2 changes: 1 addition & 1 deletion src/dynpmc/subproxy.pmc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pmclass SubProxy dynpmc extends Sub auto_attrs {
if (!file)
Parrot_ex_throw_from_c_args(INTERP, NULL, 1, "SubProxy: no file");

sub_pmc = key_next(INTERP, key);
sub_pmc = Parrot_key_next(INTERP, key);
if (!sub_pmc)
Parrot_ex_throw_from_c_args(INTERP, NULL, 1, "SubProxy: no sub");

Expand Down
6 changes: 4 additions & 2 deletions src/gc/gc_ms2.c
Original file line number Diff line number Diff line change
Expand Up @@ -753,8 +753,10 @@ gc_ms2_mark_pmc_header(PARROT_INTERP, ARGIN(PMC *pmc))
/* mark it live */
PObj_live_SET(pmc);

Parrot_pa_remove(interp, self->objects, item->ptr);
item->ptr = Parrot_pa_insert(interp, self->new_objects, item);
if (!PObj_constant_TEST(pmc)) {
Parrot_pa_remove(interp, self->objects, item->ptr);
item->ptr = Parrot_pa_insert(interp, self->new_objects, item);
}

}

Expand Down
2 changes: 1 addition & 1 deletion src/gc/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ trace_system_areas(PARROT_INTERP, ARGIN_NULLOK(const Memory_Pools *mem_pools))

# endif /* __hpux */

trace_mem_block(interp, base,
trace_mem_block(interp, mem_pools, base,
(size_t)current_regstore_top);

#else /* !__ia64__ */
Expand Down
Loading

0 comments on commit 0e34170

Please sign in to comment.