Add support for an external interpreter#346
Merged
aaronj0 merged 1 commit intocompiler-research:mainfrom Nov 4, 2024
Merged
Conversation
fe324fa to
95bd490
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #346 +/- ##
==========================================
+ Coverage 74.43% 74.45% +0.01%
==========================================
Files 8 8
Lines 3204 3206 +2
==========================================
+ Hits 2385 2387 +2
Misses 819 819
... and 1 file with indirect coverage changes
|
vgvassilev
reviewed
Oct 29, 2024
| void UseExternalInterpreter(TInterp_t I) { | ||
| assert(sInterpreter && "sInterpreter already in use!"); | ||
| sInterpreter = static_cast<compat::Interpreter*>(I); | ||
| OwningSInterpreter = false; |
Contributor
There was a problem hiding this comment.
Can we write a test for this?
417bcd7 to
002ba81
Compare
vgvassilev
reviewed
Oct 31, 2024
|
|
||
| EXPECT_NE(ExtInterp, nullptr); | ||
| Cpp::UseExternalInterpreter(ExtInterp); | ||
| EXPECT_FALSE(Cpp::OwnsInterpreter()); |
Contributor
There was a problem hiding this comment.
We don't need this probably. We can delete ExtInterp and write a death test.
fcfab29 to
9725d94
Compare
vgvassilev
reviewed
Nov 4, 2024
9725d94 to
2df347c
Compare
vgvassilev
reviewed
Nov 4, 2024
2df347c to
13669e1
Compare
The new interface can be called by an external library like ROOT, that manages it's own `TInterpreter` instance. In this case the `cling::Interpreter*` initialised by TCling is passed to InterOp and a flag indicates that InterOp does not have ownership
13669e1 to
4dd1e41
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The new interface can be called by an external library like ROOT, that manages it's own
TInterpreterinstance. In this case thecling::Interpreter*initialized by TCling is passed to InterOp and a flag indicates that InterOp does not have ownership