| Index: src/a64/code-stubs-a64.cc
|
| diff --git a/src/a64/code-stubs-a64.cc b/src/a64/code-stubs-a64.cc
|
| index 89bc51cb60c675187d770396bfb59d237649ea9b..390502bf95de4bba0f8dc9978b8454f95660c661 100644
|
| --- a/src/a64/code-stubs-a64.cc
|
| +++ b/src/a64/code-stubs-a64.cc
|
| @@ -3269,9 +3269,9 @@ static void GenerateRecordCallTarget(MacroAssembler* masm) {
|
| Label initialize, done, miss, megamorphic, not_array_function;
|
|
|
| ASSERT_EQ(*TypeFeedbackInfo::MegamorphicSentinel(masm->isolate()),
|
| - masm->isolate()->heap()->undefined_value());
|
| + masm->isolate()->heap()->megamorphic_symbol());
|
| ASSERT_EQ(*TypeFeedbackInfo::UninitializedSentinel(masm->isolate()),
|
| - masm->isolate()->heap()->the_hole_value());
|
| + masm->isolate()->heap()->uninitialized_symbol());
|
|
|
| // Load the cache state.
|
| __ Add(x4, x2, Operand::UntagSmiAndScale(x3, kPointerSizeLog2));
|
| @@ -3299,12 +3299,12 @@ static void GenerateRecordCallTarget(MacroAssembler* masm) {
|
|
|
| // A monomorphic miss (i.e, here the cache is not uninitialized) goes
|
| // megamorphic.
|
| - __ JumpIfRoot(x4, Heap::kTheHoleValueRootIndex, &initialize);
|
| + __ JumpIfRoot(x4, Heap::kUninitializedSymbolRootIndex, &initialize);
|
| // MegamorphicSentinel is an immortal immovable object (undefined) so no
|
| // write-barrier is needed.
|
| __ Bind(&megamorphic);
|
| __ Add(x4, x2, Operand::UntagSmiAndScale(x3, kPointerSizeLog2));
|
| - __ LoadRoot(x10, Heap::kUndefinedValueRootIndex);
|
| + __ LoadRoot(x10, Heap::kMegamorphicSymbolRootIndex);
|
| __ Str(x10, FieldMemOperand(x4, FixedArray::kHeaderSize));
|
| __ B(&done);
|
|
|
| @@ -3357,7 +3357,7 @@ void CallFunctionStub::Generate(MacroAssembler* masm) {
|
| ASM_LOCATION("CallFunctionStub::Generate");
|
| // x1 function the function to call
|
| // x2 : feedback vector
|
| - // x3 : slot in feedback vector (smi) (if x2 is not undefined)
|
| + // x3 : slot in feedback vector (smi) (if x2 is not the megamorphic symbol)
|
| Register function = x1;
|
| Register cache_cell = x2;
|
| Register slot = x3;
|
| @@ -3417,12 +3417,12 @@ 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.
|
| + // (megamorphic symbol) so no write barrier is needed.
|
| ASSERT_EQ(*TypeFeedbackInfo::MegamorphicSentinel(masm->isolate()),
|
| - masm->isolate()->heap()->undefined_value());
|
| + masm->isolate()->heap()->megamorphic_symbol());
|
| __ Add(x12, cache_cell, Operand::UntagSmiAndScale(slot,
|
| kPointerSizeLog2));
|
| - __ LoadRoot(x11, Heap::kUndefinedValueRootIndex);
|
| + __ LoadRoot(x11, Heap::kMegamorphicSymbolRootIndex);
|
| __ Str(x11, FieldMemOperand(x12, FixedArray::kHeaderSize));
|
| }
|
| // Check for function proxy.
|
| @@ -3468,7 +3468,7 @@ void CallConstructStub::Generate(MacroAssembler* masm) {
|
| // x0 : number of arguments
|
| // x1 : the function to call
|
| // x2 : feedback vector
|
| - // x3 : slot in feedback vector (smi) (if r2 is not undefined)
|
| + // x3 : slot in feedback vector (smi) (if r2 is not the megamorphic symbol)
|
| Register function = x1;
|
| Label slow, non_function_call;
|
|
|
| @@ -5482,7 +5482,7 @@ void ArrayConstructorStub::Generate(MacroAssembler* masm) {
|
| // ----------- S t a t e -------------
|
| // -- x0 : argc (only if argument_count_ == ANY)
|
| // -- x1 : constructor
|
| - // -- x2 : feedback vector (fixed array or undefined)
|
| + // -- x2 : feedback vector (fixed array or the megamorphic symbol)
|
| // -- x3 : slot index (if x2 is fixed array)
|
| // -- sp[0] : return address
|
| // -- sp[4] : last argument
|
| @@ -5491,6 +5491,9 @@ void ArrayConstructorStub::Generate(MacroAssembler* masm) {
|
| Register feedback_vector = x2;
|
| Register slot_index = x3;
|
|
|
| + ASSERT_EQ(*TypeFeedbackInfo::MegamorphicSentinel(masm->isolate()),
|
| + masm->isolate()->heap()->megamorphic_symbol());
|
| +
|
| if (FLAG_debug_code) {
|
| // The array construct code is only set for the global and natives
|
| // builtin Array functions which always have maps.
|
| @@ -5506,10 +5509,12 @@ void ArrayConstructorStub::Generate(MacroAssembler* masm) {
|
| __ Abort(kUnexpectedInitialMapForArrayFunction);
|
| __ Bind(&map_ok);
|
|
|
| - // In feedback_vector, we expect either undefined or a valid fixed array.
|
| + // In feedback_vector, we expect either the megamorphic symbol or a valid
|
| + // fixed array.
|
| Label okay_here;
|
| Handle<Map> fixed_array_map = masm->isolate()->factory()->fixed_array_map();
|
| - __ JumpIfRoot(feedback_vector, Heap::kUndefinedValueRootIndex, &okay_here);
|
| + __ JumpIfRoot(feedback_vector, Heap::kMegamorphicSymbolRootIndex,
|
| + &okay_here);
|
| __ Ldr(x10, FieldMemOperand(feedback_vector, FixedArray::kMapOffset));
|
| __ Cmp(x10, Operand(fixed_array_map));
|
| __ Assert(eq, kExpectedFixedArrayInFeedbackVector);
|
| @@ -5524,14 +5529,15 @@ void ArrayConstructorStub::Generate(MacroAssembler* masm) {
|
| Register kind = x3;
|
| Label no_info;
|
| // Get the elements kind and case on that.
|
| - __ JumpIfRoot(feedback_vector, Heap::kUndefinedValueRootIndex, &no_info);
|
| + __ JumpIfRoot(feedback_vector, Heap::kMegamorphicSymbolRootIndex, &no_info);
|
| __ Add(feedback_vector, feedback_vector,
|
| Operand::UntagSmiAndScale(slot_index, kPointerSizeLog2));
|
| __ Ldr(allocation_site, FieldMemOperand(feedback_vector,
|
| FixedArray::kHeaderSize));
|
|
|
| - // If the feedback vector is undefined, or contains anything other than an
|
| - // AllocationSite, call an array constructor that doesn't use AllocationSites.
|
| + // If the feedback vector is the megamorphic symbol, or contains anything
|
| + // other than an AllocationSite, call an array constructor that doesn't
|
| + // use AllocationSites.
|
| __ Ldr(x10, FieldMemOperand(allocation_site, AllocationSite::kMapOffset));
|
| __ JumpIfNotRoot(x10, Heap::kAllocationSiteMapRootIndex, &no_info);
|
|
|
|
|