AtomicValue::AtomicValue(AtomicValue::AtomicValueCAS, Kind kind, Origin origin, Width width, Value* expectedValue, Value* newValue, Value* pointer, MemoryValue::OffsetType offset, HeapRange range, HeapRange fenceRange) : MemoryValue(CheckedOpcode, kind, kind.opcode() == AtomicWeakCAS ? Int32 : expectedValue->type(), origin, offset, range, fenceRange, expectedValue, newValue, pointer) , m_width(width) { ASSERT(bestType(GP, accessWidth()) == accessType()); switch (kind.opcode()) { case AtomicWeakCAS: case AtomicStrongCAS: break; default: ASSERT_NOT_REACHED(); } }
AtomicValue::AtomicValue(AtomicValue::AtomicValueRMW, Kind kind, Origin origin, Width width, Value* operand, Value* pointer, MemoryValue::OffsetType offset, HeapRange range, HeapRange fenceRange) : MemoryValue(CheckedOpcode, kind, operand->type(), origin, offset, range, fenceRange, operand, pointer) , m_width(width) { ASSERT(bestType(GP, accessWidth()) == accessType()); switch (kind.opcode()) { case AtomicXchgAdd: case AtomicXchgAnd: case AtomicXchgOr: case AtomicXchgSub: case AtomicXchgXor: case AtomicXchg: break; default: ASSERT_NOT_REACHED(); } }
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ // ¥ AddPropertyToRecord /*e*/ // ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ // Gets the specified property and puts in on the AERecord passed in. This is useful for cloning properties of model objects // which are often passed as AERecords keyed by AEKeyword. // If the parameter cannot be found then the routine will throw only if inThrowIfMissing is true. // Returns true if the parameter was added, false if not. bool CModelObjectPlus::AddPropertyToRecord( AEKeyword inKeyword, AERecord &outRecord, bool inThrowIfMissing) { bool added=false; StAEDescriptor value; DescType type=typeWildCard; StAEDescriptor bestType(typeType,&type,sizeof(type)); Try_ { GetAEProperty(inKeyword,bestType,value); ThrowIfOSErr_(::AEPutKeyDesc(&outRecord,inKeyword,value)); added=true; } Catch_(err) { if (ErrCode_(err)!=errAEUnknownObjectType || inThrowIfMissing) throw; } return added; }