top | up | prev | next

PointerMinusOffset Class

Definition at line 656 of OperationRepository.cpp

Constructors

PointerMinusOffset(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

PointerMinusOffset Constructor

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

Definition at line 666 of OperationRepository.cpp
Declaration at line 659 of OperationRepository.cpp


Member Function Details

ClassName Member Function

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

Definition at line 663 of OperationRepository.cpp :
 663 { return "PointerMinusOffset"; }


DeclaredAccess Member Function

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

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


GenerateCall Member Function

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

Definition at line 680 of OperationRepository.cpp :
 681 {
 682     Assert(genObjects.size() == 2"operator- needs two objects");
 683     genObjects[0]->Load(emitterOperationFlags::none);
 684     void* left = emitter.Stack().Pop();
 685     genObjects[1]->Load(emitterOperationFlags::none);
 686     void* right = emitter.Stack().Pop();
 687     void* offset = emitter.CreateNeg(right);
 688     emitter.Stack().Push(emitter.ComputeAddress(leftoffset));
 689 }


Declaration at line 661 of OperationRepository.cpp


IsBasicTypeOperation Member Function

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

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


top | up | prev | next