From 016a04197a45c16995e61af7267fa859d8529972 Mon Sep 17 00:00:00 2001 From: "plind44@gmail.com" Date: Wed, 30 Apr 2014 15:25:47 +0000 Subject: [PATCH] MIPS: Simplify feedback vector creation and store in SharedFunctionInfo. Port r21085 (782ce81) LOG=N BUG=v8:3212 R=plind44@gmail.com Review URL: https://codereview.chromium.org/267433003 Patch from Balazs Kilvady . git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21098 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/mips/full-codegen-mips.cc | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc index 511f861..82759a9 100644 --- a/src/mips/full-codegen-mips.cc +++ b/src/mips/full-codegen-mips.cc @@ -138,8 +138,6 @@ void FullCodeGenerator::Generate() { handler_table_ = isolate()->factory()->NewFixedArray(function()->handler_count(), TENURED); - InitializeFeedbackVector(); - profiling_counter_ = isolate()->factory()->NewCell( Handle(Smi::FromInt(FLAG_interrupt_budget), isolate())); SetFunctionPosition(function()); @@ -1179,12 +1177,8 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { Label non_proxy; __ bind(&fixed_array); - Handle feedback = Handle( - Smi::FromInt(TypeFeedbackInfo::kForInFastCaseMarker), - isolate()); - StoreFeedbackVectorSlot(slot, feedback); __ li(a1, FeedbackVector()); - __ li(a2, Operand(Smi::FromInt(TypeFeedbackInfo::kForInSlowCaseMarker))); + __ li(a2, Operand(TypeFeedbackInfo::MegamorphicSentinel(isolate()))); __ sw(a2, FieldMemOperand(a1, FixedArray::OffsetOfElementAt(slot))); __ li(a1, Operand(Smi::FromInt(1))); // Smi indicates slow check @@ -2733,9 +2727,6 @@ void FullCodeGenerator::EmitCallWithStub(Call* expr) { // Record source position for debugger. SetSourcePosition(expr->position()); - Handle uninitialized = - TypeFeedbackInfo::UninitializedSentinel(isolate()); - StoreFeedbackVectorSlot(expr->CallFeedbackSlot(), uninitialized); __ li(a2, FeedbackVector()); __ li(a3, Operand(Smi::FromInt(expr->CallFeedbackSlot()))); @@ -2920,12 +2911,8 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) { __ lw(a1, MemOperand(sp, arg_count * kPointerSize)); // Record call targets in unoptimized code. - Handle uninitialized = - TypeFeedbackInfo::UninitializedSentinel(isolate()); - StoreFeedbackVectorSlot(expr->CallNewFeedbackSlot(), uninitialized); if (FLAG_pretenuring_call_new) { - StoreFeedbackVectorSlot(expr->AllocationSiteFeedbackSlot(), - isolate()->factory()->NewAllocationSite()); + EnsureSlotContainsAllocationSite(expr->AllocationSiteFeedbackSlot()); ASSERT(expr->AllocationSiteFeedbackSlot() == expr->CallNewFeedbackSlot() + 1); } -- 2.7.4