| Index: src/arm/full-codegen-arm.cc
|
| diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc
|
| index 759f989e9019d7ff2331c6ea9e46f70d2e139bc9..369f7146eb1aef781c05f1f6252a5fc2e99ea17c 100644
|
| --- a/src/arm/full-codegen-arm.cc
|
| +++ b/src/arm/full-codegen-arm.cc
|
| @@ -1102,7 +1102,7 @@ void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) {
|
|
|
| void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
|
| Comment cmnt(masm_, "[ ForInStatement");
|
| - int slot = stmt->ForInFeedbackSlot();
|
| + FeedbackVectorSlot slot = stmt->ForInFeedbackSlot();
|
| SetStatementPosition(stmt);
|
|
|
| Label loop, exit;
|
| @@ -1194,7 +1194,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
|
|
|
| __ Move(r1, FeedbackVector());
|
| __ mov(r2, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate())));
|
| - __ str(r2, FieldMemOperand(r1, FixedArray::OffsetOfElementAt(slot)));
|
| + __ str(r2, FieldMemOperand(r1, FixedArray::OffsetOfElementAt(slot.ToInt())));
|
|
|
| __ mov(r1, Operand(Smi::FromInt(1))); // Smi indicates slow check
|
| __ ldr(r2, MemOperand(sp, 0 * kPointerSize)); // Get enumerated object
|
| @@ -1366,7 +1366,7 @@ void FullCodeGenerator::EmitLoadHomeObject(SuperReference* expr) {
|
|
|
| if (FLAG_vector_ics) {
|
| __ mov(VectorLoadICDescriptor::SlotRegister(),
|
| - Operand(Smi::FromInt(expr->HomeObjectFeedbackSlot())));
|
| + Operand(SmiFromSlot(expr->HomeObjectFeedbackSlot())));
|
| CallLoadIC(NOT_CONTEXTUAL);
|
| } else {
|
| CallLoadIC(NOT_CONTEXTUAL, expr->HomeObjectFeedbackId());
|
| @@ -1432,7 +1432,7 @@ void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy,
|
| __ mov(LoadDescriptor::NameRegister(), Operand(proxy->var()->name()));
|
| if (FLAG_vector_ics) {
|
| __ mov(VectorLoadICDescriptor::SlotRegister(),
|
| - Operand(Smi::FromInt(proxy->VariableFeedbackSlot())));
|
| + Operand(SmiFromSlot(proxy->VariableFeedbackSlot())));
|
| }
|
|
|
| ContextualMode mode = (typeof_state == INSIDE_TYPEOF)
|
| @@ -1521,7 +1521,7 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
|
| __ mov(LoadDescriptor::NameRegister(), Operand(var->name()));
|
| if (FLAG_vector_ics) {
|
| __ mov(VectorLoadICDescriptor::SlotRegister(),
|
| - Operand(Smi::FromInt(proxy->VariableFeedbackSlot())));
|
| + Operand(SmiFromSlot(proxy->VariableFeedbackSlot())));
|
| }
|
| CallLoadIC(CONTEXTUAL);
|
| context()->Plug(r0);
|
| @@ -2150,7 +2150,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
|
| __ ldr(load_name, MemOperand(sp, 2 * kPointerSize));
|
| if (FLAG_vector_ics) {
|
| __ mov(VectorLoadICDescriptor::SlotRegister(),
|
| - Operand(Smi::FromInt(expr->KeyedLoadFeedbackSlot())));
|
| + Operand(SmiFromSlot(expr->KeyedLoadFeedbackSlot())));
|
| }
|
| Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code();
|
| CallIC(ic, TypeFeedbackId::None());
|
| @@ -2170,7 +2170,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
|
| __ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done"
|
| if (FLAG_vector_ics) {
|
| __ mov(VectorLoadICDescriptor::SlotRegister(),
|
| - Operand(Smi::FromInt(expr->DoneFeedbackSlot())));
|
| + Operand(SmiFromSlot(expr->DoneFeedbackSlot())));
|
| }
|
| CallLoadIC(NOT_CONTEXTUAL); // r0=result.done
|
| Handle<Code> bool_ic = ToBooleanStub::GetUninitialized(isolate());
|
| @@ -2183,7 +2183,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
|
| __ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value"
|
| if (FLAG_vector_ics) {
|
| __ mov(VectorLoadICDescriptor::SlotRegister(),
|
| - Operand(Smi::FromInt(expr->ValueFeedbackSlot())));
|
| + Operand(SmiFromSlot(expr->ValueFeedbackSlot())));
|
| }
|
| CallLoadIC(NOT_CONTEXTUAL); // r0=result.value
|
| context()->DropAndPlug(2, r0); // drop iter and g
|
| @@ -2364,7 +2364,7 @@ void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
|
| __ mov(LoadDescriptor::NameRegister(), Operand(key->value()));
|
| if (FLAG_vector_ics) {
|
| __ mov(VectorLoadICDescriptor::SlotRegister(),
|
| - Operand(Smi::FromInt(prop->PropertyFeedbackSlot())));
|
| + Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
|
| CallLoadIC(NOT_CONTEXTUAL);
|
| } else {
|
| CallLoadIC(NOT_CONTEXTUAL, prop->PropertyFeedbackId());
|
| @@ -2389,7 +2389,7 @@ void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
|
| Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code();
|
| if (FLAG_vector_ics) {
|
| __ mov(VectorLoadICDescriptor::SlotRegister(),
|
| - Operand(Smi::FromInt(prop->PropertyFeedbackSlot())));
|
| + Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
|
| CallIC(ic);
|
| } else {
|
| CallIC(ic, prop->PropertyFeedbackId());
|
| @@ -2896,7 +2896,7 @@ void FullCodeGenerator::EmitCall(Call* expr, CallICState::CallType call_type) {
|
| SetSourcePosition(expr->position());
|
| Handle<Code> ic = CallIC::initialize_stub(
|
| isolate(), arg_count, call_type);
|
| - __ mov(r3, Operand(Smi::FromInt(expr->CallFeedbackSlot())));
|
| + __ mov(r3, Operand(SmiFromSlot(expr->CallFeedbackSlot())));
|
| __ ldr(r1, 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.
|
| @@ -3096,12 +3096,12 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
|
| // 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);
|
| }
|
|
|
| __ Move(r2, FeedbackVector());
|
| - __ mov(r3, Operand(Smi::FromInt(expr->CallNewFeedbackSlot())));
|
| + __ mov(r3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot())));
|
|
|
| CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET);
|
| __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL);
|
| @@ -4302,7 +4302,7 @@ void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) {
|
| __ mov(LoadDescriptor::NameRegister(), Operand(expr->name()));
|
| if (FLAG_vector_ics) {
|
| __ mov(VectorLoadICDescriptor::SlotRegister(),
|
| - Operand(Smi::FromInt(expr->CallRuntimeFeedbackSlot())));
|
| + Operand(SmiFromSlot(expr->CallRuntimeFeedbackSlot())));
|
| CallLoadIC(NOT_CONTEXTUAL);
|
| } else {
|
| CallLoadIC(NOT_CONTEXTUAL, expr->CallRuntimeFeedbackId());
|
| @@ -4706,7 +4706,7 @@ void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
|
| __ mov(LoadDescriptor::NameRegister(), Operand(proxy->name()));
|
| if (FLAG_vector_ics) {
|
| __ mov(VectorLoadICDescriptor::SlotRegister(),
|
| - Operand(Smi::FromInt(proxy->VariableFeedbackSlot())));
|
| + Operand(SmiFromSlot(proxy->VariableFeedbackSlot())));
|
| }
|
| // Use a regular load, not a contextual load, to avoid a reference
|
| // error.
|
|
|