| Index: src/ia32/code-stubs-ia32.cc
|
| diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc
|
| index 2ef5a87da26eba19a5c4f9069bd90ebf8fef9633..bbb5aace17ec2ca5fd7b57241a4bf751de6f8684 100644
|
| --- a/src/ia32/code-stubs-ia32.cc
|
| +++ b/src/ia32/code-stubs-ia32.cc
|
| @@ -2423,7 +2423,8 @@ static void GenerateRecordCallTarget(MacroAssembler* masm) {
|
|
|
| void CallFunctionStub::Generate(MacroAssembler* masm) {
|
| // ebx : feedback vector
|
| - // edx : (only if ebx is not undefined) slot in feedback vector (Smi)
|
| + // edx : (only if ebx is not the megamorphic symbol) slot in feedback
|
| + // vector (Smi)
|
| // edi : the function to call
|
| Isolate* isolate = masm->isolate();
|
| Label slow, non_function, wrap, cont;
|
| @@ -2481,7 +2482,7 @@ void CallFunctionStub::Generate(MacroAssembler* masm) {
|
| if (RecordCallTarget()) {
|
| // If there is a call target cache, mark it megamorphic in the
|
| // non-function case. MegamorphicSentinel is an immortal immovable
|
| - // object (undefined) so no write barrier is needed.
|
| + // object (megamorphic symbol) so no write barrier is needed.
|
| __ mov(FieldOperand(ebx, edx, times_half_pointer_size,
|
| FixedArray::kHeaderSize),
|
| Immediate(TypeFeedbackInfo::MegamorphicSentinel(isolate)));
|
| @@ -2529,7 +2530,8 @@ void CallFunctionStub::Generate(MacroAssembler* masm) {
|
| void CallConstructStub::Generate(MacroAssembler* masm) {
|
| // eax : number of arguments
|
| // ebx : feedback vector
|
| - // edx : (only if ebx is not undefined) slot in feedback vector (Smi)
|
| + // edx : (only if ebx is not the megamorphic symbol) slot in feedback
|
| + // vector (Smi)
|
| // edi : constructor function
|
| Label slow, non_function_call;
|
|
|
| @@ -5152,15 +5154,14 @@ void ArrayConstructorStub::GenerateDispatchToArrayStub(
|
| void ArrayConstructorStub::Generate(MacroAssembler* masm) {
|
| // ----------- S t a t e -------------
|
| // -- eax : argc (only if argument_count_ == ANY)
|
| - // -- ebx : feedback vector (fixed array or undefined)
|
| + // -- ebx : feedback vector (fixed array or megamorphic symbol)
|
| // -- edx : slot index (if ebx is fixed array)
|
| // -- edi : constructor
|
| // -- esp[0] : return address
|
| // -- esp[4] : last argument
|
| // -----------------------------------
|
| - Handle<Object> undefined_sentinel(
|
| - masm->isolate()->heap()->undefined_value(),
|
| - masm->isolate());
|
| + Handle<Object> megamorphic_sentinel =
|
| + TypeFeedbackInfo::MegamorphicSentinel(masm->isolate());
|
|
|
| if (FLAG_debug_code) {
|
| // The array construct code is only set for the global and natives
|
| @@ -5174,24 +5175,26 @@ void ArrayConstructorStub::Generate(MacroAssembler* masm) {
|
| __ CmpObjectType(ecx, MAP_TYPE, ecx);
|
| __ Assert(equal, kUnexpectedInitialMapForArrayFunction);
|
|
|
| - // We should either have undefined in ebx or a valid fixed array.
|
| + // We should either have the megamorphic symbol in ebx or a valid
|
| + // fixed array.
|
| Label okay_here;
|
| Handle<Map> fixed_array_map = masm->isolate()->factory()->fixed_array_map();
|
| - __ cmp(ebx, Immediate(undefined_sentinel));
|
| + __ cmp(ebx, Immediate(megamorphic_sentinel));
|
| __ j(equal, &okay_here);
|
| __ cmp(FieldOperand(ebx, 0), Immediate(fixed_array_map));
|
| __ Assert(equal, kExpectedFixedArrayInRegisterEbx);
|
|
|
| - // edx should be a smi if we don't have undefined in ebx.
|
| + // edx should be a smi if we don't have the megamorphic symbol in ebx.
|
| __ AssertSmi(edx);
|
|
|
| __ bind(&okay_here);
|
| }
|
|
|
| Label no_info;
|
| - // If the feedback vector is undefined, or contains anything other than an
|
| - // AllocationSite, call an array constructor that doesn't use AllocationSites.
|
| - __ cmp(ebx, Immediate(undefined_sentinel));
|
| + // If the feedback vector is the megamorphic sentinel, or contains anything
|
| + // other than an AllocationSite, call an array constructor that doesn't use
|
| + // AllocationSites.
|
| + __ cmp(ebx, Immediate(megamorphic_sentinel));
|
| __ j(equal, &no_info);
|
| __ mov(ebx, FieldOperand(ebx, edx, times_half_pointer_size,
|
| FixedArray::kHeaderSize));
|
|
|