| Index: src/mips/full-codegen-mips.cc
|
| diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc
|
| index 18ee02dc5c4bb7328546b9712079b30e3cc9f328..56c6dee8478df6cd7ad5c20fa564ad247c2afaa8 100644
|
| --- a/src/mips/full-codegen-mips.cc
|
| +++ b/src/mips/full-codegen-mips.cc
|
| @@ -138,6 +138,9 @@ void FullCodeGenerator::Generate() {
|
| CompilationInfo* info = info_;
|
| handler_table_ =
|
| isolate()->factory()->NewFixedArray(function()->handler_count(), TENURED);
|
| +
|
| + InitializeFeedbackVector();
|
| +
|
| profiling_counter_ = isolate()->factory()->NewCell(
|
| Handle<Smi>(Smi::FromInt(FLAG_interrupt_budget), isolate()));
|
| SetFunctionPosition(function());
|
| @@ -1087,6 +1090,7 @@ void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) {
|
|
|
| void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
|
| Comment cmnt(masm_, "[ ForInStatement");
|
| + int slot = stmt->ForInFeedbackSlot();
|
| SetStatementPosition(stmt);
|
|
|
| Label loop, exit;
|
| @@ -1172,13 +1176,13 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
|
| Label non_proxy;
|
| __ bind(&fixed_array);
|
|
|
| - Handle<Cell> cell = isolate()->factory()->NewCell(
|
| - Handle<Object>(Smi::FromInt(TypeFeedbackCells::kForInFastCaseMarker),
|
| - isolate()));
|
| - RecordTypeFeedbackCell(stmt->ForInFeedbackId(), cell);
|
| - __ li(a1, cell);
|
| - __ li(a2, Operand(Smi::FromInt(TypeFeedbackCells::kForInSlowCaseMarker)));
|
| - __ sw(a2, FieldMemOperand(a1, Cell::kValueOffset));
|
| + Handle<Object> feedback = Handle<Object>(
|
| + Smi::FromInt(TypeFeedbackInfo::kForInFastCaseMarker),
|
| + isolate());
|
| + StoreFeedbackVectorSlot(slot, feedback);
|
| + __ li(a1, FeedbackVector());
|
| + __ li(a2, Operand(Smi::FromInt(TypeFeedbackInfo::kForInSlowCaseMarker)));
|
| + __ sw(a2, FieldMemOperand(a1, FixedArray::OffsetOfElementAt(slot)));
|
|
|
| __ li(a1, Operand(Smi::FromInt(1))); // Smi indicates slow check
|
| __ lw(a2, MemOperand(sp, 0 * kPointerSize)); // Get enumerated object
|
| @@ -2741,15 +2745,15 @@ void FullCodeGenerator::EmitCallWithStub(Call* expr) {
|
| SetSourcePosition(expr->position());
|
|
|
| Handle<Object> uninitialized =
|
| - TypeFeedbackCells::UninitializedSentinel(isolate());
|
| - Handle<Cell> cell = isolate()->factory()->NewCell(uninitialized);
|
| - RecordTypeFeedbackCell(expr->CallFeedbackId(), cell);
|
| - __ li(a2, Operand(cell));
|
| + TypeFeedbackInfo::UninitializedSentinel(isolate());
|
| + StoreFeedbackVectorSlot(expr->CallFeedbackSlot(), uninitialized);
|
| + __ li(a2, FeedbackVector());
|
| + __ li(a3, Operand(Smi::FromInt(expr->CallFeedbackSlot())));
|
|
|
| // Record call targets in unoptimized code.
|
| CallFunctionStub stub(arg_count, RECORD_CALL_TARGET);
|
| __ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize));
|
| - __ CallStub(&stub, expr->CallFeedbackId());
|
| + __ CallStub(&stub);
|
| RecordJSReturnSite(expr);
|
| // Restore context register.
|
| __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
|
| @@ -2928,10 +2932,10 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
|
|
|
| // Record call targets in unoptimized code.
|
| Handle<Object> uninitialized =
|
| - TypeFeedbackCells::UninitializedSentinel(isolate());
|
| - Handle<Cell> cell = isolate()->factory()->NewCell(uninitialized);
|
| - RecordTypeFeedbackCell(expr->CallNewFeedbackId(), cell);
|
| - __ li(a2, Operand(cell));
|
| + TypeFeedbackInfo::UninitializedSentinel(isolate());
|
| + StoreFeedbackVectorSlot(expr->CallNewFeedbackSlot(), uninitialized);
|
| + __ li(a2, FeedbackVector());
|
| + __ li(a3, Operand(Smi::FromInt(expr->CallNewFeedbackSlot())));
|
|
|
| CallConstructStub stub(RECORD_CALL_TARGET);
|
| __ Call(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL);
|
|
|