{"action":"created","comment":{"url":"https://api.github.com/repos/karies/root/pulls/comments/47882648","id":47882648,"diff_hunk":"@@ -0,0 +1,189 @@\n+#include \"cling/Utils/ASTImportSource.h\"\n+\n+using namespace clang;\n+\n+namespace cling {\n+  namespace utils {\n+    ASTImportSource::ASTImportSource(cling::Interpreter *parent_interpreter,\n+                                     cling::Interpreter *child_interpreter) :\n+      m_parent_Interp(parent_interpreter), m_child_Interp(child_interpreter) {\n+    }\n+\n+    void ASTImportSource::ImportDecl(Decl *declToImport,\n+                                     ASTImporter &importer,\n+                                     DeclarationName &childDeclName,\n+                                     DeclarationName &parentDeclName,\n+                                     const DeclContext *childCurrentDeclContext) {\n+\n+      Decl *importedDecl = nullptr;\n+      /* Don't do the import if we have a Function Template.\n+       * Not supported by clang. */\n+      if (!(declToImport->isFunctionOrFunctionTemplate() && declToImport->isTemplateDecl()))\n+        importedDecl = importer.Import(declToImport);\n+\n+      if (importedDecl) {\n+        /* Import this Decl in the map we own. Not used for now\n+         * m_Decls_map[Name.getAsString()] = std::make_pair(importedDecl, declToImport); */\n+        std::vector < NamedDecl * > declVector;","path":"interpreter/cling/lib/Utils/ASTImportSource.cpp","position":27,"original_position":27,"commit_id":"2abbc37eeb97bab0c7153208cd685f46826a328a","original_commit_id":"2abbc37eeb97bab0c7153208cd685f46826a328a","user":{"login":"karies","id":144675,"avatar_url":"https://avatars.githubusercontent.com/u/144675?v=3","gravatar_id":"","url":"https://api.github.com/users/karies","html_url":"https://github.com/karies","followers_url":"https://api.github.com/users/karies/followers","following_url":"https://api.github.com/users/karies/following{/other_user}","gists_url":"https://api.github.com/users/karies/gists{/gist_id}","starred_url":"https://api.github.com/users/karies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karies/subscriptions","organizations_url":"https://api.github.com/users/karies/orgs","repos_url":"https://api.github.com/users/karies/repos","events_url":"https://api.github.com/users/karies/events{/privacy}","received_events_url":"https://api.github.com/users/karies/received_events","type":"User","site_admin":false},"body":"You could use `std::vector < NamedDecl * > declVector{importedNamedDecl};` instead of the runtime `push_back()`.","created_at":"2015-12-17T09:04:34Z","updated_at":"2015-12-17T09:04:34Z","html_url":"https://github.com/karies/root/pull/145#discussion_r47882648","pull_request_url":"https://api.github.com/repos/karies/root/pulls/145","_links":{"self":{"href":"https://api.github.com/repos/karies/root/pulls/comments/47882648"},"html":{"href":"https://github.com/karies/root/pull/145#discussion_r47882648"},"pull_request":{"href":"https://api.github.com/repos/karies/root/pulls/145"}}},"pull_request":{"url":"https://api.github.com/repos/karies/root/pulls/145","id":53587069,"html_url":"https://github.com/karies/root/pull/145","diff_url":"https://github.com/karies/root/pull/145.diff","patch_url":"https://github.com/karies/root/pull/145.patch","issue_url":"https://api.github.com/repos/karies/root/issues/145","number":145,"state":"open","locked":false,"title":"First commit for the Multiple Interpreters","user":{"login":"esakellari","id":8917962,"avatar_url":"https://avatars.githubusercontent.com/u/8917962?v=3","gravatar_id":"","url":"https://api.github.com/users/esakellari","html_url":"https://github.com/esakellari","followers_url":"https://api.github.com/users/esakellari/followers","following_url":"https://api.github.com/users/esakellari/following{/other_user}","gists_url":"https://api.github.com/users/esakellari/gists{/gist_id}","starred_url":"https://api.github.com/users/esakellari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esakellari/subscriptions","organizations_url":"https://api.github.com/users/esakellari/orgs","repos_url":"https://api.github.com/users/esakellari/repos","events_url":"https://api.github.com/users/esakellari/events{/privacy}","received_events_url":"https://api.github.com/users/esakellari/received_events","type":"User","site_admin":false},"body":"First commit for the Multiple Interpreters.\r\n--------------------------------------------------------\r\n--------------------------------------------------------\r\n\r\nASTImportSource.cpp, ASTImportSource.h\r\n--------------------------------------------------------------\r\nThe class that implements the importing functionalities for the multiple Interpreters.\r\nIt derives from the clang class ExternalASTSource, and overrides the function  FindExternalVisibleDeclsByname which does the search and importing of the ASTNodes by  calling the clang::ASTImporter.\r\nThis class must be created when setting up the second Interpreter and “passed” to its Translation Unit with the function setExternalSource.\r\n\r\nSymbol Resolution from the execution engine of the second interpreter.\r\n---------------------------------------------------------------------------------------------------\r\nIn order for the second Interpreter to find and execute the correct functions that are defined in the first Interpreter, but are called from the second, the following changes have been made in the classes of IncrementalExecutor and Interpreter.\r\n\r\n(IncrementalExecutor.cpp, IncrementalExecutor.h, Interpreter.cpp, Interpreter.h)\r\n\r\n-Added a pointer to an 'external' IncrementalExecutor in IncrementalExecutor class, and a corresponding function to set the pointer (IncrementalExecutor::setExternalIncrementalExecutor).\r\n    \r\n-Added in Interpreter a getIncrementalExecutor() function to get a pointer to its IncrementalExecutor.\r\n    \r\n-Added in Interpreter a function Interpreter::setExternalIncrementalExecutor which calls IncrementalExecutor's setExternalIncrementalExecutor function.\r\n    \r\n -Edited IncrementalExecutor::NotifyLazyFunctionCreators to search for the address of a missing symbol in the external IncrementalExecutor that has been set. If it doesn't exist in the external IncrementalExecutor either, it goes to HandleMissingFunction.\r\n\r\nInterpreter constructor overloading \r\n-------------------------------------------------\r\nThe overloading constructor of the Interpreter takes as argument the pointer to the master Interpreter. This is used for the initialization of the IncrementalParser  and to avoid the set up or the runtime environment in the constructor. This is done to reduce the memory consumption during the creation and set up of the second Interpreter. \r\n\r\nIncrementalParser.cpp, IncrementalParser.h\r\n-------------------------------------------------------------\r\nThe function Initialize() of the IncrementalParser takes a bool argument to know whether it is called from a “master” Interpreter or from a “slave” Interpreter.\r\nIf it is a slave Interpreter, it avoids to include <new>, and in turn it reduces the memory consumption for the creation of the second Interpreter. \r\n\r\nSmall change in /clang/lib/Sema/SemaOpenMP.cpp\r\n-----------------------------------------------------------------------\r\nThis small change has been done in order to improve the memory consumption of the multiple interpreters. \r\n","created_at":"2015-12-14T16:26:36Z","updated_at":"2015-12-17T09:04:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"503dda5a391cdece7a70ab36e497855fad62e121","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/karies/root/pulls/145/commits","review_comments_url":"https://api.github.com/repos/karies/root/pulls/145/comments","review_comment_url":"https://api.github.com/repos/karies/root/pulls/comments{/number}","comments_url":"https://api.github.com/repos/karies/root/issues/145/comments","statuses_url":"https://api.github.com/repos/karies/root/statuses/2abbc37eeb97bab0c7153208cd685f46826a328a","head":{"label":"esakellari:MultiInterpreters","ref":"MultiInterpreters","sha":"2abbc37eeb97bab0c7153208cd685f46826a328a","user":{"login":"esakellari","id":8917962,"avatar_url":"https://avatars.githubusercontent.com/u/8917962?v=3","gravatar_id":"","url":"https://api.github.com/users/esakellari","html_url":"https://github.com/esakellari","followers_url":"https://api.github.com/users/esakellari/followers","following_url":"https://api.github.com/users/esakellari/following{/other_user}","gists_url":"https://api.github.com/users/esakellari/gists{/gist_id}","starred_url":"https://api.github.com/users/esakellari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esakellari/subscriptions","organizations_url":"https://api.github.com/users/esakellari/orgs","repos_url":"https://api.github.com/users/esakellari/repos","events_url":"https://api.github.com/users/esakellari/events{/privacy}","received_events_url":"https://api.github.com/users/esakellari/received_events","type":"User","site_admin":false},"repo":{"id":31603609,"name":"root","full_name":"esakellari/root","owner":{"login":"esakellari","id":8917962,"avatar_url":"https://avatars.githubusercontent.com/u/8917962?v=3","gravatar_id":"","url":"https://api.github.com/users/esakellari","html_url":"https://github.com/esakellari","followers_url":"https://api.github.com/users/esakellari/followers","following_url":"https://api.github.com/users/esakellari/following{/other_user}","gists_url":"https://api.github.com/users/esakellari/gists{/gist_id}","starred_url":"https://api.github.com/users/esakellari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esakellari/subscriptions","organizations_url":"https://api.github.com/users/esakellari/orgs","repos_url":"https://api.github.com/users/esakellari/repos","events_url":"https://api.github.com/users/esakellari/events{/privacy}","received_events_url":"https://api.github.com/users/esakellari/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/esakellari/root","description":"Mirror of official ROOT git repository located at ","fork":true,"url":"https://api.github.com/repos/esakellari/root","forks_url":"https://api.github.com/repos/esakellari/root/forks","keys_url":"https://api.github.com/repos/esakellari/root/keys{/key_id}","collaborators_url":"https://api.github.com/repos/esakellari/root/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/esakellari/root/teams","hooks_url":"https://api.github.com/repos/esakellari/root/hooks","issue_events_url":"https://api.github.com/repos/esakellari/root/issues/events{/number}","events_url":"https://api.github.com/repos/esakellari/root/events","assignees_url":"https://api.github.com/repos/esakellari/root/assignees{/user}","branches_url":"https://api.github.com/repos/esakellari/root/branches{/branch}","tags_url":"https://api.github.com/repos/esakellari/root/tags","blobs_url":"https://api.github.com/repos/esakellari/root/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/esakellari/root/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/esakellari/root/git/refs{/sha}","trees_url":"https://api.github.com/repos/esakellari/root/git/trees{/sha}","statuses_url":"https://api.github.com/repos/esakellari/root/statuses/{sha}","languages_url":"https://api.github.com/repos/esakellari/root/languages","stargazers_url":"https://api.github.com/repos/esakellari/root/stargazers","contributors_url":"https://api.github.com/repos/esakellari/root/contributors","subscribers_url":"https://api.github.com/repos/esakellari/root/subscribers","subscription_url":"https://api.github.com/repos/esakellari/root/subscription","commits_url":"https://api.github.com/repos/esakellari/root/commits{/sha}","git_commits_url":"https://api.github.com/repos/esakellari/root/git/commits{/sha}","comments_url":"https://api.github.com/repos/esakellari/root/comments{/number}","issue_comment_url":"https://api.github.com/repos/esakellari/root/issues/comments{/number}","contents_url":"https://api.github.com/repos/esakellari/root/contents/{+path}","compare_url":"https://api.github.com/repos/esakellari/root/compare/{base}...{head}","merges_url":"https://api.github.com/repos/esakellari/root/merges","archive_url":"https://api.github.com/repos/esakellari/root/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/esakellari/root/downloads","issues_url":"https://api.github.com/repos/esakellari/root/issues{/number}","pulls_url":"https://api.github.com/repos/esakellari/root/pulls{/number}","milestones_url":"https://api.github.com/repos/esakellari/root/milestones{/number}","notifications_url":"https://api.github.com/repos/esakellari/root/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/esakellari/root/labels{/name}","releases_url":"https://api.github.com/repos/esakellari/root/releases{/id}","created_at":"2015-03-03T14:52:02Z","updated_at":"2015-03-31T15:01:46Z","pushed_at":"2015-12-15T16:56:17Z","git_url":"git://github.com/esakellari/root.git","ssh_url":"git@github.com:esakellari/root.git","clone_url":"https://github.com/esakellari/root.git","svn_url":"https://github.com/esakellari/root","homepage":"http://root.cern.ch","size":531532,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"karies:master","ref":"master","sha":"3adaed2991448bd4d88277902eb45277c25472e8","user":{"login":"karies","id":144675,"avatar_url":"https://avatars.githubusercontent.com/u/144675?v=3","gravatar_id":"","url":"https://api.github.com/users/karies","html_url":"https://github.com/karies","followers_url":"https://api.github.com/users/karies/followers","following_url":"https://api.github.com/users/karies/following{/other_user}","gists_url":"https://api.github.com/users/karies/gists{/gist_id}","starred_url":"https://api.github.com/users/karies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karies/subscriptions","organizations_url":"https://api.github.com/users/karies/orgs","repos_url":"https://api.github.com/users/karies/repos","events_url":"https://api.github.com/users/karies/events{/privacy}","received_events_url":"https://api.github.com/users/karies/received_events","type":"User","site_admin":false},"repo":{"id":11053789,"name":"root","full_name":"karies/root","owner":{"login":"karies","id":144675,"avatar_url":"https://avatars.githubusercontent.com/u/144675?v=3","gravatar_id":"","url":"https://api.github.com/users/karies","html_url":"https://github.com/karies","followers_url":"https://api.github.com/users/karies/followers","following_url":"https://api.github.com/users/karies/following{/other_user}","gists_url":"https://api.github.com/users/karies/gists{/gist_id}","starred_url":"https://api.github.com/users/karies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karies/subscriptions","organizations_url":"https://api.github.com/users/karies/orgs","repos_url":"https://api.github.com/users/karies/repos","events_url":"https://api.github.com/users/karies/events{/privacy}","received_events_url":"https://api.github.com/users/karies/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/karies/root","description":"Mirror of official ROOT git repository located at ","fork":true,"url":"https://api.github.com/repos/karies/root","forks_url":"https://api.github.com/repos/karies/root/forks","keys_url":"https://api.github.com/repos/karies/root/keys{/key_id}","collaborators_url":"https://api.github.com/repos/karies/root/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/karies/root/teams","hooks_url":"https://api.github.com/repos/karies/root/hooks","issue_events_url":"https://api.github.com/repos/karies/root/issues/events{/number}","events_url":"https://api.github.com/repos/karies/root/events","assignees_url":"https://api.github.com/repos/karies/root/assignees{/user}","branches_url":"https://api.github.com/repos/karies/root/branches{/branch}","tags_url":"https://api.github.com/repos/karies/root/tags","blobs_url":"https://api.github.com/repos/karies/root/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/karies/root/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/karies/root/git/refs{/sha}","trees_url":"https://api.github.com/repos/karies/root/git/trees{/sha}","statuses_url":"https://api.github.com/repos/karies/root/statuses/{sha}","languages_url":"https://api.github.com/repos/karies/root/languages","stargazers_url":"https://api.github.com/repos/karies/root/stargazers","contributors_url":"https://api.github.com/repos/karies/root/contributors","subscribers_url":"https://api.github.com/repos/karies/root/subscribers","subscription_url":"https://api.github.com/repos/karies/root/subscription","commits_url":"https://api.github.com/repos/karies/root/commits{/sha}","git_commits_url":"https://api.github.com/repos/karies/root/git/commits{/sha}","comments_url":"https://api.github.com/repos/karies/root/comments{/number}","issue_comment_url":"https://api.github.com/repos/karies/root/issues/comments{/number}","contents_url":"https://api.github.com/repos/karies/root/contents/{+path}","compare_url":"https://api.github.com/repos/karies/root/compare/{base}...{head}","merges_url":"https://api.github.com/repos/karies/root/merges","archive_url":"https://api.github.com/repos/karies/root/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/karies/root/downloads","issues_url":"https://api.github.com/repos/karies/root/issues{/number}","pulls_url":"https://api.github.com/repos/karies/root/pulls{/number}","milestones_url":"https://api.github.com/repos/karies/root/milestones{/number}","notifications_url":"https://api.github.com/repos/karies/root/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/karies/root/labels{/name}","releases_url":"https://api.github.com/repos/karies/root/releases{/id}","created_at":"2013-06-29T14:35:42Z","updated_at":"2015-11-30T15:40:16Z","pushed_at":"2015-12-16T09:24:32Z","git_url":"git://github.com/karies/root.git","ssh_url":"git@github.com:karies/root.git","clone_url":"https://github.com/karies/root.git","svn_url":"https://github.com/karies/root","homepage":"http://root.cern.ch","size":541571,"stargazers_count":2,"watchers_count":2,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":8,"forks":3,"open_issues":8,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/karies/root/pulls/145"},"html":{"href":"https://github.com/karies/root/pull/145"},"issue":{"href":"https://api.github.com/repos/karies/root/issues/145"},"comments":{"href":"https://api.github.com/repos/karies/root/issues/145/comments"},"review_comments":{"href":"https://api.github.com/repos/karies/root/pulls/145/comments"},"review_comment":{"href":"https://api.github.com/repos/karies/root/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/karies/root/pulls/145/commits"},"statuses":{"href":"https://api.github.com/repos/karies/root/statuses/2abbc37eeb97bab0c7153208cd685f46826a328a"}}}}