X87: vector-based ICs did not update type feedback counts correctly.
port r24732. original commit message: vector-based ICs did not update type feedback counts correctly. BUG= R=weiliang.lin@intel.com Review URL: https://codereview.chromium.org/669823002 Patch from Chunyang Dai <chunyang.dai@intel.com>. git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24756 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
3de17c6950
commit
1306839894
@ -1957,6 +1957,13 @@ void CallICStub::Generate(MacroAssembler* masm) {
|
||||
__ mov(FieldOperand(ebx, edx, times_half_pointer_size,
|
||||
FixedArray::kHeaderSize),
|
||||
Immediate(TypeFeedbackVector::MegamorphicSentinel(isolate)));
|
||||
// We have to update statistics for runtime profiling.
|
||||
const int with_types_offset =
|
||||
FixedArray::OffsetOfElementAt(TypeFeedbackVector::kWithTypesIndex);
|
||||
__ sub(FieldOperand(ebx, with_types_offset), Immediate(Smi::FromInt(1)));
|
||||
const int generic_offset =
|
||||
FixedArray::OffsetOfElementAt(TypeFeedbackVector::kGenericCountIndex);
|
||||
__ add(FieldOperand(ebx, generic_offset), Immediate(Smi::FromInt(1)));
|
||||
__ jmp(&slow_start);
|
||||
}
|
||||
|
||||
|
@ -1106,7 +1106,8 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
|
||||
|
||||
// No need for a write barrier, we are storing a Smi in the feedback vector.
|
||||
__ LoadHeapObject(ebx, FeedbackVector());
|
||||
__ mov(FieldOperand(ebx, FixedArray::OffsetOfElementAt(slot.ToInt())),
|
||||
int vector_index = FeedbackVector()->GetIndex(slot);
|
||||
__ mov(FieldOperand(ebx, FixedArray::OffsetOfElementAt(vector_index)),
|
||||
Immediate(TypeFeedbackVector::MegamorphicSentinel(isolate())));
|
||||
|
||||
__ mov(ebx, Immediate(Smi::FromInt(1))); // Smi indicates slow check
|
||||
|
@ -3126,13 +3126,15 @@ void LCodeGen::DoLoadGlobalCell(LLoadGlobalCell* instr) {
|
||||
template <class T>
|
||||
void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
|
||||
DCHECK(FLAG_vector_ics);
|
||||
Register vector = ToRegister(instr->temp_vector());
|
||||
DCHECK(vector.is(VectorLoadICDescriptor::VectorRegister()));
|
||||
__ mov(vector, instr->hydrogen()->feedback_vector());
|
||||
Register vector_register = ToRegister(instr->temp_vector());
|
||||
DCHECK(vector_register.is(VectorLoadICDescriptor::VectorRegister()));
|
||||
Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
|
||||
__ mov(vector_register, vector);
|
||||
// No need to allocate this register.
|
||||
DCHECK(VectorLoadICDescriptor::SlotRegister().is(eax));
|
||||
int index = vector->GetIndex(instr->hydrogen()->slot());
|
||||
__ mov(VectorLoadICDescriptor::SlotRegister(),
|
||||
Immediate(Smi::FromInt(instr->hydrogen()->slot().ToInt())));
|
||||
Immediate(Smi::FromInt(index)));
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user