ANTAREX API

Clava API

LARA API

LARA Common Language API

(.js)
laraImport("clava.code.Inliner");

(.lara)
import clava.code.Inliner;

Inliner

Constructor

Inliner

new Inliner()

Instance Members

checkInline

checkInline($exprStmt)

Check if the given $exprStmt can be inlined or not. If it can, returns an object with information important for inlining,
otherwise returns undefined.

A call can be inline if the following rules apply:
- The exprStmt is an isolated call, or an assignment with a single call in the right-hand side.
- The call has a definition/implementation available.
- The call is not a function that is part of the system headers.

Parameters

$exprStmt: $exprStmt

Returns

object - an object with the properties below or undefined if this exprStmt cannot be inlined. - type: a string with either the value 'call' or 'assign', indicating the type of inlining that can be applied to the given exprStmt. - $target: if the type is 'assign', contains the left-hand side of the assignment. Otherwise, is undefined. - $call: the call to be inlined

constructor

constructor(options)

Parameters

options: object - Object with options. Supported options: 'prefix' (default: "__inline"), the prefix that will be used in the name of variables inserted by the Inliner

inline

inline($exprStmt)

Parameters

$exprStmt: unknown

inlineFunctionTree

inlineFunctionTree($function, _visited)

Parameters

$function: unknown
_visited: unknown