[svn:parrot] r47031 - in branches/ns_func_cleanup: docs include/parrot src src/ops src/pmc
whiteknight at svn.parrot.org
whiteknight at svn.parrot.org
Wed May 26 23:29:03 UTC 2010
Author: whiteknight
Date: Wed May 26 23:29:02 2010
New Revision: 47031
URL: https://trac.parrot.org/parrot/changeset/47031
Log:
Parrot_[get|set]_global -> Parrot_ns_[get|set]_global
Modified:
branches/ns_func_cleanup/docs/embed.pod
branches/ns_func_cleanup/include/parrot/global.h
branches/ns_func_cleanup/src/global.c
branches/ns_func_cleanup/src/multidispatch.c
branches/ns_func_cleanup/src/ops/core_ops.c
branches/ns_func_cleanup/src/ops/var.ops
branches/ns_func_cleanup/src/pmc/namespace.pmc
Modified: branches/ns_func_cleanup/docs/embed.pod
==============================================================================
--- branches/ns_func_cleanup/docs/embed.pod Wed May 26 23:16:06 2010 (r47030)
+++ branches/ns_func_cleanup/docs/embed.pod Wed May 26 23:29:02 2010 (r47031)
@@ -761,7 +761,7 @@
=item C<Parrot_get_encoding>
-=item C<Parrot_get_global>
+=item C<Parrot_ns_get_global>
=item C<Parrot_get_HLL_id>
@@ -1503,7 +1503,7 @@
=item C<Parrot_set_flag>
-=item C<Parrot_set_global>
+=item C<Parrot_ns_set_global>
=item C<Parrot_set_intreg>
Modified: branches/ns_func_cleanup/include/parrot/global.h
==============================================================================
--- branches/ns_func_cleanup/include/parrot/global.h Wed May 26 23:16:06 2010 (r47030)
+++ branches/ns_func_cleanup/include/parrot/global.h Wed May 26 23:29:02 2010 (r47031)
@@ -61,7 +61,7 @@
PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
-PMC * Parrot_get_global(PARROT_INTERP,
+PMC * Parrot_ns_get_global(PARROT_INTERP,
ARGIN_NULLOK(PMC *ns),
ARGIN_NULLOK(STRING *globalname))
__attribute__nonnull__(1);
@@ -119,7 +119,7 @@
__attribute__nonnull__(2);
PARROT_EXPORT
-void Parrot_set_global(PARROT_INTERP,
+void Parrot_ns_set_global(PARROT_INTERP,
ARGIN_NULLOK(PMC *ns),
ARGIN_NULLOK(STRING *globalname),
ARGIN_NULLOK(PMC *val))
@@ -156,7 +156,7 @@
#define ASSERT_ARGS_Parrot_find_name_op __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(name))
-#define ASSERT_ARGS_Parrot_get_global __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_ns_get_global __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_Parrot_ns_get_namespace_keyed __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
@@ -181,7 +181,7 @@
#define ASSERT_ARGS_Parrot_ns_get_name __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(_namespace))
-#define ASSERT_ARGS_Parrot_set_global __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_ns_set_global __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_Parrot_store_global_n __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
Modified: branches/ns_func_cleanup/src/global.c
==============================================================================
--- branches/ns_func_cleanup/src/global.c Wed May 26 23:16:06 2010 (r47030)
+++ branches/ns_func_cleanup/src/global.c Wed May 26 23:29:02 2010 (r47031)
@@ -409,9 +409,9 @@
/*
-=item C<PMC * Parrot_get_global(PARROT_INTERP, PMC *ns, STRING *globalname)>
+=item C<PMC * Parrot_ns_get_global(PARROT_INTERP, PMC *ns, STRING *globalname)>
-Parrot_get_global allows a null namespace without throwing an exception; it
+Parrot_ns_get_global allows a null namespace without throwing an exception; it
simply returns PMCNULL in that case.
NOTE: At present the use of the {get, set}_global functions is mandatory due to the
@@ -431,7 +431,7 @@
/*
* {get, set}_global.
*
- * Parrot_get_global allows a null namespace without throwing an exception; it
+ * Parrot_ns_get_global allows a null namespace without throwing an exception; it
* simply returns PMCNULL in that case.
*
* NOTE: At present the use of the {get, set}_global functions is mandatory due to the
@@ -443,9 +443,9 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
PMC *
-Parrot_get_global(PARROT_INTERP, ARGIN_NULLOK(PMC *ns), ARGIN_NULLOK(STRING *globalname))
+Parrot_ns_get_global(PARROT_INTERP, ARGIN_NULLOK(PMC *ns), ARGIN_NULLOK(STRING *globalname))
{
- ASSERT_ARGS(Parrot_get_global)
+ ASSERT_ARGS(Parrot_ns_get_global)
if (PMC_IS_NULL(ns))
return PMCNULL;
@@ -454,7 +454,7 @@
/*
-=item C<void Parrot_set_global(PARROT_INTERP, PMC *ns, STRING *globalname, PMC
+=item C<void Parrot_ns_set_global(PARROT_INTERP, PMC *ns, STRING *globalname, PMC
*val)>
Set the global named C<globalname> in the namespace C<ns> to the value C<val>.
@@ -465,10 +465,10 @@
PARROT_EXPORT
void
-Parrot_set_global(PARROT_INTERP, ARGIN_NULLOK(PMC *ns),
+Parrot_ns_set_global(PARROT_INTERP, ARGIN_NULLOK(PMC *ns),
ARGIN_NULLOK(STRING *globalname), ARGIN_NULLOK(PMC *val))
{
- ASSERT_ARGS(Parrot_set_global)
+ ASSERT_ARGS(Parrot_ns_set_global)
VTABLE_set_pmc_keyed_str(interp, ns, globalname, val);
}
Modified: branches/ns_func_cleanup/src/multidispatch.c
==============================================================================
--- branches/ns_func_cleanup/src/multidispatch.c Wed May 26 23:16:06 2010 (r47030)
+++ branches/ns_func_cleanup/src/multidispatch.c Wed May 26 23:29:02 2010 (r47031)
@@ -331,7 +331,7 @@
STRING * const multi_str = CONST_STRING(interp, "MULTI");
PMC * const ns = Parrot_ns_make_namespace_keyed_str(interp,
interp->root_namespace, multi_str);
- PMC * const multi_sub = Parrot_get_global(interp, ns, name);
+ PMC * const multi_sub = Parrot_ns_get_global(interp, ns, name);
if (PMC_IS_NULL(multi_sub)) {
return PMCNULL;
@@ -844,7 +844,7 @@
if (PMC_IS_NULL(ns))
return;
- multi_sub = Parrot_get_global(interp, ns, name);
+ multi_sub = Parrot_ns_get_global(interp, ns, name);
if (PMC_IS_NULL(multi_sub))
return;
@@ -870,7 +870,7 @@
STRING * const multi_str = CONST_STRING(interp, "MULTI");
PMC * const ns = Parrot_ns_get_namespace_keyed_str(interp,
interp->root_namespace, multi_str);
- PMC *multi_sub = Parrot_get_global(interp, ns, name);
+ PMC *multi_sub = Parrot_ns_get_global(interp, ns, name);
if (PMC_IS_NULL(multi_sub))
return;
@@ -898,11 +898,11 @@
STRING * const multi_str = CONST_STRING(interp, "MULTI");
PMC * const ns = Parrot_ns_make_namespace_keyed_str(interp,
interp->root_namespace, multi_str);
- PMC *multi_sub = Parrot_get_global(interp, ns, sub_name);
+ PMC *multi_sub = Parrot_ns_get_global(interp, ns, sub_name);
if (PMC_IS_NULL(multi_sub)) {
multi_sub = Parrot_pmc_new_constant(interp, enum_class_MultiSub);
- Parrot_set_global(interp, ns, sub_name, multi_sub);
+ Parrot_ns_set_global(interp, ns, sub_name, multi_sub);
}
PARROT_ASSERT(multi_sub->vtable->base_type == enum_class_MultiSub);
@@ -931,11 +931,11 @@
interp->HLL_namespace,
Parrot_pcc_get_HLL(interp, CURRENT_CONTEXT(interp)));
PMC * const ns = Parrot_ns_make_namespace_keyed_str(interp, hll_ns, ns_name);
- PMC *multi_sub = Parrot_get_global(interp, ns, sub_name);
+ PMC *multi_sub = Parrot_ns_get_global(interp, ns, sub_name);
if (PMC_IS_NULL(multi_sub)) {
multi_sub = Parrot_pmc_new_constant(interp, enum_class_MultiSub);
- Parrot_set_global(interp, ns, sub_name, multi_sub);
+ Parrot_ns_set_global(interp, ns, sub_name, multi_sub);
}
PARROT_ASSERT(multi_sub->vtable->base_type == enum_class_MultiSub);
Modified: branches/ns_func_cleanup/src/ops/core_ops.c
==============================================================================
--- branches/ns_func_cleanup/src/ops/core_ops.c Wed May 26 23:16:06 2010 (r47030)
+++ branches/ns_func_cleanup/src/ops/core_ops.c Wed May 26 23:29:02 2010 (r47031)
@@ -27396,7 +27396,7 @@
Parrot_set_global_s_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const cur_ns = Parrot_pcc_get_namespace(interp, CURRENT_CONTEXT(interp));
- Parrot_set_global(interp, cur_ns, SREG(1), PREG(2));
+ Parrot_ns_set_global(interp, cur_ns, SREG(1), PREG(2));
return (opcode_t *)cur_opcode + 3;}
@@ -27404,7 +27404,7 @@
Parrot_set_global_sc_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const cur_ns = Parrot_pcc_get_namespace(interp, CURRENT_CONTEXT(interp));
- Parrot_set_global(interp, cur_ns, CONST(1)->u.string, PREG(2));
+ Parrot_ns_set_global(interp, cur_ns, CONST(1)->u.string, PREG(2));
return (opcode_t *)cur_opcode + 3;}
@@ -27414,7 +27414,7 @@
PMC * const cur_ns = Parrot_pcc_get_namespace(interp, CURRENT_CONTEXT(interp));
PMC * const ns = Parrot_ns_make_namespace_keyed(interp, cur_ns, PREG(1));
- Parrot_set_global(interp, ns, SREG(2), PREG(3));
+ Parrot_ns_set_global(interp, ns, SREG(2), PREG(3));
return (opcode_t *)cur_opcode + 4;}
@@ -27424,7 +27424,7 @@
PMC * const cur_ns = Parrot_pcc_get_namespace(interp, CURRENT_CONTEXT(interp));
PMC * const ns = Parrot_ns_make_namespace_keyed(interp, cur_ns, CONST(1)->u.key);
- Parrot_set_global(interp, ns, SREG(2), PREG(3));
+ Parrot_ns_set_global(interp, ns, SREG(2), PREG(3));
return (opcode_t *)cur_opcode + 4;}
@@ -27434,7 +27434,7 @@
PMC * const cur_ns = Parrot_pcc_get_namespace(interp, CURRENT_CONTEXT(interp));
PMC * const ns = Parrot_ns_make_namespace_keyed(interp, cur_ns, PREG(1));
- Parrot_set_global(interp, ns, CONST(2)->u.string, PREG(3));
+ Parrot_ns_set_global(interp, ns, CONST(2)->u.string, PREG(3));
return (opcode_t *)cur_opcode + 4;}
@@ -27444,7 +27444,7 @@
PMC * const cur_ns = Parrot_pcc_get_namespace(interp, CURRENT_CONTEXT(interp));
PMC * const ns = Parrot_ns_make_namespace_keyed(interp, cur_ns, CONST(1)->u.key);
- Parrot_set_global(interp, ns, CONST(2)->u.string, PREG(3));
+ Parrot_ns_set_global(interp, ns, CONST(2)->u.string, PREG(3));
return (opcode_t *)cur_opcode + 4;}
@@ -27452,7 +27452,7 @@
Parrot_set_hll_global_s_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const hll_ns = Parrot_get_ctx_HLL_namespace(interp);
- Parrot_set_global(interp, hll_ns, SREG(1), PREG(2));
+ Parrot_ns_set_global(interp, hll_ns, SREG(1), PREG(2));
return (opcode_t *)cur_opcode + 3;}
@@ -27460,7 +27460,7 @@
Parrot_set_hll_global_sc_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const hll_ns = Parrot_get_ctx_HLL_namespace(interp);
- Parrot_set_global(interp, hll_ns, CONST(1)->u.string, PREG(2));
+ Parrot_ns_set_global(interp, hll_ns, CONST(1)->u.string, PREG(2));
return (opcode_t *)cur_opcode + 3;}
@@ -27470,7 +27470,7 @@
PMC * const hll_ns = Parrot_get_ctx_HLL_namespace(interp);
PMC * const ns = Parrot_ns_make_namespace_keyed(interp, hll_ns, PREG(1));
- Parrot_set_global(interp, ns, SREG(2), PREG(3));
+ Parrot_ns_set_global(interp, ns, SREG(2), PREG(3));
return (opcode_t *)cur_opcode + 4;}
@@ -27480,7 +27480,7 @@
PMC * const hll_ns = Parrot_get_ctx_HLL_namespace(interp);
PMC * const ns = Parrot_ns_make_namespace_keyed(interp, hll_ns, CONST(1)->u.key);
- Parrot_set_global(interp, ns, SREG(2), PREG(3));
+ Parrot_ns_set_global(interp, ns, SREG(2), PREG(3));
return (opcode_t *)cur_opcode + 4;}
@@ -27490,7 +27490,7 @@
PMC * const hll_ns = Parrot_get_ctx_HLL_namespace(interp);
PMC * const ns = Parrot_ns_make_namespace_keyed(interp, hll_ns, PREG(1));
- Parrot_set_global(interp, ns, CONST(2)->u.string, PREG(3));
+ Parrot_ns_set_global(interp, ns, CONST(2)->u.string, PREG(3));
return (opcode_t *)cur_opcode + 4;}
@@ -27500,7 +27500,7 @@
PMC * const hll_ns = Parrot_get_ctx_HLL_namespace(interp);
PMC * const ns = Parrot_ns_make_namespace_keyed(interp, hll_ns, CONST(1)->u.key);
- Parrot_set_global(interp, ns, CONST(2)->u.string, PREG(3));
+ Parrot_ns_set_global(interp, ns, CONST(2)->u.string, PREG(3));
return (opcode_t *)cur_opcode + 4;}
@@ -27508,7 +27508,7 @@
Parrot_set_root_global_s_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const root_ns = interp->root_namespace;
- Parrot_set_global(interp, root_ns, SREG(1), PREG(2));
+ Parrot_ns_set_global(interp, root_ns, SREG(1), PREG(2));
return (opcode_t *)cur_opcode + 3;}
@@ -27516,7 +27516,7 @@
Parrot_set_root_global_sc_p(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
PMC * const root_ns = interp->root_namespace;
- Parrot_set_global(interp, root_ns, CONST(1)->u.string, PREG(2));
+ Parrot_ns_set_global(interp, root_ns, CONST(1)->u.string, PREG(2));
return (opcode_t *)cur_opcode + 3;}
@@ -27526,7 +27526,7 @@
PMC * const root_ns = interp->root_namespace;
PMC * const ns = Parrot_ns_make_namespace_keyed(interp, root_ns, PREG(1));
- Parrot_set_global(interp, ns, SREG(2), PREG(3));
+ Parrot_ns_set_global(interp, ns, SREG(2), PREG(3));
return (opcode_t *)cur_opcode + 4;}
@@ -27536,7 +27536,7 @@
PMC * const root_ns = interp->root_namespace;
PMC * const ns = Parrot_ns_make_namespace_keyed(interp, root_ns, CONST(1)->u.key);
- Parrot_set_global(interp, ns, SREG(2), PREG(3));
+ Parrot_ns_set_global(interp, ns, SREG(2), PREG(3));
return (opcode_t *)cur_opcode + 4;}
@@ -27546,7 +27546,7 @@
PMC * const root_ns = interp->root_namespace;
PMC * const ns = Parrot_ns_make_namespace_keyed(interp, root_ns, PREG(1));
- Parrot_set_global(interp, ns, CONST(2)->u.string, PREG(3));
+ Parrot_ns_set_global(interp, ns, CONST(2)->u.string, PREG(3));
return (opcode_t *)cur_opcode + 4;}
@@ -27556,7 +27556,7 @@
PMC * const root_ns = interp->root_namespace;
PMC * const ns = Parrot_ns_make_namespace_keyed(interp, root_ns, CONST(1)->u.key);
- Parrot_set_global(interp, ns, CONST(2)->u.string, PREG(3));
+ Parrot_ns_set_global(interp, ns, CONST(2)->u.string, PREG(3));
return (opcode_t *)cur_opcode + 4;}
@@ -29265,7 +29265,7 @@
1268, /* op_count */
core_op_info_table, /* op_info_table */
core_op_func_table, /* op_func_table */
- get_op /* op_code() */
+ get_op /* op_code() */
};
/*
Modified: branches/ns_func_cleanup/src/ops/var.ops
==============================================================================
--- branches/ns_func_cleanup/src/ops/var.ops Wed May 26 23:16:06 2010 (r47030)
+++ branches/ns_func_cleanup/src/ops/var.ops Wed May 26 23:29:02 2010 (r47031)
@@ -376,14 +376,14 @@
op set_global(in STR, invar PMC) {
PMC * const cur_ns = Parrot_pcc_get_namespace(interp, CURRENT_CONTEXT(interp));
- Parrot_set_global(interp, cur_ns, $1, $2);
+ Parrot_ns_set_global(interp, cur_ns, $1, $2);
}
op set_global(in PMC, in STR, invar PMC) {
PMC * const cur_ns = Parrot_pcc_get_namespace(interp, CURRENT_CONTEXT(interp));
PMC * const ns = Parrot_ns_make_namespace_keyed(interp, cur_ns, $1);
- Parrot_set_global(interp, ns, $2, $3);
+ Parrot_ns_set_global(interp, ns, $2, $3);
}
=item B<set_hll_global>(in STR, invar PMC)
@@ -400,14 +400,14 @@
op set_hll_global(in STR, invar PMC) {
PMC * const hll_ns = Parrot_get_ctx_HLL_namespace(interp);
- Parrot_set_global(interp, hll_ns, $1, $2);
+ Parrot_ns_set_global(interp, hll_ns, $1, $2);
}
op set_hll_global(in PMC, in STR, invar PMC) {
PMC * const hll_ns = Parrot_get_ctx_HLL_namespace(interp);
PMC * const ns = Parrot_ns_make_namespace_keyed(interp, hll_ns, $1);
- Parrot_set_global(interp, ns, $2, $3);
+ Parrot_ns_set_global(interp, ns, $2, $3);
}
=item B<set_root_global>(in STR, invar PMC)
@@ -424,14 +424,14 @@
op set_root_global(in STR, invar PMC) {
PMC * const root_ns = interp->root_namespace;
- Parrot_set_global(interp, root_ns, $1, $2);
+ Parrot_ns_set_global(interp, root_ns, $1, $2);
}
op set_root_global(in PMC, in STR, invar PMC) {
PMC * const root_ns = interp->root_namespace;
PMC * const ns = Parrot_ns_make_namespace_keyed(interp, root_ns, $1);
- Parrot_set_global(interp, ns, $2, $3);
+ Parrot_ns_set_global(interp, ns, $2, $3);
}
=back
Modified: branches/ns_func_cleanup/src/pmc/namespace.pmc
==============================================================================
--- branches/ns_func_cleanup/src/pmc/namespace.pmc Wed May 26 23:16:06 2010 (r47030)
+++ branches/ns_func_cleanup/src/pmc/namespace.pmc Wed May 26 23:29:02 2010 (r47031)
@@ -456,7 +456,7 @@
key = VTABLE_shift_pmc(INTERP, key);
if (!key) {
- Parrot_set_global(INTERP, ns, part, value);
+ Parrot_ns_set_global(INTERP, ns, part, value);
return;
}
@@ -471,7 +471,7 @@
STRING * const part = VTABLE_get_string_keyed_int(INTERP, key, i);
if ((i + 1) >= elements) { /* Last entry in the array */
- Parrot_set_global(INTERP, ns, part, value);
+ Parrot_ns_set_global(INTERP, ns, part, value);
return;
}
More information about the parrot-commits
mailing list