Handle new space constants on ia32 by using in a register in Lithium.

BUG=
R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/35413008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17347 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
titzer@chromium.org 2013-10-23 16:57:57 +00:00
parent e25920da19
commit 478aa96d6f

View File

@ -561,29 +561,34 @@ LOperand* LChunkBuilder::UseAtStart(HValue* value) {
}
static inline bool CanBeImmediateConstant(HValue* value) {
return value->IsConstant() && HConstant::cast(value)->NotInNewSpace();
}
LOperand* LChunkBuilder::UseOrConstant(HValue* value) {
return value->IsConstant()
return CanBeImmediateConstant(value)
? chunk_->DefineConstantOperand(HConstant::cast(value))
: Use(value);
}
LOperand* LChunkBuilder::UseOrConstantAtStart(HValue* value) {
return value->IsConstant()
return CanBeImmediateConstant(value)
? chunk_->DefineConstantOperand(HConstant::cast(value))
: UseAtStart(value);
}
LOperand* LChunkBuilder::UseRegisterOrConstant(HValue* value) {
return value->IsConstant()
return CanBeImmediateConstant(value)
? chunk_->DefineConstantOperand(HConstant::cast(value))
: UseRegister(value);
}
LOperand* LChunkBuilder::UseRegisterOrConstantAtStart(HValue* value) {
return value->IsConstant()
return CanBeImmediateConstant(value)
? chunk_->DefineConstantOperand(HConstant::cast(value))
: UseRegisterAtStart(value);
}