Index: src/x64/stub-cache-x64.cc |
=================================================================== |
--- src/x64/stub-cache-x64.cc (revision 7267) |
+++ src/x64/stub-cache-x64.cc (working copy) |
@@ -39,7 +39,8 @@ |
#define __ ACCESS_MASM(masm) |
-static void ProbeTable(MacroAssembler* masm, |
+static void ProbeTable(Isolate* isolate, |
+ MacroAssembler* masm, |
Code::Flags flags, |
StubCache::Table table, |
Register name, |
@@ -48,7 +49,7 @@ |
ASSERT_EQ(16, sizeof(StubCache::Entry)); |
// The offset register holds the entry offset times four (due to masking |
// and shifting optimizations). |
- ExternalReference key_offset(SCTableReference::keyReference(table)); |
+ ExternalReference key_offset(isolate->stub_cache()->key_reference(table)); |
Label miss; |
__ movq(kScratchRegister, key_offset); |
@@ -88,8 +89,8 @@ |
Register r0, |
Register r1) { |
ASSERT(name->IsSymbol()); |
- __ IncrementCounter(&Counters::negative_lookups, 1); |
- __ IncrementCounter(&Counters::negative_lookups_miss, 1); |
+ __ IncrementCounter(COUNTERS->negative_lookups(), 1); |
+ __ IncrementCounter(COUNTERS->negative_lookups_miss(), 1); |
Label done; |
__ movq(r0, FieldOperand(receiver, HeapObject::kMapOffset)); |
@@ -151,7 +152,7 @@ |
ASSERT_EQ(kSmiTagSize, 1); |
__ movq(entity_name, Operand(properties, index, times_pointer_size, |
kElementsStartOffset - kHeapObjectTag)); |
- __ Cmp(entity_name, Factory::undefined_value()); |
+ __ Cmp(entity_name, FACTORY->undefined_value()); |
// __ jmp(miss_label); |
if (i != kProbes - 1) { |
__ j(equal, &done); |
@@ -172,7 +173,7 @@ |
} |
__ bind(&done); |
- __ DecrementCounter(&Counters::negative_lookups_miss, 1); |
+ __ DecrementCounter(COUNTERS->negative_lookups_miss(), 1); |
} |
@@ -183,6 +184,7 @@ |
Register scratch, |
Register extra, |
Register extra2) { |
+ Isolate* isolate = Isolate::Current(); |
Label miss; |
USE(extra); // The register extra is not used on the X64 platform. |
USE(extra2); // The register extra2 is not used on the X64 platform. |
@@ -212,7 +214,7 @@ |
__ and_(scratch, Immediate((kPrimaryTableSize - 1) << kHeapObjectTagSize)); |
// Probe the primary table. |
- ProbeTable(masm, flags, kPrimary, name, scratch); |
+ ProbeTable(isolate, masm, flags, kPrimary, name, scratch); |
// Primary miss: Compute hash for secondary probe. |
__ movl(scratch, FieldOperand(name, String::kHashFieldOffset)); |
@@ -224,7 +226,7 @@ |
__ and_(scratch, Immediate((kSecondaryTableSize - 1) << kHeapObjectTagSize)); |
// Probe the secondary table. |
- ProbeTable(masm, flags, kSecondary, name, scratch); |
+ ProbeTable(isolate, masm, flags, kSecondary, name, scratch); |
// Cache miss: Fall-through and let caller handle the miss by |
// entering the runtime system. |
@@ -254,12 +256,13 @@ |
void StubCompiler::GenerateDirectLoadGlobalFunctionPrototype( |
MacroAssembler* masm, int index, Register prototype, Label* miss) { |
// Check we're still in the same context. |
- __ Move(prototype, Top::global()); |
+ __ Move(prototype, Isolate::Current()->global()); |
__ cmpq(Operand(rsi, Context::SlotOffset(Context::GLOBAL_INDEX)), |
prototype); |
__ j(not_equal, miss); |
// Get the global function with the given index. |
- JSFunction* function = JSFunction::cast(Top::global_context()->get(index)); |
+ JSFunction* function = JSFunction::cast( |
+ Isolate::Current()->global_context()->get(index)); |
// Load its initial map. The global functions all have initial maps. |
__ Move(prototype, Handle<Map>(function->initial_map())); |
// Load the prototype from the initial map. |
@@ -375,7 +378,7 @@ |
JSObject* holder_obj) { |
__ push(name); |
InterceptorInfo* interceptor = holder_obj->GetNamedInterceptor(); |
- ASSERT(!Heap::InNewSpace(interceptor)); |
+ ASSERT(!HEAP->InNewSpace(interceptor)); |
__ Move(kScratchRegister, Handle<Object>(interceptor)); |
__ push(kScratchRegister); |
__ push(receiver); |
@@ -466,7 +469,7 @@ |
__ movq(Operand(rsp, 2 * kPointerSize), rdi); |
Object* call_data = optimization.api_call_info()->data(); |
Handle<CallHandlerInfo> api_call_info_handle(optimization.api_call_info()); |
- if (Heap::InNewSpace(call_data)) { |
+ if (HEAP->InNewSpace(call_data)) { |
__ Move(rcx, api_call_info_handle); |
__ movq(rbx, FieldOperand(rcx, CallHandlerInfo::kDataOffset)); |
__ movq(Operand(rsp, 3 * kPointerSize), rbx); |
@@ -561,7 +564,7 @@ |
name, |
holder, |
miss); |
- return Heap::undefined_value(); // Success. |
+ return HEAP->undefined_value(); // Success. |
} |
} |
@@ -597,10 +600,10 @@ |
(depth2 != kInvalidProtoDepth); |
} |
- __ IncrementCounter(&Counters::call_const_interceptor, 1); |
+ __ 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); |
} |
@@ -660,7 +663,7 @@ |
FreeSpaceForFastApiCall(masm, scratch1); |
} |
- return Heap::undefined_value(); // Success. |
+ return HEAP->undefined_value(); // Success. |
} |
void CompileRegular(MacroAssembler* masm, |
@@ -729,9 +732,9 @@ |
ASSERT(kind == Code::LOAD_IC || kind == Code::KEYED_LOAD_IC); |
Code* code = NULL; |
if (kind == Code::LOAD_IC) { |
- code = Builtins::builtin(Builtins::LoadIC_Miss); |
+ code = Isolate::Current()->builtins()->builtin(Builtins::LoadIC_Miss); |
} else { |
- code = Builtins::builtin(Builtins::KeyedLoadIC_Miss); |
+ code = Isolate::Current()->builtins()->builtin(Builtins::KeyedLoadIC_Miss); |
} |
Handle<Code> ic(code); |
@@ -836,7 +839,7 @@ |
ASSERT(cell->value()->IsTheHole()); |
__ Move(scratch, Handle<Object>(cell)); |
__ Cmp(FieldOperand(scratch, JSGlobalPropertyCell::kValueOffset), |
- Factory::the_hole_value()); |
+ FACTORY->the_hole_value()); |
__ j(not_equal, miss); |
return cell; |
} |
@@ -885,7 +888,7 @@ |
!current->IsJSGlobalObject() && |
!current->IsJSGlobalProxy()) { |
if (!name->IsSymbol()) { |
- MaybeObject* lookup_result = Heap::LookupSymbol(name); |
+ MaybeObject* lookup_result = HEAP->LookupSymbol(name); |
if (lookup_result->IsFailure()) { |
set_failure(Failure::cast(lookup_result)); |
return reg; |
@@ -905,7 +908,7 @@ |
__ movq(scratch1, FieldOperand(reg, HeapObject::kMapOffset)); |
reg = holder_reg; // from now the object is in holder_reg |
__ movq(reg, FieldOperand(scratch1, Map::kPrototypeOffset)); |
- } else if (Heap::InNewSpace(prototype)) { |
+ } else if (HEAP->InNewSpace(prototype)) { |
// Get the map of the current object. |
__ movq(scratch1, FieldOperand(reg, HeapObject::kMapOffset)); |
__ Cmp(scratch1, Handle<Map>(current->map())); |
@@ -956,7 +959,7 @@ |
__ j(not_equal, miss); |
// Log the check depth. |
- LOG(IntEvent("check-maps-depth", depth + 1)); |
+ LOG(isolate(), IntEvent("check-maps-depth", depth + 1)); |
// Perform security check for access to the global object and return |
// the holder register. |
@@ -1039,7 +1042,7 @@ |
__ push(receiver); // receiver |
__ push(reg); // holder |
- if (Heap::InNewSpace(callback_handle->data())) { |
+ if (HEAP->InNewSpace(callback_handle->data())) { |
__ Move(scratch1, callback_handle); |
__ push(FieldOperand(scratch1, AccessorInfo::kDataOffset)); // data |
} else { |
@@ -1291,7 +1294,7 @@ |
__ movq(rdi, FieldOperand(rdi, JSGlobalPropertyCell::kValueOffset)); |
// Check that the cell contains the same function. |
- if (Heap::InNewSpace(function)) { |
+ if (HEAP->InNewSpace(function)) { |
// We can't embed a pointer to a function in new space so we have |
// to verify that the shared function info is unchanged. This has |
// the nice side effect that multiple closures based on the same |
@@ -1313,8 +1316,8 @@ |
MaybeObject* CallStubCompiler::GenerateMissBranch() { |
- MaybeObject* maybe_obj = StubCache::ComputeCallMiss(arguments().immediate(), |
- kind_); |
+ MaybeObject* maybe_obj = Isolate::Current()->stub_cache()->ComputeCallMiss( |
+ arguments().immediate(), kind_); |
Object* obj; |
if (!maybe_obj->ToObject(&obj)) return maybe_obj; |
__ Jump(Handle<Code>(Code::cast(obj)), RelocInfo::CODE_TARGET); |
@@ -1393,7 +1396,7 @@ |
// ----------------------------------- |
// If object is not an array, bail out to regular call. |
- if (!object->IsJSArray() || cell != NULL) return Heap::undefined_value(); |
+ if (!object->IsJSArray() || cell != NULL) return HEAP->undefined_value(); |
Label miss; |
@@ -1427,7 +1430,7 @@ |
// Check that the elements are in fast mode and writable. |
__ Cmp(FieldOperand(rbx, HeapObject::kMapOffset), |
- Factory::fixed_array_map()); |
+ FACTORY->fixed_array_map()); |
__ j(not_equal, &call_builtin); |
if (argc == 1) { // Otherwise fall through to call builtin. |
@@ -1556,7 +1559,7 @@ |
// ----------------------------------- |
// If object is not an array, bail out to regular call. |
- if (!object->IsJSArray() || cell != NULL) return Heap::undefined_value(); |
+ if (!object->IsJSArray() || cell != NULL) return HEAP->undefined_value(); |
Label miss, return_undefined, call_builtin; |
@@ -1641,7 +1644,7 @@ |
// ----------------------------------- |
// If object is not a string, bail out to regular call. |
- if (!object->IsString() || cell != NULL) return Heap::undefined_value(); |
+ if (!object->IsString() || cell != NULL) return HEAP->undefined_value(); |
const int argc = arguments().immediate(); |
@@ -1725,7 +1728,7 @@ |
// ----------------------------------- |
// If object is not a string, bail out to regular call. |
- if (!object->IsString() || cell != NULL) return Heap::undefined_value(); |
+ if (!object->IsString() || cell != NULL) return HEAP->undefined_value(); |
const int argc = arguments().immediate(); |
@@ -1814,7 +1817,7 @@ |
// If the object is not a JSObject or we got an unexpected number of |
// arguments, bail out to the regular call. |
- if (!object->IsJSObject() || argc != 1) return Heap::undefined_value(); |
+ if (!object->IsJSObject() || argc != 1) return HEAP->undefined_value(); |
Label miss; |
GenerateNameCheck(name, &miss); |
@@ -1873,7 +1876,7 @@ |
JSFunction* function, |
String* name) { |
// TODO(872): implement this. |
- return Heap::undefined_value(); |
+ return HEAP->undefined_value(); |
} |
@@ -1894,7 +1897,7 @@ |
// If the object is not a JSObject or we got an unexpected number of |
// arguments, bail out to the regular call. |
- if (!object->IsJSObject() || argc != 1) return Heap::undefined_value(); |
+ if (!object->IsJSObject() || argc != 1) return HEAP->undefined_value(); |
Label miss; |
GenerateNameCheck(name, &miss); |
@@ -1943,7 +1946,7 @@ |
// Check if the argument is a heap number and load its value. |
__ bind(¬_smi); |
- __ CheckMap(rax, Factory::heap_number_map(), &slow, true); |
+ __ CheckMap(rax, FACTORY->heap_number_map(), &slow, true); |
__ movq(rbx, FieldOperand(rax, HeapNumber::kValueOffset)); |
// Check the sign of the argument. If the argument is positive, |
@@ -1992,11 +1995,11 @@ |
ASSERT(optimization.is_simple_api_call()); |
// Bail out if object is a global object as we don't want to |
// repatch it to global receiver. |
- if (object->IsGlobalObject()) return Heap::undefined_value(); |
- if (cell != NULL) return Heap::undefined_value(); |
+ if (object->IsGlobalObject()) return HEAP->undefined_value(); |
+ if (cell != NULL) return HEAP->undefined_value(); |
int depth = optimization.GetPrototypeDepthOfExpectedType( |
JSObject::cast(object), holder); |
- if (depth == kInvalidProtoDepth) return Heap::undefined_value(); |
+ if (depth == kInvalidProtoDepth) return HEAP->undefined_value(); |
Label miss, miss_before_stack_reserved; |
@@ -2009,8 +2012,8 @@ |
// Check that the receiver isn't a smi. |
__ JumpIfSmi(rdx, &miss_before_stack_reserved); |
- __ IncrementCounter(&Counters::call_const, 1); |
- __ IncrementCounter(&Counters::call_const_fast_api, 1); |
+ __ 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. |
@@ -2085,7 +2088,7 @@ |
SharedFunctionInfo* function_info = function->shared(); |
switch (check) { |
case RECEIVER_MAP_CHECK: |
- __ IncrementCounter(&Counters::call_const, 1); |
+ __ IncrementCounter(COUNTERS->call_const(), 1); |
// Check that the maps haven't changed. |
CheckPrototypes(JSObject::cast(object), rdx, holder, |
@@ -2291,7 +2294,7 @@ |
__ movq(rsi, FieldOperand(rdi, JSFunction::kContextOffset)); |
// Jump to the cached code (tail call). |
- __ IncrementCounter(&Counters::call_global_inline, 1); |
+ __ IncrementCounter(COUNTERS->call_global_inline(), 1); |
ASSERT(function->is_compiled()); |
ParameterCount expected(function->shared()->formal_parameter_count()); |
if (V8::UseCrankshaft()) { |
@@ -2307,7 +2310,7 @@ |
} |
// Handle call cache miss. |
__ bind(&miss); |
- __ IncrementCounter(&Counters::call_global_inline_miss, 1); |
+ __ IncrementCounter(COUNTERS->call_global_inline_miss(), 1); |
Object* obj; |
{ MaybeObject* maybe_obj = GenerateMissBranch(); |
if (!maybe_obj->ToObject(&obj)) return maybe_obj; |
@@ -2340,7 +2343,8 @@ |
// Handle store cache miss. |
__ bind(&miss); |
- Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Miss)); |
+ Handle<Code> ic(Isolate::Current()->builtins()->builtin( |
+ Builtins::StoreIC_Miss)); |
__ Jump(ic, RelocInfo::CODE_TARGET); |
// Return the generated code. |
@@ -2390,7 +2394,8 @@ |
// Handle store cache miss. |
__ bind(&miss); |
- Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Miss)); |
+ Handle<Code> ic(Isolate::Current()->builtins()->builtin( |
+ Builtins::StoreIC_Miss)); |
__ Jump(ic, RelocInfo::CODE_TARGET); |
// Return the generated code. |
@@ -2439,7 +2444,8 @@ |
// Handle store cache miss. |
__ bind(&miss); |
- Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Miss)); |
+ Handle<Code> ic(Isolate::Current()->builtins()->builtin( |
+ Builtins::StoreIC_Miss)); |
__ Jump(ic, RelocInfo::CODE_TARGET); |
// Return the generated code. |
@@ -2476,13 +2482,14 @@ |
__ movq(FieldOperand(rbx, JSGlobalPropertyCell::kValueOffset), rax); |
// Return the value (register rax). |
- __ IncrementCounter(&Counters::named_store_global_inline, 1); |
+ __ IncrementCounter(COUNTERS->named_store_global_inline(), 1); |
__ ret(0); |
// Handle store cache miss. |
__ bind(&miss); |
- __ IncrementCounter(&Counters::named_store_global_inline_miss, 1); |
- Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Miss)); |
+ __ IncrementCounter(COUNTERS->named_store_global_inline_miss(), 1); |
+ Handle<Code> ic(Isolate::Current()->builtins()->builtin( |
+ Builtins::StoreIC_Miss)); |
__ Jump(ic, RelocInfo::CODE_TARGET); |
// Return the generated code. |
@@ -2502,7 +2509,7 @@ |
// ----------------------------------- |
Label miss; |
- __ IncrementCounter(&Counters::keyed_store_field, 1); |
+ __ IncrementCounter(COUNTERS->keyed_store_field(), 1); |
// Check that the name has not changed. |
__ Cmp(rcx, Handle<String>(name)); |
@@ -2518,8 +2525,9 @@ |
// Handle store cache miss. |
__ bind(&miss); |
- __ DecrementCounter(&Counters::keyed_store_field, 1); |
- Handle<Code> ic(Builtins::builtin(Builtins::KeyedStoreIC_Miss)); |
+ __ DecrementCounter(COUNTERS->keyed_store_field(), 1); |
+ Handle<Code> ic(Isolate::Current()->builtins()->builtin( |
+ Builtins::KeyedStoreIC_Miss)); |
__ Jump(ic, RelocInfo::CODE_TARGET); |
// Return the generated code. |
@@ -2551,7 +2559,7 @@ |
// Get the elements array and make sure it is a fast element array, not 'cow'. |
__ movq(rdi, FieldOperand(rdx, JSObject::kElementsOffset)); |
__ Cmp(FieldOperand(rdi, HeapObject::kMapOffset), |
- Factory::fixed_array_map()); |
+ FACTORY->fixed_array_map()); |
__ j(not_equal, &miss); |
// Check that the key is within bounds. |
@@ -2576,7 +2584,8 @@ |
// Handle store cache miss. |
__ bind(&miss); |
- Handle<Code> ic(Builtins::builtin(Builtins::KeyedStoreIC_Miss)); |
+ Handle<Code> ic(Isolate::Current()->builtins()->builtin( |
+ Builtins::KeyedStoreIC_Miss)); |
__ jmp(ic, RelocInfo::CODE_TARGET); |
// Return the generated code. |
@@ -2625,7 +2634,7 @@ |
GenerateLoadMiss(masm(), Code::LOAD_IC); |
// Return the generated code. |
- return GetCode(NONEXISTENT, Heap::empty_string()); |
+ return GetCode(NONEXISTENT, HEAP->empty_string()); |
} |
@@ -2764,12 +2773,12 @@ |
__ Check(not_equal, "DontDelete cells can't contain the hole"); |
} |
- __ IncrementCounter(&Counters::named_load_global_stub, 1); |
+ __ IncrementCounter(COUNTERS->named_load_global_stub(), 1); |
__ movq(rax, rbx); |
__ 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. |
@@ -2788,7 +2797,7 @@ |
// ----------------------------------- |
Label miss; |
- __ IncrementCounter(&Counters::keyed_load_field, 1); |
+ __ IncrementCounter(COUNTERS->keyed_load_field(), 1); |
// Check that the name has not changed. |
__ Cmp(rax, Handle<String>(name)); |
@@ -2797,7 +2806,7 @@ |
GenerateLoadField(receiver, holder, rdx, rbx, rcx, rdi, 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. |
@@ -2817,7 +2826,7 @@ |
// ----------------------------------- |
Label miss; |
- __ IncrementCounter(&Counters::keyed_load_callback, 1); |
+ __ IncrementCounter(COUNTERS->keyed_load_callback(), 1); |
// Check that the name has not changed. |
__ Cmp(rax, Handle<String>(name)); |
@@ -2832,7 +2841,7 @@ |
__ bind(&miss); |
- __ DecrementCounter(&Counters::keyed_load_callback, 1); |
+ __ DecrementCounter(COUNTERS->keyed_load_callback(), 1); |
GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); |
// Return the generated code. |
@@ -2851,7 +2860,7 @@ |
// ----------------------------------- |
Label miss; |
- __ IncrementCounter(&Counters::keyed_load_constant_function, 1); |
+ __ IncrementCounter(COUNTERS->keyed_load_constant_function(), 1); |
// Check that the name has not changed. |
__ Cmp(rax, Handle<String>(name)); |
@@ -2860,7 +2869,7 @@ |
GenerateLoadConstant(receiver, holder, rdx, rbx, rcx, rdi, |
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. |
@@ -2878,7 +2887,7 @@ |
// ----------------------------------- |
Label miss; |
- __ IncrementCounter(&Counters::keyed_load_interceptor, 1); |
+ __ IncrementCounter(COUNTERS->keyed_load_interceptor(), 1); |
// Check that the name has not changed. |
__ Cmp(rax, Handle<String>(name)); |
@@ -2897,7 +2906,7 @@ |
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. |
@@ -2913,7 +2922,7 @@ |
// ----------------------------------- |
Label miss; |
- __ IncrementCounter(&Counters::keyed_load_array_length, 1); |
+ __ IncrementCounter(COUNTERS->keyed_load_array_length(), 1); |
// Check that the name has not changed. |
__ Cmp(rax, Handle<String>(name)); |
@@ -2921,7 +2930,7 @@ |
GenerateLoadArrayLength(masm(), rdx, rcx, &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. |
@@ -2937,7 +2946,7 @@ |
// ----------------------------------- |
Label miss; |
- __ IncrementCounter(&Counters::keyed_load_string_length, 1); |
+ __ IncrementCounter(COUNTERS->keyed_load_string_length(), 1); |
// Check that the name has not changed. |
__ Cmp(rax, Handle<String>(name)); |
@@ -2945,7 +2954,7 @@ |
GenerateLoadStringLength(masm(), rdx, rcx, rbx, &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. |
@@ -2961,7 +2970,7 @@ |
// ----------------------------------- |
Label miss; |
- __ IncrementCounter(&Counters::keyed_load_function_prototype, 1); |
+ __ IncrementCounter(COUNTERS->keyed_load_function_prototype(), 1); |
// Check that the name has not changed. |
__ Cmp(rax, Handle<String>(name)); |
@@ -2969,7 +2978,7 @@ |
GenerateLoadFunctionPrototype(masm(), rdx, rcx, rbx, &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. |
@@ -3035,7 +3044,7 @@ |
Label generic_stub_call; |
// Use r8 for holding undefined which is used in several places below. |
- __ Move(r8, Factory::undefined_value()); |
+ __ Move(r8, FACTORY->undefined_value()); |
#ifdef ENABLE_DEBUGGER_SUPPORT |
// Check to see whether there are any break points in the function code. If |
@@ -3079,7 +3088,7 @@ |
// rbx: initial map |
// rdx: JSObject (untagged) |
__ movq(Operand(rdx, JSObject::kMapOffset), rbx); |
- __ Move(rbx, Factory::empty_fixed_array()); |
+ __ Move(rbx, FACTORY->empty_fixed_array()); |
__ movq(Operand(rdx, JSObject::kPropertiesOffset), rbx); |
__ movq(Operand(rdx, JSObject::kElementsOffset), rbx); |
@@ -3138,14 +3147,15 @@ |
__ pop(rcx); |
__ lea(rsp, Operand(rsp, rbx, times_pointer_size, 1 * kPointerSize)); |
__ push(rcx); |
- __ IncrementCounter(&Counters::constructed_objects, 1); |
- __ IncrementCounter(&Counters::constructed_objects_stub, 1); |
+ __ 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 |
// construction. |
__ bind(&generic_stub_call); |
- Code* code = Builtins::builtin(Builtins::JSConstructStubGeneric); |
+ Code* code = Isolate::Current()->builtins()->builtin( |
+ Builtins::JSConstructStubGeneric); |
Handle<Code> generic_construct_stub(code); |
__ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); |
@@ -3260,7 +3270,7 @@ |
// Slow case: Jump to runtime. |
__ bind(&slow); |
- __ IncrementCounter(&Counters::keyed_load_external_array_slow, 1); |
+ __ IncrementCounter(COUNTERS->keyed_load_external_array_slow(), 1); |
// ----------- S t a t e ------------- |
// -- rax : key |