Bug 1011045 - IonMonkey: Pass AnyRegister by value instead of const-ref. r=jandem

This commit is contained in:
Dan Gohman 2014-05-15 09:58:03 -07:00
parent c9ed71ab69
commit b02e18871a
3 changed files with 9 additions and 9 deletions

View File

@ -123,7 +123,7 @@ class LAllocation : public TempObject
JS_ASSERT(!isTagged());
bits_ |= TAG_MASK;
}
inline explicit LAllocation(const AnyRegister &reg);
inline explicit LAllocation(AnyRegister reg);
Kind kind() const {
if (isTagged())
@ -1596,7 +1596,7 @@ class LIRGraph
void removeBlock(size_t i);
};
LAllocation::LAllocation(const AnyRegister &reg)
LAllocation::LAllocation(AnyRegister reg)
{
if (reg.isFloat())
*this = LFloatReg(reg.fpu());

View File

@ -51,10 +51,10 @@ struct AnyRegister {
JS_ASSERT(isFloat());
return FloatRegister::FromCode(code_ - Registers::Total);
}
bool operator ==(const AnyRegister &other) const {
bool operator ==(AnyRegister other) const {
return code_ == other.code_;
}
bool operator !=(const AnyRegister &other) const {
bool operator !=(AnyRegister other) const {
return code_ != other.code_;
}
const char *name() const {
@ -145,7 +145,7 @@ class TypedOrValueRegister
return *data.value.addr();
}
const AnyRegister &dataTyped() const {
AnyRegister dataTyped() const {
JS_ASSERT(hasTyped());
return *data.typed.addr();
}
@ -522,7 +522,7 @@ class RegisterSet {
void add(FloatRegister reg) {
fpu_.add(reg);
}
void add(const AnyRegister &any) {
void add(AnyRegister any) {
if (any.isFloat())
add(any.fpu());
else
@ -550,7 +550,7 @@ class RegisterSet {
void addUnchecked(FloatRegister reg) {
fpu_.addUnchecked(reg);
}
void addUnchecked(const AnyRegister &any) {
void addUnchecked(AnyRegister any) {
if (any.isFloat())
addUnchecked(any.fpu());
else
@ -574,7 +574,7 @@ class RegisterSet {
#error "Bad architecture"
#endif
}
void take(const AnyRegister &reg) {
void take(AnyRegister reg) {
if (reg.isFloat())
fpu_.take(reg.fpu());
else

View File

@ -412,7 +412,7 @@ class jit::OutOfLineLoadTypedArrayOutOfBounds : public OutOfLineCodeBase<CodeGen
: dest_(dest), isFloat32Load_(isFloat32Load)
{}
const AnyRegister &dest() const { return dest_; }
AnyRegister dest() const { return dest_; }
bool isFloat32Load() const { return isFloat32Load_; }
bool accept(CodeGeneratorX86 *codegen) { return codegen->visitOutOfLineLoadTypedArrayOutOfBounds(this); }
};