mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 20:35:50 +00:00
Bug 1387535 part 1 - Clean up JmpSrc and JmpDst. r=bhackett
This commit is contained in:
parent
26bc5a86f4
commit
bb851a6aae
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user