fix bad ordering in HEAPFIELDS: OPERANDS must be well placed before we can
recover atom table and dependent preds.
This commit is contained in:
parent
71de4ed52a
commit
7155fbec22
24
H/dhstruct.h
24
H/dhstruct.h
@ -75,6 +75,18 @@
|
|||||||
#define HeapTopOwner Yap_heap_regs->heap_top_owner
|
#define HeapTopOwner Yap_heap_regs->heap_top_owner
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#if USE_THREADED_CODE
|
||||||
|
#define OP_RTABLE Yap_heap_regs->op_rtable
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define EXECUTE_CPRED_OP_CODE Yap_heap_regs->execute_cpred_op_code
|
||||||
|
#define EXPAND_OP_CODE Yap_heap_regs->expand_op_code
|
||||||
|
#define FAIL_OPCODE Yap_heap_regs->fail_op
|
||||||
|
#define INDEX_OPCODE Yap_heap_regs->index_op
|
||||||
|
#define LOCKPRED_OPCODE Yap_heap_regs->lockpred_op
|
||||||
|
#define UNDEF_OPCODE Yap_heap_regs->undef_op
|
||||||
|
|
||||||
#define NOfAtoms Yap_heap_regs->n_of_atoms
|
#define NOfAtoms Yap_heap_regs->n_of_atoms
|
||||||
#define AtomHashTableSize Yap_heap_regs->atom_hash_table_size
|
#define AtomHashTableSize Yap_heap_regs->atom_hash_table_size
|
||||||
#define WideAtomHashTableSize Yap_heap_regs->wide_atom_hash_table_size
|
#define WideAtomHashTableSize Yap_heap_regs->wide_atom_hash_table_size
|
||||||
@ -108,20 +120,8 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#if USE_THREADED_CODE
|
|
||||||
#define OP_RTABLE Yap_heap_regs->op_rtable
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define Yap_ExecutionMode Yap_heap_regs->execution_mode
|
#define Yap_ExecutionMode Yap_heap_regs->execution_mode
|
||||||
|
|
||||||
#define EXECUTE_CPRED_OP_CODE Yap_heap_regs->execute_cpred_op_code
|
|
||||||
#define EXPAND_OP_CODE Yap_heap_regs->expand_op_code
|
|
||||||
#define FAIL_OPCODE Yap_heap_regs->fail_op
|
|
||||||
#define INDEX_OPCODE Yap_heap_regs->index_op
|
|
||||||
#define LOCKPRED_OPCODE Yap_heap_regs->lockpred_op
|
|
||||||
#define UNDEF_OPCODE Yap_heap_regs->undef_op
|
|
||||||
|
|
||||||
#define PredHash Yap_heap_regs->pred_hash
|
#define PredHash Yap_heap_regs->pred_hash
|
||||||
#if defined(YAPOR) || defined(THREADS)
|
#if defined(YAPOR) || defined(THREADS)
|
||||||
#define PredHashRWLock Yap_heap_regs->pred_hash_rw_lock
|
#define PredHashRWLock Yap_heap_regs->pred_hash_rw_lock
|
||||||
|
24
H/hstruct.h
24
H/hstruct.h
@ -75,6 +75,18 @@
|
|||||||
int heap_top_owner;
|
int heap_top_owner;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#if USE_THREADED_CODE
|
||||||
|
opentry *op_rtable;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
OPCODE execute_cpred_op_code;
|
||||||
|
OPCODE expand_op_code;
|
||||||
|
OPCODE fail_op;
|
||||||
|
OPCODE index_op;
|
||||||
|
OPCODE lockpred_op;
|
||||||
|
OPCODE undef_op;
|
||||||
|
|
||||||
UInt n_of_atoms;
|
UInt n_of_atoms;
|
||||||
UInt atom_hash_table_size;
|
UInt atom_hash_table_size;
|
||||||
UInt wide_atom_hash_table_size;
|
UInt wide_atom_hash_table_size;
|
||||||
@ -108,20 +120,8 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#if USE_THREADED_CODE
|
|
||||||
opentry *op_rtable;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
yap_exec_mode execution_mode;
|
yap_exec_mode execution_mode;
|
||||||
|
|
||||||
OPCODE execute_cpred_op_code;
|
|
||||||
OPCODE expand_op_code;
|
|
||||||
OPCODE fail_op;
|
|
||||||
OPCODE index_op;
|
|
||||||
OPCODE lockpred_op;
|
|
||||||
OPCODE undef_op;
|
|
||||||
|
|
||||||
struct pred_entry **pred_hash;
|
struct pred_entry **pred_hash;
|
||||||
#if defined(YAPOR) || defined(THREADS)
|
#if defined(YAPOR) || defined(THREADS)
|
||||||
rwlock_t pred_hash_rw_lock;
|
rwlock_t pred_hash_rw_lock;
|
||||||
|
24
H/ihstruct.h
24
H/ihstruct.h
@ -76,6 +76,18 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#if USE_THREADED_CODE
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
Yap_heap_regs->execute_cpred_op_code = Yap_opcode(_execute_cpred);
|
||||||
|
Yap_heap_regs->expand_op_code = Yap_opcode(_expand_index);
|
||||||
|
Yap_heap_regs->fail_op = Yap_opcode(_op_fail);
|
||||||
|
Yap_heap_regs->index_op = Yap_opcode(_index_pred);
|
||||||
|
Yap_heap_regs->lockpred_op = Yap_opcode(_lock_pred);
|
||||||
|
Yap_heap_regs->undef_op = Yap_opcode(_undef_p);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -108,20 +120,8 @@
|
|||||||
|
|
||||||
Yap_InitModules();
|
Yap_InitModules();
|
||||||
|
|
||||||
|
|
||||||
#if USE_THREADED_CODE
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Yap_heap_regs->execution_mode = INTERPRETED;
|
Yap_heap_regs->execution_mode = INTERPRETED;
|
||||||
|
|
||||||
Yap_heap_regs->execute_cpred_op_code = Yap_opcode(_execute_cpred);
|
|
||||||
Yap_heap_regs->expand_op_code = Yap_opcode(_expand_index);
|
|
||||||
Yap_heap_regs->fail_op = Yap_opcode(_op_fail);
|
|
||||||
Yap_heap_regs->index_op = Yap_opcode(_index_pred);
|
|
||||||
Yap_heap_regs->lockpred_op = Yap_opcode(_lock_pred);
|
|
||||||
Yap_heap_regs->undef_op = Yap_opcode(_undef_p);
|
|
||||||
|
|
||||||
InitPredHash();
|
InitPredHash();
|
||||||
#if defined(YAPOR) || defined(THREADS)
|
#if defined(YAPOR) || defined(THREADS)
|
||||||
|
|
||||||
|
24
H/rhstruct.h
24
H/rhstruct.h
@ -76,6 +76,18 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#if USE_THREADED_CODE
|
||||||
|
Yap_heap_regs->op_rtable = OpRTableAdjust(Yap_heap_regs->op_rtable);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
Yap_heap_regs->execute_cpred_op_code = Yap_opcode(_execute_cpred);
|
||||||
|
Yap_heap_regs->expand_op_code = Yap_opcode(_expand_index);
|
||||||
|
Yap_heap_regs->fail_op = Yap_opcode(_op_fail);
|
||||||
|
Yap_heap_regs->index_op = Yap_opcode(_index_pred);
|
||||||
|
Yap_heap_regs->lockpred_op = Yap_opcode(_lock_pred);
|
||||||
|
Yap_heap_regs->undef_op = Yap_opcode(_undef_p);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -109,18 +121,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#if USE_THREADED_CODE
|
|
||||||
Yap_heap_regs->op_rtable = OpRTableAdjust(Yap_heap_regs->op_rtable);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Yap_heap_regs->execute_cpred_op_code = Yap_opcode(_execute_cpred);
|
|
||||||
Yap_heap_regs->expand_op_code = Yap_opcode(_expand_index);
|
|
||||||
Yap_heap_regs->fail_op = Yap_opcode(_op_fail);
|
|
||||||
Yap_heap_regs->index_op = Yap_opcode(_index_pred);
|
|
||||||
Yap_heap_regs->lockpred_op = Yap_opcode(_lock_pred);
|
|
||||||
Yap_heap_regs->undef_op = Yap_opcode(_undef_p);
|
|
||||||
|
|
||||||
RestorePredHash();
|
RestorePredHash();
|
||||||
#if defined(YAPOR) || defined(THREADS)
|
#if defined(YAPOR) || defined(THREADS)
|
||||||
|
@ -78,6 +78,20 @@ int heap_top_owner HeapTopOwner =-1 void
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* execution info */
|
||||||
|
/* OPCODE TABLE, needed to recover op tables */
|
||||||
|
#if USE_THREADED_CODE
|
||||||
|
opentry *op_rtable OP_RTABLE void OpRTableAdjust
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* popular opcodes */
|
||||||
|
OPCODE execute_cpred_op_code EXECUTE_CPRED_OP_CODE MkOp _execute_cpred
|
||||||
|
OPCODE expand_op_code EXPAND_OP_CODE MkOp _expand_index
|
||||||
|
OPCODE fail_op FAIL_OPCODE MkOp _op_fail
|
||||||
|
OPCODE index_op INDEX_OPCODE MkOp _index_pred
|
||||||
|
OPCODE lockpred_op LOCKPRED_OPCODE MkOp _lock_pred
|
||||||
|
OPCODE undef_op UNDEF_OPCODE MkOp _undef_p
|
||||||
|
|
||||||
/* atom tables */
|
/* atom tables */
|
||||||
UInt n_of_atoms NOfAtoms void void
|
UInt n_of_atoms NOfAtoms void void
|
||||||
UInt atom_hash_table_size AtomHashTableSize void void
|
UInt atom_hash_table_size AtomHashTableSize void void
|
||||||
@ -115,23 +129,9 @@ struct mod_entry *current_modules CurrentModules =NULL ModEntryPtrAdjust
|
|||||||
// don't actually want to define a field
|
// don't actually want to define a field
|
||||||
void void void Yap_InitModules() void
|
void void void Yap_InitModules() void
|
||||||
|
|
||||||
/* execution info */
|
|
||||||
/* OPCODE TABLE */
|
|
||||||
#if USE_THREADED_CODE
|
|
||||||
opentry *op_rtable OP_RTABLE void OpRTableAdjust
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Anderson's JIT */
|
/* Anderson's JIT */
|
||||||
yap_exec_mode execution_mode Yap_ExecutionMode =INTERPRETED void
|
yap_exec_mode execution_mode Yap_ExecutionMode =INTERPRETED void
|
||||||
|
|
||||||
/* popular opcodes */
|
|
||||||
OPCODE execute_cpred_op_code EXECUTE_CPRED_OP_CODE MkOp _execute_cpred
|
|
||||||
OPCODE expand_op_code EXPAND_OP_CODE MkOp _expand_index
|
|
||||||
OPCODE fail_op FAIL_OPCODE MkOp _op_fail
|
|
||||||
OPCODE index_op INDEX_OPCODE MkOp _index_pred
|
|
||||||
OPCODE lockpred_op LOCKPRED_OPCODE MkOp _lock_pred
|
|
||||||
OPCODE undef_op UNDEF_OPCODE MkOp _undef_p
|
|
||||||
|
|
||||||
/* The Predicate Hash Table: fast access to predicates. */
|
/* The Predicate Hash Table: fast access to predicates. */
|
||||||
struct pred_entry **pred_hash PredHash InitPredHash() RestorePredHash()
|
struct pred_entry **pred_hash PredHash InitPredHash() RestorePredHash()
|
||||||
#if defined(YAPOR) || defined(THREADS)
|
#if defined(YAPOR) || defined(THREADS)
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit e071f01c1d9015e6d3fabc73092a6e902541485a
|
Subproject commit c325e4564bb8d4e32c27f2061df85f13d315974e
|
@ -1 +1 @@
|
|||||||
Subproject commit eb6d27251c2548c25e6d37fff2a27a014caaa7aa
|
Subproject commit a2d2f03107eecd45462cd61a678035132cf06326
|
Reference in New Issue
Block a user