BenchGen
BenchGen is a tool for generating benchmarks to stress-test a computing system.
Loading...
Searching...
No Matches
Call Class Reference

Represents a function call in the AST. More...

#include <ast.h>

Inheritance diagram for Call:
Collaboration diagram for Call:

Public Member Functions

 Call (int id, std::shared_ptr< Node > code)
 
 Call ()
 
void setId (int id)
 Sets the ID of the function being called.
 
void setCode (std::shared_ptr< Node > code)
 Sets the code block of the function being called.
 
void gen (Generator &) override
 Generates code for this AST node.
 
void print (int indent) override
 Prints the structure of this AST node.
 
- Public Member Functions inherited from Node
virtual ~Node ()=default
 

Public Attributes

int conditionalCounts
 

Detailed Description

Represents a function call in the AST.

Manages the function's parameters, ID, and code block.

Constructor & Destructor Documentation

◆ Call() [1/2]

Call::Call ( int id,
std::shared_ptr< Node > code )
inline

◆ Call() [2/2]

Call::Call ( )
inline

Member Function Documentation

◆ gen()

void Call::gen ( Generator & )
overridevirtual

Generates code for this AST node.

Parameters
generatorThe generator object used to manage code generation.

Implements Node.

◆ print()

void Call::print ( int indent)
overridevirtual

Prints the structure of this AST node.

Parameters
indentThe number of spaces to indent the output.

Implements Node.

◆ setCode()

void Call::setCode ( std::shared_ptr< Node > code)
inline

Sets the code block of the function being called.

Parameters
codeThe code block.

◆ setId()

void Call::setId ( int id)
inline

Sets the ID of the function being called.

Parameters
idThe function ID.

Member Data Documentation

◆ conditionalCounts

int Call::conditionalCounts

The documentation for this class was generated from the following files: