Commit 478aa96d authored by titzer@chromium.org's avatar titzer@chromium.org

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
parent e25920da
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment