Bug 1387535 part 1 - Clean up JmpSrc and JmpDst. r=bhackett

This commit is contained in:
Jan de Mooij 2017-08-08 13:54:47 +02:00
parent 26bc5a86f4
commit bb851a6aae

View File

@ -62,51 +62,30 @@ GetRel32Target(void* where)
class JmpSrc {
public:
JmpSrc()
: offset_(-1)
: offset_(-1)
{
}
explicit JmpSrc(int32_t offset)
: offset_(offset)
: offset_(offset)
{
}
int32_t offset() const {
return offset_;
}
bool isSet() const {
return offset_ != -1;
}
private:
int offset_;
int32_t offset_;
};
class JmpDst {
public:
JmpDst()
: offset_(-1)
, used_(false)
{
}
bool isUsed() const { return used_; }
void used() { used_ = true; }
bool isValid() const { return offset_ != -1; }
explicit JmpDst(int32_t offset)
: offset_(offset)
, used_(false)
{
MOZ_ASSERT(offset_ == offset);
}
: offset_(offset)
{}
int32_t offset() const {
return offset_;
}
private:
int32_t offset_ : 31;
bool used_ : 1;
int32_t offset_;
};
inline bool