Fix a performance bug in the register contraints for polymorphic loads.

The context is only needed in the esi register if there is a call to
the generic stub.
Review URL: https://chromiumcodereview.appspot.com/9467001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10819 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
fschneider@chromium.org 2012-02-24 10:31:16 +00:00
parent 70804bacf5
commit a6083af4fa

View File

@ -1935,13 +1935,14 @@ LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
LInstruction* LChunkBuilder::DoLoadNamedFieldPolymorphic(
HLoadNamedFieldPolymorphic* instr) {
ASSERT(instr->representation().IsTagged());
LOperand* context = UseFixed(instr->context(), esi);
if (instr->need_generic()) {
LOperand* context = UseFixed(instr->context(), esi);
LOperand* obj = UseFixed(instr->object(), eax);
LLoadNamedFieldPolymorphic* result =
new(zone()) LLoadNamedFieldPolymorphic(context, obj);
return MarkAsCall(DefineFixed(result, eax), instr);
} else {
LOperand* context = UseAny(instr->context()); // Not actually used.
LOperand* obj = UseRegisterAtStart(instr->object());
LLoadNamedFieldPolymorphic* result =
new(zone()) LLoadNamedFieldPolymorphic(context, obj);