|
decompiler 1.0.0
|
A function parameter viewed as a name, data-type, and storage address. More...
#include <fspec.hh>
Public Member Functions | |
| ProtoParameter (void) | |
| Constructor. | |
| virtual | ~ProtoParameter (void) |
| Destructor. | |
| virtual const string & | getName (void) const =0 |
| Get the name of the parameter ("" for return value) More... | |
| virtual Datatype * | getType (void) const =0 |
| Get the data-type associate with this. More... | |
| virtual Address | getAddress (void) const =0 |
| Get the storage address for this parameter. More... | |
| virtual int4 | getSize (void) const =0 |
| Get the number of bytes occupied by this parameter. More... | |
| virtual bool | isTypeLocked (void) const =0 |
| Is the parameter data-type locked. More... | |
| virtual bool | isNameLocked (void) const =0 |
| Is the parameter name locked. More... | |
| virtual bool | isSizeTypeLocked (void) const =0 |
| Is the size of the parameter locked. More... | |
| virtual bool | isThisPointer (void) const =0 |
| Is this the "this" pointer for a class method. More... | |
| virtual bool | isIndirectStorage (void) const =0 |
| Is this really a pointer to the true parameter. More... | |
| virtual bool | isHiddenReturn (void) const =0 |
| Is this a pointer to storage for a return value. More... | |
| virtual bool | isNameUndefined (void) const =0 |
| Is the name of this parameter undefined. More... | |
| virtual void | setTypeLock (bool val)=0 |
| Toggle the lock on the data-type. More... | |
| virtual void | setNameLock (bool val)=0 |
| Toggle the lock on the name. More... | |
| virtual void | setThisPointer (bool val)=0 |
| Toggle whether this is the "this" pointer for a class method. More... | |
| virtual void | overrideSizeLockType (Datatype *ct)=0 |
| Change (override) the data-type of a size-locked parameter. More... | |
| virtual void | resetSizeLockType (TypeFactory *factory)=0 |
| Clear this parameter's data-type preserving any size-lock. More... | |
| virtual ProtoParameter * | clone (void) const =0 |
| Clone the parameter. More... | |
| virtual Symbol * | getSymbol (void) const =0 |
| Retrieve the formal Symbol associated with this parameter. More... | |
| bool | operator== (const ProtoParameter &op2) const |
| Compare storage location and data-type for equality. More... | |
| bool | operator!= (const ProtoParameter &op2) const |
| Compare storage location and data-type for inequality. More... | |
A function parameter viewed as a name, data-type, and storage address.
This is the base class, with derived classes determining what is backing up the information, whether is it a formal Symbol or just internal storage. Both input parameters and return values can be represented with this object.
|
pure virtual |
Clone the parameter.
Implemented in ParameterBasic, and ParameterSymbol.
Referenced by ProtoStoreSymbol::clone(), and ProtoStoreInternal::clone().
|
pure virtual |
Get the storage address for this parameter.
Implemented in ParameterBasic, and ParameterSymbol.
Referenced by ActionPrototypeTypes::apply(), ActionParamDouble::apply(), ActionRestrictLocal::apply(), FuncCallSpecs::buildParam(), FuncProto::characterizeAsInputParam(), FuncProto::characterizeAsOutput(), FuncCallSpecs::commitNewInputs(), FuncCallSpecs::commitNewOutputs(), ProtoStoreInternal::decode(), ProtoStoreInternal::encode(), FuncProto::encode(), ActionFuncLink::funcLinkInput(), ActionFuncLink::funcLinkOutput(), FuncProto::getBiggestContainedInputParam(), FuncProto::getBiggestContainedOutput(), operator==(), FuncProto::possibleInputParam(), FuncProto::possibleOutputParam(), FuncProto::resolveExtraPop(), FuncCallSpecs::resolveSpacebaseRelative(), FuncCallSpecs::transferLockedInputParam(), FuncCallSpecs::transferLockedOutputParam(), FuncProto::unjustifiedInputParam(), and FuncProto::updateOutputTypes().
|
pure virtual |
Get the name of the parameter ("" for return value)
Implemented in ParameterBasic, and ParameterSymbol.
Referenced by ProtoStoreInternal::encode(), FuncProto::getPieces(), ActionNameVars::makeRec(), and FuncProto::paramShift().
|
pure virtual |
Get the number of bytes occupied by this parameter.
Implemented in ParameterBasic, and ParameterSymbol.
Referenced by ActionPrototypeTypes::apply(), ActionRestrictLocal::apply(), FuncCallSpecs::buildParam(), FuncProto::characterizeAsInputParam(), FuncProto::characterizeAsOutput(), FuncCallSpecs::commitNewInputs(), FuncCallSpecs::commitNewOutputs(), FuncProto::encode(), ActionFuncLink::funcLinkInput(), ActionFuncLink::funcLinkOutput(), FuncProto::getBiggestContainedInputParam(), FuncProto::getBiggestContainedOutput(), ActionNameVars::makeRec(), FuncProto::possibleInputParam(), FuncProto::possibleOutputParam(), FuncProto::resolveExtraPop(), FuncCallSpecs::transferLockedInputParam(), FuncCallSpecs::transferLockedOutputParam(), FuncProto::unjustifiedInputParam(), and FuncProto::updateOutputTypes().
|
pure virtual |
Retrieve the formal Symbol associated with this parameter.
If there is no backing symbol an exception is thrown
Implemented in ParameterBasic, and ParameterSymbol.
Referenced by PrintC::emitPrototypeInputs().
|
pure virtual |
Get the data-type associate with this.
Implemented in ParameterBasic, and ParameterSymbol.
Referenced by ActionPrototypeTypes::apply(), ActionParamDouble::apply(), FuncProto::characterizeAsOutput(), FuncCallSpecs::commitNewOutputs(), TypeCode::compare(), TypeCode::compareDependency(), ProtoStoreInternal::decode(), PrintC::emitPrototypeInputs(), ProtoStoreInternal::encode(), FuncProto::encode(), ActionPrototypeTypes::extendInput(), ActionFuncLink::funcLinkOutput(), FuncProto::getBiggestContainedOutput(), TypeOpCall::getInputLocal(), TypeOpCallind::getInputLocal(), FuncProto::getOutputType(), FuncProto::getPieces(), ActionNameVars::makeRec(), operator==(), FuncProto::paramShift(), FuncProto::possibleOutputParam(), FuncProto::printRaw(), PrintC::pushPrototypeInputs(), TypeStruct::scoreFill(), ScoreUnionFields::scoreParameter(), and FuncCallSpecs::transferLockedOutput().
|
pure virtual |
Is this a pointer to storage for a return value.
Implemented in ParameterBasic, and ParameterSymbol.
Referenced by ProtoStoreInternal::encode(), and FuncProto::updateThisPointer().
|
pure virtual |
Is this really a pointer to the true parameter.
Implemented in ParameterBasic, and ParameterSymbol.
Referenced by ProtoStoreInternal::decode(), and ProtoStoreInternal::encode().
|
pure virtual |
Is the parameter name locked.
Implemented in ParameterBasic, and ParameterSymbol.
Referenced by ProtoStoreInternal::encode(), and ActionNameVars::makeRec().
|
pure virtual |
Is the name of this parameter undefined.
Implemented in ParameterBasic, and ParameterSymbol.
Referenced by ActionNameVars::makeRec().
|
pure virtual |
Is the size of the parameter locked.
Implemented in ParameterBasic, and ParameterSymbol.
Referenced by ActionOutputPrototype::apply(), FuncProto::clearUnlockedOutput(), and FuncProto::updateOutputTypes().
|
pure virtual |
Is this the "this" pointer for a class method.
Implemented in ParameterBasic, and ParameterSymbol.
Referenced by PrintC::emitPrototypeInputs(), ProtoStoreInternal::encode(), PrintC::getHiddenThisSlot(), TypeOpCall::getInputLocal(), TypeOpCallind::getInputLocal(), and Funcdata::prepareThisPointer().
|
pure virtual |
Is the parameter data-type locked.
Implemented in ParameterBasic, and ParameterSymbol.
Referenced by ActionOutputPrototype::apply(), FuncProto::characterizeAsInputParam(), FuncProto::clearUnlockedOutput(), ProtoStoreInternal::decode(), ProtoStoreInternal::encode(), FuncProto::encode(), FuncProto::getBiggestContainedInputParam(), TypeOpCall::getInputLocal(), TypeOpCallind::getInputLocal(), FuncProto::isInputLocked(), FuncProto::isOutputLocked(), FuncProto::possibleInputParam(), Funcdata::prepareThisPointer(), FuncProto::unjustifiedInputParam(), and FuncProto::updateOutputTypes().
|
inline |
Compare storage location and data-type for inequality.
| op2 | is the parameter to compare with this |
|
inline |
Compare storage location and data-type for equality.
| op2 | is the parameter to compare with this |
References getAddress(), and getType().
|
pure virtual |
Change (override) the data-type of a size-locked parameter.
The original parameter must have a type-lock and TYPE_UNKNOWN data-type. The size-lock is preserved and this can be cleared back to its TYPE_UNKNOWN state.
| ct | is the overriding data-type |
Implemented in ParameterBasic, and ParameterSymbol.
Referenced by FuncProto::updateOutputTypes().
|
pure virtual |
Clear this parameter's data-type preserving any size-lock.
The data-type is converted to a TYPE_UNKNOWN of the same size
| factory | is the TypeFactory that will construct the unknown data-type |
Implemented in ParameterBasic, and ParameterSymbol.
Referenced by FuncProto::clearUnlockedOutput().
|
pure virtual |
Toggle the lock on the name.
Implemented in ParameterBasic, and ParameterSymbol.
Referenced by ProtoStoreInternal::decode().
|
pure virtual |
Toggle whether this is the "this" pointer for a class method.
Implemented in ParameterBasic, and ParameterSymbol.
Referenced by FuncProto::updateThisPointer().
|
pure virtual |
Toggle the lock on the data-type.
Implemented in ParameterBasic, and ParameterSymbol.
Referenced by ProtoStoreInternal::decode(), FuncProto::setInputLock(), and FuncProto::setOutputLock().