mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 07:08:19 +00:00
inlining of Zeek script functions
This commit is contained in:
parent
3c39f11726
commit
c42586af2c
63 changed files with 21807 additions and 171 deletions
15
src/Frame.h
15
src/Frame.h
|
@ -98,6 +98,15 @@ public:
|
|||
Val* GetElement(const ID* id) const
|
||||
{ return GetElementByID(id).get(); }
|
||||
|
||||
/**
|
||||
* Increases the current offset being used for frame accesses.
|
||||
* This is in support of inlined functions.
|
||||
*
|
||||
* @param incr Amount by which to increase the frame offset.
|
||||
* Use a negative value to shrink the offset.
|
||||
*/
|
||||
void IncreaseOffset(int incr) { current_offset += incr; }
|
||||
|
||||
/**
|
||||
* Resets all of the indexes from [*startIdx, frame_size) in
|
||||
* the Frame.
|
||||
|
@ -316,6 +325,12 @@ private:
|
|||
/** Associates ID's offsets with values. */
|
||||
std::unique_ptr<Element[]> frame;
|
||||
|
||||
/** The offset we're currently using for references into the frame.
|
||||
* This is how we support inlined functions without having to
|
||||
* alter the offsets associated with their local variables.
|
||||
*/
|
||||
int current_offset;
|
||||
|
||||
/** The enclosing frame of this frame. */
|
||||
Frame* closure;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue