Merge remote-tracking branch 'origin/topic/vern/CPP-workflow2'

* origin/topic/vern/CPP-workflow2:
  low-level coding style fixes
  support for standalone compiled scripts to export globals with module qualifiers
  updates for documentation of functionality for compiling scripts to C++
  fixes for standalone C++ scripts making types & variables/functions available
  fixed bug limiting availability of load_CPP() BiF
  updates to development helper scripts to support new workflow
  simpler workflow for -O gen-C++ ; also some hooks for -O gen-standalone-C++
  ReplaceBody now deletes a body if the replacement is nil
  removal of can't-actually-be-executed code
This commit is contained in:
Tim Wojtulewicz 2021-07-01 08:46:41 -07:00
commit 0b342b7bfa
26 changed files with 335 additions and 124 deletions

View file

@ -237,10 +237,16 @@ public:
const std::vector<IDPtr>& new_inits,
size_t new_frame_size, int priority) override;
// Replace the given current instance of a function body with
// a new one.
/**
* Replaces the given current instance of a function body with
* a new one. If new_body is nil then the current instance is
* deleted with no replacement.
*
* @param old_body Body to replace.
* @param new_body New body to use; can be nil.
*/
void ReplaceBody(const detail::StmtPtr& old_body,
detail::StmtPtr new_body);
detail::StmtPtr new_body);
StmtPtr CurrentBody() const { return current_body; }
int CurrentPriority() const { return current_priority; }
@ -316,7 +322,7 @@ private:
StmtPtr current_body;
// ... and its priority.
int current_priority;
int current_priority = 0;
};
using built_in_func = BifReturnVal (*)(Frame* frame, const Args* args);