Skip to content

Commit

Permalink
updates for the ns_func_cleanup branch that just merged in Parrot
Browse files Browse the repository at this point in the history
Also bump PARROT_REVISION.

Signed-off-by: Moritz Lenz <moritz@faui2k3.org>
  • Loading branch information
Whiteknight authored and moritz committed Jun 20, 2010
1 parent f9943a2 commit d6309ea
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion build/PARROT_REVISION
@@ -1 +1 @@
47640 2.5.0
47723
6 changes: 3 additions & 3 deletions src/binder/bind.c
Expand Up @@ -45,7 +45,7 @@ static PMC *
Rakudo_binding_create_array(PARROT_INTERP, PMC *rest) {
static PMC *truepmc = NULL;
PMC *hll_ns = Parrot_get_ctx_HLL_namespace(interp);
PMC *arr_ns = Parrot_get_namespace_keyed_str(interp, hll_ns, string_from_literal(interp, "Array"));
PMC *arr_ns = Parrot_ns_get_namespace_keyed_str(interp, hll_ns, string_from_literal(interp, "Array"));
PMC *arr_class = VTABLE_get_class(interp, arr_ns);
PMC *result = VTABLE_instantiate(interp, arr_class, PMCNULL);
INTVAL type_id = pmc_type(interp, string_from_literal(interp, "P6opaque"));
Expand Down Expand Up @@ -84,7 +84,7 @@ Rakudo_binding_create_hash(PARROT_INTERP, PMC *storage) {
static PMC *
Rakudo_binding_create(PARROT_INTERP, STRING *classname) {
PMC *ns = Parrot_get_ctx_HLL_namespace(interp);
PMC *class_ns = Parrot_get_namespace_keyed_str(interp, ns, classname);
PMC *class_ns = Parrot_ns_get_namespace_keyed_str(interp, ns, classname);
PMC *class_obj = VTABLE_get_class(interp, class_ns);
PMC *result = VTABLE_instantiate(interp, class_obj, PMCNULL);
return result;
Expand Down Expand Up @@ -559,7 +559,7 @@ Rakudo_binding_bind_signature(PARROT_INTERP, PMC *lexpad, PMC *signature,
* For now, we don't have that, so we just build off the current
* capture. */
PMC *ns = Parrot_get_ctx_HLL_namespace(interp);
PMC *snapper = Parrot_get_global(interp, ns, string_from_literal(interp, "!snapshot_capture"));
PMC *snapper = Parrot_ns_get_global(interp, ns, string_from_literal(interp, "!snapshot_capture"));
PMC *snapshot = PMCNULL;
Parrot_ext_call(interp, snapper, "PiIP->P", capture, cur_pos_arg, named_args_copy, &snapshot);
bind_fail = Rakudo_binding_bind_one_param(interp, lexpad, elements[i], snapshot,
Expand Down
4 changes: 2 additions & 2 deletions src/ops/perl6.ops
Expand Up @@ -501,7 +501,7 @@ inline op set_signature_elem(in PMC, in INT, in STR, in INT, inout PMC, inout PM
}
}
else {
element->nominal_type = Parrot_find_global_n(interp, Parrot_get_ctx_HLL_namespace(interp),
element->nominal_type = Parrot_ns_find_namespace_global(interp, Parrot_get_ctx_HLL_namespace(interp),
string_from_literal(interp, "Mu"));
}

Expand Down Expand Up @@ -633,7 +633,7 @@ inline op bind_signature(in PMC) :base_core {
if (bind_error == BIND_RESULT_JUNCTION) {
/* Find dispatcher and call it. */
PMC *returns = Parrot_pmc_new(interp, enum_class_CallContext);
PMC *dispatcher = Parrot_find_global_n(interp, Parrot_get_ctx_HLL_namespace(interp),
PMC *dispatcher = Parrot_ns_find_namespace_global(interp, Parrot_get_ctx_HLL_namespace(interp),
string_from_literal(interp, "!DISPATCH_JUNCTION_SINGLE"));
opcode_t *next;
PMC *junc_result, *caller_sig;
Expand Down
2 changes: 1 addition & 1 deletion src/pmc/objectref_pmc.template
Expand Up @@ -23,7 +23,7 @@ pmclass ObjectRef dynpmc group perl6_group manual_attrs {
VTABLE void init() {
PMC * const hll_ns = Parrot_get_ctx_HLL_namespace(INTERP);
STRING * const s_obj = string_from_literal(INTERP, "$!OBJECTREF");
PMC * const objectpmc = Parrot_find_global_n(INTERP, hll_ns, s_obj);
PMC * const objectpmc = Parrot_ns_find_namespace_global(INTERP, hll_ns, s_obj);
STATICSELF.init_pmc(objectpmc);
}

Expand Down
2 changes: 1 addition & 1 deletion src/pmc/p6invocation.pmc
Expand Up @@ -260,7 +260,7 @@ pmclass P6Invocation dynpmc group perl6_group auto_attrs {

/* Otherwise, we look up something that when invoked will just give a
* dispatch failure. */
ns = Parrot_get_namespace_keyed_str(interp, interp->root_namespace, CONST_STRING(interp, "perl6"));
ns = Parrot_ns_get_namespace_keyed_str(interp, interp->root_namespace, CONST_STRING(interp, "perl6"));
first_candidate = VTABLE_get_pmc_keyed_str(interp, ns, CONST_STRING(interp, "!deferal_fail"));
}
addr = VTABLE_invoke(interp, first_candidate, next);
Expand Down
12 changes: 6 additions & 6 deletions src/pmc/p6opaque.pmc
Expand Up @@ -99,7 +99,7 @@ static PMC *do_handles(PARROT_INTERP, PMC *cur_class, PMC *handlers, STRING *nam
PMC *ns_key = pmc_new(interp, enum_class_ResizableStringArray);
VTABLE_push_string(interp, ns_key, perl6_str);
VTABLE_push_string(interp, ns_key, Mu_str);
ns = Parrot_get_namespace_keyed(interp, interp->root_namespace, ns_key);
ns = Parrot_ns_get_namespace_keyed(interp, interp->root_namespace, ns_key);
p6meta = VTABLE_get_pmc_keyed_str(interp, ns, P6META_str);
meth = VTABLE_find_method(interp, p6meta, get_parrotclass_str);
Parrot_ext_call(interp, meth, "PiP->P", p6meta, matcher, &can_check);
Expand Down Expand Up @@ -142,7 +142,7 @@ static PMC *do_handles(PARROT_INTERP, PMC *cur_class, PMC *handlers, STRING *nam
/* Did we find anything? */
if (attr) {
/* Look up helper, clone it, attach names and return that. */
PMC *sub = Parrot_find_global_n(interp, Parrot_get_ctx_HLL_namespace(interp),
PMC *sub = Parrot_ns_find_namespace_global(interp, Parrot_get_ctx_HLL_namespace(interp),
CONST_STRING(interp, "!HANDLES_DISPATCH_HELPER"));
PMC *boxed_attrname = pmc_new(interp, enum_class_String);
PMC *boxed_methodname = pmc_new(interp, enum_class_String);
Expand Down Expand Up @@ -401,7 +401,7 @@ back some kind of iterator to let us get all of the possible candidates.
!Parrot_str_equal(interp, name, item_str) &&
!Parrot_str_equal(interp, name, defined_str)) {
/* Look up closure maker, clone it, attach name and return that. */
PMC *sub = Parrot_find_global_n(interp, Parrot_get_ctx_HLL_namespace(interp),
PMC *sub = Parrot_ns_find_namespace_global(interp, Parrot_get_ctx_HLL_namespace(interp),
MAKE_WHATEVER_CLOSURE_str);
PMC *boxed_name = pmc_new(interp, enum_class_String);
VTABLE_set_string_native(interp, boxed_name, name);
Expand All @@ -427,7 +427,7 @@ back some kind of iterator to let us get all of the possible candidates.
ns_key = pmc_new(interp, enum_class_ResizableStringArray);
VTABLE_push_string(interp, ns_key, perl6_str);
VTABLE_push_string(interp, ns_key, Perl6Role_str);
ns = Parrot_get_namespace_keyed(interp, interp->root_namespace, ns_key);
ns = Parrot_ns_get_namespace_keyed(interp, interp->root_namespace, ns_key);
punner = VTABLE_get_pmc_keyed_str(interp, ns, CONST_STRING(interp, "!pun_helper"));

/* Return a clone with the method name set as a property. */
Expand All @@ -445,7 +445,7 @@ back some kind of iterator to let us get all of the possible candidates.
/* If it's a junction and we need to auto-thread the call. */
if (PMC_IS_NULL(method)) {
if (VTABLE_isa(interp, SELF, Junction_str)) {
PMC *sub = Parrot_find_global_n(interp, Parrot_get_ctx_HLL_namespace(interp),
PMC *sub = Parrot_ns_find_namespace_global(interp, Parrot_get_ctx_HLL_namespace(interp),
CONST_STRING(interp, "!DISPATCH_JUNCTION_METHOD"));
PMC *boxed_name = pmc_new(interp, enum_class_String);
VTABLE_set_string_native(interp, boxed_name, name);
Expand Down Expand Up @@ -525,7 +525,7 @@ Invokes the object (if this vtable function is overridden).
PMC *postcircumfix = VTABLE_find_method(interp, SELF, CONST_STRING(interp, "postcircumfix:<( )>"));
if (!PMC_IS_NULL(postcircumfix)) {
/* Call via thunk that fixes up parameters. */
PMC *thunk = Parrot_find_global_n(interp, Parrot_get_ctx_HLL_namespace(interp),
PMC *thunk = Parrot_ns_find_namespace_global(interp, Parrot_get_ctx_HLL_namespace(interp),
CONST_STRING(interp, "!postcircumfix_forwarder"));
PMC *call_sig = Parrot_pcc_get_signature(interp, CURRENT_CONTEXT(interp));
VTABLE_unshift_pmc(interp, call_sig, SELF);
Expand Down
2 changes: 1 addition & 1 deletion src/pmc/p6role.pmc
Expand Up @@ -55,7 +55,7 @@ pmclass P6role extends Role dynpmc group perl6_group auto_attrs {
ns_key = pmc_new(interp, enum_class_ResizableStringArray);
VTABLE_push_string(interp, ns_key, CONST_STRING(interp, "perl6"));
VTABLE_push_string(interp, ns_key, CONST_STRING(interp, "Perl6Role"));
ns = Parrot_get_namespace_keyed(interp, interp->root_namespace, ns_key);
ns = Parrot_ns_get_namespace_keyed(interp, interp->root_namespace, ns_key);
punner = VTABLE_get_pmc_keyed_str(interp, ns, CONST_STRING(interp, "!pun_helper"));

/* Return a clone with the method name set as a property. */
Expand Down
2 changes: 1 addition & 1 deletion src/pmc/perl6multisub.pmc
Expand Up @@ -660,7 +660,7 @@ static PMC* do_dispatch(PARROT_INTERP, PMC *self, candidate_info **candidates, P
/* Look up multi junction dispatcher, clone it, attach this multi-sub
* as a property and hand that back as the dispatch result. We also
* stick it in the MMD cache for next time around. */
PMC *sub = Parrot_find_global_n(interp, Parrot_get_ctx_HLL_namespace(interp),
PMC *sub = Parrot_ns_find_namespace_global(interp, Parrot_get_ctx_HLL_namespace(interp),
CONST_STRING(interp, "!DISPATCH_JUNCTION_MULTI"));
sub = VTABLE_clone(interp, sub);
VTABLE_setprop(interp, sub, CONST_STRING(interp, "sub"), self);
Expand Down

0 comments on commit d6309ea

Please sign in to comment.