Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(534)

Unified Diff: src/ia32/ic-ia32.cc

Issue 6685088: Merge isolates to bleeding_edge. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/ia32/lithium-gap-resolver-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/ic-ia32.cc
===================================================================
--- src/ia32/ic-ia32.cc (revision 7267)
+++ src/ia32/ic-ia32.cc (working copy)
@@ -93,7 +93,7 @@
__ j(not_zero, miss, not_taken);
__ mov(r0, FieldOperand(receiver, JSObject::kPropertiesOffset));
- __ CheckMap(r0, Factory::hash_table_map(), miss, true);
+ __ CheckMap(r0, FACTORY->hash_table_map(), miss, true);
}
@@ -475,7 +475,7 @@
__ mov(scratch, FieldOperand(receiver, JSObject::kElementsOffset));
if (not_fast_array != NULL) {
// Check that the object is in fast mode and writable.
- __ CheckMap(scratch, Factory::fixed_array_map(), not_fast_array, true);
+ __ CheckMap(scratch, FACTORY->fixed_array_map(), not_fast_array, true);
} else {
__ AssertFastElements(scratch);
}
@@ -485,7 +485,7 @@
// Fast case: Do the load.
ASSERT((kPointerSize == 4) && (kSmiTagSize == 1) && (kSmiTag == 0));
__ mov(scratch, FieldOperand(scratch, key, times_2, FixedArray::kHeaderSize));
- __ cmp(Operand(scratch), Immediate(Factory::the_hole_value()));
+ __ cmp(Operand(scratch), Immediate(FACTORY->the_hole_value()));
// In case the loaded value is the_hole we have to consult GetProperty
// to ensure the prototype chain is searched.
__ j(equal, out_of_range);
@@ -555,7 +555,7 @@
eax,
NULL,
&slow);
- __ IncrementCounter(&Counters::keyed_load_generic_smi, 1);
+ __ IncrementCounter(COUNTERS->keyed_load_generic_smi(), 1);
__ ret(0);
__ bind(&check_number_dictionary);
@@ -568,7 +568,7 @@
// ebx: untagged index
// eax: key
// ecx: elements
- __ CheckMap(ecx, Factory::hash_table_map(), &slow, true);
+ __ CheckMap(ecx, FACTORY->hash_table_map(), &slow, true);
Label slow_pop_receiver;
// Push receiver on the stack to free up a register for the dictionary
// probing.
@@ -593,7 +593,7 @@
// Slow case: jump to runtime.
// edx: receiver
// eax: key
- __ IncrementCounter(&Counters::keyed_load_generic_slow, 1);
+ __ IncrementCounter(COUNTERS->keyed_load_generic_slow(), 1);
GenerateRuntimeGetProperty(masm);
__ bind(&check_string);
@@ -606,7 +606,7 @@
// cache. Otherwise probe the dictionary.
__ mov(ebx, FieldOperand(edx, JSObject::kPropertiesOffset));
__ cmp(FieldOperand(ebx, HeapObject::kMapOffset),
- Immediate(Factory::hash_table_map()));
+ Immediate(FACTORY->hash_table_map()));
__ j(equal, &probe_dictionary);
// Load the map of the receiver, compute the keyed lookup cache hash
@@ -648,7 +648,7 @@
__ movzx_b(ecx, FieldOperand(ebx, Map::kInstanceSizeOffset));
__ add(ecx, Operand(edi));
__ mov(eax, FieldOperand(edx, ecx, times_pointer_size, 0));
- __ IncrementCounter(&Counters::keyed_load_generic_lookup_cache, 1);
+ __ IncrementCounter(COUNTERS->keyed_load_generic_lookup_cache(), 1);
__ ret(0);
// Load property array property.
@@ -656,7 +656,7 @@
__ mov(eax, FieldOperand(edx, JSObject::kPropertiesOffset));
__ mov(eax, FieldOperand(eax, edi, times_pointer_size,
FixedArray::kHeaderSize));
- __ IncrementCounter(&Counters::keyed_load_generic_lookup_cache, 1);
+ __ IncrementCounter(COUNTERS->keyed_load_generic_lookup_cache(), 1);
__ ret(0);
// Do a quick inline probe of the receiver's dictionary, if it
@@ -668,7 +668,7 @@
GenerateGlobalInstanceTypeCheck(masm, ecx, &slow);
GenerateDictionaryLoad(masm, &slow, ebx, eax, ecx, edi, eax);
- __ IncrementCounter(&Counters::keyed_load_generic_symbol, 1);
+ __ IncrementCounter(COUNTERS->keyed_load_generic_symbol(), 1);
__ ret(0);
__ bind(&index_string);
@@ -789,7 +789,7 @@
// ecx: key (a smi)
__ mov(edi, FieldOperand(edx, JSObject::kElementsOffset));
// Check that the object is in fast mode and writable.
- __ CheckMap(edi, Factory::fixed_array_map(), &slow, true);
+ __ CheckMap(edi, FACTORY->fixed_array_map(), &slow, true);
__ cmp(ecx, FieldOperand(edi, FixedArray::kLengthOffset));
__ j(below, &fast, taken);
@@ -822,7 +822,7 @@
// edx: receiver, a JSArray
// ecx: key, a smi.
__ mov(edi, FieldOperand(edx, JSObject::kElementsOffset));
- __ CheckMap(edi, Factory::fixed_array_map(), &slow, true);
+ __ CheckMap(edi, FACTORY->fixed_array_map(), &slow, true);
// Check the key against the length in the array, compute the
// address to store into and fall through to fast case.
@@ -861,7 +861,8 @@
Code::kNoExtraICState,
NORMAL,
argc);
- StubCache::GenerateProbe(masm, flags, edx, ecx, ebx, eax);
+ Isolate::Current()->stub_cache()->GenerateProbe(masm, flags, edx, ecx, ebx,
+ eax);
// If the stub cache probing failed, the receiver might be a value.
// For value objects, we use the map of the prototype objects for
@@ -888,9 +889,9 @@
// Check for boolean.
__ bind(&non_string);
- __ cmp(edx, Factory::true_value());
+ __ cmp(edx, FACTORY->true_value());
__ j(equal, &boolean, not_taken);
- __ cmp(edx, Factory::false_value());
+ __ cmp(edx, FACTORY->false_value());
__ j(not_equal, &miss, taken);
__ bind(&boolean);
StubCompiler::GenerateLoadGlobalFunctionPrototype(
@@ -898,7 +899,8 @@
// Probe the stub cache for the value object.
__ bind(&probe);
- StubCache::GenerateProbe(masm, flags, edx, ecx, ebx, no_reg);
+ Isolate::Current()->stub_cache()->GenerateProbe(masm, flags, edx, ecx, ebx,
+ no_reg);
__ bind(&miss);
}
@@ -965,9 +967,9 @@
// -----------------------------------
if (id == IC::kCallIC_Miss) {
- __ IncrementCounter(&Counters::call_miss, 1);
+ __ IncrementCounter(COUNTERS->call_miss(), 1);
} else {
- __ IncrementCounter(&Counters::keyed_call_miss, 1);
+ __ IncrementCounter(COUNTERS->keyed_call_miss(), 1);
}
// Get the receiver of the function from the stack; 1 ~ return address.
@@ -1089,7 +1091,7 @@
GenerateFastArrayLoad(
masm, edx, ecx, eax, edi, &check_number_dictionary, &slow_load);
- __ IncrementCounter(&Counters::keyed_call_generic_smi_fast, 1);
+ __ IncrementCounter(COUNTERS->keyed_call_generic_smi_fast(), 1);
__ bind(&do_call);
// receiver in edx is not used after this point.
@@ -1101,14 +1103,14 @@
// eax: elements
// ecx: smi key
// Check whether the elements is a number dictionary.
- __ CheckMap(eax, Factory::hash_table_map(), &slow_load, true);
+ __ CheckMap(eax, FACTORY->hash_table_map(), &slow_load, true);
__ mov(ebx, ecx);
__ SmiUntag(ebx);
// ebx: untagged index
// Receiver in edx will be clobbered, need to reload it on miss.
GenerateNumberDictionaryLoad(
masm, &slow_reload_receiver, eax, ecx, ebx, edx, edi, edi);
- __ IncrementCounter(&Counters::keyed_call_generic_smi_dict, 1);
+ __ IncrementCounter(COUNTERS->keyed_call_generic_smi_dict(), 1);
__ jmp(&do_call);
__ bind(&slow_reload_receiver);
@@ -1117,7 +1119,7 @@
__ bind(&slow_load);
// This branch is taken when calling KeyedCallIC_Miss is neither required
// nor beneficial.
- __ IncrementCounter(&Counters::keyed_call_generic_slow_load, 1);
+ __ IncrementCounter(COUNTERS->keyed_call_generic_slow_load(), 1);
__ EnterInternalFrame();
__ push(ecx); // save the key
__ push(edx); // pass the receiver
@@ -1139,14 +1141,14 @@
masm, edx, eax, Map::kHasNamedInterceptor, &lookup_monomorphic_cache);
__ mov(ebx, FieldOperand(edx, JSObject::kPropertiesOffset));
- __ CheckMap(ebx, Factory::hash_table_map(), &lookup_monomorphic_cache, true);
+ __ CheckMap(ebx, FACTORY->hash_table_map(), &lookup_monomorphic_cache, true);
GenerateDictionaryLoad(masm, &slow_load, ebx, ecx, eax, edi, edi);
- __ IncrementCounter(&Counters::keyed_call_generic_lookup_dict, 1);
+ __ IncrementCounter(COUNTERS->keyed_call_generic_lookup_dict(), 1);
__ jmp(&do_call);
__ bind(&lookup_monomorphic_cache);
- __ IncrementCounter(&Counters::keyed_call_generic_lookup_cache, 1);
+ __ IncrementCounter(COUNTERS->keyed_call_generic_lookup_cache(), 1);
GenerateMonomorphicCacheProbe(masm, argc, Code::KEYED_CALL_IC);
// Fall through on miss.
@@ -1157,7 +1159,7 @@
// - the value loaded is not a function,
// - there is hope that the runtime will create a monomorphic call stub
// that will get fetched next time.
- __ IncrementCounter(&Counters::keyed_call_generic_slow, 1);
+ __ IncrementCounter(COUNTERS->keyed_call_generic_slow(), 1);
GenerateMiss(masm, argc);
__ bind(&index_string);
@@ -1212,7 +1214,8 @@
Code::Flags flags = Code::ComputeFlags(Code::LOAD_IC,
NOT_IN_LOOP,
MONOMORPHIC);
- StubCache::GenerateProbe(masm, flags, eax, ecx, ebx, edx);
+ Isolate::Current()->stub_cache()->GenerateProbe(masm, flags, eax, ecx, ebx,
+ edx);
// Cache miss: Jump to runtime.
GenerateMiss(masm);
@@ -1247,7 +1250,7 @@
// -- esp[0] : return address
// -----------------------------------
- __ IncrementCounter(&Counters::load_miss, 1);
+ __ IncrementCounter(COUNTERS->load_miss(), 1);
__ pop(ebx);
__ push(eax); // receiver
@@ -1375,7 +1378,7 @@
// (-1) or we should be clearing the inlined version.
ASSERT(*reinterpret_cast<int*>(offset_address) == kMaxInt - 1 ||
*reinterpret_cast<int*>(offset_address) == -1 ||
- (offset == 0 && map == Heap::null_value()));
+ (offset == 0 && map == HEAP->null_value()));
*reinterpret_cast<int*>(offset_address) = offset - kHeapObjectTag;
// Patch the offset in the write-barrier code. The offset is the
@@ -1385,7 +1388,7 @@
// (-1) or we should be clearing the inlined version.
ASSERT(*reinterpret_cast<int*>(offset_address) == kMaxInt ||
*reinterpret_cast<int*>(offset_address) == -1 ||
- (offset == 0 && map == Heap::null_value()));
+ (offset == 0 && map == HEAP->null_value()));
*reinterpret_cast<int*>(offset_address) = offset - kHeapObjectTag;
return true;
@@ -1433,7 +1436,7 @@
// -- esp[0] : return address
// -----------------------------------
- __ IncrementCounter(&Counters::keyed_load_miss, 1);
+ __ IncrementCounter(COUNTERS->keyed_load_miss(), 1);
__ pop(ebx);
__ push(edx); // receiver
@@ -1476,7 +1479,8 @@
NOT_IN_LOOP,
MONOMORPHIC,
strict_mode);
- StubCache::GenerateProbe(masm, flags, edx, ecx, ebx, no_reg);
+ Isolate::Current()->stub_cache()->GenerateProbe(masm, flags, edx, ecx, ebx,
+ no_reg);
// Cache miss: Jump to runtime.
GenerateMiss(masm);
@@ -1580,14 +1584,14 @@
__ push(edx);
GenerateDictionaryStore(masm, &restore_miss, ebx, ecx, eax, edx, edi);
__ Drop(1);
- __ IncrementCounter(&Counters::store_normal_hit, 1);
+ __ IncrementCounter(COUNTERS->store_normal_hit(), 1);
__ ret(0);
__ bind(&restore_miss);
__ pop(edx);
__ bind(&miss);
- __ IncrementCounter(&Counters::store_normal_miss, 1);
+ __ IncrementCounter(COUNTERS->store_normal_miss(), 1);
GenerateMiss(masm);
}
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/ia32/lithium-gap-resolver-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698