aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/hipe
diff options
context:
space:
mode:
authorSverker Eriksson <sverker@erlang.org>2016-09-15 14:38:09 +0200
committerSverker Eriksson <sverker@erlang.org>2016-10-10 11:31:54 +0200
commitd8e69ab77f32ce1503125fa464d6db3ba1c904d0 (patch)
tree4777a854191e5077b0e49d0fc33c2a0ab86df30d /erts/emulator/hipe
parent16f2daa48333cced93f4f31d9a57e5d2e3a8f9e8 (diff)
downloadotp-d8e69ab77f32ce1503125fa464d6db3ba1c904d0.tar.gz
otp-d8e69ab77f32ce1503125fa464d6db3ba1c904d0.tar.bz2
otp-d8e69ab77f32ce1503125fa464d6db3ba1c904d0.zip
erts: Refactor rename structs hipe_mfa and hipe_ref
Diffstat (limited to 'erts/emulator/hipe')
-rw-r--r--erts/emulator/hipe/hipe_bif0.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/erts/emulator/hipe/hipe_bif0.c b/erts/emulator/hipe/hipe_bif0.c
index 3336fded7a..b6d0abb2d1 100644
--- a/erts/emulator/hipe/hipe_bif0.c
+++ b/erts/emulator/hipe/hipe_bif0.c
@@ -537,13 +537,13 @@ BIF_RETTYPE hipe_bifs_merge_term_1(BIF_ALIST_1)
BIF_RET(val);
}
-struct mfa_t {
+struct hipe_mfa {
Eterm mod;
Eterm fun;
Uint ari;
};
-static int term_to_mfa(Eterm term, struct mfa_t *mfa)
+static int term_to_mfa(Eterm term, struct hipe_mfa *mfa)
{
Eterm mod, fun, a;
Uint ari;
@@ -601,7 +601,7 @@ static Uint *hipe_find_emu_address(Eterm mod, Eterm name, unsigned int arity)
Uint *hipe_bifs_find_pc_from_mfa(Eterm term)
{
- struct mfa_t mfa;
+ struct hipe_mfa mfa;
if (!term_to_mfa(term, &mfa))
return NULL;
@@ -621,7 +621,7 @@ BIF_RETTYPE hipe_bifs_set_native_address_3(BIF_ALIST_3)
Eterm *pc;
void *address;
int is_closure;
- struct mfa_t mfa;
+ struct hipe_mfa mfa;
switch (BIF_ARG_3) {
case am_false:
@@ -1017,7 +1017,7 @@ struct hipe_mfa_info {
Eterm *beam_code;
Uint orig_beam_op;
struct hipe_mfa_info_list *refers_to;
- struct ref *referred_from;
+ struct hipe_ref *referred_from;
#if defined(__powerpc__) || defined(__ppc__) || defined(__powerpc64__) || defined(__arm__)
void *trampoline;
#endif
@@ -1235,7 +1235,7 @@ void hipe_mfa_set_trampoline(Eterm m, Eterm f, unsigned int arity, void *trampol
BIF_RETTYPE hipe_bifs_set_funinfo_native_address_3(BIF_ALIST_3)
{
- struct mfa_t mfa;
+ struct hipe_mfa mfa;
void *address;
int is_exported;
@@ -1257,7 +1257,7 @@ BIF_RETTYPE hipe_bifs_set_funinfo_native_address_3(BIF_ALIST_3)
BIF_RETTYPE hipe_bifs_invalidate_funinfo_native_addresses_1(BIF_ALIST_1)
{
Eterm lst;
- struct mfa_t mfa;
+ struct hipe_mfa mfa;
struct hipe_mfa_info *p;
hipe_mfa_info_table_rwlock();
@@ -1426,7 +1426,7 @@ BIF_RETTYPE hipe_find_na_or_make_stub(BIF_ALIST_3)
BIF_RETTYPE hipe_bifs_find_na_or_make_stub_2(BIF_ALIST_2)
{
- struct mfa_t mfa;
+ struct hipe_mfa mfa;
void *address;
int is_remote;
@@ -1512,12 +1512,12 @@ struct hipe_mfa_info_list {
struct hipe_mfa_info_list *next;
};
-struct ref {
+struct hipe_ref {
struct hipe_mfa_info *caller_mfa;
void *address;
void *trampoline;
unsigned int flags;
- struct ref *next;
+ struct hipe_ref *next;
};
#define REF_FLAG_IS_LOAD_MFA 1 /* bit 0: 0 == call, 1 == load_mfa */
#define REF_FLAG_IS_REMOTE 2 /* bit 1: 0 == local, 1 == remote */
@@ -1528,16 +1528,16 @@ struct ref {
*/
BIF_RETTYPE hipe_bifs_add_ref_2(BIF_ALIST_2)
{
- struct mfa_t callee;
+ struct hipe_mfa callee;
Eterm *tuple;
- struct mfa_t caller;
+ struct hipe_mfa caller;
void *address;
void *trampoline;
unsigned int flags;
struct hipe_mfa_info *callee_mfa;
struct hipe_mfa_info *caller_mfa;
struct hipe_mfa_info_list *refers_to;
- struct ref *ref;
+ struct hipe_ref *ref;
if (!term_to_mfa(BIF_ARG_1, &callee))
goto badarg;
@@ -1607,9 +1607,9 @@ BIF_RETTYPE hipe_bifs_add_ref_2(BIF_ALIST_2)
*/
BIF_RETTYPE hipe_bifs_mark_referred_from_1(BIF_ALIST_1) /* get_refs_from */
{
- struct mfa_t mfa;
+ struct hipe_mfa mfa;
const struct hipe_mfa_info *p;
- struct ref *ref;
+ struct hipe_ref *ref;
if (!term_to_mfa(BIF_ARG_1, &mfa))
BIF_ERROR(BIF_P, BADARG);
@@ -1647,7 +1647,7 @@ static void hipe_purge_all_refs(void)
erts_free(ERTS_ALC_T_HIPE, to);
}
while (mfa->referred_from) {
- struct ref* from = mfa->referred_from;
+ struct hipe_ref* from = mfa->referred_from;
mfa->referred_from = from->next;
erts_free(ERTS_ALC_T_HIPE, from);
}
@@ -1659,10 +1659,10 @@ static void hipe_purge_all_refs(void)
BIF_RETTYPE hipe_bifs_remove_refs_from_1(BIF_ALIST_1)
{
- struct mfa_t mfa;
+ struct hipe_mfa mfa;
struct hipe_mfa_info *caller_mfa, *callee_mfa;
struct hipe_mfa_info_list *refers_to, *tmp_refers_to;
- struct ref **prev, *ref;
+ struct hipe_ref **prev, *ref;
if (BIF_ARG_1 == am_all) {
hipe_purge_all_refs();
@@ -1686,7 +1686,7 @@ BIF_RETTYPE hipe_bifs_remove_refs_from_1(BIF_ALIST_1)
prev = &ref->next;
ref = ref->next;
} else {
- struct ref *tmp = ref;
+ struct hipe_ref *tmp = ref;
ref = ref->next;
*prev = ref;
erts_free(ERTS_ALC_T_HIPE, tmp);
@@ -1713,9 +1713,9 @@ BIF_RETTYPE hipe_bifs_remove_refs_from_1(BIF_ALIST_1)
*/
BIF_RETTYPE hipe_bifs_redirect_referred_from_1(BIF_ALIST_1)
{
- struct mfa_t mfa;
+ struct hipe_mfa mfa;
struct hipe_mfa_info *p;
- struct ref **prev, *ref;
+ struct hipe_ref **prev, *ref;
int is_remote, res;
void *new_address;
@@ -1738,7 +1738,7 @@ BIF_RETTYPE hipe_bifs_redirect_referred_from_1(BIF_ALIST_1)
fprintf(stderr, "%s: patch failed\r\n", __FUNCTION__);
ref->flags &= ~REF_FLAG_PENDING_REDIRECT;
if (ref->flags & REF_FLAG_PENDING_REMOVE) {
- struct ref *tmp = ref;
+ struct hipe_ref *tmp = ref;
ref = ref->next;
*prev = ref;
erts_free(ERTS_ALC_T_HIPE, tmp);