void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
Comment cmnt(masm_, "[ ForInStatement");
- int slot = stmt->ForInFeedbackSlot();
+ FeedbackVectorSlot slot = stmt->ForInFeedbackSlot();
SetStatementPosition(stmt);
Label loop, exit;
__ li(a1, FeedbackVector());
__ li(a2, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate())));
- __ sd(a2, FieldMemOperand(a1, FixedArray::OffsetOfElementAt(slot)));
+ __ sd(a2, FieldMemOperand(a1, FixedArray::OffsetOfElementAt(slot.ToInt())));
__ li(a1, Operand(Smi::FromInt(1))); // Smi indicates slow check
__ ld(a2, MemOperand(sp, 0 * kPointerSize)); // Get enumerated object
if (FLAG_vector_ics) {
__ li(VectorLoadICDescriptor::SlotRegister(),
- Operand(Smi::FromInt(expr->HomeObjectFeedbackSlot())));
+ Operand(SmiFromSlot(expr->HomeObjectFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL);
} else {
CallLoadIC(NOT_CONTEXTUAL, expr->HomeObjectFeedbackId());
__ li(LoadDescriptor::NameRegister(), Operand(proxy->var()->name()));
if (FLAG_vector_ics) {
__ li(VectorLoadICDescriptor::SlotRegister(),
- Operand(Smi::FromInt(proxy->VariableFeedbackSlot())));
+ Operand(SmiFromSlot(proxy->VariableFeedbackSlot())));
}
ContextualMode mode = (typeof_state == INSIDE_TYPEOF)
__ li(LoadDescriptor::NameRegister(), Operand(var->name()));
if (FLAG_vector_ics) {
__ li(VectorLoadICDescriptor::SlotRegister(),
- Operand(Smi::FromInt(proxy->VariableFeedbackSlot())));
+ Operand(SmiFromSlot(proxy->VariableFeedbackSlot())));
}
CallLoadIC(CONTEXTUAL);
context()->Plug(v0);
__ ld(load_name, MemOperand(sp, 2 * kPointerSize));
if (FLAG_vector_ics) {
__ li(VectorLoadICDescriptor::SlotRegister(),
- Operand(Smi::FromInt(expr->KeyedLoadFeedbackSlot())));
+ Operand(SmiFromSlot(expr->KeyedLoadFeedbackSlot())));
}
Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code();
CallIC(ic, TypeFeedbackId::None());
__ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done"
if (FLAG_vector_ics) {
__ li(VectorLoadICDescriptor::SlotRegister(),
- Operand(Smi::FromInt(expr->DoneFeedbackSlot())));
+ Operand(SmiFromSlot(expr->DoneFeedbackSlot())));
}
CallLoadIC(NOT_CONTEXTUAL); // v0=result.done
__ mov(a0, v0);
__ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value"
if (FLAG_vector_ics) {
__ li(VectorLoadICDescriptor::SlotRegister(),
- Operand(Smi::FromInt(expr->ValueFeedbackSlot())));
+ Operand(SmiFromSlot(expr->ValueFeedbackSlot())));
}
CallLoadIC(NOT_CONTEXTUAL); // v0=result.value
context()->DropAndPlug(2, v0); // drop iter and g
__ li(LoadDescriptor::NameRegister(), Operand(key->value()));
if (FLAG_vector_ics) {
__ li(VectorLoadICDescriptor::SlotRegister(),
- Operand(Smi::FromInt(prop->PropertyFeedbackSlot())));
+ Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL);
} else {
CallLoadIC(NOT_CONTEXTUAL, prop->PropertyFeedbackId());
Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code();
if (FLAG_vector_ics) {
__ li(VectorLoadICDescriptor::SlotRegister(),
- Operand(Smi::FromInt(prop->PropertyFeedbackSlot())));
+ Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
CallIC(ic);
} else {
CallIC(ic, prop->PropertyFeedbackId());
SetSourcePosition(expr->position());
Handle<Code> ic = CallIC::initialize_stub(
isolate(), arg_count, call_type);
- __ li(a3, Operand(Smi::FromInt(expr->CallFeedbackSlot())));
+ __ li(a3, Operand(SmiFromSlot(expr->CallFeedbackSlot())));
__ ld(a1, MemOperand(sp, (arg_count + 1) * kPointerSize));
// Don't assign a type feedback id to the IC, since type feedback is provided
// by the vector above.
// Record call targets in unoptimized code.
if (FLAG_pretenuring_call_new) {
EnsureSlotContainsAllocationSite(expr->AllocationSiteFeedbackSlot());
- DCHECK(expr->AllocationSiteFeedbackSlot() ==
- expr->CallNewFeedbackSlot() + 1);
+ DCHECK(expr->AllocationSiteFeedbackSlot().ToInt() ==
+ expr->CallNewFeedbackSlot().ToInt() + 1);
}
__ li(a2, FeedbackVector());
- __ li(a3, Operand(Smi::FromInt(expr->CallNewFeedbackSlot())));
+ __ li(a3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot())));
CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET);
__ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL);
__ li(LoadDescriptor::NameRegister(), Operand(expr->name()));
if (FLAG_vector_ics) {
__ li(VectorLoadICDescriptor::SlotRegister(),
- Operand(Smi::FromInt(expr->CallRuntimeFeedbackSlot())));
+ Operand(SmiFromSlot(expr->CallRuntimeFeedbackSlot())));
CallLoadIC(NOT_CONTEXTUAL);
} else {
CallLoadIC(NOT_CONTEXTUAL, expr->CallRuntimeFeedbackId());
__ li(LoadDescriptor::NameRegister(), Operand(proxy->name()));
if (FLAG_vector_ics) {
__ li(VectorLoadICDescriptor::SlotRegister(),
- Operand(Smi::FromInt(proxy->VariableFeedbackSlot())));
+ Operand(SmiFromSlot(proxy->VariableFeedbackSlot())));
}
// Use a regular load, not a contextual load, to avoid a reference
// error.