Vuo  1.2.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
VuoCompilerType Class Reference

Description

The compiler detail class for VuoType.

Public Member Functions

Value * generateValueFromStringFunctionCall (Module *module, BasicBlock *block, Value *arg)
 Generates a call to [Type]_makeFromString().
 
Value * generateStringFromValueFunctionCall (Module *module, BasicBlock *block, Value *arg)
 Generates a call to [Type]_getString().
 
Value * generateInterprocessStringFromValueFunctionCall (Module *module, BasicBlock *block, Value *arg)
 Generates a call to [Type]_getInterprocessString().
 
Value * generateSummaryFromValueFunctionCall (Module *module, BasicBlock *block, Value *arg)
 Generates a call to [Type]_getSummary().
 
void generateRetainCall (Module *module, BasicBlock *block, Value *arg)
 Generates a call to [Type]_retain(), if needed.
 
void generateReleaseCall (Module *module, BasicBlock *block, Value *arg)
 Generates a call to [Type]_release(), if needed.
 
Type * getType (void)
 Returns the LLVM type for this Vuo type.
 
Type * getFunctionParameterType (Type **secondType)
 Returns the LLVM type for this Vuo type when it appears as a function parameter.
 
Attributes getFunctionParameterAttributes (void)
 Returns the LLVM attributes for this Vuo type when it appears as a function parameter.
 
bool hasInterprocessStringFunction (void)
 Returns true if the type's getInterprocessString() function is defined.
 
- Public Member Functions inherited from VuoBaseDetail< VuoType >
 VuoBaseDetail (string description, VuoType *base)
 Creates a VuoType detail class.
 
VuoTypegetBase (void) const
 Returns the VuoType detail class instance's base class instance.
 
void setBase (VuoType *base)
 Sets the VuoType detail class instance's base class instance.
 
- Public Member Functions inherited from VuoCompilerModule
virtual ~VuoCompilerModule (void)
 Destructor.
 
VuoCompilerTargetSet parseTargetSet (json_object *o, string key)
 Parses the target set value for key in the top level of the JSON object.
 
VuoCompilerTargetSet::MacVersion parseMacVersion (string version)
 Parses a Mac OS version from a string.
 
virtual set< string > getDependencies (void)
 Returns a list of this VuoCompilerModule's dependencies.
 
virtual string getDependencyName (void)
 Returns the name that would represent this VuoCompilerModule in another VuoCompilerModule's list of dependencies.
 
VuoCompilerTargetSet getCompatibleTargets (void)
 Returns the set of targets (operating system versions) with which this module is compatible.
 
Module * getModule (void)
 Returns this VuoCompilerModule's LLVM module, which other LLVM modules can link to.
 
VuoModulegetPseudoBase (void)
 Returns the (psuedo) base for this (psuedo) compiler detail class.
 
bool getPremium (void)
 Returns a boolean indicating whether this module contains premium content.
 
void setPremium (bool premium)
 Sets the boolean indicating whether this module contains premium content.
 
bool isBuiltIn (void)
 Returns true if this module is one of the built-in modules distributed with Vuo.
 
void setBuiltIn (bool builtIn)
 Sets whether this module is one of the built-in modules distributed with Vuo.
 

Static Public Member Functions

static VuoCompilerTypenewType (string typeName, Module *module)
 Creates a type from the type definition in the module.
 
static bool isListType (VuoCompilerType *type)
 Returns true if the type is a list type.
 
- Static Public Member Functions inherited from VuoCompilerModule
static VuoCompilerModulenewModule (string moduleKey, Module *module)
 Instantiates a VuoCompilerModule (or child class) corresponding to the type of VuoCompilerModule defined in the LLVM module.
 
static Function * declareFunctionInModule (Module *module, Function *function)
 Copies the function's header into the LLVM module, if it's not already there.
 

Protected Member Functions

 VuoCompilerType (string typeName, Module *module)
 Creates a type from an LLVM module, and creates its corresponding base VuoType.
 
- Protected Member Functions inherited from VuoCompilerModule
 VuoCompilerModule (VuoModule *base, Module *module)
 Creates a VuoCompilerModule associated with the given LLVM module, as a pseudo compiler detail class of the given VuoModule.
 
virtual void parseMetadata (void)
 Parses the metadata of this VuoCompilerModule (name, description, ...) from the LLVM module.
 
string nameForGlobal (string genericGlobalVarOrFuncName)
 Returns the mangled name for a function or global variable.
 
void renameGlobalVarsAndFuncs (void)
 Renames the global variables and functions within the LLVM module so that they are unique to this VuoCompilerModule.
 

Additional Inherited Members

- Static Protected Member Functions inherited from VuoCompilerModule
static string parseString (json_object *o, string key, bool *foundValue=NULL)
 Parses the string value for key in the top level of the JSON object.
 
static int parseInt (json_object *o, string key, bool *foundValue=NULL)
 Parses the integer value for key in the top level of the JSON object.
 
static bool parseBool (json_object *o, string key, bool *foundValue=NULL)
 Parses the boolean value for key in the top level of the JSON object.
 
static vector< string > parseArrayOfStrings (json_object *o, string key)
 Parses the array-of-strings value for key in the top level of the JSON object.
 
static string nameForGlobal (string nameBeforeCompilation, string moduleKey)
 Returns the mangled name for a function or global variable.
 
static bool hasOriginalOrMangledGlobal (string nameBeforeCompilation, Module *module, string moduleKey)
 Returns true if the module contains a function or global variable with name nameBeforeCompilation or with the corresponding mangled name.
 
- Protected Attributes inherited from VuoCompilerModule
struct json_objectmoduleDetails
 This module's metadata, found in the argument to VuoModuleMetadata in the module definition.
 
set< string > dependencies
 The dependencies found in this module's metadata.
 
Module * module
 The LLVM module that defines this node class or type.
 
VuoModulebase
 The (pseudo) base for this (pseudo) compiler detail class.
 
VuoCompilerBitcodeParserparser
 The parser of the LLVM module.
 
bool isPremium
 A boolean indicating whether this module contains premium content.
 

Constructor & Destructor Documentation

VuoCompilerType::VuoCompilerType ( string  typeName,
Module *  module 
)
protected

Creates a type from an LLVM module, and creates its corresponding base VuoType.

Member Function Documentation

Value * VuoCompilerType::generateInterprocessStringFromValueFunctionCall ( Module *  module,
BasicBlock *  block,
Value *  arg 
)

Generates a call to [Type]_getInterprocessString().

Parameters
moduleThe destination LLVM module (i.e., generated code).
blockThe LLVM block to which to append the function call.
argThe argument to pass to [Type]_getInterprocessString().
Returns
The return value of [Type]_getInterprocessString(), or the return value of [Type]_getString() if the interprocess function doesn't exist.
void VuoCompilerType::generateReleaseCall ( Module *  module,
BasicBlock *  block,
Value *  arg 
)

Generates a call to [Type]_release(), if needed.

void VuoCompilerType::generateRetainCall ( Module *  module,
BasicBlock *  block,
Value *  arg 
)

Generates a call to [Type]_retain(), if needed.

Value * VuoCompilerType::generateStringFromValueFunctionCall ( Module *  module,
BasicBlock *  block,
Value *  arg 
)

Generates a call to [Type]_getString().

Parameters
moduleThe destination LLVM module (i.e., generated code).
blockThe LLVM block to which to append the function call.
argThe argument to pass to [Type]_getString().
Returns
The return value of [Type]_getString().
Value * VuoCompilerType::generateSummaryFromValueFunctionCall ( Module *  module,
BasicBlock *  block,
Value *  arg 
)

Generates a call to [Type]_getSummary().

Parameters
moduleThe destination LLVM module (i.e., generated code).
blockThe LLVM block to which to append the function call.
argThe argument to pass to [Type]_getSummary().
Returns
The return value of [Type]_getSummary().
Value * VuoCompilerType::generateValueFromStringFunctionCall ( Module *  module,
BasicBlock *  block,
Value *  arg 
)

Generates a call to [Type]_makeFromString().

Parameters
moduleThe destination LLVM module (i.e., generated code).
blockThe LLVM block to which to append the function call.
argThe argument to pass to [Type]_makeFromString().
Returns
The return value of [Type]_makeFromString().
Attributes VuoCompilerType::getFunctionParameterAttributes ( void  )

Returns the LLVM attributes for this Vuo type when it appears as a function parameter.

This is needed, for example, for struct parameters with the "byval" attribute.

Type * VuoCompilerType::getFunctionParameterType ( Type **  secondType)

Returns the LLVM type for this Vuo type when it appears as a function parameter.

This is needed, for example, for struct parameters with the "byval" attribute.

Type * VuoCompilerType::getType ( void  )

Returns the LLVM type for this Vuo type.

bool VuoCompilerType::hasInterprocessStringFunction ( void  )

Returns true if the type's getInterprocessString() function is defined.

bool VuoCompilerType::isListType ( VuoCompilerType type)
static

Returns true if the type is a list type.

VuoCompilerType * VuoCompilerType::newType ( string  typeName,
Module *  module 
)
static

Creates a type from the type definition in the module.

If the module does not contain a type definition, returns NULL.


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