diff options
author | Patrik Nyblom <[email protected]> | 2010-02-04 15:21:36 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2010-03-10 14:25:03 +0100 |
commit | 20ba5ed3c281d3f0be587395fa66182873d229f0 (patch) | |
tree | ba60b3f78be5cfc208984e4c941f78410234a1e8 /erts/emulator/beam/export.c | |
parent | 0cbb78132f50be8ba38051963314b9722c1aba05 (diff) | |
download | otp-20ba5ed3c281d3f0be587395fa66182873d229f0.tar.gz otp-20ba5ed3c281d3f0be587395fa66182873d229f0.tar.bz2 otp-20ba5ed3c281d3f0be587395fa66182873d229f0.zip |
Add the BeamInstr data type for loaded BEAM code
For cleanliness, use BeamInstr instead of the UWord
data type to any machine-sized words that are used
for BEAM instructions. Only use UWord for untyped
words in general.
Diffstat (limited to 'erts/emulator/beam/export.c')
-rw-r--r-- | erts/emulator/beam/export.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/erts/emulator/beam/export.c b/erts/emulator/beam/export.c index c39f610924..d251a0e375 100644 --- a/erts/emulator/beam/export.c +++ b/erts/emulator/beam/export.c @@ -46,8 +46,8 @@ static erts_smp_rwmtx_t export_table_lock; /* Locks the secondary export table. #define export_init_lock() erts_smp_rwmtx_init(&export_table_lock, \ "export_tab") -extern UWord* em_call_error_handler; -extern UWord* em_call_traced_function; +extern BeamInstr* em_call_error_handler; +extern BeamInstr* em_call_traced_function; void export_info(int to, void *to_arg) @@ -93,7 +93,7 @@ export_alloc(Export* tmpl) obj->code[2] = tmpl->code[2]; obj->slot.index = -1; obj->address = obj->code+3; - obj->code[3] = (UWord) em_call_error_handler; + obj->code[3] = (BeamInstr) em_call_error_handler; obj->code[4] = 0; obj->match_prog_set = NULL; return obj; @@ -140,7 +140,7 @@ init_export_table(void) Export* erts_find_export_entry(Eterm m, Eterm f, unsigned int a) { - HashValue hval = EXPORT_HASH((UWord) m, (UWord) f, (UWord) a); + HashValue hval = EXPORT_HASH((BeamInstr) m, (BeamInstr) f, (BeamInstr) a); int ix; HashBucket* b; @@ -185,7 +185,7 @@ erts_find_function(Eterm m, Eterm f, unsigned int a) ep = hash_get(&export_table.htable, (void*) &e); if (ep != NULL && ep->address == ep->code+3 && - ep->code[3] != (UWord) em_call_traced_function) { + ep->code[3] != (BeamInstr) em_call_traced_function) { ep = NULL; } return ep; |