Permalink
Browse files

start rename of pmc_new to Parrot_pmc_new

git-svn-id: https://svn.parrot.org/parrot/branches/pmc_func_cleanup@44031 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information...
1 parent 243599b commit 083213a2f0e3e17015d6e0f333aa71228e4b4771 @Whiteknight Whiteknight committed Feb 16, 2010
Showing with 537 additions and 537 deletions.
  1. +1 −1 compilers/imcc/parser_util.c
  2. +10 −10 compilers/imcc/pbc.c
  3. +8 −8 compilers/pirc/src/bcgen.c
  4. +3 −3 compilers/pirc/src/pircompunit.c
  5. +3 −3 compilers/pirc/src/piremit.c
  6. +1 −1 compilers/pirc/src/pirpcc.c
  7. +5 −5 src/dynext.c
  8. +3 −3 src/embed.c
  9. +2 −2 src/exceptions.c
  10. +3 −3 src/extend.c
  11. +2 −2 src/frame_builder.c
  12. +2 −2 src/global.c
  13. +7 −7 src/global_setup.c
  14. +3 −3 src/hash.c
  15. +7 −7 src/hll.c
  16. +5 −5 src/key.c
  17. +6 −6 src/library.c
  18. +9 −9 src/multidispatch.c
  19. +12 −12 src/oo.c
  20. +6 −6 src/packfile.c
  21. +31 −31 src/pmc.c
  22. +1 −1 src/pmc/arrayiterator.pmc
  23. +21 −21 src/pmc/bigint.pmc
  24. +20 −20 src/pmc/bignum.pmc
  25. +8 −8 src/pmc/callcontext.pmc
  26. +3 −3 src/pmc/capture.pmc
  27. +25 −25 src/pmc/class.pmc
  28. +1 −1 src/pmc/codestring.pmc
  29. +59 −59 src/pmc/complex.pmc
  30. +1 −1 src/pmc/continuation.pmc
  31. +3 −3 src/pmc/coroutine.pmc
  32. +1 −1 src/pmc/cpointer.pmc
  33. +11 −11 src/pmc/default.pmc
  34. +2 −2 src/pmc/env.pmc
  35. +6 −6 src/pmc/exception.pmc
  36. +1 −1 src/pmc/exporter.pmc
  37. +4 −4 src/pmc/fixedbooleanarray.pmc
  38. +4 −4 src/pmc/fixedfloatarray.pmc
  39. +5 −5 src/pmc/fixedintegerarray.pmc
  40. +10 −10 src/pmc/fixedpmcarray.pmc
  41. +3 −3 src/pmc/fixedstringarray.pmc
  42. +21 −21 src/pmc/float.pmc
  43. +6 −6 src/pmc/hash.pmc
  44. +1 −1 src/pmc/hashiterator.pmc
  45. +4 −4 src/pmc/imageio.pmc
  46. +32 −32 src/pmc/integer.pmc
  47. +1 −1 src/pmc/key.pmc
  48. +1 −1 src/pmc/lexinfo.pmc
  49. +1 −1 src/pmc/managedstruct.pmc
  50. +4 −4 src/pmc/namespace.pmc
  51. +1 −1 src/pmc/nci.pmc
  52. +2 −2 src/pmc/object.pmc
  53. +13 −13 src/pmc/orderedhash.pmc
  54. +3 −3 src/pmc/os.pmc
  55. +1 −1 src/pmc/packfile.pmc
  56. +6 −6 src/pmc/packfileannotations.pmc
  57. +2 −2 src/pmc/packfileconstanttable.pmc
  58. +2 −2 src/pmc/packfiledirectory.pmc
  59. +2 −2 src/pmc/packfilefixuptable.pmc
  60. +1 −1 src/pmc/packfilerawsegment.pmc
  61. +4 −4 src/pmc/parrotinterpreter.pmc
  62. +1 −1 src/pmc/parrotlibrary.pmc
  63. +13 −13 src/pmc/pmcproxy.pmc
  64. +1 −1 src/pmc/pointer.pmc
  65. +1 −1 src/pmc/resizablebooleanarray.pmc
  66. +6 −6 src/pmc/resizablepmcarray.pmc
  67. +7 −7 src/pmc/resizablestringarray.pmc
  68. +8 −8 src/pmc/role.pmc
  69. +28 −28 src/pmc/scalar.pmc
  70. +5 −5 src/pmc/scheduler.pmc
  71. +1 −1 src/pmc/sockaddr.pmc
  72. +4 −4 src/pmc/string.pmc
  73. +1 −1 src/pmc/stringhandle.pmc
  74. +3 −3 src/pmc/stringiterator.pmc
  75. +7 −7 src/pmc/sub.pmc
  76. +7 −7 src/pmc/task.pmc
  77. +2 −2 src/pmc/undef.pmc
  78. +2 −2 src/pmc/unmanagedstruct.pmc
  79. +2 −2 src/pmc_freeze.c
  80. +5 −5 src/scheduler.c
  81. +2 −2 src/sub.c
  82. +4 −4 src/thread.c
  83. +1 −1 src/utils.c
View
2 compilers/imcc/parser_util.c
@@ -703,7 +703,7 @@ imcc_compile(PARROT_INTERP, ARGIN(const char *s), int pasm_file,
*
* TODO if a sub was denoted :main return that instead
*/
- sub = pmc_new(interp, enum_class_Eval);
+ sub = Parrot_pmc_new(interp, enum_class_Eval);
PMC_get_sub(interp, sub, sub_data);
sub_data->seg = new_cs;
sub_data->start_offs = 0;
View
20 compilers/imcc/pbc.c
@@ -1044,9 +1044,9 @@ mk_multi_sig(PARROT_INTERP, ARGIN(const SymReg *r))
/* a :multi sub with no arguments */
if (!pcc_sub->multi[0])
- return pmc_new(interp, enum_class_FixedIntegerArray);
+ return Parrot_pmc_new(interp, enum_class_FixedIntegerArray);
- multi_sig = pmc_new(interp, enum_class_FixedPMCArray);
+ multi_sig = Parrot_pmc_new(interp, enum_class_FixedPMCArray);
VTABLE_set_integer_native(interp, multi_sig, n);
ct = interp->code->const_table;
@@ -1061,11 +1061,11 @@ mk_multi_sig(PARROT_INTERP, ARGIN(const SymReg *r))
const INTVAL type_num = pmc_type(interp, type_name);
if (type_num == enum_type_undef) {
- sig_pmc = pmc_new(interp, enum_class_String);
+ sig_pmc = Parrot_pmc_new(interp, enum_class_String);
VTABLE_set_string_native(interp, sig_pmc, type_name);
}
else {
- sig_pmc = pmc_new(interp, enum_class_Integer);
+ sig_pmc = Parrot_pmc_new(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, sig_pmc, type_num);
}
}
@@ -1116,7 +1116,7 @@ create_lexinfo(PARROT_INTERP, ARGMOD(IMC_Unit *unit), ARGIN(PMC *sub_pmc),
if (r->set == 'P' && r->usage & U_LEXICAL) {
SymReg *n;
if (!lex_info) {
- lex_info = pmc_new_noinit(interp, lex_info_id);
+ lex_info = Parrot_pmc_new_noinit(interp, lex_info_id);
VTABLE_init_pmc(interp, lex_info, sub_pmc);
}
@@ -1149,7 +1149,7 @@ create_lexinfo(PARROT_INTERP, ARGMOD(IMC_Unit *unit), ARGIN(PMC *sub_pmc),
}
if (!lex_info && (unit->outer || need_lex)) {
- lex_info = pmc_new_noinit(interp, lex_info_id);
+ lex_info = Parrot_pmc_new_noinit(interp, lex_info_id);
VTABLE_init_pmc(interp, lex_info, sub_pmc);
}
@@ -1297,15 +1297,15 @@ add_const_pmc_sub(PARROT_INTERP, ARGMOD(SymReg *r), size_t offs, size_t end)
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_NO_CLASS,
"Class '%Ss' specified in :instanceof(...) not found",
classname);
- sub_pmc = pmc_new(interp, type);
+ sub_pmc = Parrot_pmc_new(interp, type);
}
}
else {
/* use a possible type mapping for the Sub PMCs, and create it */
type = Parrot_get_ctx_HLL_type(interp, type);
/* TODO create constant - see also src/packfile.c */
- sub_pmc = pmc_new(interp, type);
+ sub_pmc = Parrot_pmc_new(interp, type);
}
/* Set flags and get the sub info. */
@@ -1348,7 +1348,7 @@ add_const_pmc_sub(PARROT_INTERP, ARGMOD(SymReg *r), size_t offs, size_t end)
ns_pmc = ct->constants[ns_const]->u.key;
break;
case PFC_STRING:
- ns_pmc = constant_pmc_new(interp, enum_class_String);
+ ns_pmc = constant_Parrot_pmc_new(interp, enum_class_String);
VTABLE_set_string_native(interp, ns_pmc, ct->constants[ns_const]->u.string);
break;
default:
@@ -1805,7 +1805,7 @@ make_pmc_const(PARROT_INTERP, ARGMOD(SymReg *r))
else
s = Parrot_str_unescape(interp, r->name, 0, NULL);
- p = constant_pmc_new(interp, r->pmc_type);
+ p = constant_Parrot_pmc_new(interp, r->pmc_type);
switch (r->pmc_type) {
case enum_class_Integer:
View
16 compilers/pirc/src/bcgen.c
@@ -798,10 +798,10 @@ generate_multi_signature(ARGIN(bytecode * const bc),
/* A type_count of 1 means there was a :multi flag, but no :multi types.
* therefore, create a special signature and return that. */
if (type_count == 1)
- return pmc_new(bc->interp, enum_class_FixedIntegerArray);
+ return Parrot_pmc_new(bc->interp, enum_class_FixedIntegerArray);
/* create a FixedPMCArray to store all multi types */
- multi_signature = pmc_new(bc->interp, enum_class_FixedPMCArray);
+ multi_signature = Parrot_pmc_new(bc->interp, enum_class_FixedPMCArray);
/* set its size as specified in type_count */
VTABLE_set_integer_native(bc->interp, multi_signature, type_count);
@@ -818,7 +818,7 @@ generate_multi_signature(ARGIN(bytecode * const bc),
/* add the string to the constant table, retrieve a pointer to the STRING */
STRING * typestring = add_string_const_from_cstring(bc, types[i].entry.ident);
/* create a new String PMC. */
- sig_pmc = pmc_new(bc->interp, enum_class_String);
+ sig_pmc = Parrot_pmc_new(bc->interp, enum_class_String);
/* set the STRING in the String PMC */
VTABLE_set_string_native(bc->interp, sig_pmc, typestring);
break;
@@ -977,7 +977,7 @@ create_lexinfo(ARGIN(bytecode * const bc), ARGIN(PMC * sub),
STRING * const method = string_from_literal(bc->interp, "declare_lex_preg");
/* create a lexinfo PMC */
- PMC * lex_info = pmc_new_noinit(bc->interp, lex_info_id);
+ PMC * lex_info = Parrot_pmc_new_noinit(bc->interp, lex_info_id);
VTABLE_init_pmc(bc->interp, lex_info, sub);
/* walk through the list of lexicals and register them */
@@ -1001,7 +1001,7 @@ create_lexinfo(ARGIN(bytecode * const bc), ARGIN(PMC * sub),
* :lex flag, then create the lex_info anyway.
*/
if (lex_info == NULL && needlex) {
- lex_info = pmc_new_noinit(bc->interp, lex_info_id);
+ lex_info = Parrot_pmc_new_noinit(bc->interp, lex_info_id);
VTABLE_init_pmc(bc->interp, lex_info, sub);
}
@@ -1108,7 +1108,7 @@ get_namespace_pmc(ARGIN(bytecode * const bc), ARGIN_NULLOK(multi_type * const ns
switch (ns->entry_type) {
case MULTI_TYPE_IDENT: {
- PMC *namespace_pmc = constant_pmc_new(bc->interp, enum_class_String);
+ PMC *namespace_pmc = constant_Parrot_pmc_new(bc->interp, enum_class_String);
PARROT_NAMESPACE(namespace_pmc)->name =
add_string_const_from_cstring(bc, ns->entry.ident);
break;
@@ -1161,7 +1161,7 @@ create_sub_pmc(ARGIN(bytecode * const bc), int iscoroutine,
Parrot_ex_throw_from_c_args(bc->interp, NULL, EXCEPTION_NO_CLASS,
"Requested sub class '%Ss' in :instanceof() not found", classname);
- return pmc_new(bc->interp, type);
+ return Parrot_pmc_new(bc->interp, type);
}
}
@@ -1175,7 +1175,7 @@ create_sub_pmc(ARGIN(bytecode * const bc), int iscoroutine,
* TODO create constant - see also src/packfile.c
* XXX is this (still) necessary?
*/
- return pmc_new(bc->interp, type);
+ return Parrot_pmc_new(bc->interp, type);
}
/*
View
6 compilers/pirc/src/pircompunit.c
@@ -1508,7 +1508,7 @@ new_pmc_const(lexer_state * const lexer, char const * const type,
symbol *constsym = new_symbol(lexer, name, PMC_TYPE);
target *consttarg = target_from_symbol(lexer, constsym);
- PMC *intconst = pmc_new(lexer->interp,
+ PMC *intconst = Parrot_pmc_new(lexer->interp,
Parrot_get_ctx_HLL_type(lexer->interp, enum_class_Integer));
int index = add_pmc_const(lexer->bc, intconst);
VTABLE_set_integer_native(lexer->interp, intconst, value->val.ival);
@@ -1543,7 +1543,7 @@ new_pmc_const(lexer_state * const lexer, char const * const type,
symbol *constsym = new_symbol(lexer, name, PMC_TYPE);
target *consttarg = target_from_symbol(lexer, constsym);
- PMC *numconst = pmc_new(lexer->interp,
+ PMC *numconst = Parrot_pmc_new(lexer->interp,
Parrot_get_ctx_HLL_type(lexer->interp, enum_class_Float));
int index = add_pmc_const(lexer->bc, numconst);
VTABLE_set_number_native(lexer->interp, numconst, value->val.nval);
@@ -1573,7 +1573,7 @@ new_pmc_const(lexer_state * const lexer, char const * const type,
symbol *constsym = new_symbol(lexer, name, PMC_TYPE);
target *consttarg = target_from_symbol(lexer, constsym);
- PMC *strconst = pmc_new(lexer->interp,
+ PMC *strconst = Parrot_pmc_new(lexer->interp,
Parrot_get_ctx_HLL_type(lexer->interp, enum_class_String));
int index = add_pmc_const(lexer->bc, strconst);
View
6 compilers/pirc/src/piremit.c
@@ -686,7 +686,7 @@ optimize_instr(lexer_state * const lexer, instruction * const instr) {
/* the last operand, which is the second in this case */
expression *second_operand = instr->operands;
- PMC *intconst = pmc_new(lexer->interp,
+ PMC *intconst = Parrot_pmc_new(lexer->interp,
Parrot_get_ctx_HLL_type(lexer->interp, enum_class_Integer));
int index = add_pmc_const(lexer->bc, intconst);
VTABLE_set_integer_native(lexer->interp, intconst, second_operand->expr.c->val.ival);
@@ -703,7 +703,7 @@ optimize_instr(lexer_state * const lexer, instruction * const instr) {
/* the last operand, which is the second in this case */
expression *second_operand = instr->operands;
- PMC *numconst = pmc_new(lexer->interp,
+ PMC *numconst = Parrot_pmc_new(lexer->interp,
Parrot_get_ctx_HLL_type(lexer->interp, enum_class_Float));
int index = add_pmc_const(lexer->bc, numconst);
VTABLE_set_number_native(lexer->interp, numconst, second_operand->expr.c->val.nval);
@@ -721,7 +721,7 @@ optimize_instr(lexer_state * const lexer, instruction * const instr) {
/* the last operand, which is the second in this case */
expression *second_operand = instr->operands;
- PMC *strconst = pmc_new(lexer->interp,
+ PMC *strconst = Parrot_pmc_new(lexer->interp,
Parrot_get_ctx_HLL_type(lexer->interp, enum_class_String));
int index = add_pmc_const(lexer->bc, strconst);
View
2 compilers/pirc/src/pirpcc.c
@@ -221,7 +221,7 @@ generate_signature_pmc(lexer_state * const lexer, unsigned size) {
int array_index;
/* flags and types are encoded in a FixedIntegerArray PMC */
- fixed_int_array = pmc_new(lexer->interp, enum_class_FixedIntegerArray);
+ fixed_int_array = Parrot_pmc_new(lexer->interp, enum_class_FixedIntegerArray);
if (size > 0) /* can't resize a fixed integer array to 0 elements, default size is 0. */
VTABLE_set_integer_native(lexer->interp, fixed_int_array, size);
View
10 src/dynext.c
@@ -155,7 +155,7 @@ set_cstring_prop(PARROT_INTERP, ARGMOD(PMC *lib_pmc), ARGIN(const char *what),
{
ASSERT_ARGS(set_cstring_prop)
STRING * const key = Parrot_str_new_constant(interp, what);
- PMC * const prop = constant_pmc_new(interp, enum_class_String);
+ PMC * const prop = constant_Parrot_pmc_new(interp, enum_class_String);
VTABLE_set_string_native(interp, prop, name);
VTABLE_setprop(interp, lib_pmc, key, prop);
@@ -396,7 +396,7 @@ Parrot_init_lib(PARROT_INTERP,
/* seems to be a native/NCI lib */
if (!load_func || !lib_pmc)
- lib_pmc = constant_pmc_new(interp, enum_class_ParrotLibrary);
+ lib_pmc = constant_Parrot_pmc_new(interp, enum_class_ParrotLibrary);
/* Call init, if it exists */
if (init_func)
@@ -532,7 +532,7 @@ static PMC *
make_string_pmc(PARROT_INTERP, ARGIN(STRING *string))
{
ASSERT_ARGS(make_string_pmc)
- PMC * const ret = constant_pmc_new(interp, enum_class_String);
+ PMC * const ret = constant_Parrot_pmc_new(interp, enum_class_String);
VTABLE_set_string_native(interp, ret, string);
return ret;
@@ -576,7 +576,7 @@ Parrot_clone_lib_into(ARGMOD(Interp *d), ARGMOD(Interp *s), ARGIN(PMC *lib_pmc))
* Anyways, if we hope to share bytecode at runtime, we need to have
* them have identical opcodes anyways.
*/
- PMC * const new_lib_pmc = constant_pmc_new(d, enum_class_ParrotLibrary);
+ PMC * const new_lib_pmc = constant_Parrot_pmc_new(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));
@@ -668,7 +668,7 @@ Parrot_load_lib(PARROT_INTERP, ARGIN_NULLOK(STRING *lib), SHIM(PMC *initializer)
* XXX Parrot_ex_throw_from_c_args? return PMCNULL?
* PMC Undef seems convenient, because it can be queried with get_bool()
*/
- return pmc_new(interp, enum_class_Undef);
+ return Parrot_pmc_new(interp, enum_class_Undef);
}
return run_init_lib(interp, handle, lib_name, wo_ext);
View
6 src/embed.c
@@ -186,7 +186,7 @@ PARROT_EXPORT
void
Parrot_set_executable_name(PARROT_INTERP, Parrot_String name)
{
- PMC * const name_pmc = pmc_new(interp, enum_class_String);
+ PMC * const name_pmc = Parrot_pmc_new(interp, enum_class_String);
VTABLE_set_string_native(interp, name_pmc, name);
VTABLE_set_pmc_keyed_int(interp, interp->iglobals, IGLOBALS_EXECUTABLE,
name_pmc);
@@ -635,7 +635,7 @@ static PMC*
setup_argv(PARROT_INTERP, int argc, ARGIN(char **argv))
{
ASSERT_ARGS(setup_argv)
- PMC *userargv = pmc_new(interp, enum_class_ResizableStringArray);
+ PMC *userargv = Parrot_pmc_new(interp, enum_class_ResizableStringArray);
INTVAL i;
if (Interp_debug_TEST(interp, PARROT_START_DEBUG_FLAG)) {
@@ -763,7 +763,7 @@ set_current_sub(PARROT_INTERP)
/* If we didn't find anything, put a dummy PMC into current_sub.
The default values set by SUb.init are appropiate for the
dummy, don't need additional settings. */
- sub_pmc = pmc_new(interp, enum_class_Sub);
+ sub_pmc = Parrot_pmc_new(interp, enum_class_Sub);
Parrot_pcc_set_sub(interp, CURRENT_CONTEXT(interp), sub_pmc);
return sub_pmc;
View
4 src/exceptions.c
@@ -68,7 +68,7 @@ Parrot_ex_build_exception(PARROT_INTERP, INTVAL severity,
long error, ARGIN_NULLOK(STRING *msg))
{
ASSERT_ARGS(Parrot_ex_build_exception)
- PMC *exception = pmc_new(interp, enum_class_Exception);
+ PMC *exception = Parrot_pmc_new(interp, enum_class_Exception);
VTABLE_set_integer_keyed_str(interp, exception, CONST_STRING(interp, "severity"), severity);
VTABLE_set_integer_keyed_str(interp, exception, CONST_STRING(interp, "type"), error);
@@ -176,7 +176,7 @@ void
Parrot_ex_add_c_handler(PARROT_INTERP, ARGIN(Parrot_runloop *jp))
{
ASSERT_ARGS(Parrot_ex_add_c_handler)
- PMC * const handler = pmc_new(interp, enum_class_ExceptionHandler);
+ PMC * const handler = Parrot_pmc_new(interp, enum_class_ExceptionHandler);
/* Flag to mark a C exception handler */
PObj_get_FLAGS(handler) |= SUB_FLAG_C_HANDLER;
VTABLE_set_pointer(interp, handler, jp);
View
6 src/extend.c
@@ -945,7 +945,7 @@ Parrot_PMC_new(PARROT_INTERP, Parrot_Int type)
ASSERT_ARGS(Parrot_PMC_new)
Parrot_PMC newpmc;
PARROT_CALLIN_START(interp);
- newpmc = pmc_new_noinit(interp, type);
+ newpmc = Parrot_pmc_new_noinit(interp, type);
VTABLE_init(interp, newpmc);
PARROT_CALLIN_END(interp);
return newpmc;
@@ -1473,7 +1473,7 @@ Parrot_sub_new_from_c_func(PARROT_INTERP,
ASSERT_ARGS(Parrot_sub_new_from_c_func)
Parrot_String sig = Parrot_new_string(interp, signature, strlen(signature),
(char *) NULL, 0);
- Parrot_PMC sub = pmc_new(interp, enum_class_NCI);
+ Parrot_PMC sub = Parrot_pmc_new(interp, enum_class_NCI);
VTABLE_set_pointer_keyed_str(interp, sub, sig, F2DPTR(func));
PObj_get_FLAGS(sub) |= PObj_private1_FLAG;
return sub;
@@ -1497,7 +1497,7 @@ Parrot_PMC_newclass(PARROT_INTERP, Parrot_PMC classtype)
Parrot_PMC result;
PARROT_CALLIN_START(interp);
- result = pmc_new_init(interp, enum_class_Class, classtype);
+ result = Parrot_pmc_new_init(interp, enum_class_Class, classtype);
PARROT_CALLIN_END(interp);
return result;
View
4 src/frame_builder.c
@@ -62,7 +62,7 @@ It is called by the ManagedStruct PMC's clone() function.
PMC *
Parrot_jit_clone_buffer(PARROT_INTERP, PMC *pmc, void *priv)
{
- PMC * const rv = pmc_new(interp, pmc->vtable->base_type);
+ PMC * const rv = Parrot_pmc_new(interp, pmc->vtable->base_type);
VTABLE_init(interp, rv);
/* copy the attributes */
@@ -550,7 +550,7 @@ Parrot_jit_build_call_func(PARROT_INTERP, PMC *pmc_nci, STRING *signature, int *
/* make new pmc */
emitm_movl_i_m(pc, enum_class_UnManagedStruct, emit_EBP, 0, 1, temp_calls_offset + 4);
- emitm_call_cfunc(pc, pmc_new);
+ emitm_call_cfunc(pc, Parrot_pmc_new);
/* restore pointer p to EDX */
emitm_movl_m_r(interp, pc, emit_EDX, emit_EBP, 0, 1, temp_calls_offset + 12);
View
4 src/global.c
@@ -249,7 +249,7 @@ internal_ns_maybe_create(PARROT_INTERP, ARGIN(PMC *ns), ARGIN(STRING *key), int
return PMCNULL;
/* TT #1221 - match HLL of enclosing namespace? */
- sub_ns = pmc_new(interp, Parrot_get_ctx_HLL_type(interp,
+ sub_ns = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp,
enum_class_NameSpace));
if (PMC_IS_NULL(sub_ns))
@@ -765,7 +765,7 @@ store_sub_in_multi(PARROT_INTERP, ARGIN(PMC *sub_pmc), ARGIN(PMC *ns))
/* is there an existing MultiSub PMC? or do we need to create one? */
if (PMC_IS_NULL(multisub)) {
- multisub = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_MultiSub));
+ multisub = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_MultiSub));
/* we have to push the sub onto the MultiSub before we try to store
it because storing requires information from the sub */
VTABLE_push_pmc(interp, multisub, sub_pmc);
View
14 src/global_setup.c
@@ -104,7 +104,7 @@ parrot_set_config_hash_interpreter(PARROT_INTERP)
config_hash = Parrot_thaw(interp, config_string);
}
else {
- config_hash = pmc_new(interp, enum_class_Hash);
+ config_hash = Parrot_pmc_new(interp, enum_class_Hash);
}
VTABLE_set_pmc_keyed_int(interp, iglobals,
@@ -172,7 +172,7 @@ init_world(PARROT_INTERP)
VTABLE_set_pmc_keyed_int(interp, iglobals,
(INTVAL)IGLOBALS_CLASSNAME_HASH, interp->class_hash);
- self = pmc_new_noinit(interp, enum_class_ParrotInterpreter);
+ self = Parrot_pmc_new_noinit(interp, enum_class_ParrotInterpreter);
VTABLE_set_pointer(interp, self, interp);
/* PMC_data(self) = interp; */
@@ -185,10 +185,10 @@ init_world(PARROT_INTERP)
parrot_init_library_paths(interp);
/* load_bytecode and dynlib loaded hash */
- pmc = pmc_new(interp, enum_class_Hash);
+ pmc = Parrot_pmc_new(interp, enum_class_Hash);
VTABLE_set_pmc_keyed_int(interp, iglobals, IGLOBALS_PBC_LIBS, pmc);
- pmc = pmc_new(interp, enum_class_Hash);
+ pmc = Parrot_pmc_new(interp, enum_class_Hash);
VTABLE_set_pmc_keyed_int(interp, iglobals, IGLOBALS_DYN_LIBS, pmc);
}
@@ -212,18 +212,18 @@ parrot_global_setup_2(PARROT_INTERP)
create_initial_context(interp);
/* create the namespace root stash */
- interp->root_namespace = pmc_new(interp, enum_class_NameSpace);
+ interp->root_namespace = Parrot_pmc_new(interp, enum_class_NameSpace);
Parrot_init_HLL(interp);
Parrot_pcc_set_namespace(interp, CURRENT_CONTEXT(interp),
VTABLE_get_pmc_keyed_int(interp, interp->HLL_namespace, 0));
/* We need a class hash */
- interp->class_hash = classname_hash = pmc_new(interp, enum_class_NameSpace);
+ interp->class_hash = classname_hash = Parrot_pmc_new(interp, enum_class_NameSpace);
Parrot_register_core_pmcs(interp, classname_hash);
/* init the interpreter globals array */
- iglobals = pmc_new(interp, enum_class_FixedPMCArray);
+ iglobals = Parrot_pmc_new(interp, enum_class_FixedPMCArray);
interp->iglobals = iglobals;
VTABLE_set_integer_native(interp, iglobals, (INTVAL)IGLOBALS_SIZE);
View
6 src/hash.c
@@ -1446,7 +1446,7 @@ PMC*
get_integer_pmc(PARROT_INTERP, INTVAL value)
{
ASSERT_ARGS(get_integer_pmc)
- PMC * const ret = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Integer));
+ PMC * const ret = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Integer));
VTABLE_set_integer_native(interp, ret, value);
return ret;
}
@@ -1467,7 +1467,7 @@ PMC*
get_number_pmc(PARROT_INTERP, FLOATVAL value)
{
ASSERT_ARGS(get_number_pmc)
- PMC * const ret = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Float));
+ PMC * const ret = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Float));
VTABLE_set_number_native(interp, ret, value);
return ret;
}
@@ -1487,7 +1487,7 @@ PMC *
get_string_pmc(PARROT_INTERP, ARGIN(STRING *value))
{
ASSERT_ARGS(get_string_pmc)
- PMC * const ret = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_String));
+ PMC * const ret = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_String));
VTABLE_set_string_native(interp, ret, value);
return ret;
}
View
14 src/hll.c
@@ -88,7 +88,7 @@ new_hll_entry(PARROT_INTERP, ARGIN_NULLOK(STRING *entry_name))
PMC *entry_id;
- PMC * const entry = constant_pmc_new(interp, enum_class_FixedPMCArray);
+ PMC * const entry = constant_Parrot_pmc_new(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 @@ new_hll_entry(PARROT_INTERP, ARGIN_NULLOK(STRING *entry_name))
VTABLE_set_integer_native(interp, entry, e_HLL_MAX);
- entry_id = constant_pmc_new(interp, enum_class_Integer);
+ entry_id = constant_Parrot_pmc_new(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, entry_id, id);
VTABLE_set_pmc_keyed_int(interp, entry, e_HLL_id, entry_id);
@@ -122,9 +122,9 @@ Parrot_init_HLL(PARROT_INTERP)
{
ASSERT_ARGS(Parrot_init_HLL)
interp->HLL_info =
- pmc_new(interp, enum_class_OrderedHash);
+ Parrot_pmc_new(interp, enum_class_OrderedHash);
interp->HLL_namespace =
- constant_pmc_new(interp, enum_class_ResizablePMCArray);
+ constant_Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
Parrot_register_HLL(interp, CONST_STRING(interp, "parrot"));
}
@@ -168,7 +168,7 @@ Parrot_register_HLL(PARROT_INTERP, ARGIN(STRING *hll_name))
entry = new_hll_entry(interp, hll_name);
/* register HLL name */
- name = constant_pmc_new(interp, enum_class_String);
+ name = constant_Parrot_pmc_new(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 @@ Parrot_register_HLL(PARROT_INTERP, ARGIN(STRING *hll_name))
VTABLE_set_pmc_keyed_int(interp, interp->HLL_namespace, idx, ns_hash);
/* create HLL typemap hash */
- type_hash = constant_pmc_new(interp, enum_class_Hash);
+ type_hash = constant_Parrot_pmc_new(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 @@ Parrot_register_HLL_lib(PARROT_INTERP, ARGIN(STRING *hll_lib))
VTABLE_set_pmc_keyed_int(interp, entry, e_HLL_name, PMCNULL);
/* register dynlib */
- name = constant_pmc_new(interp, enum_class_String);
+ name = constant_Parrot_pmc_new(interp, enum_class_String);
VTABLE_set_string_native(interp, name, hll_lib);
VTABLE_set_pmc_keyed_int(interp, entry, e_HLL_lib, name);
View
10 src/key.c
@@ -43,7 +43,7 @@ PMC *
key_new(PARROT_INTERP)
{
ASSERT_ARGS(key_new)
- return pmc_new(interp, enum_class_Key);
+ return Parrot_pmc_new(interp, enum_class_Key);
}
@@ -64,7 +64,7 @@ PMC *
key_new_integer(PARROT_INTERP, INTVAL value)
{
ASSERT_ARGS(key_new_integer)
- PMC * const key = pmc_new(interp, enum_class_Key);
+ PMC * const key = Parrot_pmc_new(interp, enum_class_Key);
PObj_get_FLAGS(key) |= KEY_integer_FLAG;
SETATTR_Key_int_key(interp, key, value);
@@ -90,7 +90,7 @@ PMC *
key_new_number(PARROT_INTERP, FLOATVAL value)
{
ASSERT_ARGS(key_new_number)
- PMC * const key = pmc_new(interp, enum_class_Key);
+ PMC * const key = Parrot_pmc_new(interp, enum_class_Key);
PObj_get_FLAGS(key) |= KEY_number_FLAG;
SETATTR_Key_num_key(interp, key, value);
@@ -116,7 +116,7 @@ PMC *
key_new_string(PARROT_INTERP, ARGIN(STRING *value))
{
ASSERT_ARGS(key_new_string)
- PMC * const key = pmc_new(interp, enum_class_Key);
+ PMC * const key = Parrot_pmc_new(interp, enum_class_Key);
PObj_get_FLAGS(key) |= KEY_string_FLAG;
SETATTR_Key_str_key(interp, key, value);
@@ -164,7 +164,7 @@ PMC *
key_new_pmc(PARROT_INTERP, ARGIN(PMC *value))
{
ASSERT_ARGS(key_new_pmc)
- PMC * const key = pmc_new(interp, enum_class_Key);
+ PMC * const key = Parrot_pmc_new(interp, enum_class_Key);
PObj_get_FLAGS(key) |= KEY_pmc_FLAG;
Parrot_ex_throw_from_c_args(interp, NULL, 1, "this is broken - see slice.pmc");
View
12 src/library.c
@@ -168,7 +168,7 @@ parrot_init_library_paths(PARROT_INTERP)
(INTVAL)IGLOBALS_CONFIG_HASH);
/* create the lib_paths array */
- PMC * const lib_paths = pmc_new(interp, enum_class_FixedPMCArray);
+ PMC * const lib_paths = Parrot_pmc_new(interp, enum_class_FixedPMCArray);
VTABLE_set_integer_native(interp, lib_paths, PARROT_LIB_PATH_SIZE);
VTABLE_set_pmc_keyed_int(interp, iglobals,
@@ -191,7 +191,7 @@ parrot_init_library_paths(PARROT_INTERP)
/* each is an array of strings */
/* define include paths */
- paths = pmc_new(interp, enum_class_ResizableStringArray);
+ paths = Parrot_pmc_new(interp, enum_class_ResizableStringArray);
VTABLE_set_pmc_keyed_int(interp, lib_paths,
PARROT_LIB_PATH_INCLUDE, paths);
if (!STRING_IS_NULL(builddir)) {
@@ -209,7 +209,7 @@ parrot_init_library_paths(PARROT_INTERP)
/* define library paths */
- paths = pmc_new(interp, enum_class_ResizableStringArray);
+ paths = Parrot_pmc_new(interp, enum_class_ResizableStringArray);
VTABLE_set_pmc_keyed_int(interp, lib_paths,
PARROT_LIB_PATH_LIBRARY, paths);
if (!STRING_IS_NULL(builddir)) {
@@ -224,7 +224,7 @@ parrot_init_library_paths(PARROT_INTERP)
}
/* define languages paths */
- paths = pmc_new(interp, enum_class_ResizableStringArray);
+ paths = Parrot_pmc_new(interp, enum_class_ResizableStringArray);
VTABLE_set_pmc_keyed_int(interp, lib_paths,
PARROT_LIB_PATH_LANG, paths);
if (!STRING_IS_NULL(builddir)) {
@@ -239,7 +239,7 @@ parrot_init_library_paths(PARROT_INTERP)
}
/* define dynext paths */
- paths = pmc_new(interp, enum_class_ResizableStringArray);
+ paths = Parrot_pmc_new(interp, enum_class_ResizableStringArray);
VTABLE_set_pmc_keyed_int(interp, lib_paths,
PARROT_LIB_PATH_DYNEXT, paths);
if (!STRING_IS_NULL(builddir)) {
@@ -254,7 +254,7 @@ parrot_init_library_paths(PARROT_INTERP)
}
/* shared exts */
- paths = pmc_new(interp, enum_class_ResizableStringArray);
+ paths = Parrot_pmc_new(interp, enum_class_ResizableStringArray);
VTABLE_set_pmc_keyed_int(interp, lib_paths,
PARROT_LIB_DYN_EXTS, paths);
/* no CONST_STRING here - the c2str.pl preprocessor needs "real strs" */
View
18 src/multidispatch.c
@@ -255,7 +255,7 @@ PMC*
Parrot_mmd_find_multi_from_sig_obj(PARROT_INTERP, ARGIN(STRING *name), ARGIN(PMC *invoke_sig))
{
ASSERT_ARGS(Parrot_mmd_find_multi_from_sig_obj)
- PMC * const candidate_list = pmc_new(interp, enum_class_ResizablePMCArray);
+ PMC * const candidate_list = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
mmd_search_by_sig_obj(interp, name, invoke_sig, candidate_list);
mmd_search_global(interp, name, candidate_list);
@@ -442,7 +442,7 @@ static PMC*
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_pmc_new(interp, enum_class_FixedIntegerArray);
+ PMC *multi_sig = constant_Parrot_pmc_new(interp, enum_class_FixedIntegerArray);
INTVAL param_count = VTABLE_elements(interp, type_list);
INTVAL i;
@@ -513,7 +513,7 @@ PMC*
Parrot_mmd_build_type_tuple_from_sig_obj(PARROT_INTERP, ARGIN(PMC *sig_obj))
{
ASSERT_ARGS(Parrot_mmd_build_type_tuple_from_sig_obj)
- PMC * const type_tuple = pmc_new(interp, enum_class_ResizableIntegerArray);
+ PMC * const type_tuple = Parrot_pmc_new(interp, enum_class_ResizableIntegerArray);
STRING *string_sig = VTABLE_get_string(interp, sig_obj);
INTVAL tuple_size = 0;
INTVAL args_ended = 0;
@@ -646,7 +646,7 @@ mmd_cvt_to_types(PARROT_INTERP, ARGIN(PMC *multi_sig))
/* create destination PMC only as necessary */
if (PMC_IS_NULL(ar)) {
- ar = pmc_new(interp, enum_class_FixedIntegerArray);
+ ar = Parrot_pmc_new(interp, enum_class_FixedIntegerArray);
VTABLE_set_integer_native(interp, ar, n);
}
@@ -899,7 +899,7 @@ static PMC*
Parrot_mmd_search_scopes(PARROT_INTERP, ARGIN(STRING *meth))
{
ASSERT_ARGS(Parrot_mmd_search_scopes)
- PMC * const candidates = pmc_new(interp, enum_class_ResizablePMCArray);
+ PMC * const candidates = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
const int stop = mmd_search_local(interp, meth, candidates);
if (!stop)
@@ -1061,7 +1061,7 @@ mmd_add_multi_global(PARROT_INTERP, ARGIN(STRING *sub_name), ARGIN(PMC *sub_obj)
PMC *multi_sub = Parrot_get_global(interp, ns, sub_name);
if (PMC_IS_NULL(multi_sub)) {
- multi_sub = constant_pmc_new(interp, enum_class_MultiSub);
+ multi_sub = constant_Parrot_pmc_new(interp, enum_class_MultiSub);
Parrot_set_global(interp, ns, sub_name, multi_sub);
}
@@ -1094,7 +1094,7 @@ mmd_add_multi_to_namespace(PARROT_INTERP, ARGIN(STRING *ns_name),
PMC *multi_sub = Parrot_get_global(interp, ns, sub_name);
if (PMC_IS_NULL(multi_sub)) {
- multi_sub = constant_pmc_new(interp, enum_class_MultiSub);
+ multi_sub = constant_Parrot_pmc_new(interp, enum_class_MultiSub);
Parrot_set_global(interp, ns, sub_name, multi_sub);
}
@@ -1172,7 +1172,7 @@ Parrot_mmd_add_multi_from_c_args(PARROT_INTERP,
STRING *ns_name = VTABLE_get_string_keyed_int(interp, type_list, 0);
/* Create an NCI sub for the C function */
- PMC *sub_obj = constant_pmc_new(interp, enum_class_NCI);
+ PMC *sub_obj = constant_Parrot_pmc_new(interp, enum_class_NCI);
PMC *multi_sig = mmd_build_type_tuple_from_long_sig(interp,
long_sig_str);
@@ -1219,7 +1219,7 @@ Parrot_mmd_add_multi_list_from_c_args(PARROT_INTERP,
STRING *ns_name = mmd_info[i].ns_name;
/* Create an NCI sub for the C function */
- PMC *sub_obj = constant_pmc_new(interp, enum_class_NCI);
+ PMC *sub_obj = constant_Parrot_pmc_new(interp, enum_class_NCI);
VTABLE_set_pointer_keyed_str(interp, sub_obj, short_sig,
F2DPTR(func_ptr));
View
24 src/oo.c
@@ -280,7 +280,7 @@ Parrot_oo_clone_object(PARROT_INTERP, ARGIN(PMC *pmc),
}
else {
obj = PARROT_OBJECT(pmc);
- cloned = pmc_new_noinit(interp, enum_class_Object);
+ cloned = Parrot_pmc_new_noinit(interp, enum_class_Object);
}
_class = PARROT_CLASS(obj->_class);
@@ -371,9 +371,9 @@ get_pmc_proxy(PARROT_INTERP, INTVAL type)
/* Create proxy if not found */
if (PMC_IS_NULL(proxy)) {
- PMC * const type_num = pmc_new(interp, enum_class_Integer);
+ PMC * const type_num = Parrot_pmc_new(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, type_num, type);
- proxy = pmc_new_init(interp, enum_class_PMCProxy, type_num);
+ proxy = Parrot_pmc_new_init(interp, enum_class_PMCProxy, type_num);
Parrot_pcc_invoke_method_from_c_args(interp, pmc_ns, CONST_STRING(interp, "set_class"), "P->", proxy);
}
return proxy;
@@ -434,14 +434,14 @@ PMC *
Parrot_oo_newclass_from_str(PARROT_INTERP, ARGIN(STRING *name))
{
ASSERT_ARGS(Parrot_oo_newclass_from_str)
- PMC * const namearg = pmc_new(interp, enum_class_String);
- PMC * const namehash = pmc_new(interp, enum_class_Hash);
+ PMC * const namearg = Parrot_pmc_new(interp, enum_class_String);
+ PMC * const namehash = Parrot_pmc_new(interp, enum_class_Hash);
PMC *classobj;
VTABLE_set_string_native(interp, namearg, name);
VTABLE_set_pmc_keyed_str(interp, namehash, CONST_STRING(interp, "name"), namearg);
- classobj = pmc_new_init(interp, enum_class_Class, namehash);
+ classobj = Parrot_pmc_new_init(interp, enum_class_Class, namehash);
PARROT_ASSERT(classobj);
return classobj;
@@ -516,7 +516,7 @@ Parrot_oo_find_vtable_override(PARROT_INTERP,
break;
}
if (PMC_IS_NULL(result))
- result = pmc_new(interp, enum_class_Undef);
+ result = Parrot_pmc_new(interp, enum_class_Undef);
VTABLE_set_pmc_keyed_str(interp, _class->parent_overrides, name, result);
}
if (result->vtable->base_type == enum_class_Undef)
@@ -683,7 +683,7 @@ Parrot_oo_register_type(PARROT_INTERP, ARGIN(PMC *name), ARGIN(PMC *_namespace))
{
if (!typeid_exists) {
PMC * const classname_hash = interp->class_hash;
- PMC * const item = pmc_new(interp, enum_class_Integer);
+ PMC * const item = Parrot_pmc_new(interp, enum_class_Integer);
/* set entry in name->type hash */
VTABLE_set_integer_native(interp, item, type);
@@ -1159,7 +1159,7 @@ C3_merge(PARROT_INTERP, ARGIN(PMC *merge_list))
/* If we never found any candidates, return an empty list. */
if (cand_count == 0)
- return pmc_new(interp, enum_class_ResizablePMCArray);
+ return Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
/* If we didn't find anything to accept, error. */
if (PMC_IS_NULL(accepted))
@@ -1229,7 +1229,7 @@ Parrot_ComputeMRO_C3(PARROT_INTERP, ARGIN(PMC *_class))
if (parent_count == 0) {
/* No parents - MRO just contains this class. */
- result = pmc_new(interp, enum_class_ResizablePMCArray);
+ result = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
VTABLE_push_pmc(interp, result, _class);
return result;
}
@@ -1246,7 +1246,7 @@ Parrot_ComputeMRO_C3(PARROT_INTERP, ARGIN(PMC *_class))
/* instantiated lazily */
if (PMC_IS_NULL(merge_list))
- merge_list = pmc_new(interp, enum_class_ResizablePMCArray);
+ merge_list = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
VTABLE_push_pmc(interp, merge_list, lin);
}
@@ -1318,7 +1318,7 @@ Parrot_ComposeRole(PARROT_INTERP, ARGIN(PMC *role),
/* We need to check for conflicts before we do the composition. We
* put each method that would be OK to add into a proposal list, and
* bail out right away if we find a problem. */
- proposed_add_methods = pmc_new(interp, enum_class_Hash);
+ proposed_add_methods = Parrot_pmc_new(interp, enum_class_Hash);
methods_iter = VTABLE_get_iter(interp, methods);
while (VTABLE_get_bool(interp, methods_iter)) {
View
12 src/packfile.c
@@ -4059,11 +4059,11 @@ PackFile_Constant_unpack_key(PARROT_INTERP, ARGIN(PackFile_ConstTable *constt),
opcode_t op;
if (tail) {
- SETATTR_Key_next_key(interp, tail, constant_pmc_new(interp, pmc_enum));
+ SETATTR_Key_next_key(interp, tail, constant_Parrot_pmc_new(interp, pmc_enum));
GETATTR_Key_next_key(interp, tail, tail);
}
else
- head = tail = constant_pmc_new(interp, pmc_enum);
+ head = tail = constant_Parrot_pmc_new(interp, pmc_enum);
op = PF_fetch_opcode(pf, &cursor);
@@ -4547,16 +4547,16 @@ make_annotation_value_pmc(PARROT_INTERP, ARGIN(PackFile_Annotations *self),
switch (type) {
case PF_ANNOTATION_KEY_TYPE_INT:
- result = pmc_new(interp, enum_class_Integer);
+ result = Parrot_pmc_new(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, result, value);
break;
case PF_ANNOTATION_KEY_TYPE_NUM:
- result = pmc_new(interp, enum_class_Float);
+ result = Parrot_pmc_new(interp, enum_class_Float);
VTABLE_set_number_native(interp, result,
PF_CONST(self->code, value)->u.number);
break;
default:
- result = pmc_new(interp, enum_class_String);
+ result = Parrot_pmc_new(interp, enum_class_String);
VTABLE_set_string_native(interp, result,
PF_CONST(self->code, value)->u.string);
}
@@ -4628,7 +4628,7 @@ PackFile_Annotations_lookup(PARROT_INTERP, ARGIN(PackFile_Annotations *self),
}
/* Create hash of values we have. */
- result = pmc_new(interp, enum_class_Hash);
+ result = Parrot_pmc_new(interp, enum_class_Hash);
for (i = 0; i < self->num_keys; i++) {
if (have_values[i]) {
View
62 src/pmc.c
@@ -135,7 +135,7 @@ Parrot_pmc_destroy(PARROT_INTERP, ARGMOD(PMC *pmc))
/*
-=item C<PMC * pmc_new(PARROT_INTERP, INTVAL base_type)>
+=item C<PMC * Parrot_pmc_new(PARROT_INTERP, INTVAL base_type)>
Creates a new PMC of type C<base_type> (which is an index into the list of PMC
types declared in C<vtables> in F<include/parrot/pmc.h>). Once the PMC has been
@@ -150,9 +150,9 @@ PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
PMC *
-pmc_new(PARROT_INTERP, INTVAL base_type)
+Parrot_pmc_new(PARROT_INTERP, INTVAL base_type)
{
- ASSERT_ARGS(pmc_new)
+ ASSERT_ARGS(Parrot_pmc_new)
PARROT_ASSERT(interp->vtables[base_type]);
{
PMC *const classobj = interp->vtables[base_type]->pmc_class;
@@ -466,11 +466,11 @@ get_new_pmc_header(PARROT_INTERP, INTVAL base_type, UINTVAL flags)
/*
-=item C<PMC * pmc_new_noinit(PARROT_INTERP, INTVAL base_type)>
+=item C<PMC * Parrot_pmc_new_noinit(PARROT_INTERP, INTVAL base_type)>
Creates a new PMC of type C<base_type> (which is an index into the list of PMC
-types declared in C<vtables> in F<include/parrot/pmc.h>). Unlike C<pmc_new()>,
-C<pmc_new_noinit()> does not call its C<init> method. This allows separate
+types declared in C<vtables> in F<include/parrot/pmc.h>). Unlike C<Parrot_pmc_new()>,
+C<Parrot_pmc_new_noinit()> does not call its C<init> method. This allows separate
allocation and initialization for continuations.
=cut
@@ -480,9 +480,9 @@ allocation and initialization for continuations.
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PMC *
-pmc_new_noinit(PARROT_INTERP, INTVAL base_type)
+Parrot_pmc_new_noinit(PARROT_INTERP, INTVAL base_type)
{
- ASSERT_ARGS(pmc_new_noinit)
+ ASSERT_ARGS(Parrot_pmc_new_noinit)
PMC *const classobj = interp->vtables[base_type]->pmc_class;
if (!PMC_IS_NULL(classobj) && PObj_is_class_TEST(classobj))
@@ -494,7 +494,7 @@ pmc_new_noinit(PARROT_INTERP, INTVAL base_type)
/*
-=item C<PMC * constant_pmc_new_noinit(PARROT_INTERP, INTVAL base_type)>
+=item C<PMC * constant_Parrot_pmc_new_noinit(PARROT_INTERP, INTVAL base_type)>
Creates a new constant PMC of type C<base_type>.
@@ -505,16 +505,16 @@ Creates a new constant PMC of type C<base_type>.
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PMC *
-constant_pmc_new_noinit(PARROT_INTERP, INTVAL base_type)
+constant_Parrot_pmc_new_noinit(PARROT_INTERP, INTVAL base_type)
{
- ASSERT_ARGS(constant_pmc_new_noinit)
+ ASSERT_ARGS(constant_Parrot_pmc_new_noinit)
return get_new_pmc_header(interp, base_type, PObj_constant_FLAG);
}
/*
-=item C<PMC * constant_pmc_new(PARROT_INTERP, INTVAL base_type)>
+=item C<PMC * constant_Parrot_pmc_new(PARROT_INTERP, INTVAL base_type)>
Creates a new constant PMC of type C<base_type>, then calls its C<init>.
@@ -525,9 +525,9 @@ Creates a new constant PMC of type C<base_type>, then calls its C<init>.
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PMC *
-constant_pmc_new(PARROT_INTERP, INTVAL base_type)
+constant_Parrot_pmc_new(PARROT_INTERP, INTVAL base_type)
{
- ASSERT_ARGS(constant_pmc_new)
+ ASSERT_ARGS(constant_Parrot_pmc_new)
PMC * const pmc = get_new_pmc_header(interp, base_type, PObj_constant_FLAG);
VTABLE_init(interp, pmc);
return pmc;
@@ -536,9 +536,9 @@ constant_pmc_new(PARROT_INTERP, INTVAL base_type)
/*
-=item C<PMC * pmc_new_init(PARROT_INTERP, INTVAL base_type, PMC *init)>
+=item C<PMC * Parrot_pmc_new_init(PARROT_INTERP, INTVAL base_type, PMC *init)>
-As C<pmc_new()>, but passes C<init> to the PMC's C<init_pmc()> vtable entry.
+As C<Parrot_pmc_new()>, but passes C<init> to the PMC's C<init_pmc()> vtable entry.
=cut
@@ -547,9 +547,9 @@ As C<pmc_new()>, but passes C<init> to the PMC's C<init_pmc()> vtable entry.
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PMC *
-pmc_new_init(PARROT_INTERP, INTVAL base_type, ARGOUT(PMC *init))
+Parrot_pmc_new_init(PARROT_INTERP, INTVAL base_type, ARGOUT(PMC *init))
{
- ASSERT_ARGS(pmc_new_init)
+ ASSERT_ARGS(Parrot_pmc_new_init)
PMC *const classobj = interp->vtables[base_type]->pmc_class;
if (!PMC_IS_NULL(classobj) && PObj_is_class_TEST(classobj))
@@ -564,9 +564,9 @@ pmc_new_init(PARROT_INTERP, INTVAL base_type, ARGOUT(PMC *init))
/*
-=item C<PMC * constant_pmc_new_init(PARROT_INTERP, INTVAL base_type, PMC *init)>
+=item C<PMC * constant_Parrot_pmc_new_init(PARROT_INTERP, INTVAL base_type, PMC *init)>
-As C<constant_pmc_new>, but passes C<init> to the PMC's C<init_pmc> vtable
+As C<constant_Parrot_pmc_new>, but passes C<init> to the PMC's C<init_pmc> vtable
entry.
=cut
@@ -576,9 +576,9 @@ entry.
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PMC *
-constant_pmc_new_init(PARROT_INTERP, INTVAL base_type, ARGIN_NULLOK(PMC *init))
+constant_Parrot_pmc_new_init(PARROT_INTERP, INTVAL base_type, ARGIN_NULLOK(PMC *init))
{
- ASSERT_ARGS(constant_pmc_new_init)
+ ASSERT_ARGS(constant_Parrot_pmc_new_init)
PMC * const pmc = get_new_pmc_header(interp, base_type, PObj_constant_FLAG);
VTABLE_init_pmc(interp, pmc, init);
return pmc;
@@ -587,7 +587,7 @@ constant_pmc_new_init(PARROT_INTERP, INTVAL base_type, ARGIN_NULLOK(PMC *init))
/*
-=item C<PMC * temporary_pmc_new(PARROT_INTERP, INTVAL base_type)>
+=item C<PMC * temporary_Parrot_pmc_new(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.
@@ -602,11 +602,11 @@ garbage-collected will cause bugs.
If you don't know what this means means, or you can't tell if either case
will happen as the result of any call you make on or with this PMC,
B<DO NOT> use this function, lest you cause weird crashes and memory errors.
-Use C<pmc_new()> instead.
+Use C<Parrot_pmc_new()> instead.
(Why do these functions even exist? Used judiciously, they can reduce GC
pressure in hotspots tremendously. If you haven't audited the code carefully
--- including profiling and benchmarking -- then use C<pmc_new()> instead, and
+-- including profiling and benchmarking -- then use C<Parrot_pmc_new()> instead, and
never B<ever> add C<PARROT_EXPORT> to either function.)
=cut
@@ -615,9 +615,9 @@ never B<ever> add C<PARROT_EXPORT> to either function.)
PARROT_CANNOT_RETURN_NULL
PMC *
-temporary_pmc_new(PARROT_INTERP, INTVAL base_type)
+temporary_Parrot_pmc_new(PARROT_INTERP, INTVAL base_type)
{
- ASSERT_ARGS(temporary_pmc_new)
+ ASSERT_ARGS(temporary_Parrot_pmc_new)
PMC * const pmc = get_new_pmc_header(interp, base_type, PObj_constant_FLAG);
VTABLE_init(interp, pmc);
return pmc;
@@ -628,9 +628,9 @@ temporary_pmc_new(PARROT_INTERP, INTVAL base_type)
=item C<void temporary_pmc_free(PARROT_INTERP, PMC *pmc)>
-Frees a new temporary PMC created by C<temporary_pmc_new()>. Do not call
+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
-PMCs). Read and I<understand> the warnings for C<temporary_pmc_new()> before
+PMCs). Read and I<understand> the warnings for C<temporary_Parrot_pmc_new()> before
you're tempted to use this.
=cut
@@ -838,7 +838,7 @@ Parrot_create_mro(PARROT_INTERP, INTVAL type)
if (mro_list->vtable->base_type != enum_class_ResizableStringArray)
return;
- mro = pmc_new(interp, enum_class_ResizablePMCArray);
+ mro = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
vtable->mro = mro;
if (vtable->ro_variant_vtable)
@@ -858,7 +858,7 @@ Parrot_create_mro(PARROT_INTERP, INTVAL type)
if (!vtable->_namespace) {
/* need a namespace Hash, anchor at parent, name it */
- PMC * const ns = pmc_new(interp,
+ PMC * const ns = Parrot_pmc_new(interp,
Parrot_get_ctx_HLL_type(interp, enum_class_NameSpace));
vtable->_namespace = ns;
View
2 src/pmc/arrayiterator.pmc
@@ -128,7 +128,7 @@ Marks the current idx/key and the aggregate as live.
GET_ATTR_pos(interp, SELF, pos);
GET_ATTR_reverse(interp, SELF, reverse);
- clone = pmc_new_init(INTERP, enum_class_ArrayIterator, array);
+ clone = Parrot_pmc_new_init(INTERP, enum_class_ArrayIterator, array);
SET_ATTR_pos(interp, clone, pos);
SET_ATTR_reverse(interp, clone, reverse);
View
42 src/pmc/bigint.pmc
@@ -540,7 +540,7 @@ Return GMP version string "x.y.z".
}
VTABLE PMC *clone() {
- PMC *res = pmc_new(INTERP, SELF->vtable->base_type);
+ PMC *res = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
bigint_set(INTERP, res, SELF);
return res;
}
@@ -723,14 +723,14 @@ Decrements the integer.
}
MULTI PMC *add(BigInt value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_add_bigint(INTERP, SELF, value, dest);
return dest;
}
MULTI PMC *add(Integer value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_add_bigint_int(INTERP, SELF, VTABLE_get_integer(interp, value), dest);
return dest;
@@ -745,7 +745,7 @@ Decrements the integer.
}
VTABLE PMC *add_int(INTVAL value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_add_bigint_int(INTERP, SELF, value, dest);
return dest;
@@ -779,14 +779,14 @@ Decrements the integer.
MULTI PMC *subtract(BigInt value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_sub_bigint(INTERP, SELF, value, dest);
return dest;
}
MULTI PMC *subtract(Integer value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_sub_bigint_int(INTERP, SELF, VTABLE_get_integer(interp, value), dest);
return dest;
@@ -801,7 +801,7 @@ Decrements the integer.
}
VTABLE PMC *subtract_int(INTVAL value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_sub_bigint_int(INTERP, SELF, value, dest);
return dest;
@@ -835,14 +835,14 @@ Decrements the integer.
MULTI PMC *multiply(BigInt value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_mul_bigint(INTERP, SELF, value, dest);
return dest;
}
MULTI PMC *multiply(Integer value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_mul_bigint_int(INTERP, SELF, VTABLE_get_integer(interp, value), dest);
return dest;
@@ -857,7 +857,7 @@ Decrements the integer.
}
VTABLE PMC *multiply_int(INTVAL value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_mul_bigint_int(INTERP, SELF, value, dest);
return dest;
@@ -890,15 +890,15 @@ Decrements the integer.
METHOD PMC *pow(PMC *value) {
/* XXX only Integer RHS currently */
const INTVAL r = VTABLE_get_integer(INTERP, value);
- PMC *dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC *dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_pow_bigint_int(INTERP, SELF, r, dest);
RETURN(PMC *dest);
}
MULTI PMC *divide(BigInt value, PMC *dest) {
BIGINT *bi;
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_div_bigint(INTERP, SELF, value, dest);
#if 0
@@ -914,7 +914,7 @@ Decrements the integer.
}
MULTI PMC *divide(Integer value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_div_bigint_int(INTERP, SELF, VTABLE_get_integer(interp, value), dest);
return dest;
@@ -929,7 +929,7 @@ Decrements the integer.
}
VTABLE PMC *divide_int(INTVAL value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_div_bigint_int(INTERP, SELF, value, dest);
return dest;
@@ -953,14 +953,14 @@ Decrements the integer.
}
MULTI PMC *floor_divide(BigInt value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_fdiv_bigint(INTERP, SELF, value, dest);
return dest;
}
MULTI PMC *floor_divide(Integer value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_fdiv_bigint_int(INTERP, SELF, VTABLE_get_integer(interp, value), dest);
return dest;
@@ -975,7 +975,7 @@ Decrements the integer.
}
VTABLE PMC *floor_divide_int(INTVAL value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_fdiv_bigint_int(INTERP, SELF, value, dest);
return dest;
@@ -1001,14 +1001,14 @@ Decrements the integer.
}
MULTI PMC *modulus(BigInt value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_mod_bigint(INTERP, SELF, value, dest);
return dest;
}
MULTI PMC *modulus(Integer value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_mod_bigint_int(INTERP, SELF, VTABLE_get_integer(interp, value), dest);
return dest;
@@ -1078,7 +1078,7 @@ Sets C<dest> to the absolute value of SELF.
*/
VTABLE PMC *absolute(PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_abs(INTERP, SELF, dest);
return dest;
@@ -1102,7 +1102,7 @@ Set C<dest> to the negated value of C<SELF>.
*/
VTABLE PMC *neg(PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_neg(INTERP, SELF, dest);
return dest;
View
40 src/pmc/bignum.pmc
@@ -810,7 +810,7 @@ Return GMP version string "x.y.z".
}
VTABLE PMC *clone() {
- PMC *res = pmc_new(INTERP, SELF->vtable->base_type);
+ PMC *res = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
bignum_set(INTERP, res, SELF);
return res;
}
@@ -1046,14 +1046,14 @@ Decrement the BigNum by 1.0.
*/
MULTI PMC *add(BigNum value, PMC *dest) {
- dest = pmc_new(INTERP, SELF->vtable->base_type);
+ dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
bignum_add_bignum(INTERP, SELF, value, dest);
return dest;
}
MULTI PMC *add(Integer value, PMC *dest) {
- dest = pmc_new(INTERP, SELF->vtable->base_type);
+ dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
bignum_add_bignum_int(INTERP, SELF, VTABLE_get_integer(interp, value), dest);
return dest;
@@ -1067,7 +1067,7 @@ Decrement the BigNum by 1.0.
}
VTABLE PMC *add_int(INTVAL value, PMC *dest) {
- dest = pmc_new(INTERP, SELF->vtable->base_type);
+ dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
bignum_add_bignum_int(INTERP, SELF, value, dest);
return dest;
@@ -1109,14 +1109,14 @@ Decrement the BigNum by 1.0.
*/
MULTI PMC *subtract(BigNum value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bignum_sub_bignum(INTERP, SELF, value, dest);
return dest;
}
MULTI PMC *subtract(Integer value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bignum_sub_bignum_int(INTERP, SELF, VTABLE_get_integer(interp, value), dest);
return dest;
@@ -1130,7 +1130,7 @@ Decrement the BigNum by 1.0.
}
VTABLE PMC *subtract_int(INTVAL value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bignum_sub_bignum_int(INTERP, SELF, value, dest);
return dest;
@@ -1172,14 +1172,14 @@ Decrement the BigNum by 1.0.
*/
MULTI PMC *multiply(BigNum value, PMC *dest) {
- dest = pmc_new(INTERP, SELF->vtable->base_type);
+ dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
bignum_mul_bignum(INTERP, SELF, value, dest);
return dest;
}
MULTI PMC *multiply(Integer value, PMC *dest) {
- dest = pmc_new(INTERP, SELF->vtable->base_type);
+ dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
bignum_mul_bignum_int(INTERP, SELF, VTABLE_get_integer(interp, value), dest);
return dest;
@@ -1193,7 +1193,7 @@ Decrement the BigNum by 1.0.
}
VTABLE PMC *multiply_int(INTVAL value, PMC *dest) {
- dest = pmc_new(INTERP, SELF->vtable->base_type);
+ dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
bignum_mul_bignum_int(INTERP, SELF, value, dest);
return dest;
@@ -1243,7 +1243,7 @@ TODO: Only supports Integer values for now.
METHOD PMC *pow(PMC *value) {
/* only Integer RHS currently. TODO: check number and bignum types */
INTVAL r = VTABLE_get_integer(INTERP, value);
- PMC *dest = pmc_new(INTERP, SELF->vtable->base_type);
+ PMC *dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
bignum_pow_bignum_int(INTERP, SELF, r, dest);
RETURN(PMC *dest);
@@ -1259,7 +1259,7 @@ TODO: Only supports Integer values for now.
MULTI PMC *divide(BigNum value, PMC *dest) {
BIGNUM *bn;
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bignum_div_bignum(INTERP, SELF, value, dest);
#if 0
@@ -1275,7 +1275,7 @@ TODO: Only supports Integer values for now.
}
MULTI PMC *divide(Integer value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bignum_div_bignum_int(INTERP, SELF, VTABLE_get_integer(interp, value), dest);
return dest;
@@ -1289,14 +1289,14 @@ TODO: Only supports Integer values for now.
}
VTABLE PMC *divide_int(INTVAL value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bignum_div_bignum_int(INTERP, SELF, value, dest);
return dest;
}
VTABLE PMC *divide_float(FLOATVAL value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bignum_div_bignum_float(INTERP, SELF, value, dest);
return dest;
@@ -1331,14 +1331,14 @@ TODO: Only supports Integer values for now.
*/
MULTI PMC *floor_divide(BigNum value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bignum_fdiv_bignum(INTERP, SELF, value, dest);
return dest;
}
MULTI PMC *floor_divide(Integer value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bignum_fdiv_bignum_int(INTERP, SELF, VTABLE_get_integer(interp, value), dest);
return dest;
@@ -1352,7 +1352,7 @@ TODO: Only supports Integer values for now.
}
VTABLE PMC *floor_divide_int(INTVAL value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bignum_fdiv_bignum_int(INTERP, SELF, value, dest);
return dest;
@@ -1436,7 +1436,7 @@ Sets C<dest> to the absolute value of SELF.
*/
VTABLE PMC *absolute(PMC *dest) {
- dest = pmc_new(INTERP, SELF->vtable->base_type);
+ dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
bignum_abs(INTERP, SELF, dest);
return dest;
@@ -1460,7 +1460,7 @@ Set C<dest> to the negated value of C<SELF>.
*/
VTABLE PMC *neg(PMC *dest) {
- dest = pmc_new(INTERP, SELF->vtable->base_type);
+ dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
bignum_neg(INTERP, SELF, dest);
return dest;
View
16 src/pmc/callcontext.pmc
@@ -269,15 +269,15 @@ autobox_pmc(PARROT_INTERP, Pcc_cell *cell)
switch (CELL_TYPE_MASK(cell)) {
case INTCELL:
- result = pmc_new(interp, HLL_TYPE(enum_class_Integer));
+ result = Parrot_pmc_new(interp, HLL_TYPE(enum_class_Integer));
VTABLE_set_integer_native(interp, result, CELL_INT(cell));
break;
case FLOATCELL:
- result = pmc_new(interp, HLL_TYPE(enum_class_Float));
+ result = Parrot_pmc_new(interp, HLL_TYPE(enum_class_Float));
VTABLE_set_number_native(interp, result, CELL_FLOAT(cell));
break;
case STRINGCELL:
- result = pmc_new(interp, HLL_TYPE(enum_class_String));
+ result = Parrot_pmc_new(interp, HLL_TYPE(enum_class_String));
VTABLE_set_string_native(interp, result, CELL_STRING(cell));
break;
case PMCCELL:
@@ -363,7 +363,7 @@ get_named_names(PARROT_INTERP, ARGIN(PMC *SELF))
/* yes, this *looks* risky, but it's a Parrot STRING hash internally */
if (hash && hash->entries) {
UINTVAL i, j = 0;
- result = pmc_new(interp, enum_class_FixedStringArray);
+ result = Parrot_pmc_new(interp, enum_class_FixedStringArray);
VTABLE_set_integer_native(interp, result, hash->entries);
for (i = 0; i <= hash->mask; i++) {
@@ -1407,7 +1407,7 @@ Creates and returns a clone of the signature.
Pcc_cell *cell;
STRING *short_sig;
PMC *type_tuple, *arg_flags, *return_flags;
- PMC * const dest = pmc_new(INTERP, SELF->vtable->base_type);
+ PMC * const dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
GET_ATTR_positionals(INTERP, SELF, cell);
@@ -1489,13 +1489,13 @@ sub, or for the point of the call a level deeper for the rest.
*/
METHOD backtrace(PMC *resume :optional, INTVAL has_resume :opt_flag) {
- PMC *result = pmc_new(interp, enum_class_ResizablePMCArray);
+ PMC *result = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
PMC *cur_ctx = SELF;
Parrot_Continuation_attributes *cont = has_resume ? PMC_cont(resume) : NULL;
/* Get starting context, then loop over them. */
while (cur_ctx) {
- PMC *frame = pmc_new(interp, enum_class_Hash);
+ PMC *frame = Parrot_pmc_new(interp, enum_class_Hash);
PMC *annotations = NULL;
Parrot_Sub_attributes *sub;
@@ -1524,7 +1524,7 @@ sub, or for the point of the call a level deeper for the rest.
}
if (!annotations)
- annotations = pmc_new(interp, enum_class_Hash);
+ annotations = Parrot_pmc_new(interp, enum_class_Hash);
VTABLE_set_pmc_keyed_str(interp, frame, CONST_STRING(interp, "annotations"), annotations);
View
6 src/pmc/capture.pmc
@@ -22,13 +22,13 @@ These are the vtable functions for the Capture PMC.
do { \
GETATTR_Capture_array((i), (obj), array); \
if (!array) \
- SETATTR_Capture_array((i), (obj), pmc_new((i), enum_class_ResizablePMCArray)); \
+ SETATTR_Capture_array((i), (obj), Parrot_pmc_new((i), enum_class_ResizablePMCArray)); \
} while (0)
#define CAPTURE_hash_CREATE(i, obj) \
do { \
GETATTR_Capture_hash((i), (obj), hash); \
if (!hash) \
- SETATTR_Capture_hash((i), (obj), pmc_new((i), enum_class_Hash)); \
+ SETATTR_Capture_hash((i), (obj), Parrot_pmc_new((i), enum_class_Hash)); \
} while (0)
pmclass Capture auto_attrs {
@@ -61,7 +61,7 @@ Creates an identical copy of the Capture.
VTABLE PMC *clone() {
PMC *array, *hash;
- PMC *dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC *dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
GET_ATTR_array(INTERP, SELF, array);
GET_ATTR_hash(INTERP, SELF, hash);
if (array)
View
50 src/pmc/class.pmc
@@ -106,7 +106,7 @@ cache_class_attribs(PARROT_INTERP, PMC *cur_class, PMC *attrib_index,
/* Build a string representing the fully qualified class name. */
/* Retrieve the fully qualified class name for the class. */
STRING * const fq_class = VTABLE_get_string(interp, cur_class);
- PMC * const class_cache = pmc_new(interp, enum_class_Hash);
+ PMC * const class_cache = Parrot_pmc_new(interp, enum_class_Hash);
VTABLE_set_pmc_keyed_str(interp, cache, fq_class, class_cache);
/* Iterate over the attributes. */
@@ -138,8 +138,8 @@ build_attrib_index(PARROT_INTERP, PMC *self)
{
Parrot_Class_attributes * const _class = PARROT_CLASS(self);
int cur_index = 0;
- PMC * const attrib_index = pmc_new(interp, enum_class_Hash);
- PMC * const cache = pmc_new(interp, enum_class_Hash);
+ PMC * const attrib_index = Parrot_pmc_new(interp, enum_class_Hash);
+ PMC * const cache = Parrot_pmc_new(interp, enum_class_Hash);
const int num_classes = VTABLE_elements(interp, _class->all_parents);
int i;
@@ -344,7 +344,7 @@ initialize_parents(PARROT_INTERP, PMC *object, PMC *all_parents)
if (!PMC_IS_NULL(meth)) {
/* build an empty signature; it has an invocant but no args/retvals */
- PMC * const sig_obj = pmc_new(interp, enum_class_CallContext);
+ PMC * const sig_obj = Parrot_pmc_new(interp, enum_class_CallContext);
/* preserve current_object */
PMC * const old_object = interp->current_object;
VTABLE_set_string_native(interp, sig_obj, CONST_STRING(interp, "Pi->"));
@@ -504,18 +504,18 @@ arguments. The class is attached to the current HLL namespace.
/* Set up the object. */
_class->name = CONST_STRING(interp, "");
_class->_namespace = PMCNULL;
- _class->parents = pmc_new(interp, enum_class_ResizablePMCArray);
- _class->all_parents = pmc_new(interp, enum_class_ResizablePMCArray);
- _class->roles = pmc_new(interp, enum_class_ResizablePMCArray);
- _class->methods = pmc_new(interp, enum_class_Hash);
- _class->attrib_metadata = pmc_new(interp, enum_class_Hash);
+ _class->parents = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
+ _class->all_parents = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
+ _class->roles = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
+ _class->methods = Parrot_pmc_new(interp, enum_class_Hash);
+ _class->attrib_metadata = Parrot_pmc_new(interp, enum_class_Hash);
_class->attrib_index = PMCNULL;
_class->attrib_cache = PMCNULL;
_class->meth_cache = PMCNULL;
- _class->resolve_method = pmc_new(interp, enum_class_ResizablePMCArray);
+ _class->resolve_method = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
- _class->vtable_overrides = pmc_new(interp, enum_class_Hash);
- _class->parent_overrides = pmc_new(interp, enum_class_Hash);
+ _class->vtable_overrides = Parrot_pmc_new(interp, enum_class_Hash);
+ _class->parent_overrides = Parrot_pmc_new(interp, enum_class_Hash);
/* We put ourself on the all parents list. */
VTABLE_push_pmc(interp, _class->all_parents, SELF);
@@ -542,7 +542,7 @@ arguments. The class is attached to the current HLL namespace.
case enum_class_ResizableStringArray:
case enum_class_NameSpace:
/* set only the name property */
- arg = pmc_new(interp, enum_class_Hash);
+ arg = Parrot_pmc_new(interp, enum_class_Hash);
VTABLE_set_pmc_keyed_str(interp, arg, name_str, init_data);
break;
@@ -556,7 +556,7 @@ arguments. The class is attached to the current HLL namespace.
|| VTABLE_isa(interp, init_data, CONST_STRING(interp, "Key"))
|| VTABLE_isa(interp, init_data, CONST_STRING(interp, "ResizableStringArray"))) {
/* set only the name property */
- arg = pmc_new(interp, enum_class_Hash);
+ arg = Parrot_pmc_new(interp, enum_class_Hash);
VTABLE_set_pmc_keyed_str(interp, arg, name_str, init_data);
}
@@ -631,7 +631,7 @@ Returns an error if an attribute of C<name> already exists.
VTABLE void add_attribute(STRING *name, PMC *type) {
Parrot_Class_attributes * const _class = PARROT_CLASS(SELF);
- PMC * const new_attribute = pmc_new(interp, enum_class_Hash);
+ PMC * const new_attribute = Parrot_pmc_new(interp, enum_class_Hash);
/* If we've been instantiated already, not allowed. */
if (_class->instantiated)
@@ -960,11 +960,11 @@ Array of Class PMCs representing the direct parents of this class.
found = _class->parents;
}
else if (Parrot_str_equal(interp, what, CONST_STRING(interp, "name"))) {
- found = pmc_new(interp, enum_class_String);
+ found = Parrot_pmc_new(interp, enum_class_String);
VTABLE_set_string_native(interp, found, _class->name);
}
else if (Parrot_str_equal(interp, what, CONST_STRING(interp, "id"))) {
- found = pmc_new(interp, enum_class_Integer);
+ found = Parrot_pmc_new(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, found, _class->id);
}
else if (Parrot_str_equal(interp, what, CONST_STRING(interp, "namespace"))) {
@@ -987,7 +987,7 @@ Array of Class PMCs representing the direct parents of this class.
found = _class->roles;
}
else if (Parrot_str_equal(interp, what, CONST_STRING(interp, "flags"))) {
- found = pmc_new(interp, enum_class_Integer);
+ found = Parrot_pmc_new(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, found,
(INTVAL)PObj_get_FLAGS(SELF));
}
@@ -1002,7 +1002,7 @@ Array of Class PMCs representing the direct parents of this class.
if (found->vtable->base_type == enum_class_Hash) {
/* for Hash return values, create and return a shallow
* clone because the VTABLE_clone does a deep clone */
- PMC * const hash = pmc_new(interp, enum_class_Hash);
+ PMC * const hash = Parrot_pmc_new(interp, enum_class_Hash);
PMC * const iter = VTABLE_get_iter(interp, found);
while (VTABLE_get_bool(interp, iter)) {
STRING * const key = VTABLE_shift_string(interp, iter);
@@ -1029,7 +1029,7 @@ inspect_str.
VTABLE PMC *inspect() {
/* Create a hash, then use inspect_str to get all of the data to
* fill it up with. */
- PMC * const metadata = pmc_new(interp, enum_class_Hash);
+ PMC * const metadata = Parrot_pmc_new(interp, enum_class_Hash);
STRING * const name_str = CONST_STRING(interp, "name");
STRING * const ns_str = CONST_STRING(interp, "namespace");
STRING * const attrs_str = CONST_STRING(interp, "attributes");
@@ -1191,7 +1191,7 @@ Creates a new PMC object of the type of the class and calls init().
_class->instantiated = 1;
/* Create object. */
- object = pmc_new_noinit(interp, enum_class_Object);
+ object = Parrot_pmc_new_noinit(interp, enum_class_Object);
/* Set custom GC mark and destroy on the object. */
PObj_custom_mark_destroy_SETALL(object);
@@ -1207,7 +1207,7 @@ Creates a new PMC object of the type of the class and calls init().
Parrot_Object_attributes * const objattr =
PMC_data_typed(object, Parrot_Object_attributes *);
objattr->_class = SELF;
- objattr->attrib_store = pmc_new(interp, enum_class_ResizablePMCArray);
+ objattr->attrib_store = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
}
if (!PMC_IS_NULL(init)) {
@@ -1537,7 +1537,7 @@ Used to unarchive the class.
This is just a temporary hack. Type ID numbers shouldn't be externally
visible to the average PIR user. However, we need this for now to interface
-with functions like pmc_new and pmc_reuse, which take type ID numbers still.
+with functions like Parrot_pmc_new and pmc_reuse, which take type ID numbers still.
=cut
@@ -1563,7 +1563,7 @@ Called after the class has been thawed.
/* Recalculate full MRO from thawed parents */
_class->all_parents = Parrot_ComputeMRO_C3(interp, SELF);
- _class->parent_overrides = pmc_new(interp, enum_class_Hash);
+ _class->parent_overrides = Parrot_pmc_new(interp, enum_class_Hash);
/* Rebuild attribute index from thawed attribute metadata */
build_attrib_index(interp, SELF);
@@ -1591,7 +1591,7 @@ Sets the name of the class, and updates the namespace accordingly.
if (has_name) {
/* We'll build a hash just containing the name, then give this to
* init_class_from_hash - saves some code duplication. */
- PMC * const naming_hash = pmc_new(interp, enum_class_Hash);
+ PMC * const naming_hash = Parrot_pmc_new(interp, enum_class_Hash);
STRING * const name_str = CONST_STRING(interp, "name");
VTABLE_set_string_keyed_str(interp, naming_hash, name_str, name);
View
2 src/pmc/codestring.pmc
@@ -189,7 +189,7 @@ the first line is line number zero.
INTVAL eos;
INTVAL jpos;
- linepos = pmc_new(INTERP, enum_class_ResizableIntegerArray);
+ linepos = Parrot_pmc_new(INTERP, enum_class_ResizableIntegerArray);
/* get the string itself */
GET_ATTR_str_val(INTERP, SELF, str);
eos = Parrot_str_byte_length(INTERP, str);
View
118 src/pmc/complex.pmc
@@ -234,7 +234,7 @@ C<complex> object according to 2.1. Built-in Functions.
*/
VTABLE opcode_t *invoke(void *next) {
const int argcP = REG_INT(interp, 3);
- PMC * const res = pmc_new(INTERP, enum_class_Complex);
+ PMC * const res = Parrot_pmc_new(INTERP, enum_class_Complex);
if (argcP == 1) {
PMC * const arg = REG_PMC(interp, 5);
@@ -316,7 +316,7 @@ Creates an identical copy of the complex number.
}
VTABLE PMC *clone() {
- PMC * const dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
FLOATVAL re, im;
GET_ATTR_re(INTERP, SELF, re);
@@ -436,7 +436,7 @@ Returns the requested number (real part for C<real> and imaginary for C<imag>).
}
VTABLE PMC *get_pmc_keyed_str(STRING *key) {
- PMC * const ret = pmc_new(INTERP, enum_class_Float);
+ PMC * const ret = Parrot_pmc_new(INTERP, enum_class_Float);
const FLOATVAL val = SELF.get_number_keyed_str(key);
VTABLE_set_number_native(INTERP, ret, val);
return ret;