Exemplo n.º 1
0
void* Nullcline::DataCopy() const
{
#ifdef DEBUG_FUNC
    ScopeTracker st("Nullcline::DataCopy", std::this_thread::get_id());
#endif
    std::lock_guard<std::mutex> lock( Mutex() );
    if (!ConstData()) return nullptr;
    return new Record(*static_cast<const Record*>( ConstData() ));
}
Exemplo n.º 2
0
// Check whether the other ByteArray is equal to this.
bool ByteArray::Equal(const ByteArray &other) const {
	if (Length() != other.Length()) {
		return false;
	}
	if (Length() == 0 && other.Length() == 0) {
		// If both are empty, ensure that they are either
		// both null, or both non-null.
		return IsNull() == other.IsNull();
	}
	if (memcmp(ConstData(), other.ConstData(), Length()) == 0) {
		return true;
	}
	return false;
}
Exemplo n.º 3
0
SSATmp* TraceBuilder::genDefNone() {
  return gen(DefConst, Type::None, ConstData(0));
}
Exemplo n.º 4
0
SSATmp* TraceBuilder::genPtrToUninit() {
  return gen(DefConst, Type::PtrToInitNull, ConstData(&init_null_variant));
}
Exemplo n.º 5
0
SSATmp* TraceBuilder::genDefNull() {
  return gen(DefConst, Type::Null, ConstData(0));
}
Exemplo n.º 6
0
SSATmp* TraceBuilder::genDefUninit() {
  return gen(DefConst, Type::Uninit, ConstData(0));
}
Exemplo n.º 7
0
TEST( ConstDataTest, ConstDataReturns3 )
{
  EXPECT_EQ( ConstData(), 3 );
}