Index: src/arm/full-codegen-arm.cc |
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc |
index 6fe05ff649b08b82160961fd99570804125f3529..1a8f05148ec157bc2a423d3cfb6f0704ac42ca53 100644 |
--- a/src/arm/full-codegen-arm.cc |
+++ b/src/arm/full-codegen-arm.cc |
@@ -130,6 +130,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()); |
@@ -1074,6 +1077,7 @@ void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) { |
void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { |
Comment cmnt(masm_, "[ ForInStatement"); |
+ int slot = stmt->ForInFeedbackSlot(); |
SetStatementPosition(stmt); |
Label loop, exit; |
@@ -1163,13 +1167,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); |
- __ Move(r1, cell); |
- __ mov(r2, Operand(Smi::FromInt(TypeFeedbackCells::kForInSlowCaseMarker))); |
- __ str(r2, FieldMemOperand(r1, Cell::kValueOffset)); |
+ Handle<Object> feedback = Handle<Object>( |
+ Smi::FromInt(TypeFeedbackInfo::kForInFastCaseMarker), |
+ isolate()); |
+ StoreFeedbackVectorSlot(slot, feedback); |
+ __ Move(r1, FeedbackVector()); |
+ __ mov(r2, Operand(Smi::FromInt(TypeFeedbackInfo::kForInSlowCaseMarker))); |
+ __ str(r2, FieldMemOperand(r1, FixedArray::OffsetOfElementAt(slot))); |
__ mov(r1, Operand(Smi::FromInt(1))); // Smi indicates slow check |
__ ldr(r2, MemOperand(sp, 0 * kPointerSize)); // Get enumerated object |
@@ -2674,10 +2678,10 @@ 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); |
- __ mov(r2, Operand(cell)); |
+ TypeFeedbackInfo::UninitializedSentinel(isolate()); |
+ StoreFeedbackVectorSlot(expr->CallFeedbackSlot(), uninitialized); |
+ __ Move(r2, FeedbackVector()); |
+ __ mov(r3, Operand(Smi::FromInt(expr->CallFeedbackSlot()))); |
// Record call targets in unoptimized code. |
CallFunctionStub stub(arg_count, RECORD_CALL_TARGET); |
@@ -2868,10 +2872,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); |
- __ mov(r2, Operand(cell)); |
+ TypeFeedbackInfo::UninitializedSentinel(isolate()); |
+ StoreFeedbackVectorSlot(expr->CallNewFeedbackSlot(), uninitialized); |
+ __ Move(r2, FeedbackVector()); |
+ __ mov(r3, Operand(Smi::FromInt(expr->CallNewFeedbackSlot()))); |
CallConstructStub stub(RECORD_CALL_TARGET); |
__ Call(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL); |