| Index: src/ia32/code-stubs-ia32.cc
|
| diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc
|
| index eddd571e6638ca55c503c9b6673edd23696831af..5a5705752cce644e3067507d7c2b15732a6b4552 100644
|
| --- a/src/ia32/code-stubs-ia32.cc
|
| +++ b/src/ia32/code-stubs-ia32.cc
|
| @@ -2362,10 +2362,26 @@ static void GenerateRecordCallTarget(MacroAssembler* masm) {
|
|
|
| __ bind(&miss);
|
|
|
| - // A monomorphic miss (i.e, here the cache is not uninitialized) goes
|
| - // megamorphic.
|
| + // A monomorphic miss (i.e, here the cache is not uninitialized or
|
| + // pre-monomorphic) goes megamorphic.
|
| + Label not_uninitialized;
|
| __ cmp(ecx, Immediate(TypeFeedbackInfo::UninitializedSentinel(isolate)));
|
| + __ j(not_equal, ¬_uninitialized);
|
| +
|
| + // PremonomorphicSentinel is an immortal immovable object (null) so no
|
| + // write-barrier is needed.
|
| + __ mov(FieldOperand(ebx, edx, times_half_pointer_size,
|
| + FixedArray::kHeaderSize),
|
| + Immediate(TypeFeedbackInfo::PremonomorphicSentinel(isolate)));
|
| + __ jmp(&done, Label::kFar);
|
| +
|
| + // If the cache isn't uninitialized, it is either premonomorphic or
|
| + // monomorphic. If it is premonomorphic, we initialize it thus making
|
| + // it monomorphic. Otherwise, we go megamorphic.
|
| + __ bind(¬_uninitialized);
|
| + __ cmp(ecx, Immediate(TypeFeedbackInfo::PremonomorphicSentinel(isolate)));
|
| __ j(equal, &initialize);
|
| +
|
| // MegamorphicSentinel is an immortal immovable object (undefined) so no
|
| // write-barrier is needed.
|
| __ bind(&megamorphic);
|
|
|