From bf18738539a79cd7ed6731095b377466f62a177a Mon Sep 17 00:00:00 2001 From: "weiliang.lin@intel.com" Date: Fri, 19 Sep 2014 06:31:33 +0000 Subject: [PATCH] X87: Move state sentinels into TypeFeedbackVector. port r24037. original commit message: Move state sentinels into TypeFeedbackVector. These sentinels were in the wrong place, living in only tangentially related class TypeFeedbackInfo, but they codify state in the TypeFeedbackVector. BUG= R=weiliang.lin@intel.com Review URL: https://codereview.chromium.org/585743002 Patch from Jing Bao . git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24062 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/x87/code-stubs-x87.cc | 16 ++++++++-------- src/x87/full-codegen-x87.cc | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/x87/code-stubs-x87.cc b/src/x87/code-stubs-x87.cc index af3ad21..27aa7dc 100644 --- a/src/x87/code-stubs-x87.cc +++ b/src/x87/code-stubs-x87.cc @@ -1512,7 +1512,7 @@ static void GenerateRecordCallTarget(MacroAssembler* masm) { // function without changing the state. __ cmp(ecx, edi); __ j(equal, &done, Label::kFar); - __ cmp(ecx, Immediate(TypeFeedbackInfo::MegamorphicSentinel(isolate))); + __ cmp(ecx, Immediate(TypeFeedbackVector::MegamorphicSentinel(isolate))); __ j(equal, &done, Label::kFar); if (!FLAG_pretenuring_call_new) { @@ -1535,14 +1535,14 @@ static void GenerateRecordCallTarget(MacroAssembler* masm) { // A monomorphic miss (i.e, here the cache is not uninitialized) goes // megamorphic. - __ cmp(ecx, Immediate(TypeFeedbackInfo::UninitializedSentinel(isolate))); + __ cmp(ecx, Immediate(TypeFeedbackVector::UninitializedSentinel(isolate))); __ j(equal, &initialize); // MegamorphicSentinel is an immortal immovable object (undefined) so no // write-barrier is needed. __ bind(&megamorphic); - __ mov(FieldOperand(ebx, edx, times_half_pointer_size, - FixedArray::kHeaderSize), - Immediate(TypeFeedbackInfo::MegamorphicSentinel(isolate))); + __ mov( + FieldOperand(ebx, edx, times_half_pointer_size, FixedArray::kHeaderSize), + Immediate(TypeFeedbackVector::MegamorphicSentinel(isolate))); __ jmp(&done, Label::kFar); // An uninitialized cache is patched with the function or sentinel to @@ -1877,9 +1877,9 @@ void CallICStub::Generate(MacroAssembler* masm) { __ mov(ecx, FieldOperand(ebx, edx, times_half_pointer_size, FixedArray::kHeaderSize)); - __ cmp(ecx, Immediate(TypeFeedbackInfo::MegamorphicSentinel(isolate))); + __ cmp(ecx, Immediate(TypeFeedbackVector::MegamorphicSentinel(isolate))); __ j(equal, &slow_start); - __ cmp(ecx, Immediate(TypeFeedbackInfo::UninitializedSentinel(isolate))); + __ cmp(ecx, Immediate(TypeFeedbackVector::UninitializedSentinel(isolate))); __ j(equal, &miss); if (!FLAG_trace_ic) { @@ -1890,7 +1890,7 @@ void CallICStub::Generate(MacroAssembler* masm) { __ j(not_equal, &miss); __ mov(FieldOperand(ebx, edx, times_half_pointer_size, FixedArray::kHeaderSize), - Immediate(TypeFeedbackInfo::MegamorphicSentinel(isolate))); + Immediate(TypeFeedbackVector::MegamorphicSentinel(isolate))); __ jmp(&slow_start); } diff --git a/src/x87/full-codegen-x87.cc b/src/x87/full-codegen-x87.cc index 944c7f9..ac55c28 100644 --- a/src/x87/full-codegen-x87.cc +++ b/src/x87/full-codegen-x87.cc @@ -1115,7 +1115,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { // No need for a write barrier, we are storing a Smi in the feedback vector. __ LoadHeapObject(ebx, FeedbackVector()); __ mov(FieldOperand(ebx, FixedArray::OffsetOfElementAt(slot)), - Immediate(TypeFeedbackInfo::MegamorphicSentinel(isolate()))); + Immediate(TypeFeedbackVector::MegamorphicSentinel(isolate()))); __ mov(ebx, Immediate(Smi::FromInt(1))); // Smi indicates slow check __ mov(ecx, Operand(esp, 0 * kPointerSize)); // Get enumerated object -- 2.7.4