-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unloading AST optimization + change base class of TEnum from TNamed to TDictionary #57
Changes from 6 commits
f7158d2
c819eb9
2d8fad4
bcdb435
ce19172
08404aa
4f3c662
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,11 @@ class TObjArray; | |
class TVirtualMutex; | ||
class TEnum; | ||
|
||
namespace cling { | ||
class Interpreter; | ||
class Transaction; | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TInterpreter must stay agnostics to the implementation chosen and thus it must not know about cling. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, corrected. |
||
R__EXTERN TVirtualMutex *gInterpreterMutex; | ||
|
||
class TInterpreter : public TNamed { | ||
|
@@ -212,6 +217,9 @@ class TInterpreter : public TNamed { | |
|
||
// core/meta helper functions. | ||
virtual TMethodCall::EReturnType MethodCallReturnType(TFunction *func) const = 0; | ||
virtual ULong64_t GetTransactionCount() const = 0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would prefer not to be too specific on the underlying semantic of the number. I.e. maybe GetInterpreterStateMarker (or some better name :) ) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can do |
||
virtual void UpdateListsOnCommitted(const cling::Transaction &T, cling::Interpreter* interp) = 0; | ||
virtual void UpdateListsOnUnloaded(const cling::Transaction &T) = 0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do you need those exposed in the abstract interface? Could the usage be limited to inside TCling.cxx? (I.e. what other routines know about transactions?) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes I would want to do that, but how? Because TCling__UpdateListsOnUnloaded/TCling__UpdateListsOnCommited are extern functions and they need to update the TCling fTransactionCOunt(or how we name it) and call the TCling::HandleNewTransaction. I could expose andleNewTransaction, but then it still requires the cling::Transaction...Any idea is very welcomed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In TCling_* you can assume that the type of gCling is TCling (we already do that in many places ... see ((TCling*)gCling) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried that before but I got the cast wrong: (TCling_)gCling->. Now with ((TCling_)gCling) it works. Sorry about the noise |
||
|
||
typedef TDictionary::DeclId_t DeclId_t; | ||
virtual DeclId_t GetDeclId(CallFunc_t *info) const = 0; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer a more generic name. HasInterpreterUpdate or MightNeedUpdate or InterpreterStateHasChanged or .... something better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can do :)