Skip to content

Commit

Permalink
Merge pull request #436 from donno2048/develop/main
Browse files Browse the repository at this point in the history
Add `=` operator
  • Loading branch information
tonybaloney authored Nov 15, 2021
2 parents ff5b7da + a736bc5 commit 046beb0
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/pyjion/pyjit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,30 @@ PyjionJittedCode::~PyjionJittedCode() {
delete j_profile;
}


void PyjionJittedCode::operator = (const PyjionJittedCode& code) {
j_run_count = code.j_run_count;
j_failed = code.j_failed;
j_compile_result = code.j_compile_result;
j_optimizations = code.j_optimizations;
j_addr = code.j_addr;
j_specialization_threshold = code.j_specialization_threshold;
j_ilLen = code.j_ilLen;
j_nativeSize = code.j_nativeSize;
j_pgc_status = code.j_pgc_status;
j_sequencePointsLen = code.j_sequencePointsLen;
j_callPointsLen = code.j_callPointsLen;
j_symbols = code.j_symbols;
j_tracingHooks = code.j_tracingHooks;
j_profilingHooks = code.j_profilingHooks;
*j_code = *(code.j_code);
*j_profile = *(code.j_profile);
*j_il = *(code.j_il);
*j_sequencePoints = *(code.j_sequencePoints);
*j_callPoints = *(code.j_callPoints);
*j_graph = *(code.j_graph);
}

int Pyjit_CheckRecursiveCall(PyThreadState* tstate, const char* where) {
int recursion_limit = g_pyjionSettings.recursionLimit;

Expand Down
2 changes: 2 additions & 0 deletions src/pyjion/pyjit.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ class PyjionJittedCode {
}

~PyjionJittedCode();

void operator = (const PyjionJittedCode& code);
};

void setOptimizationLevel(unsigned short level);
Expand Down

0 comments on commit 046beb0

Please sign in to comment.