Index: src/x64/full-codegen-x64.cc |
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc |
index b146809a24e19a745a5d3810b97ad4bcff8412d9..b40ee92977a2559281f8ac836222cb7f9cdef770 100644 |
--- a/src/x64/full-codegen-x64.cc |
+++ b/src/x64/full-codegen-x64.cc |
@@ -119,6 +119,8 @@ void FullCodeGenerator::Generate() { |
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()); |
@@ -1125,10 +1127,15 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { |
Label non_proxy; |
__ bind(&fixed_array); |
+ Handle<Object> feedback = Handle<Object>( |
+ Smi::FromInt(TypeFeedbackInfo::kForInFastCaseMarker), |
+ isolate()); |
+ StoreFeedbackVectorSlot(slot, feedback); |
+ |
// No need for a write barrier, we are storing a Smi in the feedback vector. |
__ Move(rbx, FeedbackVector()); |
__ Move(FieldOperand(rbx, FixedArray::OffsetOfElementAt(slot)), |
- TypeFeedbackInfo::MegamorphicSentinel(isolate())); |
+ Smi::FromInt(TypeFeedbackInfo::kForInSlowCaseMarker)); |
__ Move(rbx, Smi::FromInt(1)); // Smi indicates slow check |
__ movp(rcx, Operand(rsp, 0 * kPointerSize)); // Get enumerated object |
STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE); |
@@ -2641,6 +2648,9 @@ void FullCodeGenerator::EmitCallWithStub(Call* expr) { |
// Record source position for debugger. |
SetSourcePosition(expr->position()); |
+ Handle<Object> uninitialized = |
+ TypeFeedbackInfo::UninitializedSentinel(isolate()); |
+ StoreFeedbackVectorSlot(expr->CallFeedbackSlot(), uninitialized); |
__ Move(rbx, FeedbackVector()); |
__ Move(rdx, Smi::FromInt(expr->CallFeedbackSlot())); |
@@ -2818,6 +2828,9 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) { |
__ movp(rdi, Operand(rsp, arg_count * kPointerSize)); |
// Record call targets in unoptimized code, but not in the snapshot. |
+ Handle<Object> uninitialized = |
+ TypeFeedbackInfo::UninitializedSentinel(isolate()); |
+ StoreFeedbackVectorSlot(expr->CallNewFeedbackSlot(), uninitialized); |
__ Move(rbx, FeedbackVector()); |
__ Move(rdx, Smi::FromInt(expr->CallNewFeedbackSlot())); |