Skip to content

Commit

Permalink
D
Browse files Browse the repository at this point in the history
  • Loading branch information
tiky authored and Daniel Toma committed Dec 1, 2010
1 parent 8c09a00 commit a8f3fb2
Show file tree
Hide file tree
Showing 35 changed files with 486 additions and 486 deletions.
6 changes: 3 additions & 3 deletions compilers/imcc/imcc.l
Expand Up @@ -1070,8 +1070,8 @@ define_macro(PARROT_INTERP, ARGIN(const char *name), ARGIN(const params_t *param
m = mem_gc_allocate_zeroed_typed(interp, macro_t);

if (!IMCC_INFO(interp)->macros)
IMCC_INFO(interp)->macros = parrot_new_cstring_hash(interp);
parrot_hash_put(interp, IMCC_INFO(interp)->macros,
IMCC_INFO(interp)->macros = Parrot_hsh_new_cstring_hash(interp);
Parrot_hsh_put(interp, IMCC_INFO(interp)->macros,
PARROT_const_cast(char *, name), m);
}

Expand All @@ -1090,7 +1090,7 @@ find_macro(PARROT_INTERP, const char *name)
if (!IMCC_INFO(interp)->macros)
return NULL;

return (macro_t *)parrot_hash_get(interp, IMCC_INFO(interp)->macros, name);
return (macro_t *)Parrot_hsh_get(interp, IMCC_INFO(interp)->macros, name);
}

static int
Expand Down
6 changes: 3 additions & 3 deletions compilers/imcc/imclexer.c
Expand Up @@ -5490,8 +5490,8 @@ define_macro(PARROT_INTERP, ARGIN(const char *name), ARGIN(const params_t *param
m = mem_gc_allocate_zeroed_typed(interp, macro_t);

if (!IMCC_INFO(interp)->macros)
IMCC_INFO(interp)->macros = parrot_new_cstring_hash(interp);
parrot_hash_put(interp, IMCC_INFO(interp)->macros,
IMCC_INFO(interp)->macros = Parrot_hsh_new_cstring_hash(interp);
Parrot_hsh_put(interp, IMCC_INFO(interp)->macros,
PARROT_const_cast(char *, name), m);
}

Expand All @@ -5510,7 +5510,7 @@ find_macro(PARROT_INTERP, const char *name)
if (!IMCC_INFO(interp)->macros)
return NULL;

return (macro_t *)parrot_hash_get(interp, IMCC_INFO(interp)->macros, name);
return (macro_t *)Parrot_hsh_get(interp, IMCC_INFO(interp)->macros, name);
}

static int
Expand Down
2 changes: 1 addition & 1 deletion compilers/imcc/optimizer.c
Expand Up @@ -803,7 +803,7 @@ eval_ins(PARROT_INTERP, ARGIN(const char *op), size_t ops, ARGIN(SymReg **r))
ASSERT_ARGS(eval_ins)
opcode_t eval[4], *pc;
int i;
op_info_t *op_info = (op_info_t *)parrot_hash_get(interp, interp->op_hash, (void *)op);
op_info_t *op_info = (op_info_t *)Parrot_hsh_get(interp, interp->op_hash, (void *)op);
if (!op_info || !STREQ(op_info->full_name, op))
IMCC_fatal(interp, 1, "eval_ins: op '%s' not found\n", op);
/* now fill registers */
Expand Down
18 changes: 9 additions & 9 deletions compilers/imcc/parser_util.c
Expand Up @@ -210,7 +210,7 @@ check_op(PARROT_INTERP, ARGOUT(op_info_t **op_info), ARGOUT(char *fullname),
{
ASSERT_ARGS(check_op)
op_fullname(fullname, name, r, narg, keyvec);
*op_info = (op_info_t *)parrot_hash_get(interp, interp->op_hash, fullname);
*op_info = (op_info_t *)Parrot_hsh_get(interp, interp->op_hash, fullname);
if (*op_info && !STREQ((*op_info)->full_name, fullname))
*op_info = NULL;
}
Expand All @@ -230,7 +230,7 @@ int
is_op(PARROT_INTERP, ARGIN(const char *name))
{
ASSERT_ARGS(is_op)
return parrot_hash_exists(interp, interp->op_hash, (void *)name);
return Parrot_hsh_exists(interp, interp->op_hash, (void *)name);
}

/*
Expand Down Expand Up @@ -272,7 +272,7 @@ var_arg_ins(PARROT_INTERP, ARGMOD(IMC_Unit *unit), ARGIN(const char *name),
}

op_fullname(fullname, name, r, 1, 0);
op = (op_info_t *)parrot_hash_get(interp, interp->op_hash, fullname);
op = (op_info_t *)Parrot_hsh_get(interp, interp->op_hash, fullname);

PARROT_ASSERT(op && STREQ(op->full_name, fullname));

Expand Down Expand Up @@ -336,13 +336,13 @@ INS(PARROT_INTERP, ARGMOD(IMC_Unit *unit), ARGIN(const char *name),
char fullname[64] = "", format[128] = "";

op_fullname(fullname, name, r, n, keyvec);
op = (op_info_t *)parrot_hash_get(interp, interp->op_hash, fullname);
op = (op_info_t *)Parrot_hsh_get(interp, interp->op_hash, fullname);
if (op && !STREQ(op->full_name, fullname))
op = NULL;

/* maybe we have a fullname */
if (!op) {
op = (op_info_t *)parrot_hash_get(interp, interp->op_hash, name);
op = (op_info_t *)Parrot_hsh_get(interp, interp->op_hash, name);
if (op && !STREQ(op->full_name, name))
op = NULL;
}
Expand All @@ -353,7 +353,7 @@ INS(PARROT_INTERP, ARGMOD(IMC_Unit *unit), ARGIN(const char *name),
if (n_name) {
name = n_name;
op_fullname(fullname, name, r, n, keyvec);
op = (op_info_t *)parrot_hash_get(interp, interp->op_hash, fullname);
op = (op_info_t *)Parrot_hsh_get(interp, interp->op_hash, fullname);
if (op && !STREQ(op->full_name, fullname))
op = NULL;
}
Expand Down Expand Up @@ -1047,7 +1047,7 @@ try_find_op(PARROT_INTERP, ARGMOD(IMC_Unit *unit), ARGIN(const char *name),
if (changed) {
op_info_t *op;
op_fullname(fullname, name, r, n, keyvec);
op = (op_info_t *)parrot_hash_get(interp, interp->op_hash, fullname);
op = (op_info_t *)Parrot_hsh_get(interp, interp->op_hash, fullname);
if (op && !STREQ(op->full_name, fullname))
op = NULL;
return op;
Expand Down Expand Up @@ -1151,7 +1151,7 @@ imcc_init(PARROT_INTERP)
=item C<static void imcc_destroy_macro_values(void *value)>
A callback for parrot_chash_destroy_values() to free all macro-allocated memory.
A callback for Parrot_hsh_chash_destroy_values() to free all macro-allocated memory.
=cut
Expand Down Expand Up @@ -1194,7 +1194,7 @@ imcc_destroy(PARROT_INTERP)
Hash * const macros = IMCC_INFO(interp)->macros;

if (macros)
parrot_chash_destroy_values(interp, macros, imcc_destroy_macro_values);
Parrot_hsh_chash_destroy_values(interp, macros, imcc_destroy_macro_values);

if (IMCC_INFO(interp)->globals)
mem_sys_free(IMCC_INFO(interp)->globals);
Expand Down
4 changes: 2 additions & 2 deletions compilers/imcc/pbc.c
Expand Up @@ -1089,13 +1089,13 @@ add_const_str(PARROT_INTERP, ARGIN(STRING *s))

/* initialize rlookup cache */
if (!ct->string_hash)
ct->string_hash = parrot_create_hash(interp,
ct->string_hash = Parrot_hsh_create_hash(interp,
enum_type_INTVAL,
Hash_key_type_STRING_enc);

ct->str.constants[ct->str.const_count] = s;

parrot_hash_put(interp, ct->string_hash, s,
Parrot_hsh_put(interp, ct->string_hash, s,
(void *)ct->str.const_count);

return ct->str.const_count++;
Expand Down
2 changes: 1 addition & 1 deletion docs/dev/c_functions.pod
Expand Up @@ -212,7 +212,7 @@ without wanting to know its value.
PARROT_EXPORT
PARROT_PURE_FUNCTION
INTVAL
parrot_hash_size(SHIM_INTERP, NOTNULL(const Hash *hash))
Parrot_hsh_size(SHIM_INTERP, NOTNULL(const Hash *hash))
{
return hash->entries;
}
Expand Down

0 comments on commit a8f3fb2

Please sign in to comment.