Skip to content

Commit

Permalink
track parrot renames
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz authored and Tadeusz Sośnierz committed Nov 15, 2011
1 parent ef4702d commit 0296f41
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 29 deletions.
24 changes: 12 additions & 12 deletions src/binder/bind.c
Expand Up @@ -60,8 +60,8 @@ static void setup_binder_statics(PARROT_INTERP) {
NAMED_str = Parrot_str_new_constant(interp, "named");
INSTANTIATE_GENERIC_str = Parrot_str_new_constant(interp, "instantiate_generic");

smo_id = pmc_type(interp, Parrot_str_new(interp, "SixModelObject", 0));
p6l_id = pmc_type(interp, Parrot_str_new(interp, "Perl6LexPad", 0));
smo_id = Parrot_pmc_get_type_str(interp, Parrot_str_new(interp, "SixModelObject", 0));
p6l_id = Parrot_pmc_get_type_str(interp, Parrot_str_new(interp, "Perl6LexPad", 0));
}


Expand Down Expand Up @@ -522,7 +522,7 @@ Rakudo_binding_bind_one_param(PARROT_INTERP, PMC *lexpad, Rakudo_Signature *sign
PMC *bindee = decont_value;
if (param->flags & SIG_ELEM_IS_COPY) {
bindee = Rakudo_binding_create_positional(interp,
pmc_new(interp, enum_class_ResizablePMCArray));
Parrot_pmc_new(interp, enum_class_ResizablePMCArray));
Rakudo_cont_store(interp, bindee, decont_value, 0, 0);
}
VTABLE_set_pmc_keyed_str(interp, lexpad, param->variable_name, bindee);
Expand All @@ -533,7 +533,7 @@ Rakudo_binding_bind_one_param(PARROT_INTERP, PMC *lexpad, Rakudo_Signature *sign
PMC *bindee = decont_value;
if (param->flags & SIG_ELEM_IS_COPY) {
bindee = Rakudo_binding_create_hash(interp,
pmc_new(interp, enum_class_Hash));
Parrot_pmc_new(interp, enum_class_Hash));
Rakudo_cont_store(interp, bindee, decont_value, 0, 0);
}
VTABLE_set_pmc_keyed_str(interp, lexpad, param->variable_name, bindee);
Expand Down Expand Up @@ -683,7 +683,7 @@ Rakudo_binding_handle_optional(PARROT_INTERP, Rakudo_Parameter *param, PMC *lexp
return Rakudo_binding_create_positional(interp, PMCNULL);
}
else if (param->flags & SIG_ELEM_HASH_SIGIL) {
return Rakudo_binding_create_hash(interp, pmc_new(interp, enum_class_Hash));
return Rakudo_binding_create_hash(interp, Parrot_pmc_new(interp, enum_class_Hash));
}
else {
return param->nominal_type;
Expand Down Expand Up @@ -765,7 +765,7 @@ Rakudo_binding_bind(PARROT_INTERP, PMC *lexpad, PMC *sig_pmc, PMC *capture,
PMC *named_names = VTABLE_get_attr_str(interp, capture, NAMED_str);
if (!PMC_IS_NULL(named_names)) {
PMC *iter = VTABLE_get_iter(interp, named_names);
named_args_copy = pmc_new(interp, enum_class_Hash);
named_args_copy = Parrot_pmc_new(interp, enum_class_Hash);
while (VTABLE_get_bool(interp, iter)) {
STRING *name = VTABLE_shift_string(interp, iter);
VTABLE_set_pmc_keyed_str(interp, named_args_copy, name,
Expand All @@ -780,10 +780,10 @@ Rakudo_binding_bind(PARROT_INTERP, PMC *lexpad, PMC *sig_pmc, PMC *capture,
PMC *list_part = VTABLE_get_attr_keyed(interp, capture, captype, LIST_str);
PMC *hash_part = VTABLE_get_attr_keyed(interp, capture, captype, HASH_str);
capture = list_part->vtable->base_type == enum_class_ResizablePMCArray ?
list_part : pmc_new(interp, enum_class_ResizablePMCArray);
list_part : Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
if (hash_part->vtable->base_type == enum_class_Hash) {
PMC *iter = VTABLE_get_iter(interp, hash_part);
named_args_copy = pmc_new(interp, enum_class_Hash);
named_args_copy = Parrot_pmc_new(interp, enum_class_Hash);
while (VTABLE_get_bool(interp, iter)) {
STRING *arg_copy_name = VTABLE_shift_string(interp, iter);
VTABLE_set_pmc_keyed_str(interp, named_args_copy, arg_copy_name,
Expand Down Expand Up @@ -813,8 +813,8 @@ Rakudo_binding_bind(PARROT_INTERP, PMC *lexpad, PMC *sig_pmc, PMC *capture,
else {
PMC *captype = Rakudo_types_capture_get();
PMC *capsnap = REPR(captype)->allocate(interp, STABLE(captype));
PMC *pos_args = pmc_new(interp, enum_class_ResizablePMCArray);
PMC *named_args = pmc_new(interp, enum_class_Hash);
PMC *pos_args = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
PMC *named_args = Parrot_pmc_new(interp, enum_class_Hash);
INTVAL k;
VTABLE_set_attr_keyed(interp, capsnap, captype, LIST_str, pos_args);
VTABLE_set_attr_keyed(interp, capsnap, captype, HASH_str, named_args);
Expand Down Expand Up @@ -867,7 +867,7 @@ Rakudo_binding_bind(PARROT_INTERP, PMC *lexpad, PMC *sig_pmc, PMC *capture,
* will by definition contain all unbound named parameters and use
* that, or just create an empty one. */
PMC *slurpy = PMC_IS_NULL(named_args_copy) ?
pmc_new(interp, enum_class_Hash) :
Parrot_pmc_new(interp, enum_class_Hash) :
named_args_copy;
cur_bv.type = BIND_VAL_OBJ;
cur_bv.val.o = Rakudo_binding_create_hash(interp, slurpy);
Expand All @@ -888,7 +888,7 @@ Rakudo_binding_bind(PARROT_INTERP, PMC *lexpad, PMC *sig_pmc, PMC *capture,
if (param->flags & (SIG_ELEM_SLURPY_POS | SIG_ELEM_SLURPY_LOL)) {
/* Create Perl 6 array, create RPA of all remaining things, then
* store it. */
PMC *temp = pmc_new(interp, enum_class_ResizablePMCArray);
PMC *temp = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
while (cur_pos_arg < num_pos_args) {
cur_bv = get_positional_bind_val(interp, pc_positionals, capture, cur_pos_arg);
VTABLE_push_pmc(interp, temp, cur_bv.type == BIND_VAL_OBJ ?
Expand Down
4 changes: 2 additions & 2 deletions src/binder/multidispatch.c
Expand Up @@ -508,7 +508,7 @@ static PMC* find_best_candidate(PARROT_INTERP, Rakudo_md_candidate_info **candid
Rakudo_md_candidate_info **cur_candidate = candidates;
Rakudo_md_candidate_info **possibles = mem_allocate_n_typed(num_candidates + 1, Rakudo_md_candidate_info *);
PMC *junctional_res = PMCNULL;
PMC *many_res = many ? pmc_new(interp, enum_class_ResizablePMCArray) : PMCNULL;
PMC *many_res = many ? Parrot_pmc_new(interp, enum_class_ResizablePMCArray) : PMCNULL;
const INTVAL num_args = VTABLE_elements(interp, capture);
INTVAL possibles_count = 0;
INTVAL pure_type_result = 1;
Expand Down Expand Up @@ -820,7 +820,7 @@ static Rakudo_md_candidate_info ** obtain_candidate_list(PARROT_INTERP,
else {
Rakudo_md_cache *cache = mem_allocate_zeroed_typed(Rakudo_md_cache);
cache->candidates = sort_candidates(interp, code_obj->dispatchees);
code_obj->dispatcher_cache = pmc_new(interp, enum_class_Pointer);
code_obj->dispatcher_cache = Parrot_pmc_new(interp, enum_class_Pointer);
VTABLE_set_pointer(interp, code_obj->dispatcher_cache, cache);
PARROT_GC_WRITE_BARRIER(interp, dispatcher);
return cache->candidates;
Expand Down
18 changes: 9 additions & 9 deletions src/ops/perl6.ops
Expand Up @@ -42,7 +42,7 @@ Does various setup tasks on behalf of all of the other dynops.
*/
inline op rakudo_dynop_setup() :base_core {
/* Get 6model object type ID. */
smo_id = pmc_type(interp, Parrot_str_new(interp, "SixModelObject", 0));
smo_id = Parrot_pmc_get_type_str(interp, Parrot_str_new(interp, "SixModelObject", 0));
}


Expand Down Expand Up @@ -256,7 +256,7 @@ Sees if we could potentially bind a signature.
*/
inline op perl6_trial_bind_ct(out INT, in PMC, in PMC, in PMC) :base_core {
/* Build up a capture with sample arguments. */
PMC *capture = pmc_new(interp, enum_class_CallContext);
PMC *capture = Parrot_pmc_new(interp, enum_class_CallContext);
INTVAL num_args = VTABLE_elements(interp, $3);
INTVAL args_ok = 1;
INTVAL i;
Expand Down Expand Up @@ -842,7 +842,7 @@ Creates a multi-dispatch thunk for the specified onlystar dispatcher.
inline op perl6_multi_dispatch_thunk(out PMC, in PMC) :base_core {
Rakudo_Code *code_obj = (Rakudo_Code *)PMC_data($2);
if (PMC_IS_NULL(code_obj->md_thunk)) {
code_obj->md_thunk = pmc_new(interp, pmc_type(interp, Parrot_str_new(interp, "MDThunk", 0)));
code_obj->md_thunk = Parrot_pmc_new(interp, Parrot_pmc_get_type_str(interp, Parrot_str_new(interp, "MDThunk", 0)));
PARROT_GC_WRITE_BARRIER(interp, $2);
VTABLE_set_pointer(interp, code_obj->md_thunk, &Rakudo_md_dispatch);
VTABLE_set_pmc(interp, code_obj->md_thunk, $2);
Expand All @@ -867,7 +867,7 @@ inline op perl6_multi_dispatch_cand_thunk(out PMC, in PMC, in INT) :base_core {
PMC *chosen = VTABLE_get_pmc_keyed_int(interp, disp_obj->dispatchees, $3);
Rakudo_Code *code_obj = (Rakudo_Code *)PMC_data(chosen);
if (PMC_IS_NULL(code_obj->md_thunk)) {
code_obj->md_thunk = pmc_new(interp, pmc_type(interp, Parrot_str_new(interp, "CTMThunk", 0)));
code_obj->md_thunk = Parrot_pmc_new(interp, Parrot_pmc_get_type_str(interp, Parrot_str_new(interp, "CTMThunk", 0)));
PARROT_GC_WRITE_BARRIER(interp, chosen);
VTABLE_set_pmc(interp, code_obj->md_thunk, chosen);
}
Expand Down Expand Up @@ -915,7 +915,7 @@ decide some multiple dispatches at compile time.
inline op perl6_multi_dispatch_ct(out PMC, in PMC, in PMC, in PMC) :base_core {
/* Build up a capture with sample arguments. */
PMC *result = PMCNULL;
PMC *capture = pmc_new(interp, enum_class_CallContext);
PMC *capture = Parrot_pmc_new(interp, enum_class_CallContext);
INTVAL num_args = VTABLE_elements(interp, $3);
INTVAL args_ok = 1;
INTVAL i;
Expand Down Expand Up @@ -945,7 +945,7 @@ inline op perl6_multi_dispatch_ct(out PMC, in PMC, in PMC, in PMC) :base_core {
}

/* Use the capture to do a compile time trial dispatch. */
$1 = pmc_new(interp, enum_class_ResizablePMCArray);
$1 = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
if (args_ok) {
VTABLE_set_integer_keyed_int(interp, $1, 0,
Rakudo_md_ct_dispatch(interp, $2, capture, &result));
Expand Down Expand Up @@ -1128,7 +1128,7 @@ current block.
*/
inline op perl6_current_args_rpa(out PMC) :base_core {
PMC *cur_ctx = CURRENT_CONTEXT(interp);
PMC *result = pmc_new(interp, enum_class_ResizablePMCArray);
PMC *result = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
INTVAL args = VTABLE_elements(interp, cur_ctx);
INTVAL i;
for (i = 0; i < args; i++)
Expand Down Expand Up @@ -1289,7 +1289,7 @@ inline op perl6_shiftpush(inout PMC, in PMC, in INT) :base_core {
}
}
if ($3 > 0)
VTABLE_splice(interp, $2, pmc_new(interp, enum_class_ResizablePMCArray), 0, $3);
VTABLE_splice(interp, $2, Parrot_pmc_new(interp, enum_class_ResizablePMCArray), 0, $3);
}


Expand Down Expand Up @@ -1395,7 +1395,7 @@ inline op perl6_invoke_catchhandler(invar PMC, in PMC) :flow {
PMC * ctx = CURRENT_CONTEXT(interp);
opcode_t * dest = expr NEXT();
PMC * call_obj = Parrot_pcc_build_call_from_c_args(interp, PMCNULL, "P", $2);
PMC * cont = pmc_new(interp, enum_class_Continuation);
PMC * cont = Parrot_pmc_new(interp, enum_class_Continuation);
PMC * ectx = PMCNULL;

VTABLE_set_pointer(interp, cont, dest);
Expand Down
2 changes: 1 addition & 1 deletion src/pmc/perl6lexinfo.pmc
Expand Up @@ -42,7 +42,7 @@ pmclass Perl6LexInfo

VTABLE void init_pmc(PMC *sub) {
/* Set up the lex info storage. */
PMC *name_to_register_map = pmc_new(interp, enum_class_Hash);
PMC *name_to_register_map = Parrot_pmc_new(interp, enum_class_Hash);
VTABLE_init_int(interp, name_to_register_map, (INTVAL)enum_type_INTVAL);
SET_ATTR_name_to_register_map(INTERP, SELF, name_to_register_map);

Expand Down
10 changes: 5 additions & 5 deletions src/pmc/perl6lexpad.pmc
Expand Up @@ -191,10 +191,10 @@ Return the LexInfo PMC, if any or a Null PMC.
/* Compute the caches if needed. */
if (static_lexpad->changed || PMC_IS_NULL(static_slots_cache)) {
/* (Re-)build caches. */
PMC *slots = pmc_new(interp, enum_class_ResizableIntegerArray);
PMC *values = pmc_new(interp, enum_class_ResizablePMCArray);
PMC *clone_flags = pmc_new(interp, enum_class_ResizableIntegerArray);
PMC *state_flags = pmc_new(interp, enum_class_ResizableStringArray);
PMC *slots = Parrot_pmc_new(interp, enum_class_ResizableIntegerArray);
PMC *values = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
PMC *clone_flags = Parrot_pmc_new(interp, enum_class_ResizableIntegerArray);
PMC *state_flags = Parrot_pmc_new(interp, enum_class_ResizableStringArray);
PMC *iter = VTABLE_get_iter(interp, static_lexpad->static_values);
while (VTABLE_get_bool(interp, iter)) {
STRING *name = VTABLE_shift_string(interp, iter);
Expand Down Expand Up @@ -245,7 +245,7 @@ Return the LexInfo PMC, if any or a Null PMC.
GETATTR_Sub_multi_signature(interp, sub, p6sub);
state_stash = VTABLE_get_attr_keyed(interp, p6sub, Block, CONST_STRING(interp, "$!state_vars"));
if (PMC_IS_NULL(state_stash)) {
state_stash = pmc_new(interp, enum_class_Hash);
state_stash = Parrot_pmc_new(interp, enum_class_Hash);
VTABLE_set_attr_keyed(interp, p6sub, Block, CONST_STRING(interp, "$!state_vars"), state_stash);
PObj_flag_SET(P6LEXPAD_STATE_INIT, (PMC *)ctx);
}
Expand Down

0 comments on commit 0296f41

Please sign in to comment.