top | up | prev | next

PointerMinusPointer Class

Definition at line 738 of OperationRepository.cpp

Constructors

PointerMinusPointer(TypeSymbol* pointerType_, TypeSymbol* longType_, const Span& span, const boost::uuids::uuid& moduleId)

Member Functions

const char* ClassName() const override
SymbolAccess DeclaredAccess() const override
void GenerateCall(Emitter& emitter, std::vector<GenObject*>& genObjects, OperationFlags flags, const Span& span, const boost::uuids::uuid& moduleId) override
bool IsBasicTypeOperation() const override

Constructor Details

PointerMinusPointer Constructor

cmajor::binder::PointerMinusPointer::PointerMinusPointer(TypeSymbol* pointerType_, TypeSymbol* longType_, const Span& span, const boost::uuids::uuid& moduleId)

Definition at line 748 of OperationRepository.cpp
Declaration at line 741 of OperationRepository.cpp


Member Function Details

ClassName Member Function

const char * cmajor::binder::PointerMinusPointer::ClassName() const override

Definition at line 745 of OperationRepository.cpp :
 745 { return "PointerMinusPointer"; }


DeclaredAccess Member Function

SymbolAccess cmajor::binder::PointerMinusPointer::DeclaredAccess() const override

Definition at line 742 of OperationRepository.cpp :
 742 { return SymbolAccess::public_; }


GenerateCall Member Function

void cmajor::binder::PointerMinusPointer::GenerateCall(Emitter& emitter, std::vector<GenObject*>& genObjects, OperationFlags flags, const Span& span, const boost::uuids::uuid& moduleId) override

Definition at line 762 of OperationRepository.cpp :
 763 {
 764     Assert(genObjects.size() == 2"operator- needs two objects");
 765     genObjects[0]->Load(emitterOperationFlags::none);
 766     void* left = emitter.Stack().Pop();
 767     genObjects[1]->Load(emitterOperationFlags::none);
 768     void* right = emitter.Stack().Pop();
 769     emitter.Stack().Push(emitter.CreatePtrDiff(leftright));
 770 }


Declaration at line 743 of OperationRepository.cpp


IsBasicTypeOperation Member Function

bool cmajor::binder::PointerMinusPointer::IsBasicTypeOperation() const override

Definition at line 744 of OperationRepository.cpp :
 744 { return true; }


top | up | prev | next