[svn:parrot] r44034 - in branches/pmc_func_cleanup: include/parrot lib/Parrot/Ops2c lib/Parrot/Pmc2c src src/call src/dynpmc src/interp src/io src/ops src/pmc src/string tools/build
whiteknight at svn.parrot.org
whiteknight at svn.parrot.org
Tue Feb 16 18:00:21 UTC 2010
Author: whiteknight
Date: Tue Feb 16 18:00:18 2010
New Revision: 44034
URL: https://trac.parrot.org/parrot/changeset/44034
Log:
rename the rest of the functions in pmc.c, start updating the rest of the codebase but not complete yet
Modified:
branches/pmc_func_cleanup/include/parrot/pmc.h
branches/pmc_func_cleanup/lib/Parrot/Ops2c/Utils.pm
branches/pmc_func_cleanup/lib/Parrot/Pmc2c/Attribute.pm
branches/pmc_func_cleanup/lib/Parrot/Pmc2c/PMCEmitter.pm
branches/pmc_func_cleanup/lib/Parrot/Pmc2c/UtilFunctions.pm
branches/pmc_func_cleanup/src/call/args.c
branches/pmc_func_cleanup/src/call/context.c
branches/pmc_func_cleanup/src/dynext.c
branches/pmc_func_cleanup/src/dynpmc/dynlexpad.pmc
branches/pmc_func_cleanup/src/dynpmc/foo.pmc
branches/pmc_func_cleanup/src/dynpmc/gdbmhash.pmc
branches/pmc_func_cleanup/src/dynpmc/rational.pmc
branches/pmc_func_cleanup/src/extend.c
branches/pmc_func_cleanup/src/hll.c
branches/pmc_func_cleanup/src/interp/inter_cb.c
branches/pmc_func_cleanup/src/interp/inter_create.c
branches/pmc_func_cleanup/src/interp/inter_misc.c
branches/pmc_func_cleanup/src/io/api.c
branches/pmc_func_cleanup/src/io/socket_api.c
branches/pmc_func_cleanup/src/io/socket_unix.c
branches/pmc_func_cleanup/src/io/socket_win32.c
branches/pmc_func_cleanup/src/multidispatch.c
branches/pmc_func_cleanup/src/oo.c
branches/pmc_func_cleanup/src/ops/bit.ops
branches/pmc_func_cleanup/src/ops/cmp.ops
branches/pmc_func_cleanup/src/ops/core.ops
branches/pmc_func_cleanup/src/ops/experimental.ops
branches/pmc_func_cleanup/src/ops/io.ops
branches/pmc_func_cleanup/src/ops/math.ops
branches/pmc_func_cleanup/src/ops/object.ops
branches/pmc_func_cleanup/src/ops/pmc.ops
branches/pmc_func_cleanup/src/packfile.c
branches/pmc_func_cleanup/src/pmc.c
branches/pmc_func_cleanup/src/pmc/default.pmc
branches/pmc_func_cleanup/src/string/api.c
branches/pmc_func_cleanup/src/thread.c
branches/pmc_func_cleanup/tools/build/nativecall.pl
Modified: branches/pmc_func_cleanup/include/parrot/pmc.h
==============================================================================
--- branches/pmc_func_cleanup/include/parrot/pmc.h Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/include/parrot/pmc.h Tue Feb 16 18:00:18 2010 (r44034)
@@ -23,72 +23,84 @@
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
PARROT_EXPORT
-PARROT_CANNOT_RETURN_NULL
-PMC * constant_pmc_new(PARROT_INTERP, INTVAL base_type)
+void Parrot_pmc_create_mro(PARROT_INTERP, INTVAL type)
__attribute__nonnull__(1);
PARROT_EXPORT
-PARROT_CANNOT_RETURN_NULL
-PMC * constant_pmc_new_init(PARROT_INTERP,
- INTVAL base_type,
- ARGIN_NULLOK(PMC *init))
- __attribute__nonnull__(1);
+void Parrot_pmc_destroy(PARROT_INTERP, ARGMOD(PMC *pmc))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ FUNC_MODIFIES(*pmc);
PARROT_EXPORT
-PARROT_CANNOT_RETURN_NULL
-PMC * constant_pmc_new_noinit(PARROT_INTERP, INTVAL base_type)
- __attribute__nonnull__(1);
+void Parrot_pmc_gc_register(PARROT_INTERP, ARGIN(PMC *pmc))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
PARROT_EXPORT
-void gc_register_pmc(PARROT_INTERP, ARGIN(PMC *pmc))
+void Parrot_pmc_gc_unregister(PARROT_INTERP, ARGIN(PMC *pmc))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
PARROT_EXPORT
-void gc_unregister_pmc(PARROT_INTERP, ARGIN(PMC *pmc))
+INTVAL Parrot_pmc_get_type(PARROT_INTERP, ARGIN(PMC *name))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
PARROT_EXPORT
-void Parrot_create_mro(PARROT_INTERP, INTVAL type)
+PARROT_WARN_UNUSED_RESULT
+INTVAL Parrot_pmc_get_type_str(PARROT_INTERP, ARGIN_NULLOK(STRING *name))
__attribute__nonnull__(1);
PARROT_EXPORT
-void Parrot_pmc_destroy(PARROT_INTERP, ARGMOD(PMC *pmc))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- FUNC_MODIFIES(*pmc);
-
-PARROT_EXPORT
INTVAL Parrot_pmc_is_null(SHIM_INTERP, ARGIN_NULLOK(const PMC *pmc));
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
-PMC * pmc_new(PARROT_INTERP, INTVAL base_type)
+PMC * Parrot_pmc_new(PARROT_INTERP, INTVAL base_type)
+ __attribute__nonnull__(1);
+
+PARROT_EXPORT
+PARROT_CANNOT_RETURN_NULL
+PMC * Parrot_pmc_new_constant(PARROT_INTERP, INTVAL base_type)
__attribute__nonnull__(1);
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
-PMC * pmc_new_init(PARROT_INTERP, INTVAL base_type, ARGOUT(PMC *init))
+PMC * Parrot_pmc_new_constant_init(PARROT_INTERP,
+ INTVAL base_type,
+ ARGIN_NULLOK(PMC *init))
+ __attribute__nonnull__(1);
+
+PARROT_EXPORT
+PARROT_CANNOT_RETURN_NULL
+PMC * Parrot_pmc_new_constant_noinit(PARROT_INTERP, INTVAL base_type)
+ __attribute__nonnull__(1);
+
+PARROT_EXPORT
+PARROT_CANNOT_RETURN_NULL
+PMC * Parrot_pmc_new_init(PARROT_INTERP,
+ INTVAL base_type,
+ ARGOUT(PMC *init))
__attribute__nonnull__(1)
__attribute__nonnull__(3)
FUNC_MODIFIES(*init);
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
-PMC * pmc_new_noinit(PARROT_INTERP, INTVAL base_type)
+PMC * Parrot_pmc_new_noinit(PARROT_INTERP, INTVAL base_type)
__attribute__nonnull__(1);
PARROT_EXPORT
-INTVAL pmc_register(PARROT_INTERP, ARGIN(STRING *name))
+INTVAL Parrot_pmc_register_new_type(PARROT_INTERP, ARGIN(STRING *name))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PARROT_IGNORABLE_RESULT
-PMC * pmc_reuse(PARROT_INTERP,
+PMC * Parrot_pmc_reuse(PARROT_INTERP,
ARGIN(PMC *pmc),
INTVAL new_type,
UINTVAL flags)
@@ -98,7 +110,7 @@
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PARROT_IGNORABLE_RESULT
-PMC * pmc_reuse_by_class(PARROT_INTERP,
+PMC * Parrot_pmc_reuse_by_class(PARROT_INTERP,
ARGMOD(PMC *pmc),
ARGIN(PMC *class_),
UINTVAL flags)
@@ -110,7 +122,7 @@
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PARROT_IGNORABLE_RESULT
-PMC * pmc_reuse_init(PARROT_INTERP,
+PMC * Parrot_pmc_reuse_init(PARROT_INTERP,
ARGIN(PMC *pmc),
INTVAL new_type,
ARGIN(PMC *init),
@@ -119,78 +131,70 @@
__attribute__nonnull__(2)
__attribute__nonnull__(4);
-PARROT_EXPORT
-PARROT_WARN_UNUSED_RESULT
-INTVAL pmc_type(PARROT_INTERP, ARGIN_NULLOK(STRING *name))
- __attribute__nonnull__(1);
-
-PARROT_EXPORT
-INTVAL pmc_type_p(PARROT_INTERP, ARGIN(PMC *name))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-INTVAL get_new_vtable_index(PARROT_INTERP)
- __attribute__nonnull__(1);
-
-void temporary_pmc_free(PARROT_INTERP, ARGMOD(PMC *pmc))
+void Parrot_pmc_free_temporary(PARROT_INTERP, ARGMOD(PMC *pmc))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
FUNC_MODIFIES(*pmc);
+INTVAL Parrot_pmc_get_new_vtable_index(PARROT_INTERP)
+ __attribute__nonnull__(1);
+
PARROT_CANNOT_RETURN_NULL
-PMC * temporary_pmc_new(PARROT_INTERP, INTVAL base_type)
+PMC * Parrot_pmc_new_temporary(PARROT_INTERP, INTVAL base_type)
__attribute__nonnull__(1);
-#define ASSERT_ARGS_constant_pmc_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_constant_pmc_new_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_create_mro __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_constant_pmc_new_noinit __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_gc_register_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_destroy __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(pmc))
-#define ASSERT_ARGS_gc_unregister_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_gc_register __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(pmc))
-#define ASSERT_ARGS_Parrot_create_mro __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_Parrot_pmc_destroy __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_gc_unregister __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(pmc))
+#define ASSERT_ARGS_Parrot_pmc_get_type __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(name))
+#define ASSERT_ARGS_Parrot_pmc_get_type_str __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_Parrot_pmc_is_null __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
-#define ASSERT_ARGS_pmc_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_pmc_new_constant __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_pmc_new_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_new_constant_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_pmc_new_constant_noinit \
+ __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_pmc_new_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(init))
-#define ASSERT_ARGS_pmc_new_noinit __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_new_noinit __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_pmc_register __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_register_new_type __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(name))
-#define ASSERT_ARGS_pmc_reuse __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_reuse __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(pmc))
-#define ASSERT_ARGS_pmc_reuse_by_class __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_reuse_by_class __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(pmc) \
, PARROT_ASSERT_ARG(class_))
-#define ASSERT_ARGS_pmc_reuse_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_reuse_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(pmc) \
, PARROT_ASSERT_ARG(init))
-#define ASSERT_ARGS_pmc_type __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_pmc_type_p __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(name))
-#define ASSERT_ARGS_get_new_vtable_index __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_temporary_pmc_free __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_free_temporary __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(pmc))
-#define ASSERT_ARGS_temporary_pmc_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_get_new_vtable_index \
+ __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_pmc_new_temporary __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: src/pmc.c */
Modified: branches/pmc_func_cleanup/lib/Parrot/Ops2c/Utils.pm
==============================================================================
--- branches/pmc_func_cleanup/lib/Parrot/Ops2c/Utils.pm Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/lib/Parrot/Ops2c/Utils.pm Tue Feb 16 18:00:18 2010 (r44034)
@@ -1063,7 +1063,7 @@
$self->{sym_export} PMC*
$load_func(PARROT_INTERP)
{
- PMC *const lib = pmc_new(interp, enum_class_ParrotLibrary);
+ PMC *const lib = Parrot_pmc_new(interp, enum_class_ParrotLibrary);
((Parrot_ParrotLibrary_attributes*)PMC_data(lib))->oplib_init = (void *) $self->{init_func};
dynop_register(interp, lib);
return lib;
Modified: branches/pmc_func_cleanup/lib/Parrot/Pmc2c/Attribute.pm
==============================================================================
--- branches/pmc_func_cleanup/lib/Parrot/Pmc2c/Attribute.pm Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/lib/Parrot/Pmc2c/Attribute.pm Tue Feb 16 18:00:18 2010 (r44034)
@@ -207,7 +207,7 @@
}
elsif ($attrtype eq "INTVAL") {
$decl .= <<"EOA";
- PMC * const attr_value = pmc_new(interp, enum_class_Integer); \\
+ PMC * const attr_value = Parrot_pmc_new(interp, enum_class_Integer); \\
VTABLE_set_integer_native(interp, attr_value, value); \\
VTABLE_set_attr_str(interp, pmc, \\
Parrot_str_new_constant(interp, "$attrname"), attr_value); \\
@@ -215,7 +215,7 @@
}
elsif ($attrtype eq "FLOATVAL") {
$decl .= <<"EOA";
- PMC * const attr_value = pmc_new(interp, enum_class_Float); \\
+ PMC * const attr_value = Parrot_pmc_new(interp, enum_class_Float); \\
VTABLE_set_number_native(interp, attr_value, value); \\
VTABLE_set_attr_str(interp, pmc, \\
Parrot_str_new_constant(interp, "$attrname"), attr_value); \\
@@ -223,7 +223,7 @@
}
elsif ($attrtype =~ $isptrtostring) {
$decl .= <<"EOA";
- PMC * const attr_value = pmc_new(interp, enum_class_String); \\
+ PMC * const attr_value = Parrot_pmc_new(interp, enum_class_String); \\
VTABLE_set_string_native(interp, attr_value, value); \\
VTABLE_set_attr_str(interp, pmc, \\
Parrot_str_new_constant(interp, "$attrname"), attr_value); \\
Modified: branches/pmc_func_cleanup/lib/Parrot/Pmc2c/PMCEmitter.pm
==============================================================================
--- branches/pmc_func_cleanup/lib/Parrot/Pmc2c/PMCEmitter.pm Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/lib/Parrot/Pmc2c/PMCEmitter.pm Tue Feb 16 18:00:18 2010 (r44034)
@@ -703,7 +703,7 @@
}
/* set up MRO and _namespace */
- Parrot_create_mro(interp, entry);
+ Parrot_pmc_create_mro(interp, entry);
EOC
# declare each nci method for this class
@@ -870,7 +870,7 @@
PARROT_WARN_UNUSED_RESULT
PMC* Parrot_${classname}_get_mro(PARROT_INTERP, PMC* mro) {
if (PMC_IS_NULL(mro)) {
- mro = pmc_new(interp, enum_class_ResizableStringArray);
+ mro = Parrot_pmc_new(interp, enum_class_ResizableStringArray);
}
$get_mro
VTABLE_unshift_string(interp, mro,
Modified: branches/pmc_func_cleanup/lib/Parrot/Pmc2c/UtilFunctions.pm
==============================================================================
--- branches/pmc_func_cleanup/lib/Parrot/Pmc2c/UtilFunctions.pm Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/lib/Parrot/Pmc2c/UtilFunctions.pm Tue Feb 16 18:00:18 2010 (r44034)
@@ -163,7 +163,7 @@
int pass;
/* create a library PMC */
- pmc = constant_pmc_new(interp, enum_class_ParrotLibrary);
+ pmc = Parrot_pmc_new_constant(interp, enum_class_ParrotLibrary);
/* TODO: stuff some info into this PMC's props */
Modified: branches/pmc_func_cleanup/src/call/args.c
==============================================================================
--- branches/pmc_func_cleanup/src/call/args.c Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/src/call/args.c Tue Feb 16 18:00:18 2010 (r44034)
@@ -573,7 +573,7 @@
INTVAL arg_index;
if (PMC_IS_NULL(signature))
- call_object = pmc_new(interp, enum_class_CallContext);
+ call_object = Parrot_pmc_new(interp, enum_class_CallContext);
else
call_object = signature;
@@ -749,7 +749,7 @@
else if (VTABLE_does(interp, aggregate, CONST_STRING(interp, "hash"))) {
const INTVAL elements = VTABLE_elements(interp, aggregate);
INTVAL index;
- PMC * const key = pmc_new(interp, enum_class_Key);
+ PMC * const key = Parrot_pmc_new(interp, enum_class_Key);
VTABLE_set_integer_native(interp, key, 0);
SETATTR_Key_next_key(interp, key, (PMC *)INITBucketIndex);
@@ -799,7 +799,7 @@
INTVAL arg_count;
if (PMC_IS_NULL(signature))
- call_object = pmc_new(interp, enum_class_CallContext);
+ call_object = Parrot_pmc_new(interp, enum_class_CallContext);
/* A hack to support 'get_results' as the way of fetching the
* exception object inside an exception handler. The first argument
* in the call object is the exception, stick it directly into the
@@ -884,7 +884,7 @@
PMC *type_tuple = PMCNULL;
PMC *arg_flags = PMCNULL;
PMC *return_flags = PMCNULL;
- PMC * const call_object = pmc_new(interp, enum_class_CallContext);
+ PMC * const call_object = Parrot_pmc_new(interp, enum_class_CallContext);
const INTVAL sig_len = strlen(sig);
INTVAL in_return_sig = 0;
INTVAL i;
@@ -1087,7 +1087,7 @@
EXCEPTION_INVALID_OPERATION,
"named parameters must follow all positional parameters");
- collect_positional = pmc_new(interp,
+ collect_positional = Parrot_pmc_new(interp,
Parrot_get_ctx_HLL_type(interp, enum_class_ResizablePMCArray));
for (; arg_index < positional_args; arg_index++) {
VTABLE_push_pmc(interp, collect_positional,
@@ -1119,7 +1119,7 @@
/* Mark the name as used, cannot be filled again. */
if (PMC_IS_NULL(named_used_list)) /* Only created if needed. */
- named_used_list = pmc_new(interp, enum_class_Hash);
+ named_used_list = Parrot_pmc_new(interp, enum_class_Hash);
VTABLE_set_integer_keyed_str(interp, named_used_list, param_name, 1);
}
@@ -1242,7 +1242,7 @@
/* Collected ("slurpy") named parameter */
if (param_flags & PARROT_ARG_SLURPY_ARRAY) {
- PMC * const collect_named = pmc_new(interp,
+ PMC * const collect_named = Parrot_pmc_new(interp,
Parrot_get_ctx_HLL_type(interp, enum_class_Hash));
PMC * const named_arg_list = VTABLE_get_attr_str(interp, call_object, CONST_STRING(interp, "named"));
if (!PMC_IS_NULL(named_arg_list)) {
@@ -1260,7 +1260,7 @@
VTABLE_get_pmc_keyed_str(interp, call_object, name));
/* Mark the name as used, cannot be filled again. */
if (PMC_IS_NULL(named_used_list)) /* Only created if needed. */
- named_used_list = pmc_new(interp, enum_class_Hash);
+ named_used_list = Parrot_pmc_new(interp, enum_class_Hash);
VTABLE_set_integer_keyed_str(interp, named_used_list, name, 1);
named_count++;
}
@@ -1291,7 +1291,7 @@
/* Mark the name as used, cannot be filled again. */
if (PMC_IS_NULL(named_used_list)) /* Only created if needed. */
- named_used_list = pmc_new(interp, enum_class_Hash);
+ named_used_list = Parrot_pmc_new(interp, enum_class_Hash);
VTABLE_set_integer_keyed_str(interp, named_used_list, param_name, 1);
named_count++;
@@ -1680,7 +1680,7 @@
EXCEPTION_INVALID_OPERATION,
"named results must follow all positional results");
- collect_positional = pmc_new(interp,
+ collect_positional = Parrot_pmc_new(interp,
Parrot_get_ctx_HLL_type(interp, enum_class_ResizablePMCArray));
/* Iterate over all positional returns in the list. */
@@ -1768,7 +1768,7 @@
/* Mark the name as used, cannot be filled again. */
if (PMC_IS_NULL(named_used_list)) /* Only created if needed. */
- named_used_list = pmc_new(interp,
+ named_used_list = Parrot_pmc_new(interp,
Parrot_get_ctx_HLL_type(interp, enum_class_Hash));
VTABLE_set_integer_keyed_str(interp, named_used_list, result_name, 1);
}
@@ -1921,7 +1921,7 @@
return_flags = return_array[return_index];
if (PMC_IS_NULL(named_return_list)) /* Only created if needed. */
- named_return_list = pmc_new(interp,
+ named_return_list = Parrot_pmc_new(interp,
Parrot_get_ctx_HLL_type(interp, enum_class_Hash));
if (VTABLE_exists_keyed_str(interp, named_return_list, return_name))
@@ -1987,7 +1987,7 @@
/* Collected ("slurpy") named result */
if (result_flags & PARROT_ARG_SLURPY_ARRAY) {
if (PMC_IS_NULL(named_return_list))
- named_return_list = pmc_new(interp,
+ named_return_list = Parrot_pmc_new(interp,
Parrot_get_ctx_HLL_type(interp, enum_class_Hash));
csr_fill_pmc(interp, call_object, result_index, named_return_list);
@@ -2288,7 +2288,7 @@
INTVAL set = 0;
if (PMC_IS_NULL(*arg_flags))
- *arg_flags = pmc_new(interp, enum_class_ResizableIntegerArray);
+ *arg_flags = Parrot_pmc_new(interp, enum_class_ResizableIntegerArray);
current_array = *arg_flags;
for (x = signature; *x != '\0'; x++) {
@@ -2307,7 +2307,7 @@
/* Switch to the return argument flags. */
if (PMC_IS_NULL(*return_flags))
- *return_flags = pmc_new(interp, enum_class_ResizableIntegerArray);
+ *return_flags = Parrot_pmc_new(interp, enum_class_ResizableIntegerArray);
current_array = *return_flags;
}
/* parse arg type */
@@ -3142,7 +3142,7 @@
return_flags = VTABLE_get_attr_str(interp, sig_object, return_flags_name);
if (PMC_IS_NULL(return_flags)) {
/* Create return_flags for single element */
- return_flags = pmc_new(interp, enum_class_FixedIntegerArray);
+ return_flags = Parrot_pmc_new(interp, enum_class_FixedIntegerArray);
return_flags_size = 0;
VTABLE_set_integer_native(interp, return_flags, 1);
VTABLE_set_attr_str(interp, sig_object, return_flags_name, return_flags);
Modified: branches/pmc_func_cleanup/src/call/context.c
==============================================================================
--- branches/pmc_func_cleanup/src/call/context.c Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/src/call/context.c Tue Feb 16 18:00:18 2010 (r44034)
@@ -566,7 +566,7 @@
ARGIN_NULLOK(PMC *old))
{
ASSERT_ARGS(Parrot_alloc_context)
- PMC *pmcctx = pmc_new(interp, enum_class_CallContext);
+ PMC *pmcctx = Parrot_pmc_new(interp, enum_class_CallContext);
allocate_registers(interp, pmcctx, number_regs_used);
init_context(interp, pmcctx, old);
@@ -592,7 +592,7 @@
Parrot_pcc_allocate_empty_context(PARROT_INTERP, ARGIN_NULLOK(PMC *old))
{
ASSERT_ARGS(Parrot_pcc_allocate_empty_context)
- PMC *pmcctx = pmc_new(interp, enum_class_CallContext);
+ PMC *pmcctx = Parrot_pmc_new(interp, enum_class_CallContext);
init_context(interp, pmcctx, old);
Modified: branches/pmc_func_cleanup/src/dynext.c
==============================================================================
--- branches/pmc_func_cleanup/src/dynext.c Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/src/dynext.c Tue Feb 16 18:00:18 2010 (r44034)
@@ -155,7 +155,7 @@
{
ASSERT_ARGS(set_cstring_prop)
STRING * const key = Parrot_str_new_constant(interp, what);
- PMC * const prop = constant_Parrot_pmc_new(interp, enum_class_String);
+ PMC * const prop = Parrot_pmc_new_constant(interp, enum_class_String);
VTABLE_set_string_native(interp, prop, name);
VTABLE_setprop(interp, lib_pmc, key, prop);
@@ -396,7 +396,7 @@
/* seems to be a native/NCI lib */
if (!load_func || !lib_pmc)
- lib_pmc = constant_Parrot_pmc_new(interp, enum_class_ParrotLibrary);
+ lib_pmc = Parrot_pmc_new_constant(interp, enum_class_ParrotLibrary);
/* Call init, if it exists */
if (init_func)
@@ -532,7 +532,7 @@
make_string_pmc(PARROT_INTERP, ARGIN(STRING *string))
{
ASSERT_ARGS(make_string_pmc)
- PMC * const ret = constant_Parrot_pmc_new(interp, enum_class_String);
+ PMC * const ret = Parrot_pmc_new_constant(interp, enum_class_String);
VTABLE_set_string_native(interp, ret, string);
return ret;
@@ -576,7 +576,7 @@
* Anyways, if we hope to share bytecode at runtime, we need to have
* them have identical opcodes anyways.
*/
- PMC * const new_lib_pmc = constant_Parrot_pmc_new(d, enum_class_ParrotLibrary);
+ PMC * const new_lib_pmc = Parrot_pmc_new_constant(d, enum_class_ParrotLibrary);
PMC_data(new_lib_pmc) = handle;
VTABLE_setprop(d, new_lib_pmc, CONST_STRING(s, "_filename"), make_string_pmc(d, wo_ext));
Modified: branches/pmc_func_cleanup/src/dynpmc/dynlexpad.pmc
==============================================================================
--- branches/pmc_func_cleanup/src/dynpmc/dynlexpad.pmc Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/src/dynpmc/dynlexpad.pmc Tue Feb 16 18:00:18 2010 (r44034)
@@ -45,7 +45,7 @@
(Parrot_DynLexPad_attributes *) PMC_data(SELF);
if (VTABLE_elements(interp, lexinfo)) {
- attrs->init = pmc_new_init(interp, enum_class_LexPad, lexinfo);
+ attrs->init = Parrot_pmc_new_init(interp, enum_class_LexPad, lexinfo);
}
else
attrs->init = NULL;
Modified: branches/pmc_func_cleanup/src/dynpmc/foo.pmc
==============================================================================
--- branches/pmc_func_cleanup/src/dynpmc/foo.pmc Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/src/dynpmc/foo.pmc Tue Feb 16 18:00:18 2010 (r44034)
@@ -16,14 +16,14 @@
MULTI PMC* subtract(Integer value, PMC *dest) {
if (!dest)
- dest = pmc_new(interp, SELF->vtable->base_type);
+ dest = Parrot_pmc_new(interp, SELF->vtable->base_type);
VTABLE_set_integer_native(interp, dest, 144);
return dest;
}
MULTI PMC* subtract(DEFAULT value, PMC *dest) {
if (!dest)
- dest = pmc_new(interp, SELF->vtable->base_type);
+ dest = Parrot_pmc_new(interp, SELF->vtable->base_type);
VTABLE_set_integer_native(interp, dest, 244);
return dest;
}
Modified: branches/pmc_func_cleanup/src/dynpmc/gdbmhash.pmc
==============================================================================
--- branches/pmc_func_cleanup/src/dynpmc/gdbmhash.pmc Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/src/dynpmc/gdbmhash.pmc Tue Feb 16 18:00:18 2010 (r44034)
@@ -291,7 +291,7 @@
VTABLE PMC* get_pmc_keyed(PMC* key) {
STRING * ret_string = SELF.get_string_keyed(key);
- PMC *ret_pmc = pmc_new(interp, enum_class_String);
+ PMC *ret_pmc = Parrot_pmc_new(interp, enum_class_String);
VTABLE_set_string_native(interp, ret_pmc, ret_string);
@@ -311,7 +311,7 @@
VTABLE void set_integer_keyed(PMC* key, INTVAL value) {
PMC *temp;
- temp = pmc_new(interp, enum_class_String);
+ temp = Parrot_pmc_new(interp, enum_class_String);
VTABLE_set_integer_native(interp, temp, value);
SELF.set_pmc_keyed(key, temp);
}
@@ -330,7 +330,7 @@
VTABLE void set_number_keyed(PMC* key, FLOATVAL value) {
PMC *temp;
- temp = pmc_new(interp, enum_class_String);
+ temp = Parrot_pmc_new(interp, enum_class_String);
VTABLE_set_number_native(interp, temp, value);
SELF.set_pmc_keyed(key, temp);
}
Modified: branches/pmc_func_cleanup/src/dynpmc/rational.pmc
==============================================================================
--- branches/pmc_func_cleanup/src/dynpmc/rational.pmc Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/src/dynpmc/rational.pmc Tue Feb 16 18:00:18 2010 (r44034)
@@ -282,7 +282,7 @@
*/
VTABLE PMC *clone() {
#ifdef PARROT_HAS_GMP
- PMC * const ret = pmc_new(INTERP, SELF->vtable->base_type);
+ PMC * const ret = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
mpq_set(RT(ret), RT(SELF));
return ret;
#else
@@ -522,7 +522,7 @@
MULTI PMC *add(Rational value, PMC* dest) {
#ifdef PARROT_HAS_GMP
- dest = pmc_new(INTERP, SELF->vtable->base_type);
+ dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
mpq_add(RT(dest), RT(SELF), RT(value));
return dest;
@@ -633,7 +633,7 @@
MULTI PMC *subtract(Rational value, PMC* dest) {
#ifdef PARROT_HAS_GMP
- dest = pmc_new(INTERP, SELF->vtable->base_type);
+ dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
mpq_sub(RT(dest), RT(SELF), RT(value));
return dest;
#else
@@ -743,7 +743,7 @@
MULTI PMC *multiply(Rational value, PMC* dest) {
#ifdef PARROT_HAS_GMP
- dest = pmc_new(INTERP, SELF->vtable->base_type);
+ dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
mpq_mul(RT(dest), RT(SELF), RT(value));
return dest;
#else
@@ -853,7 +853,7 @@
MULTI PMC *divide(Rational value, PMC* dest) {
#ifdef PARROT_HAS_GMP
- dest = pmc_new(INTERP, SELF->vtable->base_type);
+ dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
mpq_div(RT(dest), RT(SELF), RT(value));
return dest;
#else
@@ -951,7 +951,7 @@
*/
VTABLE PMC *neg(PMC* dest) {
#ifdef PARROT_HAS_GMP
- dest = pmc_new(INTERP, SELF->vtable->base_type);
+ dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
mpq_neg(RT(dest), RT(SELF));
return dest;
@@ -984,7 +984,7 @@
*/
VTABLE PMC *absolute(PMC* dest) {
#ifdef PARROT_HAS_GMP
- dest = pmc_new(INTERP, SELF->vtable->base_type);
+ dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
mpq_abs(RT(dest), RT(SELF));
return dest;
Modified: branches/pmc_func_cleanup/src/extend.c
==============================================================================
--- branches/pmc_func_cleanup/src/extend.c Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/src/extend.c Tue Feb 16 18:00:18 2010 (r44034)
@@ -968,7 +968,7 @@
ASSERT_ARGS(Parrot_PMC_typenum)
Parrot_Int retval;
PARROT_CALLIN_START(interp);
- retval = pmc_type(interp, Parrot_str_new(interp, _class, 0));
+ retval = Parrot_pmc_get_type_str(interp, Parrot_str_new(interp, _class, 0));
PARROT_CALLIN_END(interp);
return retval;
}
@@ -1391,7 +1391,7 @@
{
ASSERT_ARGS(Parrot_register_pmc)
PARROT_CALLIN_START(interp);
- gc_register_pmc(interp, pmc);
+ Parrot_pmc_gc_register(interp, pmc);
PARROT_CALLIN_END(interp);
}
@@ -1412,7 +1412,7 @@
{
ASSERT_ARGS(Parrot_unregister_pmc)
PARROT_CALLIN_START(interp);
- gc_unregister_pmc(interp, pmc);
+ Parrot_pmc_gc_unregister(interp, pmc);
PARROT_CALLIN_END(interp);
}
Modified: branches/pmc_func_cleanup/src/hll.c
==============================================================================
--- branches/pmc_func_cleanup/src/hll.c Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/src/hll.c Tue Feb 16 18:00:18 2010 (r44034)
@@ -88,7 +88,7 @@
PMC *entry_id;
- PMC * const entry = constant_Parrot_pmc_new(interp, enum_class_FixedPMCArray);
+ PMC * const entry = Parrot_pmc_new_constant(interp, enum_class_FixedPMCArray);
if (entry_name && !STRING_IS_EMPTY(entry_name)) {
VTABLE_set_pmc_keyed_str(interp, hll_info, entry_name, entry);
@@ -98,7 +98,7 @@
VTABLE_set_integer_native(interp, entry, e_HLL_MAX);
- entry_id = constant_Parrot_pmc_new(interp, enum_class_Integer);
+ entry_id = Parrot_pmc_new_constant(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, entry_id, id);
VTABLE_set_pmc_keyed_int(interp, entry, e_HLL_id, entry_id);
@@ -124,7 +124,7 @@
interp->HLL_info =
Parrot_pmc_new(interp, enum_class_OrderedHash);
interp->HLL_namespace =
- constant_Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
+ Parrot_pmc_new_constant(interp, enum_class_ResizablePMCArray);
Parrot_register_HLL(interp, CONST_STRING(interp, "parrot"));
}
@@ -168,7 +168,7 @@
entry = new_hll_entry(interp, hll_name);
/* register HLL name */
- name = constant_Parrot_pmc_new(interp, enum_class_String);
+ name = Parrot_pmc_new_constant(interp, enum_class_String);
VTABLE_set_string_native(interp, name, hll_name);
VTABLE_set_pmc_keyed_int(interp, entry, e_HLL_name, name);
@@ -188,7 +188,7 @@
VTABLE_set_pmc_keyed_int(interp, interp->HLL_namespace, idx, ns_hash);
/* create HLL typemap hash */
- type_hash = constant_Parrot_pmc_new(interp, enum_class_Hash);
+ type_hash = Parrot_pmc_new_constant(interp, enum_class_Hash);
VTABLE_set_pointer(interp, type_hash, parrot_new_intval_hash(interp));
VTABLE_set_pmc_keyed_int(interp, entry, e_HLL_typemap, type_hash);
@@ -243,7 +243,7 @@
VTABLE_set_pmc_keyed_int(interp, entry, e_HLL_name, PMCNULL);
/* register dynlib */
- name = constant_Parrot_pmc_new(interp, enum_class_String);
+ name = Parrot_pmc_new_constant(interp, enum_class_String);
VTABLE_set_string_native(interp, name, hll_lib);
VTABLE_set_pmc_keyed_int(interp, entry, e_HLL_lib, name);
Modified: branches/pmc_func_cleanup/src/interp/inter_cb.c
==============================================================================
--- branches/pmc_func_cleanup/src/interp/inter_cb.c Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/src/interp/inter_cb.c Tue Feb 16 18:00:18 2010 (r44034)
@@ -110,7 +110,7 @@
Parrot_ex_throw_from_c_args(interp, NULL, 1,
"unhandled signature '%Ss' in make_cb", cb_signature);
- cb_sig = pmc_new(interp, enum_class_String);
+ cb_sig = Parrot_pmc_new(interp, enum_class_String);
VTABLE_set_string_native(interp, cb_sig, cb_signature);
sc = CONST_STRING(interp, "_signature");
VTABLE_setprop(interp, user_data, sc, cb_sig);
@@ -122,14 +122,14 @@
* we need to anchor it.
*
*/
- gc_register_pmc(interp, user_data);
+ Parrot_pmc_gc_register(interp, user_data);
/*
* Finally, the external lib awaits a function pointer.
* Create a PMC that points to Parrot_callback_C (or _D);
* it can be passed on with signature 'p'.
*/
- cb = pmc_new(interp, enum_class_UnManagedStruct);
+ cb = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
/*
* Currently, we handle only 2 types:
* _C ... user_data is 2nd parameter
@@ -139,7 +139,7 @@
VTABLE_set_pointer(interp, cb, F2DPTR(Parrot_callback_C));
else
VTABLE_set_pointer(interp, cb, F2DPTR(Parrot_callback_D));
- gc_register_pmc(interp, cb);
+ Parrot_pmc_gc_register(interp, cb);
return cb;
}
@@ -345,7 +345,7 @@
#endif
case 'p':
/* created a UnManagedStruct */
- p_param = pmc_new(interp, enum_class_UnManagedStruct);
+ p_param = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
VTABLE_set_pointer(interp, p_param, external_data);
pasm_sig[1] = 'P';
param = (void*) p_param;
Modified: branches/pmc_func_cleanup/src/interp/inter_create.c
==============================================================================
--- branches/pmc_func_cleanup/src/interp/inter_create.c Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/src/interp/inter_create.c Tue Feb 16 18:00:18 2010 (r44034)
@@ -289,11 +289,11 @@
interp->code = NULL;
/* create the root set registry */
- interp->gc_registry = pmc_new(interp, enum_class_AddrRegistry);
+ interp->gc_registry = Parrot_pmc_new(interp, enum_class_AddrRegistry);
/* And a dynamic environment stack */
/* TODO: We should really consider removing this (TT #876) */
- interp->dynamic_env = pmc_new(interp, enum_class_ResizablePMCArray);
+ interp->dynamic_env = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
/* create exceptions list */
interp->current_runloop_id = 0;
Modified: branches/pmc_func_cleanup/src/interp/inter_misc.c
==============================================================================
--- branches/pmc_func_cleanup/src/interp/inter_misc.c Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/src/interp/inter_misc.c Tue Feb 16 18:00:18 2010 (r44034)
@@ -51,7 +51,7 @@
ARGIN(const char *name), ARGIN(const char *proto))
{
ASSERT_ARGS(register_nci_method)
- PMC * const method = pmc_new(interp, enum_class_NCI);
+ PMC * const method = Parrot_pmc_new(interp, enum_class_NCI);
STRING * const method_name = string_make(interp, name, strlen(name),
NULL, PObj_constant_FLAG|PObj_external_FLAG);
@@ -84,7 +84,7 @@
ARGIN(STRING *name))
{
ASSERT_ARGS(register_raw_nci_method_in_ns)
- PMC * const method = pmc_new(interp, enum_class_NCI);
+ PMC * const method = Parrot_pmc_new(interp, enum_class_NCI);
/* setup call func */
VTABLE_set_pointer(interp, method, func);
@@ -111,7 +111,7 @@
{
ASSERT_ARGS(Parrot_mark_method_writes)
STRING *const str_name = Parrot_str_new_constant(interp, name);
- PMC *const pmc_true = pmc_new(interp, enum_class_Integer);
+ PMC *const pmc_true = Parrot_pmc_new(interp, enum_class_Integer);
PMC *const method = VTABLE_get_pmc_keyed_str(
interp, interp->vtables[type]->_namespace, str_name);
VTABLE_set_integer_native(interp, pmc_true, 1);
@@ -136,13 +136,13 @@
{
ASSERT_ARGS(Parrot_compreg)
PMC* const iglobals = interp->iglobals;
- PMC *nci = pmc_new(interp, enum_class_NCI);
+ PMC *nci = Parrot_pmc_new(interp, enum_class_NCI);
STRING *sc = CONST_STRING(interp, "PJt");
PMC *hash = VTABLE_get_pmc_keyed_int(interp, interp->iglobals,
IGLOBALS_COMPREG_HASH);
if (!hash) {
- hash = pmc_new_noinit(interp, enum_class_Hash);
+ hash = Parrot_pmc_new_noinit(interp, enum_class_Hash);
VTABLE_init(interp, hash);
VTABLE_set_pmc_keyed_int(interp, iglobals,
(INTVAL)IGLOBALS_COMPREG_HASH, hash);
Modified: branches/pmc_func_cleanup/src/io/api.c
==============================================================================
--- branches/pmc_func_cleanup/src/io/api.c Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/src/io/api.c Tue Feb 16 18:00:18 2010 (r44034)
@@ -89,7 +89,7 @@
Parrot_io_new_pmc(PARROT_INTERP, INTVAL flags)
{
ASSERT_ARGS(Parrot_io_new_pmc)
- PMC * const new_io = pmc_new(interp, enum_class_FileHandle);
+ PMC * const new_io = Parrot_pmc_new(interp, enum_class_FileHandle);
Parrot_io_set_flags(interp, new_io, flags);
@@ -125,7 +125,7 @@
if (PMC_IS_NULL(pmc)) {
/* TODO: We should look up the HLL mapped type, instead of always
using FileHandle here */
- new_filehandle = pmc_new(interp, enum_class_FileHandle);
+ new_filehandle = Parrot_pmc_new(interp, enum_class_FileHandle);
PARROT_ASSERT(new_filehandle->vtable->base_type == enum_class_FileHandle);
}
else
Modified: branches/pmc_func_cleanup/src/io/socket_api.c
==============================================================================
--- branches/pmc_func_cleanup/src/io/socket_api.c Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/src/io/socket_api.c Tue Feb 16 18:00:18 2010 (r44034)
@@ -346,7 +346,7 @@
Parrot_io_new_socket_pmc(PARROT_INTERP, INTVAL flags)
{
ASSERT_ARGS(Parrot_io_new_socket_pmc)
- PMC * const new_io = pmc_new(interp, enum_class_Socket);
+ PMC * const new_io = Parrot_pmc_new(interp, enum_class_Socket);
Parrot_io_set_flags(interp, new_io, flags);
Modified: branches/pmc_func_cleanup/src/io/socket_unix.c
==============================================================================
--- branches/pmc_func_cleanup/src/io/socket_unix.c Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/src/io/socket_unix.c Tue Feb 16 18:00:18 2010 (r44034)
@@ -102,7 +102,7 @@
ASSERT_ARGS(Parrot_io_sockaddr_in)
char * const s = Parrot_str_to_cstring(interp, addr);
- PMC * const sockaddr = pmc_new(interp, enum_class_Sockaddr);
+ PMC * const sockaddr = Parrot_pmc_new(interp, enum_class_Sockaddr);
get_sockaddr_in(interp, sockaddr, s, port);
Parrot_str_free_cstring(s);
@@ -258,7 +258,7 @@
int newsock;
PARROT_SOCKET(newio)->local = PARROT_SOCKET(socket)->local;
- PARROT_SOCKET(newio)->remote = pmc_new(interp, enum_class_Sockaddr);
+ PARROT_SOCKET(newio)->remote = Parrot_pmc_new(interp, enum_class_Sockaddr);
saddr = SOCKADDR_REMOTE(newio);
newsock = accept(io->os_handle, (struct sockaddr *)saddr, &addrlen);
Modified: branches/pmc_func_cleanup/src/io/socket_win32.c
==============================================================================
--- branches/pmc_func_cleanup/src/io/socket_win32.c Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/src/io/socket_win32.c Tue Feb 16 18:00:18 2010 (r44034)
@@ -205,7 +205,7 @@
int newsock;
PARROT_SOCKET(newio)->local = PARROT_SOCKET(socket)->local;
- PARROT_SOCKET(newio)->remote = pmc_new(interp, enum_class_Sockaddr);
+ PARROT_SOCKET(newio)->remote = Parrot_pmc_new(interp, enum_class_Sockaddr);
saddr = SOCKADDR_REMOTE(newio);
newsock = accept((int)io->os_handle, (struct sockaddr *)saddr, &addrlen);
@@ -445,7 +445,7 @@
ASSERT_ARGS(Parrot_io_sockaddr_in)
PMC * sockaddr;
char * const s = Parrot_str_to_cstring(interp, addr);
- sockaddr = pmc_new(interp, enum_class_Sockaddr);
+ sockaddr = Parrot_pmc_new(interp, enum_class_Sockaddr);
get_sockaddr_in(interp, sockaddr, s, port);
Parrot_str_free_cstring(s);
return sockaddr;
Modified: branches/pmc_func_cleanup/src/multidispatch.c
==============================================================================
--- branches/pmc_func_cleanup/src/multidispatch.c Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/src/multidispatch.c Tue Feb 16 18:00:18 2010 (r44034)
@@ -442,7 +442,7 @@
mmd_build_type_tuple_from_type_list(PARROT_INTERP, ARGIN(PMC *type_list))
{
ASSERT_ARGS(mmd_build_type_tuple_from_type_list)
- PMC *multi_sig = constant_Parrot_pmc_new(interp, enum_class_FixedIntegerArray);
+ PMC *multi_sig = Parrot_pmc_new_constant(interp, enum_class_FixedIntegerArray);
INTVAL param_count = VTABLE_elements(interp, type_list);
INTVAL i;
@@ -461,7 +461,7 @@
else if (Parrot_str_equal(interp, type_name, CONST_STRING(interp, "FLOATVAL")))
type = enum_type_FLOATVAL;
else
- type = pmc_type(interp, type_name);
+ type = Parrot_pmc_get_type_str(interp, type_name);
VTABLE_set_integer_keyed_int(interp, multi_sig, i, type);
}
@@ -633,7 +633,7 @@
if (!sig)
return PMCNULL;
- type = pmc_type(interp, sig);
+ type = Parrot_pmc_get_type_str(interp, sig);
if (type == enum_type_undef)
return PMCNULL;
@@ -642,7 +642,7 @@
type = VTABLE_get_integer(interp, sig_elem);
}
else
- type = pmc_type_p(interp, sig_elem);
+ type = Parrot_pmc_get_type(interp, sig_elem);
/* create destination PMC only as necessary */
if (PMC_IS_NULL(ar)) {
@@ -1061,7 +1061,7 @@
PMC *multi_sub = Parrot_get_global(interp, ns, sub_name);
if (PMC_IS_NULL(multi_sub)) {
- multi_sub = constant_Parrot_pmc_new(interp, enum_class_MultiSub);
+ multi_sub = Parrot_pmc_new_constant(interp, enum_class_MultiSub);
Parrot_set_global(interp, ns, sub_name, multi_sub);
}
@@ -1094,7 +1094,7 @@
PMC *multi_sub = Parrot_get_global(interp, ns, sub_name);
if (PMC_IS_NULL(multi_sub)) {
- multi_sub = constant_Parrot_pmc_new(interp, enum_class_MultiSub);
+ multi_sub = Parrot_pmc_new_constant(interp, enum_class_MultiSub);
Parrot_set_global(interp, ns, sub_name, multi_sub);
}
@@ -1172,7 +1172,7 @@
STRING *ns_name = VTABLE_get_string_keyed_int(interp, type_list, 0);
/* Create an NCI sub for the C function */
- PMC *sub_obj = constant_Parrot_pmc_new(interp, enum_class_NCI);
+ PMC *sub_obj = Parrot_pmc_new_constant(interp, enum_class_NCI);
PMC *multi_sig = mmd_build_type_tuple_from_long_sig(interp,
long_sig_str);
@@ -1219,7 +1219,7 @@
STRING *ns_name = mmd_info[i].ns_name;
/* Create an NCI sub for the C function */
- PMC *sub_obj = constant_Parrot_pmc_new(interp, enum_class_NCI);
+ PMC *sub_obj = Parrot_pmc_new_constant(interp, enum_class_NCI);
VTABLE_set_pointer_keyed_str(interp, sub_obj, short_sig,
F2DPTR(func_ptr));
Modified: branches/pmc_func_cleanup/src/oo.c
==============================================================================
--- branches/pmc_func_cleanup/src/oo.c Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/src/oo.c Tue Feb 16 18:00:18 2010 (r44034)
@@ -236,9 +236,9 @@
if (base_type == enum_class_Key
|| base_type == enum_class_ResizableStringArray
|| base_type == enum_class_String)
- type = pmc_type_p(interp, key);
+ type = Parrot_pmc_get_type(interp, key);
else
- type = pmc_type(interp, VTABLE_get_string(interp, key));
+ type = Parrot_pmc_get_type_str(interp, VTABLE_get_string(interp, key));
classobj = get_pmc_proxy(interp, type);
}
@@ -411,7 +411,7 @@
/* If not found, check for a PMC */
if (PMC_IS_NULL(_class))
- return get_pmc_proxy(interp, pmc_type(interp, name));
+ return get_pmc_proxy(interp, Parrot_pmc_get_type_str(interp, name));
else
return _class;
}
@@ -678,7 +678,7 @@
* pt_shared_fixup() can safely do a type lookup. */
LOCK_INTERPRETER(interp);
{
- type = get_new_vtable_index(interp);
+ type = Parrot_pmc_get_new_vtable_index(interp);
}
{
if (!typeid_exists) {
@@ -874,7 +874,7 @@
return;
}
- type = pmc_type(interp, _class);
+ type = Parrot_pmc_get_type_str(interp, _class);
if (type == 0)
invalidate_all_caches(interp);
Modified: branches/pmc_func_cleanup/src/ops/bit.ops
==============================================================================
--- branches/pmc_func_cleanup/src/ops/bit.ops Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/src/ops/bit.ops Tue Feb 16 18:00:18 2010 (r44034)
@@ -172,7 +172,7 @@
inline op bnot(out PMC, invar PMC) :base_core {
const INTVAL a = VTABLE_get_integer(interp, $2);
- PMC * const b = pmc_new(interp, VTABLE_type(interp, $2));
+ PMC * const b = Parrot_pmc_new(interp, VTABLE_type(interp, $2));
VTABLE_set_integer_native(interp, b, ~a);
$1 = b;
}
Modified: branches/pmc_func_cleanup/src/ops/cmp.ops
==============================================================================
--- branches/pmc_func_cleanup/src/ops/cmp.ops Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/src/ops/cmp.ops Tue Feb 16 18:00:18 2010 (r44034)
@@ -87,15 +87,15 @@
}
op eq(invar PMC, in INT, inconst LABEL) :base_core {
- PMC * temp = temporary_pmc_new(interp, enum_class_Integer);
+ PMC * temp = Parrot_pmc_new_temporary(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, temp, $2);
if (VTABLE_is_equal(interp, $1, temp)) {
- temporary_pmc_free(interp, temp);
+ Parrot_pmc_free_temporary(interp, temp);
goto OFFSET($3);
}
- temporary_pmc_free(interp, temp);
+ Parrot_pmc_free_temporary(interp, temp);
}
op eq(invar PMC, in NUM, inconst LABEL) :base_core {
@@ -193,15 +193,15 @@
}
op ne(invar PMC, in INT, inconst LABEL) :base_core {
- PMC * temp = temporary_pmc_new(interp, enum_class_Integer);
+ PMC * temp = Parrot_pmc_new_temporary(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, temp, $2);
if (!VTABLE_is_equal(interp, $1, temp)) {
- temporary_pmc_free(interp, temp);
+ Parrot_pmc_free_temporary(interp, temp);
goto OFFSET($3);
}
- temporary_pmc_free(interp, temp);
+ Parrot_pmc_free_temporary(interp, temp);
}
op ne(invar PMC, in NUM, inconst LABEL) :base_core {
@@ -289,15 +289,15 @@
}
op lt(invar PMC, in INT, inconst LABEL) :base_core {
- PMC * temp = temporary_pmc_new(interp, enum_class_Integer);
+ PMC * temp = Parrot_pmc_new_temporary(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, temp, $2);
if (VTABLE_cmp(interp, $1, temp) < 0) {
- temporary_pmc_free(interp, temp);
+ Parrot_pmc_free_temporary(interp, temp);
goto OFFSET($3);
}
- temporary_pmc_free(interp, temp);
+ Parrot_pmc_free_temporary(interp, temp);
}
op lt(invar PMC, in NUM, inconst LABEL) :base_core {
@@ -373,15 +373,15 @@
}
op le(invar PMC, in INT, inconst LABEL) :base_core {
- PMC * temp = temporary_pmc_new(interp, enum_class_Integer);
+ PMC * temp = Parrot_pmc_new_temporary(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, temp, $2);
if (VTABLE_cmp(interp, $1, temp) <= 0) {
- temporary_pmc_free(interp, temp);
+ Parrot_pmc_free_temporary(interp, temp);
goto OFFSET($3);
}
- temporary_pmc_free(interp, temp);
+ Parrot_pmc_free_temporary(interp, temp);
}
op le(invar PMC, in NUM, inconst LABEL) :base_core {
@@ -433,15 +433,15 @@
}
op gt(invar PMC, in INT, inconst LABEL) :base_core {
- PMC * temp = temporary_pmc_new(interp, enum_class_Integer);
+ PMC * temp = Parrot_pmc_new_temporary(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, temp, $2);
if (VTABLE_cmp(interp, $1, temp) > 0) {
- temporary_pmc_free(interp, temp);
+ Parrot_pmc_free_temporary(interp, temp);
goto OFFSET($3);
}
- temporary_pmc_free(interp, temp);
+ Parrot_pmc_free_temporary(interp, temp);
}
op gt(invar PMC, in NUM, inconst LABEL) :base_core {
@@ -493,15 +493,15 @@
}
op ge(invar PMC, in INT, inconst LABEL) :base_core {
- PMC * temp = temporary_pmc_new(interp, enum_class_Integer);
+ PMC * temp = Parrot_pmc_new_temporary(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, temp, $2);
if (VTABLE_cmp(interp, $1, temp) >= 0) {
- temporary_pmc_free(interp, temp);
+ Parrot_pmc_free_temporary(interp, temp);
goto OFFSET($3);
}
- temporary_pmc_free(interp, temp);
+ Parrot_pmc_free_temporary(interp, temp);
}
op ge(invar PMC, in NUM, inconst LABEL) :base_core {
Modified: branches/pmc_func_cleanup/src/ops/core.ops
==============================================================================
--- branches/pmc_func_cleanup/src/ops/core.ops Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/src/ops/core.ops Tue Feb 16 18:00:18 2010 (r44034)
@@ -606,7 +606,7 @@
/* If no elements, hand back empty array; otherwise PMC. */
if (!sig)
- $1 = pmc_new(interp, enum_class_FixedIntegerArray);
+ $1 = Parrot_pmc_new(interp, enum_class_FixedIntegerArray);
else
$1 = sig;
}
@@ -758,7 +758,7 @@
=cut
inline op push_eh(inconst LABEL) {
- PMC * const eh = pmc_new(interp, enum_class_ExceptionHandler);
+ PMC * const eh = Parrot_pmc_new(interp, enum_class_ExceptionHandler);
VTABLE_set_pointer(interp, eh, CUR_OPCODE + $1);
Parrot_cx_add_handler_local(interp, eh);
}
@@ -874,7 +874,7 @@
}
inline op pushmark(in INT) {
- PMC * const newint = pmc_new(interp, enum_class_Integer);
+ PMC * const newint = Parrot_pmc_new(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, newint, $1);
VTABLE_push_pmc(interp, interp->dynamic_env, newint);
}
@@ -1319,10 +1319,10 @@
const char * err = Parrot_dlerror();
Parrot_warn(interp, PARROT_WARNINGS_UNDEF_FLAG,
"Symbol '%s' not found: %s\n", name, err ? err : "unknown reason");
- $1 = pmc_new(interp, enum_class_Undef);
+ $1 = Parrot_pmc_new(interp, enum_class_Undef);
}
else {
- $1 = pmc_new(interp, enum_class_NCI);
+ $1 = Parrot_pmc_new(interp, enum_class_NCI);
VTABLE_set_pointer_keyed_str(interp, $1, $4, F2DPTR(p));
PObj_get_FLAGS($1) |= PObj_private1_FLAG;
}
@@ -1342,12 +1342,12 @@
const char * const err = Parrot_dlerror();
Parrot_warn(interp, PARROT_WARNINGS_UNDEF_FLAG,
"Symbol '%s' not found: %s\n", name, err ? err : "unknown reason");
- $1 = pmc_new(interp, enum_class_Undef);
+ $1 = Parrot_pmc_new(interp, enum_class_Undef);
}
else {
/* At this point we have the symbol's address. We just need to build
a PMC with it so we can get and set the value */
- $1 = pmc_new(interp, enum_class_UnManagedStruct);
+ $1 = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
VTABLE_set_pointer(interp, $1, p);
}
Parrot_str_free_cstring(name);
@@ -1399,7 +1399,7 @@
cur_pos, NULL);
}
else {
- $1 = pmc_new(interp, enum_class_Hash);
+ $1 = Parrot_pmc_new(interp, enum_class_Hash);
}
goto NEXT();
}
Modified: branches/pmc_func_cleanup/src/ops/experimental.ops
==============================================================================
--- branches/pmc_func_cleanup/src/ops/experimental.ops Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/src/ops/experimental.ops Tue Feb 16 18:00:18 2010 (r44034)
@@ -98,7 +98,7 @@
if (!PMC_IS_NULL(classobj))
$1 = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = pmc_type_p(interp, $4);
+ const INTVAL type = Parrot_pmc_get_type(interp, $4);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
interp, expr NEXT(), EXCEPTION_NO_CLASS,
@@ -106,7 +106,7 @@
goto ADDRESS(dest);
}
- $1 = pmc_new(interp, type);
+ $1 = Parrot_pmc_new(interp, type);
}
}
}
@@ -118,7 +118,7 @@
if (!PMC_IS_NULL(classobj))
$1 = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = pmc_type_p(interp, $4);
+ const INTVAL type = Parrot_pmc_get_type(interp, $4);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
interp, expr NEXT(), EXCEPTION_NO_CLASS,
@@ -126,7 +126,7 @@
goto ADDRESS(dest);
}
- $1 = pmc_new(interp, type);
+ $1 = Parrot_pmc_new(interp, type);
}
}
}
@@ -138,7 +138,7 @@
if (!PMC_IS_NULL(classobj))
$1 = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = pmc_type_p(interp, $4);
+ const INTVAL type = Parrot_pmc_get_type(interp, $4);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
interp, expr NEXT(), EXCEPTION_NO_CLASS,
@@ -146,7 +146,7 @@
goto ADDRESS(dest);
}
- $1 = pmc_new(interp, type);
+ $1 = Parrot_pmc_new(interp, type);
}
}
}
@@ -175,7 +175,7 @@
if (!PMC_IS_NULL(classobj))
$1 = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = pmc_type_p(interp, $4);
+ const INTVAL type = Parrot_pmc_get_type(interp, $4);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
interp, expr NEXT(), EXCEPTION_NO_CLASS,
@@ -183,7 +183,7 @@
goto ADDRESS(dest);
}
- $1 = pmc_new(interp, type);
+ $1 = Parrot_pmc_new(interp, type);
}
VTABLE_set_pmc_keyed(interp, $2, $3, $1);
}
@@ -197,7 +197,7 @@
if (!PMC_IS_NULL(classobj))
$1 = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = pmc_type_p(interp, $4);
+ const INTVAL type = Parrot_pmc_get_type(interp, $4);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
interp, expr NEXT(), EXCEPTION_NO_CLASS,
@@ -205,7 +205,7 @@
goto ADDRESS(dest);
}
- $1 = pmc_new(interp, type);
+ $1 = Parrot_pmc_new(interp, type);
}
VTABLE_set_pmc_keyed_int(interp, $2, $3, $1);
@@ -220,7 +220,7 @@
if (!PMC_IS_NULL(classobj))
$1 = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = pmc_type_p(interp, $4);
+ const INTVAL type = Parrot_pmc_get_type(interp, $4);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
interp, expr NEXT(), EXCEPTION_NO_CLASS,
@@ -228,7 +228,7 @@
goto ADDRESS(dest);
}
- $1 = pmc_new(interp, type);
+ $1 = Parrot_pmc_new(interp, type);
}
VTABLE_set_pmc_keyed_str(interp, $2, $3, $1);
Modified: branches/pmc_func_cleanup/src/ops/io.ops
==============================================================================
--- branches/pmc_func_cleanup/src/ops/io.ops Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/src/ops/io.ops Tue Feb 16 18:00:18 2010 (r44034)
@@ -54,7 +54,7 @@
inline op fdopen(out PMC, in INT, in STR) :filesys_open {
$1 = Parrot_io_fdopen(interp, PMCNULL, (PIOHANDLE)$2, $3);
if (!$1)
- $1 = pmc_new(interp, enum_class_Undef);
+ $1 = Parrot_pmc_new(interp, enum_class_Undef);
}
=item B<getstdin>(out PMC)
Modified: branches/pmc_func_cleanup/src/ops/math.ops
==============================================================================
--- branches/pmc_func_cleanup/src/ops/math.ops Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/src/ops/math.ops Tue Feb 16 18:00:18 2010 (r44034)
@@ -205,7 +205,7 @@
result = VTABLE_get_integer(interp, $2) % $3;
- $1 = pmc_new(interp, VTABLE_type(interp, $2));
+ $1 = Parrot_pmc_new(interp, VTABLE_type(interp, $2));
VTABLE_set_integer_native(interp, $1, result);
}
@@ -222,7 +222,7 @@
result = VTABLE_get_integer(interp, $2) % value;
- $1 = pmc_new(interp, VTABLE_type(interp, $2));
+ $1 = Parrot_pmc_new(interp, VTABLE_type(interp, $2));
VTABLE_set_integer_native(interp, $1, result);
}
@@ -283,7 +283,7 @@
result = fmod(VTABLE_get_integer(interp, $2), value);
- $1 = pmc_new(interp, VTABLE_type(interp, $2));
+ $1 = Parrot_pmc_new(interp, VTABLE_type(interp, $2));
VTABLE_set_integer_native(interp, $1, (INTVAL) result);
}
@@ -816,9 +816,9 @@
const FLOATVAL b = VTABLE_get_number(interp, $3);
const FLOATVAL c = pow(a, b);
if (PMC_IS_NULL($1))
- $1 = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Float));
+ $1 = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Float));
else
- $1 = pmc_new(interp, $1->vtable->base_type);
+ $1 = Parrot_pmc_new(interp, $1->vtable->base_type);
VTABLE_set_number_native(interp, $1, c);
}
@@ -827,9 +827,9 @@
const FLOATVAL b = (FLOATVAL)$3;
const FLOATVAL c = pow(a, b);
if (PMC_IS_NULL($1))
- $1 = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Float));
+ $1 = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Float));
else
- $1 = pmc_new(interp, $1->vtable->base_type);
+ $1 = Parrot_pmc_new(interp, $1->vtable->base_type);
VTABLE_set_number_native(interp, $1, c);
}
@@ -837,9 +837,9 @@
const FLOATVAL a = VTABLE_get_number(interp, $2);
const FLOATVAL c = pow(a, $3);
if (PMC_IS_NULL($1))
- $1 = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Float));
+ $1 = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Float));
else
- $1 = pmc_new(interp, $1->vtable->base_type);
+ $1 = Parrot_pmc_new(interp, $1->vtable->base_type);
VTABLE_set_number_native(interp, $1, c);
}
Modified: branches/pmc_func_cleanup/src/ops/object.ops
==============================================================================
--- branches/pmc_func_cleanup/src/ops/object.ops Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/src/ops/object.ops Tue Feb 16 18:00:18 2010 (r44034)
@@ -236,13 +236,13 @@
=cut
inline op newclass(out PMC, in STR) :object_classes {
- PMC * const name = pmc_new(interp, enum_class_String);
+ PMC * const name = Parrot_pmc_new(interp, enum_class_String);
VTABLE_set_string_native(interp, name, $2);
- $1 = pmc_new_init(interp, enum_class_Class, name);
+ $1 = Parrot_pmc_new_init(interp, enum_class_Class, name);
}
inline op newclass(out PMC, in PMC) :object_classes {
- $1 = pmc_new_init(interp, enum_class_Class, $2);
+ $1 = Parrot_pmc_new_init(interp, enum_class_Class, $2);
}
=item B<subclass>(out PMC, in PMC)
@@ -267,7 +267,7 @@
"Class '%Ss' doesn't exist", VTABLE_get_string(interp, $2));
goto ADDRESS(handler);
}
- $1 = pmc_new(interp, enum_class_Class);
+ $1 = Parrot_pmc_new(interp, enum_class_Class);
VTABLE_add_parent(interp, $1, parent_class);
goto ADDRESS(next);
}
@@ -297,7 +297,7 @@
"Class '%Ss' doesn't exist", VTABLE_get_string(interp, $2));
goto ADDRESS(handler);
}
- $1 = pmc_new_init(interp, enum_class_Class, $3);
+ $1 = Parrot_pmc_new_init(interp, enum_class_Class, $3);
VTABLE_add_parent(interp, $1, parent_class);
goto ADDRESS(next);
}
@@ -326,7 +326,7 @@
goto ADDRESS(handler);
}
- $1 = pmc_new(interp, enum_class_Class);
+ $1 = Parrot_pmc_new(interp, enum_class_Class);
VTABLE_add_parent(interp, $1, parent_class);
goto ADDRESS(next);
}
@@ -358,7 +358,7 @@
goto ADDRESS(handler);
}
- $1 = pmc_new_init(interp, enum_class_Class, $3);
+ $1 = Parrot_pmc_new_init(interp, enum_class_Class, $3);
VTABLE_add_parent(interp, $1, parent_class);
goto ADDRESS(next);
}
Modified: branches/pmc_func_cleanup/src/ops/pmc.ops
==============================================================================
--- branches/pmc_func_cleanup/src/ops/pmc.ops Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/src/ops/pmc.ops Tue Feb 16 18:00:18 2010 (r44034)
@@ -58,14 +58,14 @@
if (!PMC_IS_NULL(_class))
$1 = VTABLE_instantiate(interp, _class, PMCNULL);
else {
- const INTVAL type = pmc_type(interp, name);
+ const INTVAL type = Parrot_pmc_get_type_str(interp, name);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(interp, expr NEXT(),
EXCEPTION_NO_CLASS,
"Class '%Ss' not found", name);
goto ADDRESS(dest);
}
- $1 = pmc_new(interp, type);
+ $1 = Parrot_pmc_new(interp, type);
}
}
@@ -78,14 +78,14 @@
if (!PMC_IS_NULL(_class))
$1 = VTABLE_instantiate(interp, _class, $3);
else {
- const INTVAL type = pmc_type(interp, name);
+ const INTVAL type = Parrot_pmc_get_type_str(interp, name);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(interp, expr NEXT(),
EXCEPTION_NO_CLASS,
"Class '%Ss' not found", name);
goto ADDRESS(dest);
}
- $1 = pmc_new_init(interp, type, $3);
+ $1 = Parrot_pmc_new_init(interp, type, $3);
}
}
@@ -96,14 +96,14 @@
if (!PMC_IS_NULL(_class))
$1 = VTABLE_instantiate(interp, _class, PMCNULL);
else {
- const INTVAL type = pmc_type_p(interp, name_key);
+ const INTVAL type = Parrot_pmc_get_type(interp, name_key);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(interp, expr NEXT(),
EXCEPTION_NO_CLASS,
"Class '%Ss' not found", VTABLE_get_repr(interp, name_key));
goto ADDRESS(dest);
}
- $1 = pmc_new(interp, type);
+ $1 = Parrot_pmc_new(interp, type);
}
}
@@ -114,14 +114,14 @@
if (!PMC_IS_NULL(_class))
$1 = VTABLE_instantiate(interp, _class, $3);
else {
- const INTVAL type = pmc_type_p(interp, name_key);
+ const INTVAL type = Parrot_pmc_get_type(interp, name_key);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(interp, expr NEXT(),
EXCEPTION_NO_CLASS,
"Class '%Ss' not found", VTABLE_get_repr(interp, name_key));
goto ADDRESS(dest);
}
- $1 = pmc_new_init(interp, type, $3);
+ $1 = Parrot_pmc_new_init(interp, type, $3);
}
}
@@ -627,11 +627,11 @@
=cut
op register(invar PMC) {
- gc_register_pmc(interp, $1);
+ Parrot_pmc_gc_register(interp, $1);
}
op unregister(invar PMC) {
- gc_unregister_pmc(interp, $1);
+ Parrot_pmc_gc_unregister(interp, $1);
}
@@ -648,17 +648,17 @@
=cut
op box(out PMC, in INT) {
- $1 = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Integer));
+ $1 = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Integer));
VTABLE_set_integer_native(interp, $1, $2);
}
op box(out PMC, in NUM) {
- $1 = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Float));
+ $1 = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Float));
VTABLE_set_number_native(interp, $1, $2);
}
op box(out PMC, in STR) {
- $1 = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_String));
+ $1 = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_String));
VTABLE_set_string_native(interp, $1, $2);
}
Modified: branches/pmc_func_cleanup/src/packfile.c
==============================================================================
--- branches/pmc_func_cleanup/src/packfile.c Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/src/packfile.c Tue Feb 16 18:00:18 2010 (r44034)
@@ -4059,11 +4059,11 @@
opcode_t op;
if (tail) {
- SETATTR_Key_next_key(interp, tail, constant_Parrot_pmc_new(interp, pmc_enum));
+ SETATTR_Key_next_key(interp, tail, Parrot_pmc_new_constant(interp, pmc_enum));
GETATTR_Key_next_key(interp, tail, tail);
}
else
- head = tail = constant_Parrot_pmc_new(interp, pmc_enum);
+ head = tail = Parrot_pmc_new_constant(interp, pmc_enum);
op = PF_fetch_opcode(pf, &cursor);
Modified: branches/pmc_func_cleanup/src/pmc.c
==============================================================================
--- branches/pmc_func_cleanup/src/pmc.c Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/src/pmc.c Tue Feb 16 18:00:18 2010 (r44034)
@@ -46,7 +46,7 @@
__attribute__nonnull__(1);
PARROT_CANNOT_RETURN_NULL
-static PMC* pmc_reuse_no_init(PARROT_INTERP,
+static PMC* Parrot_pmc_reuse_noinit(PARROT_INTERP,
ARGIN(PMC *pmc),
INTVAL new_type,
SHIM(UINTVAL flags))
@@ -59,7 +59,7 @@
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_get_new_pmc_header __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_pmc_reuse_no_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_reuse_noinit __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(pmc))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
@@ -169,7 +169,7 @@
/*
-=item C<PMC * pmc_reuse(PARROT_INTERP, PMC *pmc, INTVAL new_type, UINTVAL
+=item C<PMC * Parrot_pmc_reuse(PARROT_INTERP, PMC *pmc, INTVAL new_type, UINTVAL
flags)>
Reuse an existing PMC, turning it into an empty PMC of the new type. Any
@@ -188,11 +188,11 @@
PARROT_CANNOT_RETURN_NULL
PARROT_IGNORABLE_RESULT
PMC *
-pmc_reuse(PARROT_INTERP, ARGIN(PMC *pmc), INTVAL new_type,
- UINTVAL flags)
+Parrot_pmc_reuse(PARROT_INTERP, ARGIN(PMC *pmc), INTVAL new_type,
+ UINTVAL flags)
{
- ASSERT_ARGS(pmc_reuse)
- pmc = pmc_reuse_no_init(interp, pmc, new_type, flags);
+ ASSERT_ARGS(Parrot_pmc_reuse)
+ pmc = Parrot_pmc_reuse_noinit(interp, pmc, new_type, flags);
/* Call the base init for the redone pmc. Warning, this should not
be called on Object PMCs. */
@@ -203,8 +203,8 @@
/*
-=item C<PMC * pmc_reuse_init(PARROT_INTERP, PMC *pmc, INTVAL new_type, PMC
-*init, UINTVAL flags)>
+=item C<PMC * Parrot_pmc_reuse_init(PARROT_INTERP, PMC *pmc, INTVAL new_type,
+PMC *init, UINTVAL flags)>
Reuse an existing PMC, turning it into an PMC of the new type. Any
required internal structure will be put in place (such as the extension area)
@@ -222,11 +222,11 @@
PARROT_CANNOT_RETURN_NULL
PARROT_IGNORABLE_RESULT
PMC *
-pmc_reuse_init(PARROT_INTERP, ARGIN(PMC *pmc), INTVAL new_type, ARGIN(PMC *init),
+Parrot_pmc_reuse_init(PARROT_INTERP, ARGIN(PMC *pmc), INTVAL new_type, ARGIN(PMC *init),
UINTVAL flags)
{
- ASSERT_ARGS(pmc_reuse_init)
- pmc = pmc_reuse_no_init(interp, pmc, new_type, flags);
+ ASSERT_ARGS(Parrot_pmc_reuse_init)
+ pmc = Parrot_pmc_reuse_noinit(interp, pmc, new_type, flags);
/* Call the base init for the redone pmc. Warning, this should not
be called on Object PMCs. */
@@ -237,8 +237,8 @@
/*
-=item C<static PMC* pmc_reuse_no_init(PARROT_INTERP, PMC *pmc, INTVAL new_type,
-UINTVAL flags)>
+=item C<static PMC* Parrot_pmc_reuse_noinit(PARROT_INTERP, PMC *pmc, INTVAL
+new_type, UINTVAL flags)>
Prepare pmc for reuse. Do all scuffolding except initing.
@@ -247,10 +247,10 @@
*/
PARROT_CANNOT_RETURN_NULL
static PMC*
-pmc_reuse_no_init(PARROT_INTERP, ARGIN(PMC *pmc), INTVAL new_type,
+Parrot_pmc_reuse_noinit(PARROT_INTERP, ARGIN(PMC *pmc), INTVAL new_type,
SHIM(UINTVAL flags)) {
- ASSERT_ARGS(pmc_reuse_no_init)
+ ASSERT_ARGS(Parrot_pmc_reuse_noinit)
VTABLE *new_vtable;
INTVAL has_ext, new_flags = 0;
@@ -281,8 +281,8 @@
/*
-=item C<PMC * pmc_reuse_by_class(PARROT_INTERP, PMC *pmc, PMC *class_, UINTVAL
-flags)>
+=item C<PMC * Parrot_pmc_reuse_by_class(PARROT_INTERP, PMC *pmc, PMC *class_,
+UINTVAL flags)>
Reuse an existing PMC. Convert it to the type specified by the given Class
PMC. At the moment, this means we can only use this function to reuse PMCs
@@ -297,10 +297,10 @@
PARROT_CANNOT_RETURN_NULL
PARROT_IGNORABLE_RESULT
PMC *
-pmc_reuse_by_class(PARROT_INTERP, ARGMOD(PMC *pmc), ARGIN(PMC *class_),
+Parrot_pmc_reuse_by_class(PARROT_INTERP, ARGMOD(PMC *pmc), ARGIN(PMC *class_),
UINTVAL flags)
{
- ASSERT_ARGS(pmc_reuse_by_class)
+ ASSERT_ARGS(Parrot_pmc_reuse_by_class)
const INTVAL new_type = PARROT_CLASS(class_)->id;
VTABLE * const new_vtable = interp->vtables[new_type];
INTVAL new_flags = flags;
@@ -494,7 +494,7 @@
/*
-=item C<PMC * constant_Parrot_pmc_new_noinit(PARROT_INTERP, INTVAL base_type)>
+=item C<PMC * Parrot_pmc_new_constant(PARROT_INTERP, INTVAL base_type)>
Creates a new constant PMC of type C<base_type>.
@@ -505,16 +505,16 @@
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PMC *
-constant_Parrot_pmc_new_noinit(PARROT_INTERP, INTVAL base_type)
+Parrot_pmc_new_constant_noinit(PARROT_INTERP, INTVAL base_type)
{
- ASSERT_ARGS(constant_Parrot_pmc_new_noinit)
+ ASSERT_ARGS(Parrot_pmc_new_constant_noinit)
return get_new_pmc_header(interp, base_type, PObj_constant_FLAG);
}
/*
-=item C<PMC * constant_Parrot_pmc_new(PARROT_INTERP, INTVAL base_type)>
+=item C<PMC * Parrot_pmc_new_constant(PARROT_INTERP, INTVAL base_type)>
Creates a new constant PMC of type C<base_type>, then calls its C<init>.
@@ -525,9 +525,9 @@
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PMC *
-constant_Parrot_pmc_new(PARROT_INTERP, INTVAL base_type)
+Parrot_pmc_new_constant(PARROT_INTERP, INTVAL base_type)
{
- ASSERT_ARGS(constant_Parrot_pmc_new)
+ ASSERT_ARGS(Parrot_pmc_new_constant)
PMC * const pmc = get_new_pmc_header(interp, base_type, PObj_constant_FLAG);
VTABLE_init(interp, pmc);
return pmc;
@@ -564,7 +564,8 @@
/*
-=item C<PMC * constant_Parrot_pmc_new_init(PARROT_INTERP, INTVAL base_type, PMC *init)>
+=item C<PMC * Parrot_pmc_new_constant_init(PARROT_INTERP, INTVAL base_type, PMC
+*init)>
As C<constant_Parrot_pmc_new>, but passes C<init> to the PMC's C<init_pmc> vtable
entry.
@@ -576,9 +577,9 @@
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PMC *
-constant_Parrot_pmc_new_init(PARROT_INTERP, INTVAL base_type, ARGIN_NULLOK(PMC *init))
+Parrot_pmc_new_constant_init(PARROT_INTERP, INTVAL base_type, ARGIN_NULLOK(PMC *init))
{
- ASSERT_ARGS(constant_Parrot_pmc_new_init)
+ ASSERT_ARGS(Parrot_pmc_new_constant_init)
PMC * const pmc = get_new_pmc_header(interp, base_type, PObj_constant_FLAG);
VTABLE_init_pmc(interp, pmc, init);
return pmc;
@@ -587,7 +588,7 @@
/*
-=item C<PMC * temporary_Parrot_pmc_new(PARROT_INTERP, INTVAL base_type)>
+=item C<PMC * Parrot_pmc_new_temporary(PARROT_INTERP, INTVAL base_type)>
Creates a new temporary PMC of type C<base_type>, then call C<init>. Cannot
be used to create PMC Objects which have been defined from PIR.
@@ -615,9 +616,9 @@
PARROT_CANNOT_RETURN_NULL
PMC *
-temporary_Parrot_pmc_new(PARROT_INTERP, INTVAL base_type)
+Parrot_pmc_new_temporary(PARROT_INTERP, INTVAL base_type)
{
- ASSERT_ARGS(temporary_Parrot_pmc_new)
+ ASSERT_ARGS(Parrot_pmc_new_temporary)
PMC * const pmc = get_new_pmc_header(interp, base_type, PObj_constant_FLAG);
VTABLE_init(interp, pmc);
return pmc;
@@ -626,7 +627,7 @@
/*
-=item C<void temporary_pmc_free(PARROT_INTERP, PMC *pmc)>
+=item C<void Parrot_pmc_free_temporary(PARROT_INTERP, PMC *pmc)>
Frees a new temporary PMC created by C<temporary_Parrot_pmc_new()>. Do not call
this with any other type of PMC. Do not forget to call this (or you'll leak
@@ -638,16 +639,16 @@
*/
void
-temporary_pmc_free(PARROT_INTERP, ARGMOD(PMC *pmc))
+Parrot_pmc_free_temporary(PARROT_INTERP, ARGMOD(PMC *pmc))
{
- ASSERT_ARGS(temporary_pmc_free)
+ ASSERT_ARGS(Parrot_pmc_free_temporary)
Parrot_gc_free_pmc_header(interp, pmc);
}
/*
-=item C<INTVAL get_new_vtable_index(PARROT_INTERP)>
+=item C<INTVAL Parrot_pmc_get_new_vtable_index(PARROT_INTERP)>
Get a new unique identifier number and allocate a new vtable structure for a
new PMC type.
@@ -657,9 +658,9 @@
*/
INTVAL
-get_new_vtable_index(PARROT_INTERP)
+Parrot_pmc_get_new_vtable_index(PARROT_INTERP)
{
- ASSERT_ARGS(get_new_vtable_index)
+ ASSERT_ARGS(Parrot_pmc_get_new_vtable_index)
const INTVAL type_id = interp->n_vtable_max++;
/* Have we overflowed the table? */
@@ -671,7 +672,7 @@
/*
-=item C<INTVAL pmc_register(PARROT_INTERP, STRING *name)>
+=item C<INTVAL Parrot_pmc_register_new_type(PARROT_INTERP, STRING *name)>
Registers the name of a new PMC type with Parrot, returning the INTVAL
representing that type.
@@ -682,12 +683,12 @@
PARROT_EXPORT
INTVAL
-pmc_register(PARROT_INTERP, ARGIN(STRING *name))
+Parrot_pmc_register_new_type(PARROT_INTERP, ARGIN(STRING *name))
{
- ASSERT_ARGS(pmc_register)
+ ASSERT_ARGS(Parrot_pmc_register_new_type)
/* If they're looking to register an existing class, return that
class' type number */
- INTVAL type = pmc_type(interp, name);
+ INTVAL type = Parrot_pmc_get_type_str(interp, name);
if (type > enum_type_undef)
return type;
@@ -696,7 +697,7 @@
Parrot_ex_throw_from_c_args(interp, NULL, 1,
"undefined type already exists - can't register PMC");
- type = get_new_vtable_index(interp);
+ type = Parrot_pmc_get_new_vtable_index(interp);
/* set entry in name->type hash */
VTABLE_set_integer_keyed_str(interp, interp->class_hash, name, type);
@@ -707,7 +708,7 @@
/*
-=item C<INTVAL pmc_type(PARROT_INTERP, STRING *name)>
+=item C<INTVAL Parrot_pmc_get_type_str(PARROT_INTERP, STRING *name)>
Returns the PMC type for C<name>.
@@ -718,9 +719,9 @@
PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
INTVAL
-pmc_type(PARROT_INTERP, ARGIN_NULLOK(STRING *name))
+Parrot_pmc_get_type_str(PARROT_INTERP, ARGIN_NULLOK(STRING *name))
{
- ASSERT_ARGS(pmc_type)
+ ASSERT_ARGS(Parrot_pmc_get_type_str)
if (!name)
return enum_type_undef;
else {
@@ -743,7 +744,7 @@
/*
-=item C<INTVAL pmc_type_p(PARROT_INTERP, PMC *name)>
+=item C<INTVAL Parrot_pmc_get_type(PARROT_INTERP, PMC *name)>
Returns the PMC type for C<name>.
@@ -753,9 +754,9 @@
PARROT_EXPORT
INTVAL
-pmc_type_p(PARROT_INTERP, ARGIN(PMC *name))
+Parrot_pmc_get_type(PARROT_INTERP, ARGIN(PMC *name))
{
- ASSERT_ARGS(pmc_type_p)
+ ASSERT_ARGS(Parrot_pmc_get_type)
PMC * const classname_hash = interp->class_hash;
PMC * item;
@@ -813,7 +814,7 @@
/*
-=item C<void Parrot_create_mro(PARROT_INTERP, INTVAL type)>
+=item C<void Parrot_pmc_create_mro(PARROT_INTERP, INTVAL type)>
Create the MRO (method resolution order) array for this type.
@@ -823,9 +824,9 @@
PARROT_EXPORT
void
-Parrot_create_mro(PARROT_INTERP, INTVAL type)
+Parrot_pmc_create_mro(PARROT_INTERP, INTVAL type)
{
- ASSERT_ARGS(Parrot_create_mro)
+ ASSERT_ARGS(Parrot_pmc_create_mro)
PMC *_class, *mro;
VTABLE *vtable = interp->vtables[type];
PMC *mro_list = vtable->mro;
@@ -848,7 +849,7 @@
for (i = 0; i < count; ++i) {
STRING *class_name = VTABLE_get_string_keyed_int(interp, mro_list, i);
- INTVAL parent_type = pmc_type(interp, class_name);
+ INTVAL parent_type = Parrot_pmc_get_type_str(interp, class_name);
/* abstract classes don't have a vtable */
if (!parent_type)
@@ -884,7 +885,7 @@
=over 4
-=item C<void gc_register_pmc(PARROT_INTERP, PMC *pmc)>
+=item C<void Parrot_pmc_gc_register(PARROT_INTERP, PMC *pmc)>
Registers the PMC with the interpreter's GC registry.
@@ -894,9 +895,9 @@
PARROT_EXPORT
void
-gc_register_pmc(PARROT_INTERP, ARGIN(PMC *pmc))
+Parrot_pmc_gc_register(PARROT_INTERP, ARGIN(PMC *pmc))
{
- ASSERT_ARGS(gc_register_pmc)
+ ASSERT_ARGS(Parrot_pmc_gc_register)
/* Better not trigger a GC run with a potentially unanchored PMC */
Parrot_block_GC_mark(interp);
@@ -906,10 +907,9 @@
Parrot_unblock_GC_mark(interp);
}
-
/*
-=item C<void gc_unregister_pmc(PARROT_INTERP, PMC *pmc)>
+=item C<void Parrot_pmc_gc_unregister(PARROT_INTERP, PMC *pmc)>
Unregisters the PMC from the interpreter's GC registry.
@@ -919,15 +919,14 @@
PARROT_EXPORT
void
-gc_unregister_pmc(PARROT_INTERP, ARGIN(PMC *pmc))
+Parrot_pmc_gc_unregister(PARROT_INTERP, ARGIN(PMC *pmc))
{
- ASSERT_ARGS(gc_unregister_pmc)
+ ASSERT_ARGS(Parrot_pmc_gc_unregister)
PARROT_ASSERT(interp->gc_registry);
VTABLE_delete_keyed(interp, interp->gc_registry, pmc);
}
-
/*
=back
@@ -947,7 +946,6 @@
*/
-
/*
* Local variables:
* c-file-style: "parrot"
Modified: branches/pmc_func_cleanup/src/pmc/default.pmc
==============================================================================
--- branches/pmc_func_cleanup/src/pmc/default.pmc Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/src/pmc/default.pmc Tue Feb 16 18:00:18 2010 (r44034)
@@ -612,7 +612,7 @@
STRING * const undef = CONST_STRING(INTERP, "Undef");
if (VTABLE_isa(INTERP, value, undef))
- pmc_reuse(INTERP, SELF, value->vtable->base_type, 0);
+ Parrot_pmc_reuse(INTERP, SELF, value->vtable->base_type, 0);
else
SELF.set_pmc(value);
}
@@ -632,7 +632,7 @@
*/
VTABLE void morph(PMC* type) {
- pmc_reuse(INTERP, SELF, VTABLE_get_integer(interp, type), 0);
+ Parrot_pmc_reuse(INTERP, SELF, VTABLE_get_integer(interp, type), 0);
}
/*
Modified: branches/pmc_func_cleanup/src/string/api.c
==============================================================================
--- branches/pmc_func_cleanup/src/string/api.c Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/src/string/api.c Tue Feb 16 18:00:18 2010 (r44034)
@@ -3443,7 +3443,7 @@
if (STRING_IS_NULL(delim) || STRING_IS_NULL(str))
return PMCNULL;
- res = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_ResizableStringArray));
+ res = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_ResizableStringArray));
slen = Parrot_str_byte_length(interp, str);
if (!slen)
Modified: branches/pmc_func_cleanup/src/thread.c
==============================================================================
--- branches/pmc_func_cleanup/src/thread.c Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/src/thread.c Tue Feb 16 18:00:18 2010 (r44034)
@@ -1364,7 +1364,7 @@
* dying interpreter, so register it in parent's GC registry
* XXX is this still needed?
*/
- gc_register_pmc(parent, parent_ret);
+ Parrot_pmc_gc_register(parent, parent_ret);
Parrot_unblock_GC_mark(parent);
retval = parent_ret;
}
@@ -1388,7 +1388,7 @@
* value, caller gets it now
*/
if (retval)
- gc_unregister_pmc(parent, retval);
+ Parrot_pmc_gc_unregister(parent, retval);
return retval;
}
Modified: branches/pmc_func_cleanup/tools/build/nativecall.pl
==============================================================================
--- branches/pmc_func_cleanup/tools/build/nativecall.pl Tue Feb 16 17:51:25 2010 (r44033)
+++ branches/pmc_func_cleanup/tools/build/nativecall.pl Tue Feb 16 18:00:18 2010 (r44034)
@@ -44,7 +44,7 @@
final_dest => "PMC * final_destination = PMCNULL;",
sig_char => "P",
ret_assign => "if (return_data != NULL) {\n" .
- " final_destination = pmc_new(interp, enum_class_UnManagedStruct);\n" .
+ " final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);\n" .
" VTABLE_set_pointer(interp, final_destination, return_data);\n" .
" }\n" .
" Parrot_pcc_fill_returns_from_c_args(interp, call_object, \"P\", final_destination);",
@@ -398,7 +398,7 @@
);
push @{$put_pointer_ref}, <<"PUT_POINTER";
- temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
VTABLE_set_pointer(interp, temp_pmc, (void *)$value);
VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "$key"), temp_pmc);
PUT_POINTER
@@ -450,7 +450,7 @@
IGLOBALS_NCI_FUNCS);
if (!HashPointer) {
- HashPointer = pmc_new(interp, enum_class_Hash);
+ HashPointer = Parrot_pmc_new(interp, enum_class_Hash);
VTABLE_set_pmc_keyed_int(interp, iglobals, IGLOBALS_NCI_FUNCS,
HashPointer);
}
@@ -471,7 +471,7 @@
if (result) {
struct jit_buffer_private_data *priv;
*jitted = 1;
- temp_pmc = pmc_new(interp, enum_class_ManagedStruct);
+ temp_pmc = Parrot_pmc_new(interp, enum_class_ManagedStruct);
VTABLE_set_pointer(interp, temp_pmc, (void *)result);
#ifdef PARROT_HAS_EXEC_PROTECT
priv = (struct jit_buffer_private_data *)
More information about the parrot-commits
mailing list