From 41560e9f5f1a6a50621ff24a17ed2f81e5144714 Mon Sep 17 00:00:00 2001 From: "verwaest@chromium.org" Date: Mon, 25 Jun 2012 11:35:23 +0000 Subject: [PATCH] Separate stub types from property types. Review URL: https://chromiumcodereview.appspot.com/10656018 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11920 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/arm/ic-arm.cc | 2 +- src/arm/stub-cache-arm.cc | 64 ++++++++++++++------------ src/disassembler.cc | 4 +- src/ia32/ic-ia32.cc | 2 +- src/ia32/stub-cache-ia32.cc | 64 ++++++++++++++------------ src/ic.cc | 2 +- src/mips/ic-mips.cc | 2 +- src/mips/stub-cache-mips.cc | 64 ++++++++++++++------------ src/objects-inl.h | 8 ++-- src/objects.cc | 18 ++++---- src/objects.h | 33 +++++++++----- src/property-details.h | 6 +-- src/property.h | 4 +- src/stub-cache.cc | 91 ++++++++++++++++++++----------------- src/stub-cache.h | 10 ++-- src/type-info.cc | 12 +++-- src/x64/ic-x64.cc | 2 +- src/x64/stub-cache-x64.cc | 62 +++++++++++++------------ 18 files changed, 241 insertions(+), 209 deletions(-) diff --git a/src/arm/ic-arm.cc b/src/arm/ic-arm.cc index fd9348098..404f3c614 100644 --- a/src/arm/ic-arm.cc +++ b/src/arm/ic-arm.cc @@ -396,7 +396,7 @@ void CallICBase::GenerateMonomorphicCacheProbe(MacroAssembler* masm, Code::Flags flags = Code::ComputeFlags(kind, MONOMORPHIC, extra_state, - NORMAL, + Code::NORMAL, argc); Isolate::Current()->stub_cache()->GenerateProbe( masm, flags, r1, r2, r3, r4, r5, r6); diff --git a/src/arm/stub-cache-arm.cc b/src/arm/stub-cache-arm.cc index 7fc813868..54114dbc5 100644 --- a/src/arm/stub-cache-arm.cc +++ b/src/arm/stub-cache-arm.cc @@ -1526,7 +1526,7 @@ Handle CallStubCompiler::CompileCallField(Handle object, GenerateMissBranch(); // Return the generated code. - return GetCode(FIELD, name); + return GetCode(Code::FIELD, name); } @@ -2071,7 +2071,7 @@ Handle CallStubCompiler::CompileStringFromCharCodeCall( GenerateMissBranch(); // Return the generated code. - return cell.is_null() ? GetCode(function) : GetCode(NORMAL, name); + return cell.is_null() ? GetCode(function) : GetCode(Code::NORMAL, name); } @@ -2217,7 +2217,7 @@ Handle CallStubCompiler::CompileMathFloorCall( GenerateMissBranch(); // Return the generated code. - return cell.is_null() ? GetCode(function) : GetCode(NORMAL, name); + return cell.is_null() ? GetCode(function) : GetCode(Code::NORMAL, name); } @@ -2316,7 +2316,7 @@ Handle CallStubCompiler::CompileMathAbsCall( GenerateMissBranch(); // Return the generated code. - return cell.is_null() ? GetCode(function) : GetCode(NORMAL, name); + return cell.is_null() ? GetCode(function) : GetCode(Code::NORMAL, name); } @@ -2533,7 +2533,7 @@ Handle CallStubCompiler::CompileCallInterceptor(Handle object, GenerateMissBranch(); // Return the generated code. - return GetCode(INTERCEPTOR, name); + return GetCode(Code::INTERCEPTOR, name); } @@ -2591,7 +2591,7 @@ Handle CallStubCompiler::CompileCallGlobal( GenerateMissBranch(); // Return the generated code. - return GetCode(NORMAL, name); + return GetCode(Code::NORMAL, name); } @@ -2619,7 +2619,9 @@ Handle StoreStubCompiler::CompileStoreField(Handle object, __ Jump(ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(transition.is_null() ? FIELD : MAP_TRANSITION, name); + return GetCode(transition.is_null() + ? Code::FIELD + : Code::MAP_TRANSITION, name); } @@ -2664,7 +2666,7 @@ Handle StoreStubCompiler::CompileStoreCallback( __ Jump(ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(CALLBACKS, name); + return GetCode(Code::CALLBACKS, name); } @@ -2709,7 +2711,7 @@ Handle StoreStubCompiler::CompileStoreViaSetter( __ Jump(ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(CALLBACKS, name); + return GetCode(Code::CALLBACKS, name); } @@ -2754,7 +2756,7 @@ Handle StoreStubCompiler::CompileStoreInterceptor( __ Jump(ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(INTERCEPTOR, name); + return GetCode(Code::INTERCEPTOR, name); } @@ -2800,7 +2802,7 @@ Handle StoreStubCompiler::CompileStoreGlobal( __ Jump(ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(NORMAL, name); + return GetCode(Code::NORMAL, name); } @@ -2835,7 +2837,7 @@ Handle LoadStubCompiler::CompileLoadNonexistent(Handle name, GenerateLoadMiss(masm(), Code::LOAD_IC); // Return the generated code. - return GetCode(NONEXISTENT, factory()->empty_string()); + return GetCode(Code::NONEXISTENT, factory()->empty_string()); } @@ -2855,7 +2857,7 @@ Handle LoadStubCompiler::CompileLoadField(Handle object, GenerateLoadMiss(masm(), Code::LOAD_IC); // Return the generated code. - return GetCode(FIELD, name); + return GetCode(Code::FIELD, name); } @@ -2876,7 +2878,7 @@ Handle LoadStubCompiler::CompileLoadCallback( GenerateLoadMiss(masm(), Code::LOAD_IC); // Return the generated code. - return GetCode(CALLBACKS, name); + return GetCode(Code::CALLBACKS, name); } @@ -2914,7 +2916,7 @@ Handle LoadStubCompiler::CompileLoadViaGetter( GenerateLoadMiss(masm(), Code::LOAD_IC); // Return the generated code. - return GetCode(CALLBACKS, name); + return GetCode(Code::CALLBACKS, name); } @@ -2934,7 +2936,7 @@ Handle LoadStubCompiler::CompileLoadConstant(Handle object, GenerateLoadMiss(masm(), Code::LOAD_IC); // Return the generated code. - return GetCode(CONSTANT_FUNCTION, name); + return GetCode(Code::CONSTANT_FUNCTION, name); } @@ -2956,7 +2958,7 @@ Handle LoadStubCompiler::CompileLoadInterceptor(Handle object, GenerateLoadMiss(masm(), Code::LOAD_IC); // Return the generated code. - return GetCode(INTERCEPTOR, name); + return GetCode(Code::INTERCEPTOR, name); } @@ -2998,7 +3000,7 @@ Handle LoadStubCompiler::CompileLoadGlobal( GenerateLoadMiss(masm(), Code::LOAD_IC); // Return the generated code. - return GetCode(NORMAL, name); + return GetCode(Code::NORMAL, name); } @@ -3021,7 +3023,7 @@ Handle KeyedLoadStubCompiler::CompileLoadField(Handle name, __ bind(&miss); GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); - return GetCode(FIELD, name); + return GetCode(Code::FIELD, name); } @@ -3046,7 +3048,7 @@ Handle KeyedLoadStubCompiler::CompileLoadCallback( __ bind(&miss); GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); - return GetCode(CALLBACKS, name); + return GetCode(Code::CALLBACKS, name); } @@ -3071,7 +3073,7 @@ Handle KeyedLoadStubCompiler::CompileLoadConstant( GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); // Return the generated code. - return GetCode(CONSTANT_FUNCTION, name); + return GetCode(Code::CONSTANT_FUNCTION, name); } @@ -3097,7 +3099,7 @@ Handle KeyedLoadStubCompiler::CompileLoadInterceptor( __ bind(&miss); GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); - return GetCode(INTERCEPTOR, name); + return GetCode(Code::INTERCEPTOR, name); } @@ -3118,7 +3120,7 @@ Handle KeyedLoadStubCompiler::CompileLoadArrayLength( __ bind(&miss); GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); - return GetCode(CALLBACKS, name); + return GetCode(Code::CALLBACKS, name); } @@ -3144,7 +3146,7 @@ Handle KeyedLoadStubCompiler::CompileLoadStringLength( GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); - return GetCode(CALLBACKS, name); + return GetCode(Code::CALLBACKS, name); } @@ -3169,7 +3171,7 @@ Handle KeyedLoadStubCompiler::CompileLoadFunctionPrototype( __ DecrementCounter(counters->keyed_load_function_prototype(), 1, r2, r3); GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); - return GetCode(CALLBACKS, name); + return GetCode(Code::CALLBACKS, name); } @@ -3189,7 +3191,7 @@ Handle KeyedLoadStubCompiler::CompileLoadElement( __ Jump(ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(NORMAL, factory()->empty_string()); + return GetCode(Code::NORMAL, factory()->empty_string()); } @@ -3217,7 +3219,7 @@ Handle KeyedLoadStubCompiler::CompileLoadPolymorphic( __ Jump(miss_ic, RelocInfo::CODE_TARGET, al); // Return the generated code. - return GetCode(NORMAL, factory()->empty_string(), MEGAMORPHIC); + return GetCode(Code::NORMAL, factory()->empty_string(), MEGAMORPHIC); } @@ -3256,7 +3258,9 @@ Handle KeyedStoreStubCompiler::CompileStoreField(Handle object, __ Jump(ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(transition.is_null() ? FIELD : MAP_TRANSITION, name); + return GetCode(transition.is_null() + ? Code::FIELD + : Code::MAP_TRANSITION, name); } @@ -3280,7 +3284,7 @@ Handle KeyedStoreStubCompiler::CompileStoreElement( __ Jump(ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(NORMAL, factory()->empty_string()); + return GetCode(Code::NORMAL, factory()->empty_string()); } @@ -3319,7 +3323,7 @@ Handle KeyedStoreStubCompiler::CompileStorePolymorphic( __ Jump(miss_ic, RelocInfo::CODE_TARGET, al); // Return the generated code. - return GetCode(NORMAL, factory()->empty_string(), MEGAMORPHIC); + return GetCode(Code::NORMAL, factory()->empty_string(), MEGAMORPHIC); } diff --git a/src/disassembler.cc b/src/disassembler.cc index e3b40ab93..9f8b9a820 100644 --- a/src/disassembler.cc +++ b/src/disassembler.cc @@ -244,8 +244,8 @@ static int DecodeIt(FILE* f, out.AddFormatted(" %s, %s", Code::Kind2String(kind), Code::ICState2String(ic_state)); if (ic_state == MONOMORPHIC) { - PropertyType type = code->type(); - out.AddFormatted(", %s", Code::PropertyType2String(type)); + Code::StubType type = code->type(); + out.AddFormatted(", %s", Code::StubType2String(type)); } if (kind == Code::CALL_IC || kind == Code::KEYED_CALL_IC) { out.AddFormatted(", argc = %d", code->arguments_count()); diff --git a/src/ia32/ic-ia32.cc b/src/ia32/ic-ia32.cc index a091ff1aa..52d8fa145 100644 --- a/src/ia32/ic-ia32.cc +++ b/src/ia32/ic-ia32.cc @@ -943,7 +943,7 @@ void CallICBase::GenerateMonomorphicCacheProbe(MacroAssembler* masm, Code::Flags flags = Code::ComputeFlags(kind, MONOMORPHIC, extra_state, - NORMAL, + Code::NORMAL, argc); Isolate* isolate = masm->isolate(); isolate->stub_cache()->GenerateProbe(masm, flags, edx, ecx, ebx, eax); diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc index 6ab5bf37b..78a5b68d5 100644 --- a/src/ia32/stub-cache-ia32.cc +++ b/src/ia32/stub-cache-ia32.cc @@ -1415,7 +1415,7 @@ Handle CallStubCompiler::CompileCallField(Handle object, GenerateMissBranch(); // Return the generated code. - return GetCode(FIELD, name); + return GetCode(Code::FIELD, name); } @@ -1962,7 +1962,7 @@ Handle CallStubCompiler::CompileStringFromCharCodeCall( GenerateMissBranch(); // Return the generated code. - return cell.is_null() ? GetCode(function) : GetCode(NORMAL, name); + return cell.is_null() ? GetCode(function) : GetCode(Code::NORMAL, name); } @@ -2092,7 +2092,7 @@ Handle CallStubCompiler::CompileMathFloorCall( GenerateMissBranch(); // Return the generated code. - return cell.is_null() ? GetCode(function) : GetCode(NORMAL, name); + return cell.is_null() ? GetCode(function) : GetCode(Code::NORMAL, name); } @@ -2197,7 +2197,7 @@ Handle CallStubCompiler::CompileMathAbsCall( GenerateMissBranch(); // Return the generated code. - return cell.is_null() ? GetCode(function) : GetCode(NORMAL, name); + return cell.is_null() ? GetCode(function) : GetCode(Code::NORMAL, name); } @@ -2444,7 +2444,7 @@ Handle CallStubCompiler::CompileCallInterceptor(Handle object, GenerateMissBranch(); // Return the generated code. - return GetCode(INTERCEPTOR, name); + return GetCode(Code::INTERCEPTOR, name); } @@ -2505,7 +2505,7 @@ Handle CallStubCompiler::CompileCallGlobal( GenerateMissBranch(); // Return the generated code. - return GetCode(NORMAL, name); + return GetCode(Code::NORMAL, name); } @@ -2536,7 +2536,9 @@ Handle StoreStubCompiler::CompileStoreField(Handle object, __ jmp(ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(transition.is_null() ? FIELD : MAP_TRANSITION, name); + return GetCode(transition.is_null() + ? Code::FIELD + : Code::MAP_TRANSITION, name); } @@ -2583,7 +2585,7 @@ Handle StoreStubCompiler::CompileStoreCallback( __ jmp(ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(CALLBACKS, name); + return GetCode(Code::CALLBACKS, name); } @@ -2629,7 +2631,7 @@ Handle StoreStubCompiler::CompileStoreViaSetter( __ jmp(ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(CALLBACKS, name); + return GetCode(Code::CALLBACKS, name); } @@ -2675,7 +2677,7 @@ Handle StoreStubCompiler::CompileStoreInterceptor( __ jmp(ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(INTERCEPTOR, name); + return GetCode(Code::INTERCEPTOR, name); } @@ -2723,7 +2725,7 @@ Handle StoreStubCompiler::CompileStoreGlobal( __ jmp(ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(NORMAL, name); + return GetCode(Code::NORMAL, name); } @@ -2762,7 +2764,9 @@ Handle KeyedStoreStubCompiler::CompileStoreField(Handle object, __ jmp(ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(transition.is_null() ? FIELD : MAP_TRANSITION, name); + return GetCode(transition.is_null() + ? Code::FIELD + : Code::MAP_TRANSITION, name); } @@ -2785,7 +2789,7 @@ Handle KeyedStoreStubCompiler::CompileStoreElement( __ jmp(ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(NORMAL, factory()->empty_string()); + return GetCode(Code::NORMAL, factory()->empty_string()); } @@ -2820,7 +2824,7 @@ Handle KeyedStoreStubCompiler::CompileStorePolymorphic( __ jmp(miss_ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(NORMAL, factory()->empty_string(), MEGAMORPHIC); + return GetCode(Code::NORMAL, factory()->empty_string(), MEGAMORPHIC); } @@ -2860,7 +2864,7 @@ Handle LoadStubCompiler::CompileLoadNonexistent(Handle name, GenerateLoadMiss(masm(), Code::LOAD_IC); // Return the generated code. - return GetCode(NONEXISTENT, factory()->empty_string()); + return GetCode(Code::NONEXISTENT, factory()->empty_string()); } @@ -2880,7 +2884,7 @@ Handle LoadStubCompiler::CompileLoadField(Handle object, GenerateLoadMiss(masm(), Code::LOAD_IC); // Return the generated code. - return GetCode(FIELD, name); + return GetCode(Code::FIELD, name); } @@ -2902,7 +2906,7 @@ Handle LoadStubCompiler::CompileLoadCallback( GenerateLoadMiss(masm(), Code::LOAD_IC); // Return the generated code. - return GetCode(CALLBACKS, name); + return GetCode(Code::CALLBACKS, name); } @@ -2940,7 +2944,7 @@ Handle LoadStubCompiler::CompileLoadViaGetter( GenerateLoadMiss(masm(), Code::LOAD_IC); // Return the generated code. - return GetCode(CALLBACKS, name); + return GetCode(Code::CALLBACKS, name); } @@ -2960,7 +2964,7 @@ Handle LoadStubCompiler::CompileLoadConstant(Handle object, GenerateLoadMiss(masm(), Code::LOAD_IC); // Return the generated code. - return GetCode(CONSTANT_FUNCTION, name); + return GetCode(Code::CONSTANT_FUNCTION, name); } @@ -2986,7 +2990,7 @@ Handle LoadStubCompiler::CompileLoadInterceptor(Handle receiver, GenerateLoadMiss(masm(), Code::LOAD_IC); // Return the generated code. - return GetCode(INTERCEPTOR, name); + return GetCode(Code::INTERCEPTOR, name); } @@ -3034,7 +3038,7 @@ Handle LoadStubCompiler::CompileLoadGlobal( GenerateLoadMiss(masm(), Code::LOAD_IC); // Return the generated code. - return GetCode(NORMAL, name); + return GetCode(Code::NORMAL, name); } @@ -3063,7 +3067,7 @@ Handle KeyedLoadStubCompiler::CompileLoadField(Handle name, GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); // Return the generated code. - return GetCode(FIELD, name); + return GetCode(Code::FIELD, name); } @@ -3094,7 +3098,7 @@ Handle KeyedLoadStubCompiler::CompileLoadCallback( GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); // Return the generated code. - return GetCode(CALLBACKS, name); + return GetCode(Code::CALLBACKS, name); } @@ -3124,7 +3128,7 @@ Handle KeyedLoadStubCompiler::CompileLoadConstant( GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); // Return the generated code. - return GetCode(CONSTANT_FUNCTION, name); + return GetCode(Code::CONSTANT_FUNCTION, name); } @@ -3155,7 +3159,7 @@ Handle KeyedLoadStubCompiler::CompileLoadInterceptor( GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); // Return the generated code. - return GetCode(INTERCEPTOR, name); + return GetCode(Code::INTERCEPTOR, name); } @@ -3181,7 +3185,7 @@ Handle KeyedLoadStubCompiler::CompileLoadArrayLength( GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); // Return the generated code. - return GetCode(CALLBACKS, name); + return GetCode(Code::CALLBACKS, name); } @@ -3207,7 +3211,7 @@ Handle KeyedLoadStubCompiler::CompileLoadStringLength( GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); // Return the generated code. - return GetCode(CALLBACKS, name); + return GetCode(Code::CALLBACKS, name); } @@ -3233,7 +3237,7 @@ Handle KeyedLoadStubCompiler::CompileLoadFunctionPrototype( GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); // Return the generated code. - return GetCode(CALLBACKS, name); + return GetCode(Code::CALLBACKS, name); } @@ -3253,7 +3257,7 @@ Handle KeyedLoadStubCompiler::CompileLoadElement( GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); // Return the generated code. - return GetCode(NORMAL, factory()->empty_string()); + return GetCode(Code::NORMAL, factory()->empty_string()); } @@ -3280,7 +3284,7 @@ Handle KeyedLoadStubCompiler::CompileLoadPolymorphic( GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); // Return the generated code. - return GetCode(NORMAL, factory()->empty_string(), MEGAMORPHIC); + return GetCode(Code::NORMAL, factory()->empty_string(), MEGAMORPHIC); } diff --git a/src/ic.cc b/src/ic.cc index bebdceec4..3d36ead01 100644 --- a/src/ic.cc +++ b/src/ic.cc @@ -1583,7 +1583,7 @@ Handle KeyedIC::ComputeStub(Handle receiver, // Don't handle megamorphic property accesses for INTERCEPTORS or CALLBACKS // via megamorphic stubs, since they don't have a map in their relocation info // and so the stubs can't be harvested for the object needed for a map check. - if (target()->type() != NORMAL) { + if (target()->type() != Code::NORMAL) { TRACE_GENERIC_IC("KeyedIC", "non-NORMAL target type"); return generic_stub; } diff --git a/src/mips/ic-mips.cc b/src/mips/ic-mips.cc index 5d530d0e9..3f2ecb88a 100644 --- a/src/mips/ic-mips.cc +++ b/src/mips/ic-mips.cc @@ -398,7 +398,7 @@ void CallICBase::GenerateMonomorphicCacheProbe(MacroAssembler* masm, Code::Flags flags = Code::ComputeFlags(kind, MONOMORPHIC, extra_state, - NORMAL, + Code::NORMAL, argc); Isolate::Current()->stub_cache()->GenerateProbe( masm, flags, a1, a2, a3, t0, t1, t2); diff --git a/src/mips/stub-cache-mips.cc b/src/mips/stub-cache-mips.cc index 1cfa2bbae..d4d4de0a6 100644 --- a/src/mips/stub-cache-mips.cc +++ b/src/mips/stub-cache-mips.cc @@ -1531,7 +1531,7 @@ Handle CallStubCompiler::CompileCallField(Handle object, GenerateMissBranch(); // Return the generated code. - return GetCode(FIELD, name); + return GetCode(Code::FIELD, name); } @@ -2078,7 +2078,7 @@ Handle CallStubCompiler::CompileStringFromCharCodeCall( GenerateMissBranch(); // Return the generated code. - return cell.is_null() ? GetCode(function) : GetCode(NORMAL, name); + return cell.is_null() ? GetCode(function) : GetCode(Code::NORMAL, name); } @@ -2212,7 +2212,7 @@ Handle CallStubCompiler::CompileMathFloorCall( GenerateMissBranch(); // Return the generated code. - return cell.is_null() ? GetCode(function) : GetCode(NORMAL, name); + return cell.is_null() ? GetCode(function) : GetCode(Code::NORMAL, name); } @@ -2313,7 +2313,7 @@ Handle CallStubCompiler::CompileMathAbsCall( GenerateMissBranch(); // Return the generated code. - return cell.is_null() ? GetCode(function) : GetCode(NORMAL, name); + return cell.is_null() ? GetCode(function) : GetCode(Code::NORMAL, name); } @@ -2534,7 +2534,7 @@ Handle CallStubCompiler::CompileCallInterceptor(Handle object, GenerateMissBranch(); // Return the generated code. - return GetCode(INTERCEPTOR, name); + return GetCode(Code::INTERCEPTOR, name); } @@ -2593,7 +2593,7 @@ Handle CallStubCompiler::CompileCallGlobal( GenerateMissBranch(); // Return the generated code. - return GetCode(NORMAL, name); + return GetCode(Code::NORMAL, name); } @@ -2623,7 +2623,9 @@ Handle StoreStubCompiler::CompileStoreField(Handle object, __ Jump(ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(transition.is_null() ? FIELD : MAP_TRANSITION, name); + return GetCode(transition.is_null() + ? Code::FIELD + : Code::MAP_TRANSITION, name); } @@ -2668,7 +2670,7 @@ Handle StoreStubCompiler::CompileStoreCallback( __ Jump(ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(CALLBACKS, name); + return GetCode(Code::CALLBACKS, name); } @@ -2714,7 +2716,7 @@ Handle StoreStubCompiler::CompileStoreViaSetter( __ Jump(ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(CALLBACKS, name); + return GetCode(Code::CALLBACKS, name); } @@ -2759,7 +2761,7 @@ Handle StoreStubCompiler::CompileStoreInterceptor( __ Jump(ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(INTERCEPTOR, name); + return GetCode(Code::INTERCEPTOR, name); } @@ -2804,7 +2806,7 @@ Handle StoreStubCompiler::CompileStoreGlobal( __ Jump(ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(NORMAL, name); + return GetCode(Code::NORMAL, name); } @@ -2838,7 +2840,7 @@ Handle LoadStubCompiler::CompileLoadNonexistent(Handle name, GenerateLoadMiss(masm(), Code::LOAD_IC); // Return the generated code. - return GetCode(NONEXISTENT, factory()->empty_string()); + return GetCode(Code::NONEXISTENT, factory()->empty_string()); } @@ -2860,7 +2862,7 @@ Handle LoadStubCompiler::CompileLoadField(Handle object, GenerateLoadMiss(masm(), Code::LOAD_IC); // Return the generated code. - return GetCode(FIELD, name); + return GetCode(Code::FIELD, name); } @@ -2881,7 +2883,7 @@ Handle LoadStubCompiler::CompileLoadCallback( GenerateLoadMiss(masm(), Code::LOAD_IC); // Return the generated code. - return GetCode(CALLBACKS, name); + return GetCode(Code::CALLBACKS, name); } @@ -2919,7 +2921,7 @@ Handle LoadStubCompiler::CompileLoadViaGetter( GenerateLoadMiss(masm(), Code::LOAD_IC); // Return the generated code. - return GetCode(CALLBACKS, name); + return GetCode(Code::CALLBACKS, name); } @@ -2939,7 +2941,7 @@ Handle LoadStubCompiler::CompileLoadConstant(Handle object, GenerateLoadMiss(masm(), Code::LOAD_IC); // Return the generated code. - return GetCode(CONSTANT_FUNCTION, name); + return GetCode(Code::CONSTANT_FUNCTION, name); } @@ -2962,7 +2964,7 @@ Handle LoadStubCompiler::CompileLoadInterceptor(Handle object, GenerateLoadMiss(masm(), Code::LOAD_IC); // Return the generated code. - return GetCode(INTERCEPTOR, name); + return GetCode(Code::INTERCEPTOR, name); } @@ -3003,7 +3005,7 @@ Handle LoadStubCompiler::CompileLoadGlobal( GenerateLoadMiss(masm(), Code::LOAD_IC); // Return the generated code. - return GetCode(NORMAL, name); + return GetCode(Code::NORMAL, name); } @@ -3025,7 +3027,7 @@ Handle KeyedLoadStubCompiler::CompileLoadField(Handle name, __ bind(&miss); GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); - return GetCode(FIELD, name); + return GetCode(Code::FIELD, name); } @@ -3049,7 +3051,7 @@ Handle KeyedLoadStubCompiler::CompileLoadCallback( __ bind(&miss); GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); - return GetCode(CALLBACKS, name); + return GetCode(Code::CALLBACKS, name); } @@ -3073,7 +3075,7 @@ Handle KeyedLoadStubCompiler::CompileLoadConstant( GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); // Return the generated code. - return GetCode(CONSTANT_FUNCTION, name); + return GetCode(Code::CONSTANT_FUNCTION, name); } @@ -3098,7 +3100,7 @@ Handle KeyedLoadStubCompiler::CompileLoadInterceptor( __ bind(&miss); GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); - return GetCode(INTERCEPTOR, name); + return GetCode(Code::INTERCEPTOR, name); } @@ -3118,7 +3120,7 @@ Handle KeyedLoadStubCompiler::CompileLoadArrayLength( __ bind(&miss); GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); - return GetCode(CALLBACKS, name); + return GetCode(Code::CALLBACKS, name); } @@ -3143,7 +3145,7 @@ Handle KeyedLoadStubCompiler::CompileLoadStringLength( GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); - return GetCode(CALLBACKS, name); + return GetCode(Code::CALLBACKS, name); } @@ -3167,7 +3169,7 @@ Handle KeyedLoadStubCompiler::CompileLoadFunctionPrototype( __ DecrementCounter(counters->keyed_load_function_prototype(), 1, a2, a3); GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); - return GetCode(CALLBACKS, name); + return GetCode(Code::CALLBACKS, name); } @@ -3187,7 +3189,7 @@ Handle KeyedLoadStubCompiler::CompileLoadElement( __ Jump(ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(NORMAL, factory()->empty_string()); + return GetCode(Code::NORMAL, factory()->empty_string()); } @@ -3214,7 +3216,7 @@ Handle KeyedLoadStubCompiler::CompileLoadPolymorphic( __ Jump(miss_ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(NORMAL, factory()->empty_string(), MEGAMORPHIC); + return GetCode(Code::NORMAL, factory()->empty_string(), MEGAMORPHIC); } @@ -3253,7 +3255,9 @@ Handle KeyedStoreStubCompiler::CompileStoreField(Handle object, __ Jump(ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(transition.is_null() ? FIELD : MAP_TRANSITION, name); + return GetCode(transition.is_null() + ? Code::FIELD + : Code::MAP_TRANSITION, name); } @@ -3277,7 +3281,7 @@ Handle KeyedStoreStubCompiler::CompileStoreElement( __ Jump(ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(NORMAL, factory()->empty_string()); + return GetCode(Code::NORMAL, factory()->empty_string()); } @@ -3315,7 +3319,7 @@ Handle KeyedStoreStubCompiler::CompileStorePolymorphic( __ Jump(miss_ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(NORMAL, factory()->empty_string(), MEGAMORPHIC); + return GetCode(Code::NORMAL, factory()->empty_string(), MEGAMORPHIC); } diff --git a/src/objects-inl.h b/src/objects-inl.h index 2cdfad6fb..331f76f7b 100644 --- a/src/objects-inl.h +++ b/src/objects-inl.h @@ -3029,7 +3029,7 @@ Code::ExtraICState Code::extra_ic_state() { } -PropertyType Code::type() { +Code::StubType Code::type() { return ExtractTypeFromFlags(flags()); } @@ -3301,7 +3301,7 @@ bool Code::is_inline_cache_stub() { Code::Flags Code::ComputeFlags(Kind kind, InlineCacheState ic_state, ExtraICState extra_ic_state, - PropertyType type, + StubType type, int argc, InlineCacheHolderFlag holder) { // Extra IC state is only allowed for call IC stubs or for store IC @@ -3322,7 +3322,7 @@ Code::Flags Code::ComputeFlags(Kind kind, Code::Flags Code::ComputeMonomorphicFlags(Kind kind, - PropertyType type, + StubType type, ExtraICState extra_ic_state, InlineCacheHolderFlag holder, int argc) { @@ -3345,7 +3345,7 @@ Code::ExtraICState Code::ExtractExtraICStateFromFlags(Flags flags) { } -PropertyType Code::ExtractTypeFromFlags(Flags flags) { +Code::StubType Code::ExtractTypeFromFlags(Flags flags) { return TypeField::decode(flags); } diff --git a/src/objects.cc b/src/objects.cc index 78f83c45c..d96c111d9 100644 --- a/src/objects.cc +++ b/src/objects.cc @@ -418,7 +418,7 @@ PropertyAttributes JSObject::GetPropertyAttributeWithFailedAccessCheck( case HANDLER: case MAP_TRANSITION: case CONSTANT_TRANSITION: - case NONEXISTENT: + case NULL_DESCRIPTOR: UNREACHABLE(); } } @@ -5274,7 +5274,7 @@ MaybeObject* CodeCache::Update(String* name, Code* code) { // The number of monomorphic stubs for normal load/store/call IC's can grow to // a large number and therefore they need to go into a hash table. They are // used to load global properties from cells. - if (code->type() == NORMAL) { + if (code->type() == Code::NORMAL) { // Make sure that a hash table is allocated for the normal load code cache. if (normal_type_cache()->IsUndefined()) { Object* result; @@ -5365,7 +5365,7 @@ MaybeObject* CodeCache::UpdateNormalTypeCache(String* name, Code* code) { Object* CodeCache::Lookup(String* name, Code::Flags flags) { - if (Code::ExtractTypeFromFlags(flags) == NORMAL) { + if (Code::ExtractTypeFromFlags(flags) == Code::NORMAL) { return LookupNormalTypeCache(name, flags); } else { return LookupDefaultCache(name, flags); @@ -5403,7 +5403,7 @@ Object* CodeCache::LookupNormalTypeCache(String* name, Code::Flags flags) { int CodeCache::GetIndex(Object* name, Code* code) { - if (code->type() == NORMAL) { + if (code->type() == Code::NORMAL) { if (normal_type_cache()->IsUndefined()) return -1; CodeCacheHashTable* cache = CodeCacheHashTable::cast(normal_type_cache()); return cache->GetIndex(String::cast(name), code->flags()); @@ -5419,7 +5419,7 @@ int CodeCache::GetIndex(Object* name, Code* code) { void CodeCache::RemoveByIndex(Object* name, Code* code, int index) { - if (code->type() == NORMAL) { + if (code->type() == Code::NORMAL) { ASSERT(!normal_type_cache()->IsUndefined()); CodeCacheHashTable* cache = CodeCacheHashTable::cast(normal_type_cache()); ASSERT(cache->GetIndex(String::cast(name), code->flags()) == index); @@ -8554,17 +8554,15 @@ const char* Code::ICState2String(InlineCacheState state) { } -const char* Code::PropertyType2String(PropertyType type) { +const char* Code::StubType2String(StubType type) { switch (type) { case NORMAL: return "NORMAL"; case FIELD: return "FIELD"; case CONSTANT_FUNCTION: return "CONSTANT_FUNCTION"; case CALLBACKS: return "CALLBACKS"; - case HANDLER: return "HANDLER"; case INTERCEPTOR: return "INTERCEPTOR"; case MAP_TRANSITION: return "MAP_TRANSITION"; - case CONSTANT_TRANSITION: return "CONSTANT_TRANSITION"; - case NULL_DESCRIPTOR: return "NULL_DESCRIPTOR"; + case NONEXISTENT: return "NONEXISTENT"; } UNREACHABLE(); // keep the compiler happy return NULL; @@ -8602,7 +8600,7 @@ void Code::Disassemble(const char* name, FILE* out) { PrintF(out, "ic_state = %s\n", ICState2String(ic_state())); PrintExtraICState(out, kind(), extra_ic_state()); if (ic_state() == MONOMORPHIC) { - PrintF(out, "type = %s\n", PropertyType2String(type())); + PrintF(out, "type = %s\n", StubType2String(type())); } if (is_call_stub() || is_keyed_call_stub()) { PrintF(out, "argc = %d\n", arguments_count()); diff --git a/src/objects.h b/src/objects.h index 9c3d0f81f..2b6e2f8fd 100644 --- a/src/objects.h +++ b/src/objects.h @@ -4199,6 +4199,17 @@ class Code: public HeapObject { LAST_IC_KIND = TO_BOOLEAN_IC }; + // Types of stubs. + enum StubType { + NORMAL, + FIELD, + CONSTANT_FUNCTION, + CALLBACKS, + INTERCEPTOR, + MAP_TRANSITION, + NONEXISTENT + }; + enum { NUMBER_OF_KINDS = LAST_IC_KIND + 1 }; @@ -4211,7 +4222,7 @@ class Code: public HeapObject { // Printing static const char* Kind2String(Kind kind); static const char* ICState2String(InlineCacheState state); - static const char* PropertyType2String(PropertyType type); + static const char* StubType2String(StubType type); static void PrintExtraICState(FILE* out, Kind kind, ExtraICState extra); inline void Disassemble(const char* name) { Disassemble(name, stdout); @@ -4261,7 +4272,7 @@ class Code: public HeapObject { inline Kind kind(); inline InlineCacheState ic_state(); // Only valid for IC stubs. inline ExtraICState extra_ic_state(); // Only valid for IC stubs. - inline PropertyType type(); // Only valid for monomorphic IC stubs. + inline StubType type(); // Only valid for monomorphic IC stubs. inline int arguments_count(); // Only valid for call IC stubs. // Testers for IC stub kinds. @@ -4404,19 +4415,19 @@ class Code: public HeapObject { Kind kind, InlineCacheState ic_state = UNINITIALIZED, ExtraICState extra_ic_state = kNoExtraICState, - PropertyType type = NORMAL, + StubType type = NORMAL, int argc = -1, InlineCacheHolderFlag holder = OWN_MAP); static inline Flags ComputeMonomorphicFlags( Kind kind, - PropertyType type, + StubType type, ExtraICState extra_ic_state = kNoExtraICState, InlineCacheHolderFlag holder = OWN_MAP, int argc = -1); static inline InlineCacheState ExtractICStateFromFlags(Flags flags); - static inline PropertyType ExtractTypeFromFlags(Flags flags); + static inline StubType ExtractTypeFromFlags(Flags flags); static inline Kind ExtractKindFromFlags(Flags flags); static inline InlineCacheHolderFlag ExtractCacheHolderFromFlags(Flags flags); static inline ExtraICState ExtractExtraICStateFromFlags(Flags flags); @@ -4552,14 +4563,14 @@ class Code: public HeapObject { // Flags layout. BitField. class ICStateField: public BitField {}; - class TypeField: public BitField {}; - class CacheHolderField: public BitField {}; - class KindField: public BitField {}; - class ExtraICStateField: public BitField {}; - class IsPregeneratedField: public BitField {}; + class TypeField: public BitField {}; + class CacheHolderField: public BitField {}; + class KindField: public BitField {}; + class ExtraICStateField: public BitField {}; + class IsPregeneratedField: public BitField {}; // Signed field cannot be encoded using the BitField class. - static const int kArgumentsCountShift = 15; + static const int kArgumentsCountShift = 14; static const int kArgumentsCountMask = ~((1 << kArgumentsCountShift) - 1); // This constant should be encodable in an ARM instruction. diff --git a/src/property-details.h b/src/property-details.h index a623fe9b1..27c8b1551 100644 --- a/src/property-details.h +++ b/src/property-details.h @@ -64,11 +64,7 @@ enum PropertyType { // All properties before MAP_TRANSITION are real. MAP_TRANSITION = 6, // only in fast mode CONSTANT_TRANSITION = 7, // only in fast mode - NULL_DESCRIPTOR = 8, // only in fast mode - // There are no IC stubs for NULL_DESCRIPTORS. Therefore, - // NULL_DESCRIPTOR can be used as the type flag for IC stubs for - // nonexistent properties. - NONEXISTENT = NULL_DESCRIPTOR + NULL_DESCRIPTOR = 8 // only in fast mode }; diff --git a/src/property.h b/src/property.h index 55c72bada..5599aa874 100644 --- a/src/property.h +++ b/src/property.h @@ -189,7 +189,7 @@ class LookupResult BASE_EMBEDDED { lookup_type_(NOT_FOUND), holder_(NULL), cacheable_(true), - details_(NONE, NONEXISTENT) { + details_(NONE, NULL_DESCRIPTOR) { isolate->SetTopLookupResult(this); } @@ -237,7 +237,7 @@ class LookupResult BASE_EMBEDDED { void NotFound() { lookup_type_ = NOT_FOUND; - details_ = PropertyDetails(NONE, NONEXISTENT); + details_ = PropertyDetails(NONE, NULL_DESCRIPTOR); holder_ = NULL; } diff --git a/src/stub-cache.cc b/src/stub-cache.cc index d790f03f8..c5ae17591 100644 --- a/src/stub-cache.cc +++ b/src/stub-cache.cc @@ -119,7 +119,7 @@ Handle StubCache::ComputeLoadNonexistent(Handle name, // Compile the stub that is either shared for all names or // name specific if there are global objects involved. Code::Flags flags = - Code::ComputeMonomorphicFlags(Code::LOAD_IC, NONEXISTENT); + Code::ComputeMonomorphicFlags(Code::LOAD_IC, Code::NONEXISTENT); Handle probe(receiver->map()->FindInCodeCache(*cache_name, flags)); if (probe->IsCode()) return Handle::cast(probe); @@ -138,7 +138,7 @@ Handle StubCache::ComputeLoadField(Handle name, Handle holder, int field_index) { ASSERT(IC::GetCodeCacheForObject(*receiver, *holder) == OWN_MAP); - Code::Flags flags = Code::ComputeMonomorphicFlags(Code::LOAD_IC, FIELD); + Code::Flags flags = Code::ComputeMonomorphicFlags(Code::LOAD_IC, Code::FIELD); Handle probe(receiver->map()->FindInCodeCache(*name, flags)); if (probe->IsCode()) return Handle::cast(probe); @@ -158,7 +158,8 @@ Handle StubCache::ComputeLoadCallback(Handle name, Handle callback) { ASSERT(v8::ToCData
(callback->getter()) != 0); ASSERT(IC::GetCodeCacheForObject(*receiver, *holder) == OWN_MAP); - Code::Flags flags = Code::ComputeMonomorphicFlags(Code::LOAD_IC, CALLBACKS); + Code::Flags flags = + Code::ComputeMonomorphicFlags(Code::LOAD_IC, Code::CALLBACKS); Handle probe(receiver->map()->FindInCodeCache(*name, flags)); if (probe->IsCode()) return Handle::cast(probe); @@ -177,7 +178,8 @@ Handle StubCache::ComputeLoadViaGetter(Handle name, Handle holder, Handle getter) { ASSERT(IC::GetCodeCacheForObject(*receiver, *holder) == OWN_MAP); - Code::Flags flags = Code::ComputeMonomorphicFlags(Code::LOAD_IC, CALLBACKS); + Code::Flags flags = + Code::ComputeMonomorphicFlags(Code::LOAD_IC, Code::CALLBACKS); Handle probe(receiver->map()->FindInCodeCache(*name, flags)); if (probe->IsCode()) return Handle::cast(probe); @@ -197,7 +199,7 @@ Handle StubCache::ComputeLoadConstant(Handle name, Handle value) { ASSERT(IC::GetCodeCacheForObject(*receiver, *holder) == OWN_MAP); Code::Flags flags = - Code::ComputeMonomorphicFlags(Code::LOAD_IC, CONSTANT_FUNCTION); + Code::ComputeMonomorphicFlags(Code::LOAD_IC, Code::CONSTANT_FUNCTION); Handle probe(receiver->map()->FindInCodeCache(*name, flags)); if (probe->IsCode()) return Handle::cast(probe); @@ -215,7 +217,8 @@ Handle StubCache::ComputeLoadInterceptor(Handle name, Handle receiver, Handle holder) { ASSERT(IC::GetCodeCacheForObject(*receiver, *holder) == OWN_MAP); - Code::Flags flags = Code::ComputeMonomorphicFlags(Code::LOAD_IC, INTERCEPTOR); + Code::Flags flags = + Code::ComputeMonomorphicFlags(Code::LOAD_IC, Code::INTERCEPTOR); Handle probe(receiver->map()->FindInCodeCache(*name, flags)); if (probe->IsCode()) return Handle::cast(probe); @@ -240,7 +243,8 @@ Handle StubCache::ComputeLoadGlobal(Handle name, Handle cell, bool is_dont_delete) { ASSERT(IC::GetCodeCacheForObject(*receiver, *holder) == OWN_MAP); - Code::Flags flags = Code::ComputeMonomorphicFlags(Code::LOAD_IC, NORMAL); + Code::Flags flags = + Code::ComputeMonomorphicFlags(Code::LOAD_IC, Code::NORMAL); Handle probe(receiver->map()->FindInCodeCache(*name, flags)); if (probe->IsCode()) return Handle::cast(probe); @@ -259,7 +263,8 @@ Handle StubCache::ComputeKeyedLoadField(Handle name, Handle holder, int field_index) { ASSERT(IC::GetCodeCacheForObject(*receiver, *holder) == OWN_MAP); - Code::Flags flags = Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, FIELD); + Code::Flags flags = + Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, Code::FIELD); Handle probe(receiver->map()->FindInCodeCache(*name, flags)); if (probe->IsCode()) return Handle::cast(probe); @@ -278,8 +283,8 @@ Handle StubCache::ComputeKeyedLoadConstant(Handle name, Handle holder, Handle value) { ASSERT(IC::GetCodeCacheForObject(*receiver, *holder) == OWN_MAP); - Code::Flags flags = - Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, CONSTANT_FUNCTION); + Code::Flags flags = Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, + Code::CONSTANT_FUNCTION); Handle probe(receiver->map()->FindInCodeCache(*name, flags)); if (probe->IsCode()) return Handle::cast(probe); @@ -298,7 +303,7 @@ Handle StubCache::ComputeKeyedLoadInterceptor(Handle name, Handle holder) { ASSERT(IC::GetCodeCacheForObject(*receiver, *holder) == OWN_MAP); Code::Flags flags = - Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, INTERCEPTOR); + Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, Code::INTERCEPTOR); Handle probe(receiver->map()->FindInCodeCache(*name, flags)); if (probe->IsCode()) return Handle::cast(probe); @@ -318,7 +323,7 @@ Handle StubCache::ComputeKeyedLoadCallback( Handle callback) { ASSERT(IC::GetCodeCacheForObject(*receiver, *holder) == OWN_MAP); Code::Flags flags = - Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, CALLBACKS); + Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, Code::CALLBACKS); Handle probe(receiver->map()->FindInCodeCache(*name, flags)); if (probe->IsCode()) return Handle::cast(probe); @@ -335,7 +340,7 @@ Handle StubCache::ComputeKeyedLoadCallback( Handle StubCache::ComputeKeyedLoadArrayLength(Handle name, Handle receiver) { Code::Flags flags = - Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, CALLBACKS); + Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, Code::CALLBACKS); Handle probe(receiver->map()->FindInCodeCache(*name, flags)); if (probe->IsCode()) return Handle::cast(probe); @@ -351,7 +356,7 @@ Handle StubCache::ComputeKeyedLoadArrayLength(Handle name, Handle StubCache::ComputeKeyedLoadStringLength(Handle name, Handle receiver) { Code::Flags flags = - Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, CALLBACKS); + Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, Code::CALLBACKS); Handle map(receiver->map()); Handle probe(map->FindInCodeCache(*name, flags)); if (probe->IsCode()) return Handle::cast(probe); @@ -369,7 +374,7 @@ Handle StubCache::ComputeKeyedLoadFunctionPrototype( Handle name, Handle receiver) { Code::Flags flags = - Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, CALLBACKS); + Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, Code::CALLBACKS); Handle probe(receiver->map()->FindInCodeCache(*name, flags)); if (probe->IsCode()) return Handle::cast(probe); @@ -387,7 +392,8 @@ Handle StubCache::ComputeStoreField(Handle name, int field_index, Handle transition, StrictModeFlag strict_mode) { - PropertyType type = (transition.is_null()) ? FIELD : MAP_TRANSITION; + Code::StubType type = + (transition.is_null()) ? Code::FIELD : Code::MAP_TRANSITION; Code::Flags flags = Code::ComputeMonomorphicFlags( Code::STORE_IC, type, strict_mode); Handle probe(receiver->map()->FindInCodeCache(*name, flags)); @@ -415,7 +421,7 @@ Handle StubCache::ComputeKeyedLoadOrStoreElement( Code::ComputeMonomorphicFlags( stub_kind == KeyedIC::LOAD ? Code::KEYED_LOAD_IC : Code::KEYED_STORE_IC, - NORMAL, + Code::NORMAL, extra_state); Handle name; switch (stub_kind) { @@ -483,7 +489,7 @@ Handle StubCache::ComputeStoreGlobal(Handle name, Handle cell, StrictModeFlag strict_mode) { Code::Flags flags = Code::ComputeMonomorphicFlags( - Code::STORE_IC, NORMAL, strict_mode); + Code::STORE_IC, Code::NORMAL, strict_mode); Handle probe(receiver->map()->FindInCodeCache(*name, flags)); if (probe->IsCode()) return Handle::cast(probe); @@ -502,7 +508,7 @@ Handle StubCache::ComputeStoreCallback(Handle name, StrictModeFlag strict_mode) { ASSERT(v8::ToCData
(callback->setter()) != 0); Code::Flags flags = Code::ComputeMonomorphicFlags( - Code::STORE_IC, CALLBACKS, strict_mode); + Code::STORE_IC, Code::CALLBACKS, strict_mode); Handle probe(receiver->map()->FindInCodeCache(*name, flags)); if (probe->IsCode()) return Handle::cast(probe); @@ -520,7 +526,7 @@ Handle StubCache::ComputeStoreViaSetter(Handle name, Handle setter, StrictModeFlag strict_mode) { Code::Flags flags = Code::ComputeMonomorphicFlags( - Code::STORE_IC, CALLBACKS, strict_mode); + Code::STORE_IC, Code::CALLBACKS, strict_mode); Handle probe(receiver->map()->FindInCodeCache(*name, flags)); if (probe->IsCode()) return Handle::cast(probe); @@ -537,7 +543,7 @@ Handle StubCache::ComputeStoreInterceptor(Handle name, Handle receiver, StrictModeFlag strict_mode) { Code::Flags flags = Code::ComputeMonomorphicFlags( - Code::STORE_IC, INTERCEPTOR, strict_mode); + Code::STORE_IC, Code::INTERCEPTOR, strict_mode); Handle probe(receiver->map()->FindInCodeCache(*name, flags)); if (probe->IsCode()) return Handle::cast(probe); @@ -554,7 +560,8 @@ Handle StubCache::ComputeKeyedStoreField(Handle name, int field_index, Handle transition, StrictModeFlag strict_mode) { - PropertyType type = (transition.is_null()) ? FIELD : MAP_TRANSITION; + Code::StubType type = + (transition.is_null()) ? Code::FIELD : Code::MAP_TRANSITION; Code::Flags flags = Code::ComputeMonomorphicFlags( Code::KEYED_STORE_IC, type, strict_mode); Handle probe(receiver->map()->FindInCodeCache(*name, flags)); @@ -597,7 +604,7 @@ Handle StubCache::ComputeCallConstant(int argc, } Code::Flags flags = - Code::ComputeMonomorphicFlags(kind, CONSTANT_FUNCTION, extra_state, + Code::ComputeMonomorphicFlags(kind, Code::CONSTANT_FUNCTION, extra_state, cache_holder, argc); Handle probe(map_holder->map()->FindInCodeCache(*name, flags)); if (probe->IsCode()) return Handle::cast(probe); @@ -635,7 +642,7 @@ Handle StubCache::ComputeCallField(int argc, } Code::Flags flags = - Code::ComputeMonomorphicFlags(kind, FIELD, extra_state, + Code::ComputeMonomorphicFlags(kind, Code::FIELD, extra_state, cache_holder, argc); Handle probe(map_holder->map()->FindInCodeCache(*name, flags)); if (probe->IsCode()) return Handle::cast(probe); @@ -672,7 +679,7 @@ Handle StubCache::ComputeCallInterceptor(int argc, } Code::Flags flags = - Code::ComputeMonomorphicFlags(kind, INTERCEPTOR, extra_state, + Code::ComputeMonomorphicFlags(kind, Code::INTERCEPTOR, extra_state, cache_holder, argc); Handle probe(map_holder->map()->FindInCodeCache(*name, flags)); if (probe->IsCode()) return Handle::cast(probe); @@ -702,7 +709,7 @@ Handle StubCache::ComputeCallGlobal(int argc, IC::GetCodeCacheForObject(*receiver, *holder); Handle map_holder(IC::GetCodeCacheHolder(*receiver, cache_holder)); Code::Flags flags = - Code::ComputeMonomorphicFlags(kind, NORMAL, extra_state, + Code::ComputeMonomorphicFlags(kind, Code::NORMAL, extra_state, cache_holder, argc); Handle probe(map_holder->map()->FindInCodeCache(*name, flags)); if (probe->IsCode()) return Handle::cast(probe); @@ -735,7 +742,7 @@ Code* StubCache::FindCallInitialize(int argc, CallICBase::StringStubState::encode(DEFAULT_STRING_STUB) | CallICBase::Contextual::encode(mode == RelocInfo::CODE_TARGET_CONTEXT); Code::Flags flags = - Code::ComputeFlags(kind, UNINITIALIZED, extra_state, NORMAL, argc); + Code::ComputeFlags(kind, UNINITIALIZED, extra_state, Code::NORMAL, argc); // Use raw_unchecked... so we don't get assert failures during GC. UnseededNumberDictionary* dictionary = @@ -756,7 +763,7 @@ Handle StubCache::ComputeCallInitialize(int argc, CallICBase::StringStubState::encode(DEFAULT_STRING_STUB) | CallICBase::Contextual::encode(mode == RelocInfo::CODE_TARGET_CONTEXT); Code::Flags flags = - Code::ComputeFlags(kind, UNINITIALIZED, extra_state, NORMAL, argc); + Code::ComputeFlags(kind, UNINITIALIZED, extra_state, Code::NORMAL, argc); Handle cache = isolate_->factory()->non_monomorphic_cache(); int entry = cache->FindEntry(isolate_, flags); @@ -785,7 +792,7 @@ Handle StubCache::ComputeCallPreMonomorphic( Code::Kind kind, Code::ExtraICState extra_state) { Code::Flags flags = - Code::ComputeFlags(kind, PREMONOMORPHIC, extra_state, NORMAL, argc); + Code::ComputeFlags(kind, PREMONOMORPHIC, extra_state, Code::NORMAL, argc); Handle cache = isolate_->factory()->non_monomorphic_cache(); int entry = cache->FindEntry(isolate_, flags); @@ -802,7 +809,7 @@ Handle StubCache::ComputeCallNormal(int argc, Code::Kind kind, Code::ExtraICState extra_state) { Code::Flags flags = - Code::ComputeFlags(kind, MONOMORPHIC, extra_state, NORMAL, argc); + Code::ComputeFlags(kind, MONOMORPHIC, extra_state, Code::NORMAL, argc); Handle cache = isolate_->factory()->non_monomorphic_cache(); int entry = cache->FindEntry(isolate_, flags); @@ -819,7 +826,7 @@ Handle StubCache::ComputeCallArguments(int argc, Code::Kind kind) { ASSERT(kind == Code::KEYED_CALL_IC); Code::Flags flags = Code::ComputeFlags(kind, MEGAMORPHIC, Code::kNoExtraICState, - NORMAL, argc); + Code::NORMAL, argc); Handle cache = isolate_->factory()->non_monomorphic_cache(); int entry = cache->FindEntry(isolate_, flags); @@ -838,7 +845,7 @@ Handle StubCache::ComputeCallMegamorphic( Code::ExtraICState extra_state) { Code::Flags flags = Code::ComputeFlags(kind, MEGAMORPHIC, extra_state, - NORMAL, argc); + Code::NORMAL, argc); Handle cache = isolate_->factory()->non_monomorphic_cache(); int entry = cache->FindEntry(isolate_, flags); @@ -858,7 +865,7 @@ Handle StubCache::ComputeCallMiss(int argc, // and monomorphic stubs are not mixed up together in the stub cache. Code::Flags flags = Code::ComputeFlags(kind, MONOMORPHIC_PROTOTYPE_FAILURE, extra_state, - NORMAL, argc, OWN_MAP); + Code::NORMAL, argc, OWN_MAP); Handle cache = isolate_->factory()->non_monomorphic_cache(); int entry = cache->FindEntry(isolate_, flags); @@ -878,7 +885,7 @@ Handle StubCache::ComputeCallDebugBreak(int argc, // the actual call ic to carry out the work. Code::Flags flags = Code::ComputeFlags(kind, DEBUG_BREAK, Code::kNoExtraICState, - NORMAL, argc); + Code::NORMAL, argc); Handle cache = isolate_->factory()->non_monomorphic_cache(); int entry = cache->FindEntry(isolate_, flags); @@ -897,7 +904,7 @@ Handle StubCache::ComputeCallDebugPrepareStepIn(int argc, // the actual call ic to carry out the work. Code::Flags flags = Code::ComputeFlags(kind, DEBUG_PREPARE_STEP_IN, Code::kNoExtraICState, - NORMAL, argc); + Code::NORMAL, argc); Handle cache = isolate_->factory()->non_monomorphic_cache(); int entry = cache->FindEntry(isolate_, flags); @@ -1361,7 +1368,8 @@ void StubCompiler::LookupPostInterceptor(Handle holder, } -Handle LoadStubCompiler::GetCode(PropertyType type, Handle name) { +Handle LoadStubCompiler::GetCode(Code::StubType type, + Handle name) { Code::Flags flags = Code::ComputeMonomorphicFlags(Code::LOAD_IC, type); Handle code = GetCodeWithFlags(flags, name); PROFILE(isolate(), CodeCreateEvent(Logger::LOAD_IC_TAG, *code, *name)); @@ -1370,7 +1378,7 @@ Handle LoadStubCompiler::GetCode(PropertyType type, Handle name) { } -Handle KeyedLoadStubCompiler::GetCode(PropertyType type, +Handle KeyedLoadStubCompiler::GetCode(Code::StubType type, Handle name, InlineCacheState state) { Code::Flags flags = Code::ComputeFlags( @@ -1382,7 +1390,7 @@ Handle KeyedLoadStubCompiler::GetCode(PropertyType type, } -Handle StoreStubCompiler::GetCode(PropertyType type, +Handle StoreStubCompiler::GetCode(Code::StubType type, Handle name) { Code::Flags flags = Code::ComputeMonomorphicFlags(Code::STORE_IC, type, strict_mode_); @@ -1393,7 +1401,7 @@ Handle StoreStubCompiler::GetCode(PropertyType type, } -Handle KeyedStoreStubCompiler::GetCode(PropertyType type, +Handle KeyedStoreStubCompiler::GetCode(Code::StubType type, Handle name, InlineCacheState state) { Code::ExtraICState extra_state = @@ -1471,7 +1479,8 @@ Handle CallStubCompiler::CompileCustomCall( } -Handle CallStubCompiler::GetCode(PropertyType type, Handle name) { +Handle CallStubCompiler::GetCode(Code::StubType type, + Handle name) { int argc = arguments_.immediate(); Code::Flags flags = Code::ComputeMonomorphicFlags(kind_, type, @@ -1487,7 +1496,7 @@ Handle CallStubCompiler::GetCode(Handle function) { if (function->shared()->name()->IsString()) { function_name = Handle(String::cast(function->shared()->name())); } - return GetCode(CONSTANT_FUNCTION, function_name); + return GetCode(Code::CONSTANT_FUNCTION, function_name); } diff --git a/src/stub-cache.h b/src/stub-cache.h index de8a76ba7..e274c82bc 100644 --- a/src/stub-cache.h +++ b/src/stub-cache.h @@ -628,7 +628,7 @@ class LoadStubCompiler: public StubCompiler { bool is_dont_delete); private: - Handle GetCode(PropertyType type, Handle name); + Handle GetCode(Code::StubType type, Handle name); }; @@ -676,7 +676,7 @@ class KeyedLoadStubCompiler: public StubCompiler { static void GenerateLoadDictionaryElement(MacroAssembler* masm); private: - Handle GetCode(PropertyType type, + Handle GetCode(Code::StubType type, Handle name, InlineCacheState state = MONOMORPHIC); }; @@ -709,7 +709,7 @@ class StoreStubCompiler: public StubCompiler { Handle name); private: - Handle GetCode(PropertyType type, Handle name); + Handle GetCode(Code::StubType type, Handle name); StrictModeFlag strict_mode_; }; @@ -750,7 +750,7 @@ class KeyedStoreStubCompiler: public StubCompiler { static void GenerateStoreDictionaryElement(MacroAssembler* masm); private: - Handle GetCode(PropertyType type, + Handle GetCode(Code::StubType type, Handle name, InlineCacheState state = MONOMORPHIC); @@ -830,7 +830,7 @@ class CallStubCompiler: public StubCompiler { Handle function, Handle name); - Handle GetCode(PropertyType type, Handle name); + Handle GetCode(Code::StubType type, Handle name); Handle GetCode(Handle function); const ParameterCount& arguments() { return arguments_; } diff --git a/src/type-info.cc b/src/type-info.cc index dfdfd89f6..6747fec5f 100644 --- a/src/type-info.cc +++ b/src/type-info.cc @@ -97,7 +97,7 @@ bool TypeFeedbackOracle::LoadIsMonomorphicNormal(Property* expr) { Handle code = Handle::cast(map_or_code); return code->is_keyed_load_stub() && code->ic_state() == MONOMORPHIC && - Code::ExtractTypeFromFlags(code->flags()) == NORMAL && + Code::ExtractTypeFromFlags(code->flags()) == Code::NORMAL && code->FindFirstMap() != NULL && !CanRetainOtherContext(code->FindFirstMap(), *global_context_); } @@ -129,7 +129,7 @@ bool TypeFeedbackOracle::StoreIsMonomorphicNormal(Expression* expr) { return code->is_keyed_store_stub() && !allow_growth && code->ic_state() == MONOMORPHIC && - Code::ExtractTypeFromFlags(code->flags()) == NORMAL && + Code::ExtractTypeFromFlags(code->flags()) == Code::NORMAL && code->FindFirstMap() != NULL && !CanRetainOtherContext(code->FindFirstMap(), *global_context_); } @@ -214,7 +214,8 @@ Handle TypeFeedbackOracle::StoreMonomorphicReceiverType(Expression* expr) { void TypeFeedbackOracle::LoadReceiverTypes(Property* expr, Handle name, SmallMapList* types) { - Code::Flags flags = Code::ComputeMonomorphicFlags(Code::LOAD_IC, NORMAL); + Code::Flags flags = + Code::ComputeMonomorphicFlags(Code::LOAD_IC, Code::NORMAL); CollectReceiverTypes(expr->id(), name, flags, types); } @@ -222,7 +223,8 @@ void TypeFeedbackOracle::LoadReceiverTypes(Property* expr, void TypeFeedbackOracle::StoreReceiverTypes(Assignment* expr, Handle name, SmallMapList* types) { - Code::Flags flags = Code::ComputeMonomorphicFlags(Code::STORE_IC, NORMAL); + Code::Flags flags = + Code::ComputeMonomorphicFlags(Code::STORE_IC, Code::NORMAL); CollectReceiverTypes(expr->id(), name, flags, types); } @@ -239,7 +241,7 @@ void TypeFeedbackOracle::CallReceiverTypes(Call* expr, CallIC::Contextual::encode(call_kind == CALL_AS_FUNCTION); Code::Flags flags = Code::ComputeMonomorphicFlags(Code::CALL_IC, - NORMAL, + Code::NORMAL, extra_ic_state, OWN_MAP, arity); diff --git a/src/x64/ic-x64.cc b/src/x64/ic-x64.cc index 82fdb3cec..4649a420f 100644 --- a/src/x64/ic-x64.cc +++ b/src/x64/ic-x64.cc @@ -823,7 +823,7 @@ void CallICBase::GenerateMonomorphicCacheProbe(MacroAssembler* masm, Code::Flags flags = Code::ComputeFlags(kind, MONOMORPHIC, extra_state, - NORMAL, + Code::NORMAL, argc); Isolate::Current()->stub_cache()->GenerateProbe(masm, flags, rdx, rcx, rbx, rax); diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc index 4040e9586..a2adf066f 100644 --- a/src/x64/stub-cache-x64.cc +++ b/src/x64/stub-cache-x64.cc @@ -1391,7 +1391,7 @@ Handle CallStubCompiler::CompileCallField(Handle object, GenerateMissBranch(); // Return the generated code. - return GetCode(FIELD, name); + return GetCode(Code::FIELD, name); } @@ -1915,7 +1915,7 @@ Handle CallStubCompiler::CompileStringFromCharCodeCall( GenerateMissBranch(); // Return the generated code. - return cell.is_null() ? GetCode(function) : GetCode(NORMAL, name); + return cell.is_null() ? GetCode(function) : GetCode(Code::NORMAL, name); } @@ -2030,7 +2030,7 @@ Handle CallStubCompiler::CompileMathAbsCall( GenerateMissBranch(); // Return the generated code. - return cell.is_null() ? GetCode(function) : GetCode(NORMAL, name); + return cell.is_null() ? GetCode(function) : GetCode(Code::NORMAL, name); } @@ -2279,7 +2279,7 @@ Handle CallStubCompiler::CompileCallInterceptor(Handle object, GenerateMissBranch(); // Return the generated code. - return GetCode(INTERCEPTOR, name); + return GetCode(Code::INTERCEPTOR, name); } @@ -2342,7 +2342,7 @@ Handle CallStubCompiler::CompileCallGlobal( GenerateMissBranch(); // Return the generated code. - return GetCode(NORMAL, name); + return GetCode(Code::NORMAL, name); } @@ -2373,7 +2373,9 @@ Handle StoreStubCompiler::CompileStoreField(Handle object, __ Jump(ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(transition.is_null() ? FIELD : MAP_TRANSITION, name); + return GetCode(transition.is_null() + ? Code::FIELD + : Code::MAP_TRANSITION, name); } @@ -2420,7 +2422,7 @@ Handle StoreStubCompiler::CompileStoreCallback( __ Jump(ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(CALLBACKS, name); + return GetCode(Code::CALLBACKS, name); } @@ -2466,7 +2468,7 @@ Handle StoreStubCompiler::CompileStoreViaSetter( __ Jump(ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(CALLBACKS, name); + return GetCode(Code::CALLBACKS, name); } @@ -2512,7 +2514,7 @@ Handle StoreStubCompiler::CompileStoreInterceptor( __ Jump(ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(INTERCEPTOR, name); + return GetCode(Code::INTERCEPTOR, name); } @@ -2560,7 +2562,7 @@ Handle StoreStubCompiler::CompileStoreGlobal( __ Jump(ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(NORMAL, name); + return GetCode(Code::NORMAL, name); } @@ -2599,7 +2601,9 @@ Handle KeyedStoreStubCompiler::CompileStoreField(Handle object, __ Jump(ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(transition.is_null() ? FIELD : MAP_TRANSITION, name); + return GetCode(transition.is_null() + ? Code::FIELD + : Code::MAP_TRANSITION, name); } @@ -2623,7 +2627,7 @@ Handle KeyedStoreStubCompiler::CompileStoreElement( __ jmp(ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(NORMAL, factory()->empty_string()); + return GetCode(Code::NORMAL, factory()->empty_string()); } @@ -2661,7 +2665,7 @@ Handle KeyedStoreStubCompiler::CompileStorePolymorphic( __ jmp(ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(NORMAL, factory()->empty_string(), MEGAMORPHIC); + return GetCode(Code::NORMAL, factory()->empty_string(), MEGAMORPHIC); } @@ -2699,7 +2703,7 @@ Handle LoadStubCompiler::CompileLoadNonexistent(Handle name, GenerateLoadMiss(masm(), Code::LOAD_IC); // Return the generated code. - return GetCode(NONEXISTENT, factory()->empty_string()); + return GetCode(Code::NONEXISTENT, factory()->empty_string()); } @@ -2719,7 +2723,7 @@ Handle LoadStubCompiler::CompileLoadField(Handle object, GenerateLoadMiss(masm(), Code::LOAD_IC); // Return the generated code. - return GetCode(FIELD, name); + return GetCode(Code::FIELD, name); } @@ -2740,7 +2744,7 @@ Handle LoadStubCompiler::CompileLoadCallback( GenerateLoadMiss(masm(), Code::LOAD_IC); // Return the generated code. - return GetCode(CALLBACKS, name); + return GetCode(Code::CALLBACKS, name); } @@ -2778,7 +2782,7 @@ Handle LoadStubCompiler::CompileLoadViaGetter( GenerateLoadMiss(masm(), Code::LOAD_IC); // Return the generated code. - return GetCode(CALLBACKS, name); + return GetCode(Code::CALLBACKS, name); } @@ -2798,7 +2802,7 @@ Handle LoadStubCompiler::CompileLoadConstant(Handle object, GenerateLoadMiss(masm(), Code::LOAD_IC); // Return the generated code. - return GetCode(CONSTANT_FUNCTION, name); + return GetCode(Code::CONSTANT_FUNCTION, name); } @@ -2822,7 +2826,7 @@ Handle LoadStubCompiler::CompileLoadInterceptor(Handle receiver, GenerateLoadMiss(masm(), Code::LOAD_IC); // Return the generated code. - return GetCode(INTERCEPTOR, name); + return GetCode(Code::INTERCEPTOR, name); } @@ -2866,7 +2870,7 @@ Handle LoadStubCompiler::CompileLoadGlobal( GenerateLoadMiss(masm(), Code::LOAD_IC); // Return the generated code. - return GetCode(NORMAL, name); + return GetCode(Code::NORMAL, name); } @@ -2895,7 +2899,7 @@ Handle KeyedLoadStubCompiler::CompileLoadField(Handle name, GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); // Return the generated code. - return GetCode(FIELD, name); + return GetCode(Code::FIELD, name); } @@ -2924,7 +2928,7 @@ Handle KeyedLoadStubCompiler::CompileLoadCallback( GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); // Return the generated code. - return GetCode(CALLBACKS, name); + return GetCode(Code::CALLBACKS, name); } @@ -2954,7 +2958,7 @@ Handle KeyedLoadStubCompiler::CompileLoadConstant( GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); // Return the generated code. - return GetCode(CONSTANT_FUNCTION, name); + return GetCode(Code::CONSTANT_FUNCTION, name); } @@ -2984,7 +2988,7 @@ Handle KeyedLoadStubCompiler::CompileLoadInterceptor( GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); // Return the generated code. - return GetCode(INTERCEPTOR, name); + return GetCode(Code::INTERCEPTOR, name); } @@ -3010,7 +3014,7 @@ Handle KeyedLoadStubCompiler::CompileLoadArrayLength( GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); // Return the generated code. - return GetCode(CALLBACKS, name); + return GetCode(Code::CALLBACKS, name); } @@ -3036,7 +3040,7 @@ Handle KeyedLoadStubCompiler::CompileLoadStringLength( GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); // Return the generated code. - return GetCode(CALLBACKS, name); + return GetCode(Code::CALLBACKS, name); } @@ -3062,7 +3066,7 @@ Handle KeyedLoadStubCompiler::CompileLoadFunctionPrototype( GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); // Return the generated code. - return GetCode(CALLBACKS, name); + return GetCode(Code::CALLBACKS, name); } @@ -3082,7 +3086,7 @@ Handle KeyedLoadStubCompiler::CompileLoadElement( __ jmp(ic, RelocInfo::CODE_TARGET); // Return the generated code. - return GetCode(NORMAL, factory()->empty_string()); + return GetCode(Code::NORMAL, factory()->empty_string()); } @@ -3110,7 +3114,7 @@ Handle KeyedLoadStubCompiler::CompileLoadPolymorphic( GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); // Return the generated code. - return GetCode(NORMAL, factory()->empty_string(), MEGAMORPHIC); + return GetCode(Code::NORMAL, factory()->empty_string(), MEGAMORPHIC); } -- 2.34.1