| Index: src/ia32/stub-cache-ia32.cc
|
| diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc
|
| index a5243a8790642b900dbcdf9e310f310a00e08643..b11e3b02e0da00f02f5294ca2cb9124322d7ea64 100644
|
| --- a/src/ia32/stub-cache-ia32.cc
|
| +++ b/src/ia32/stub-cache-ia32.cc
|
| @@ -114,8 +114,9 @@ static void GenerateDictionaryNegativeLookup(MacroAssembler* masm,
|
| Register r0,
|
| Register r1) {
|
| ASSERT(name->IsSymbol());
|
| - __ IncrementCounter(COUNTERS->negative_lookups(), 1);
|
| - __ IncrementCounter(COUNTERS->negative_lookups_miss(), 1);
|
| + Counters* counters = masm->isolate()->counters();
|
| + __ IncrementCounter(counters->negative_lookups(), 1);
|
| + __ IncrementCounter(counters->negative_lookups_miss(), 1);
|
|
|
| Label done;
|
| __ mov(r0, FieldOperand(receiver, HeapObject::kMapOffset));
|
| @@ -198,7 +199,7 @@ static void GenerateDictionaryNegativeLookup(MacroAssembler* masm,
|
| }
|
|
|
| __ bind(&done);
|
| - __ DecrementCounter(COUNTERS->negative_lookups_miss(), 1);
|
| + __ DecrementCounter(counters->negative_lookups_miss(), 1);
|
| }
|
|
|
|
|
| @@ -614,10 +615,11 @@ class CallInterceptorCompiler BASE_EMBEDDED {
|
| (depth2 != kInvalidProtoDepth);
|
| }
|
|
|
| - __ IncrementCounter(COUNTERS->call_const_interceptor(), 1);
|
| + Counters* counters = masm->isolate()->counters();
|
| + __ IncrementCounter(counters->call_const_interceptor(), 1);
|
|
|
| if (can_do_fast_api_call) {
|
| - __ IncrementCounter(COUNTERS->call_const_interceptor_fast_api(), 1);
|
| + __ IncrementCounter(counters->call_const_interceptor_fast_api(), 1);
|
| ReserveSpaceForFastApiCall(masm, scratch1);
|
| }
|
|
|
| @@ -2155,8 +2157,9 @@ MaybeObject* CallStubCompiler::CompileFastApiCall(
|
| __ test(edx, Immediate(kSmiTagMask));
|
| __ j(zero, &miss_before_stack_reserved, not_taken);
|
|
|
| - __ IncrementCounter(COUNTERS->call_const(), 1);
|
| - __ IncrementCounter(COUNTERS->call_const_fast_api(), 1);
|
| + Counters* counters = masm()->isolate()->counters();
|
| + __ IncrementCounter(counters->call_const(), 1);
|
| + __ IncrementCounter(counters->call_const_fast_api(), 1);
|
|
|
| // Allocate space for v8::Arguments implicit values. Must be initialized
|
| // before calling any runtime function.
|
| @@ -2230,7 +2233,7 @@ MaybeObject* CallStubCompiler::CompileCallConstant(Object* object,
|
| SharedFunctionInfo* function_info = function->shared();
|
| switch (check) {
|
| case RECEIVER_MAP_CHECK:
|
| - __ IncrementCounter(COUNTERS->call_const(), 1);
|
| + __ IncrementCounter(masm()->isolate()->counters()->call_const(), 1);
|
|
|
| // Check that the maps haven't changed.
|
| CheckPrototypes(JSObject::cast(object), edx, holder,
|
| @@ -2430,7 +2433,8 @@ MaybeObject* CallStubCompiler::CompileCallGlobal(JSObject* object,
|
| __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset));
|
|
|
| // Jump to the cached code (tail call).
|
| - __ IncrementCounter(COUNTERS->call_global_inline(), 1);
|
| + Counters* counters = masm()->isolate()->counters();
|
| + __ IncrementCounter(counters->call_global_inline(), 1);
|
| ASSERT(function->is_compiled());
|
| ParameterCount expected(function->shared()->formal_parameter_count());
|
| if (V8::UseCrankshaft()) {
|
| @@ -2447,7 +2451,7 @@ MaybeObject* CallStubCompiler::CompileCallGlobal(JSObject* object,
|
|
|
| // Handle call cache miss.
|
| __ bind(&miss);
|
| - __ IncrementCounter(COUNTERS->call_global_inline_miss(), 1);
|
| + __ IncrementCounter(counters->call_global_inline_miss(), 1);
|
| MaybeObject* maybe_result = GenerateMissBranch();
|
| if (maybe_result->IsFailure()) return maybe_result;
|
|
|
| @@ -2626,12 +2630,13 @@ MaybeObject* StoreStubCompiler::CompileStoreGlobal(GlobalObject* object,
|
| __ mov(cell_operand, eax);
|
|
|
| // Return the value (register eax).
|
| - __ IncrementCounter(COUNTERS->named_store_global_inline(), 1);
|
| + Counters* counters = masm()->isolate()->counters();
|
| + __ IncrementCounter(counters->named_store_global_inline(), 1);
|
| __ ret(0);
|
|
|
| // Handle store cache miss.
|
| __ bind(&miss);
|
| - __ IncrementCounter(COUNTERS->named_store_global_inline_miss(), 1);
|
| + __ IncrementCounter(counters->named_store_global_inline_miss(), 1);
|
| Handle<Code> ic(Isolate::Current()->builtins()->builtin(
|
| Builtins::StoreIC_Miss));
|
| __ jmp(ic, RelocInfo::CODE_TARGET);
|
| @@ -2653,7 +2658,8 @@ MaybeObject* KeyedStoreStubCompiler::CompileStoreField(JSObject* object,
|
| // -----------------------------------
|
| Label miss;
|
|
|
| - __ IncrementCounter(COUNTERS->keyed_store_field(), 1);
|
| + Counters* counters = masm()->isolate()->counters();
|
| + __ IncrementCounter(counters->keyed_store_field(), 1);
|
|
|
| // Check that the name has not changed.
|
| __ cmp(Operand(ecx), Immediate(Handle<String>(name)));
|
| @@ -2669,7 +2675,7 @@ MaybeObject* KeyedStoreStubCompiler::CompileStoreField(JSObject* object,
|
|
|
| // Handle store cache miss.
|
| __ bind(&miss);
|
| - __ DecrementCounter(COUNTERS->keyed_store_field(), 1);
|
| + __ DecrementCounter(counters->keyed_store_field(), 1);
|
| Handle<Code> ic(Isolate::Current()->builtins()->builtin(
|
| Builtins::KeyedStoreIC_Miss));
|
| __ jmp(ic, RelocInfo::CODE_TARGET);
|
| @@ -2925,12 +2931,13 @@ MaybeObject* LoadStubCompiler::CompileLoadGlobal(JSObject* object,
|
| __ Check(not_equal, "DontDelete cells can't contain the hole");
|
| }
|
|
|
| - __ IncrementCounter(COUNTERS->named_load_global_stub(), 1);
|
| + Counters* counters = masm()->isolate()->counters();
|
| + __ IncrementCounter(counters->named_load_global_stub(), 1);
|
| __ mov(eax, ebx);
|
| __ ret(0);
|
|
|
| __ bind(&miss);
|
| - __ IncrementCounter(COUNTERS->named_load_global_stub_miss(), 1);
|
| + __ IncrementCounter(counters->named_load_global_stub_miss(), 1);
|
| GenerateLoadMiss(masm(), Code::LOAD_IC);
|
|
|
| // Return the generated code.
|
| @@ -2949,7 +2956,8 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadField(String* name,
|
| // -----------------------------------
|
| Label miss;
|
|
|
| - __ IncrementCounter(COUNTERS->keyed_load_field(), 1);
|
| + Counters* counters = masm()->isolate()->counters();
|
| + __ IncrementCounter(counters->keyed_load_field(), 1);
|
|
|
| // Check that the name has not changed.
|
| __ cmp(Operand(eax), Immediate(Handle<String>(name)));
|
| @@ -2958,7 +2966,7 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadField(String* name,
|
| GenerateLoadField(receiver, holder, edx, ebx, ecx, edi, index, name, &miss);
|
|
|
| __ bind(&miss);
|
| - __ DecrementCounter(COUNTERS->keyed_load_field(), 1);
|
| + __ DecrementCounter(counters->keyed_load_field(), 1);
|
| GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
|
|
|
| // Return the generated code.
|
| @@ -2978,7 +2986,8 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadCallback(
|
| // -----------------------------------
|
| Label miss;
|
|
|
| - __ IncrementCounter(COUNTERS->keyed_load_callback(), 1);
|
| + Counters* counters = masm()->isolate()->counters();
|
| + __ IncrementCounter(counters->keyed_load_callback(), 1);
|
|
|
| // Check that the name has not changed.
|
| __ cmp(Operand(eax), Immediate(Handle<String>(name)));
|
| @@ -2993,7 +3002,7 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadCallback(
|
|
|
| __ bind(&miss);
|
|
|
| - __ DecrementCounter(COUNTERS->keyed_load_callback(), 1);
|
| + __ DecrementCounter(counters->keyed_load_callback(), 1);
|
| GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
|
|
|
| // Return the generated code.
|
| @@ -3012,7 +3021,8 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadConstant(String* name,
|
| // -----------------------------------
|
| Label miss;
|
|
|
| - __ IncrementCounter(COUNTERS->keyed_load_constant_function(), 1);
|
| + Counters* counters = masm()->isolate()->counters();
|
| + __ IncrementCounter(counters->keyed_load_constant_function(), 1);
|
|
|
| // Check that the name has not changed.
|
| __ cmp(Operand(eax), Immediate(Handle<String>(name)));
|
| @@ -3021,7 +3031,7 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadConstant(String* name,
|
| GenerateLoadConstant(receiver, holder, edx, ebx, ecx, edi,
|
| value, name, &miss);
|
| __ bind(&miss);
|
| - __ DecrementCounter(COUNTERS->keyed_load_constant_function(), 1);
|
| + __ DecrementCounter(counters->keyed_load_constant_function(), 1);
|
| GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
|
|
|
| // Return the generated code.
|
| @@ -3039,7 +3049,8 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadInterceptor(JSObject* receiver,
|
| // -----------------------------------
|
| Label miss;
|
|
|
| - __ IncrementCounter(COUNTERS->keyed_load_interceptor(), 1);
|
| + Counters* counters = masm()->isolate()->counters();
|
| + __ IncrementCounter(counters->keyed_load_interceptor(), 1);
|
|
|
| // Check that the name has not changed.
|
| __ cmp(Operand(eax), Immediate(Handle<String>(name)));
|
| @@ -3058,7 +3069,7 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadInterceptor(JSObject* receiver,
|
| name,
|
| &miss);
|
| __ bind(&miss);
|
| - __ DecrementCounter(COUNTERS->keyed_load_interceptor(), 1);
|
| + __ DecrementCounter(counters->keyed_load_interceptor(), 1);
|
| GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
|
|
|
| // Return the generated code.
|
| @@ -3074,7 +3085,8 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadArrayLength(String* name) {
|
| // -----------------------------------
|
| Label miss;
|
|
|
| - __ IncrementCounter(COUNTERS->keyed_load_array_length(), 1);
|
| + Counters* counters = masm()->isolate()->counters();
|
| + __ IncrementCounter(counters->keyed_load_array_length(), 1);
|
|
|
| // Check that the name has not changed.
|
| __ cmp(Operand(eax), Immediate(Handle<String>(name)));
|
| @@ -3082,7 +3094,7 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadArrayLength(String* name) {
|
|
|
| GenerateLoadArrayLength(masm(), edx, ecx, &miss);
|
| __ bind(&miss);
|
| - __ DecrementCounter(COUNTERS->keyed_load_array_length(), 1);
|
| + __ DecrementCounter(counters->keyed_load_array_length(), 1);
|
| GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
|
|
|
| // Return the generated code.
|
| @@ -3098,7 +3110,8 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadStringLength(String* name) {
|
| // -----------------------------------
|
| Label miss;
|
|
|
| - __ IncrementCounter(COUNTERS->keyed_load_string_length(), 1);
|
| + Counters* counters = masm()->isolate()->counters();
|
| + __ IncrementCounter(counters->keyed_load_string_length(), 1);
|
|
|
| // Check that the name has not changed.
|
| __ cmp(Operand(eax), Immediate(Handle<String>(name)));
|
| @@ -3106,7 +3119,7 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadStringLength(String* name) {
|
|
|
| GenerateLoadStringLength(masm(), edx, ecx, ebx, &miss, true);
|
| __ bind(&miss);
|
| - __ DecrementCounter(COUNTERS->keyed_load_string_length(), 1);
|
| + __ DecrementCounter(counters->keyed_load_string_length(), 1);
|
| GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
|
|
|
| // Return the generated code.
|
| @@ -3122,7 +3135,8 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadFunctionPrototype(String* name) {
|
| // -----------------------------------
|
| Label miss;
|
|
|
| - __ IncrementCounter(COUNTERS->keyed_load_function_prototype(), 1);
|
| + Counters* counters = masm()->isolate()->counters();
|
| + __ IncrementCounter(counters->keyed_load_function_prototype(), 1);
|
|
|
| // Check that the name has not changed.
|
| __ cmp(Operand(eax), Immediate(Handle<String>(name)));
|
| @@ -3130,7 +3144,7 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadFunctionPrototype(String* name) {
|
|
|
| GenerateLoadFunctionPrototype(masm(), edx, ecx, ebx, &miss);
|
| __ bind(&miss);
|
| - __ DecrementCounter(COUNTERS->keyed_load_function_prototype(), 1);
|
| + __ DecrementCounter(counters->keyed_load_function_prototype(), 1);
|
| GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
|
|
|
| // Return the generated code.
|
| @@ -3305,8 +3319,9 @@ MaybeObject* ConstructStubCompiler::CompileConstructStub(JSFunction* function) {
|
| __ pop(ecx);
|
| __ lea(esp, Operand(esp, ebx, times_pointer_size, 1 * kPointerSize));
|
| __ push(ecx);
|
| - __ IncrementCounter(COUNTERS->constructed_objects(), 1);
|
| - __ IncrementCounter(COUNTERS->constructed_objects_stub(), 1);
|
| + Counters* counters = masm()->isolate()->counters();
|
| + __ IncrementCounter(counters->constructed_objects(), 1);
|
| + __ IncrementCounter(counters->constructed_objects_stub(), 1);
|
| __ ret(0);
|
|
|
| // Jump to the generic stub in case the specialized code cannot handle the
|
| @@ -3454,7 +3469,8 @@ MaybeObject* ExternalArrayStubCompiler::CompileKeyedLoadStub(
|
|
|
| // Slow case: Jump to runtime.
|
| __ bind(&slow);
|
| - __ IncrementCounter(COUNTERS->keyed_load_external_array_slow(), 1);
|
| + Counters* counters = masm()->isolate()->counters();
|
| + __ IncrementCounter(counters->keyed_load_external_array_slow(), 1);
|
| // ----------- S t a t e -------------
|
| // -- eax : key
|
| // -- edx : receiver
|
|
|