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:
parent
e25920da19
commit
478aa96d6f
@ -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) {
|
LOperand* LChunkBuilder::UseOrConstant(HValue* value) {
|
||||||
return value->IsConstant()
|
return CanBeImmediateConstant(value)
|
||||||
? chunk_->DefineConstantOperand(HConstant::cast(value))
|
? chunk_->DefineConstantOperand(HConstant::cast(value))
|
||||||
: Use(value);
|
: Use(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LOperand* LChunkBuilder::UseOrConstantAtStart(HValue* value) {
|
LOperand* LChunkBuilder::UseOrConstantAtStart(HValue* value) {
|
||||||
return value->IsConstant()
|
return CanBeImmediateConstant(value)
|
||||||
? chunk_->DefineConstantOperand(HConstant::cast(value))
|
? chunk_->DefineConstantOperand(HConstant::cast(value))
|
||||||
: UseAtStart(value);
|
: UseAtStart(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LOperand* LChunkBuilder::UseRegisterOrConstant(HValue* value) {
|
LOperand* LChunkBuilder::UseRegisterOrConstant(HValue* value) {
|
||||||
return value->IsConstant()
|
return CanBeImmediateConstant(value)
|
||||||
? chunk_->DefineConstantOperand(HConstant::cast(value))
|
? chunk_->DefineConstantOperand(HConstant::cast(value))
|
||||||
: UseRegister(value);
|
: UseRegister(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LOperand* LChunkBuilder::UseRegisterOrConstantAtStart(HValue* value) {
|
LOperand* LChunkBuilder::UseRegisterOrConstantAtStart(HValue* value) {
|
||||||
return value->IsConstant()
|
return CanBeImmediateConstant(value)
|
||||||
? chunk_->DefineConstantOperand(HConstant::cast(value))
|
? chunk_->DefineConstantOperand(HConstant::cast(value))
|
||||||
: UseRegisterAtStart(value);
|
: UseRegisterAtStart(value);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user