Skip to content

Commit

Permalink
initialize member variables of Dispatch Table
Browse files Browse the repository at this point in the history
  • Loading branch information
meetesh06 committed Sep 2, 2021
1 parent 1cc4750 commit 07ca0d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 0 additions & 4 deletions rir/src/interpreter/interp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1124,16 +1124,12 @@ RIR_INLINE SEXP rirCall(CallContext& call, InterpreterInstance* ctx) {
Function* fun = dispatch(call, table);
fun->registerInvocation();

#if LOGG > 0
Context assumptions = call.givenContext;
fun->clearDisabledAssumptions(assumptions);
assumptions = table->combineContextWith(assumptions);
#endif

if (
#if LOGG > 0
!table->isBlacklisted(assumptions) &&
#endif
!isDeoptimizing() && RecompileHeuristic(table, fun)) {
Context given = call.givenContext;
// addDynamicAssumptionForOneTarget compares arguments with the
Expand Down
4 changes: 3 additions & 1 deletion rir/src/runtime/DispatchTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,9 @@ struct DispatchTable
// GC area starts at the end of the DispatchTable
sizeof(DispatchTable),
// GC area is just the pointers in the entry array
cap) {}
cap), hast(0) {
for(int i = 0; i< BLACKLIST_SIZE; i++) { contextBlacklist_[i]=0; }
}

size_t size_ = 0;
Context userDefinedContext_;
Expand Down

0 comments on commit 07ca0d2

Please sign in to comment.