Index: src/mips/stub-cache-mips.cc |
diff --git a/src/mips/stub-cache-mips.cc b/src/mips/stub-cache-mips.cc |
index efd1b549bddb3fa8192df1492738f7122d22c962..82f8655c7e77280bf2b79d258d10cce43d471691 100644 |
--- a/src/mips/stub-cache-mips.cc |
+++ b/src/mips/stub-cache-mips.cc |
@@ -36,12 +36,12 @@ static void ProbeTable(Isolate* isolate, |
uint32_t map_off_addr = reinterpret_cast<uint32_t>(map_offset.address()); |
// Check the relative positions of the address fields. |
- ASSERT(value_off_addr > key_off_addr); |
- ASSERT((value_off_addr - key_off_addr) % 4 == 0); |
- ASSERT((value_off_addr - key_off_addr) < (256 * 4)); |
- ASSERT(map_off_addr > key_off_addr); |
- ASSERT((map_off_addr - key_off_addr) % 4 == 0); |
- ASSERT((map_off_addr - key_off_addr) < (256 * 4)); |
+ DCHECK(value_off_addr > key_off_addr); |
+ DCHECK((value_off_addr - key_off_addr) % 4 == 0); |
+ DCHECK((value_off_addr - key_off_addr) < (256 * 4)); |
+ DCHECK(map_off_addr > key_off_addr); |
+ DCHECK((map_off_addr - key_off_addr) % 4 == 0); |
+ DCHECK((map_off_addr - key_off_addr) < (256 * 4)); |
Label miss; |
Register base_addr = scratch; |
@@ -97,8 +97,8 @@ static void ProbeTable(Isolate* isolate, |
void PropertyHandlerCompiler::GenerateDictionaryNegativeLookup( |
MacroAssembler* masm, Label* miss_label, Register receiver, |
Handle<Name> name, Register scratch0, Register scratch1) { |
- ASSERT(name->IsUniqueName()); |
- ASSERT(!receiver.is(scratch0)); |
+ DCHECK(name->IsUniqueName()); |
+ DCHECK(!receiver.is(scratch0)); |
Counters* counters = masm->isolate()->counters(); |
__ IncrementCounter(counters->negative_lookups(), 1, scratch0, scratch1); |
__ IncrementCounter(counters->negative_lookups_miss(), 1, scratch0, scratch1); |
@@ -157,27 +157,27 @@ void StubCache::GenerateProbe(MacroAssembler* masm, |
// Make sure that code is valid. The multiplying code relies on the |
// entry size being 12. |
- ASSERT(sizeof(Entry) == 12); |
+ DCHECK(sizeof(Entry) == 12); |
// Make sure the flags does not name a specific type. |
- ASSERT(Code::ExtractTypeFromFlags(flags) == 0); |
+ DCHECK(Code::ExtractTypeFromFlags(flags) == 0); |
// Make sure that there are no register conflicts. |
- ASSERT(!scratch.is(receiver)); |
- ASSERT(!scratch.is(name)); |
- ASSERT(!extra.is(receiver)); |
- ASSERT(!extra.is(name)); |
- ASSERT(!extra.is(scratch)); |
- ASSERT(!extra2.is(receiver)); |
- ASSERT(!extra2.is(name)); |
- ASSERT(!extra2.is(scratch)); |
- ASSERT(!extra2.is(extra)); |
+ DCHECK(!scratch.is(receiver)); |
+ DCHECK(!scratch.is(name)); |
+ DCHECK(!extra.is(receiver)); |
+ DCHECK(!extra.is(name)); |
+ DCHECK(!extra.is(scratch)); |
+ DCHECK(!extra2.is(receiver)); |
+ DCHECK(!extra2.is(name)); |
+ DCHECK(!extra2.is(scratch)); |
+ DCHECK(!extra2.is(extra)); |
// Check register validity. |
- ASSERT(!scratch.is(no_reg)); |
- ASSERT(!extra.is(no_reg)); |
- ASSERT(!extra2.is(no_reg)); |
- ASSERT(!extra3.is(no_reg)); |
+ DCHECK(!scratch.is(no_reg)); |
+ DCHECK(!extra.is(no_reg)); |
+ DCHECK(!extra2.is(no_reg)); |
+ DCHECK(!extra3.is(no_reg)); |
Counters* counters = masm->isolate()->counters(); |
__ IncrementCounter(counters->megamorphic_stub_cache_probes(), 1, |
@@ -272,7 +272,7 @@ void PropertyHandlerCompiler::GenerateCheckPropertyCell( |
MacroAssembler* masm, Handle<JSGlobalObject> global, Handle<Name> name, |
Register scratch, Label* miss) { |
Handle<Cell> cell = JSGlobalObject::EnsurePropertyCell(global, name); |
- ASSERT(cell->value()->IsTheHole()); |
+ DCHECK(cell->value()->IsTheHole()); |
__ li(scratch, Operand(cell)); |
__ lw(scratch, FieldMemOperand(scratch, Cell::kValueOffset)); |
__ LoadRoot(at, Heap::kTheHoleValueRootIndex); |
@@ -295,7 +295,7 @@ void NamedStoreHandlerCompiler::GenerateStoreTransition( |
DescriptorArray* descriptors = transition->instance_descriptors(); |
PropertyDetails details = descriptors->GetDetails(descriptor); |
Representation representation = details.representation(); |
- ASSERT(!representation.IsNone()); |
+ DCHECK(!representation.IsNone()); |
if (details.type() == CONSTANT) { |
Handle<Object> constant(descriptors->GetValue(descriptor), masm->isolate()); |
@@ -345,7 +345,7 @@ void NamedStoreHandlerCompiler::GenerateStoreTransition( |
} |
// Stub never generated for objects that require access checks. |
- ASSERT(!transition->is_access_check_needed()); |
+ DCHECK(!transition->is_access_check_needed()); |
// Perform map transition for the receiver if necessary. |
if (details.type() == FIELD && |
@@ -377,7 +377,7 @@ void NamedStoreHandlerCompiler::GenerateStoreTransition( |
OMIT_SMI_CHECK); |
if (details.type() == CONSTANT) { |
- ASSERT(value_reg.is(a0)); |
+ DCHECK(value_reg.is(a0)); |
__ Ret(USE_DELAY_SLOT); |
__ mov(v0, a0); |
return; |
@@ -446,7 +446,7 @@ void NamedStoreHandlerCompiler::GenerateStoreTransition( |
} |
// Return the value (register v0). |
- ASSERT(value_reg.is(a0)); |
+ DCHECK(value_reg.is(a0)); |
__ bind(&exit); |
__ Ret(USE_DELAY_SLOT); |
__ mov(v0, a0); |
@@ -466,12 +466,12 @@ void NamedStoreHandlerCompiler::GenerateStoreField( |
// Stub never generated for non-global objects that require access |
// checks. |
- ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded()); |
+ DCHECK(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded()); |
FieldIndex index = lookup->GetFieldIndex(); |
Representation representation = lookup->representation(); |
- ASSERT(!representation.IsNone()); |
+ DCHECK(!representation.IsNone()); |
if (representation.IsSmi()) { |
__ JumpIfNotSmi(value_reg, miss_label); |
} else if (representation.IsHeapObject()) { |
@@ -520,7 +520,7 @@ void NamedStoreHandlerCompiler::GenerateStoreField( |
__ bind(&do_store); |
__ sdc1(f4, FieldMemOperand(scratch1, HeapNumber::kValueOffset)); |
// Return the value (register v0). |
- ASSERT(value_reg.is(a0)); |
+ DCHECK(value_reg.is(a0)); |
__ Ret(USE_DELAY_SLOT); |
__ mov(v0, a0); |
return; |
@@ -575,7 +575,7 @@ void NamedStoreHandlerCompiler::GenerateStoreField( |
} |
// Return the value (register v0). |
- ASSERT(value_reg.is(a0)); |
+ DCHECK(value_reg.is(a0)); |
__ bind(&exit); |
__ Ret(USE_DELAY_SLOT); |
__ mov(v0, a0); |
@@ -604,7 +604,7 @@ static void PushInterceptorArguments(MacroAssembler* masm, |
STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsLength == 4); |
__ push(name); |
Handle<InterceptorInfo> interceptor(holder_obj->GetNamedInterceptor()); |
- ASSERT(!masm->isolate()->heap()->InNewSpace(*interceptor)); |
+ DCHECK(!masm->isolate()->heap()->InNewSpace(*interceptor)); |
Register scratch = name; |
__ li(scratch, Operand(interceptor)); |
__ Push(scratch, receiver, holder); |
@@ -629,18 +629,18 @@ void PropertyHandlerCompiler::GenerateFastApiCall( |
MacroAssembler* masm, const CallOptimization& optimization, |
Handle<Map> receiver_map, Register receiver, Register scratch_in, |
bool is_store, int argc, Register* values) { |
- ASSERT(!receiver.is(scratch_in)); |
+ DCHECK(!receiver.is(scratch_in)); |
// Preparing to push, adjust sp. |
__ Subu(sp, sp, Operand((argc + 1) * kPointerSize)); |
__ sw(receiver, MemOperand(sp, argc * kPointerSize)); // Push receiver. |
// Write the arguments to stack frame. |
for (int i = 0; i < argc; i++) { |
Register arg = values[argc-1-i]; |
- ASSERT(!receiver.is(arg)); |
- ASSERT(!scratch_in.is(arg)); |
+ DCHECK(!receiver.is(arg)); |
+ DCHECK(!scratch_in.is(arg)); |
__ sw(arg, MemOperand(sp, (argc-1-i) * kPointerSize)); // Push arg. |
} |
- ASSERT(optimization.is_simple_api_call()); |
+ DCHECK(optimization.is_simple_api_call()); |
// Abi for CallApiFunctionStub. |
Register callee = a0; |
@@ -717,8 +717,8 @@ Register PropertyHandlerCompiler::CheckPrototypes( |
Handle<Map> receiver_map(IC::TypeToMap(*type(), isolate())); |
// Make sure there's no overlap between holder and object registers. |
- ASSERT(!scratch1.is(object_reg) && !scratch1.is(holder_reg)); |
- ASSERT(!scratch2.is(object_reg) && !scratch2.is(holder_reg) |
+ DCHECK(!scratch1.is(object_reg) && !scratch1.is(holder_reg)); |
+ DCHECK(!scratch2.is(object_reg) && !scratch2.is(holder_reg) |
&& !scratch2.is(scratch1)); |
// Keep track of the current object in register reg. |
@@ -739,7 +739,7 @@ Register PropertyHandlerCompiler::CheckPrototypes( |
// Only global objects and objects that do not require access |
// checks are allowed in stubs. |
- ASSERT(current_map->IsJSGlobalProxyMap() || |
+ DCHECK(current_map->IsJSGlobalProxyMap() || |
!current_map->is_access_check_needed()); |
prototype = handle(JSObject::cast(current_map->prototype())); |
@@ -747,10 +747,10 @@ Register PropertyHandlerCompiler::CheckPrototypes( |
!current_map->IsJSGlobalObjectMap() && |
!current_map->IsJSGlobalProxyMap()) { |
if (!name->IsUniqueName()) { |
- ASSERT(name->IsString()); |
+ DCHECK(name->IsString()); |
name = factory()->InternalizeString(Handle<String>::cast(name)); |
} |
- ASSERT(current.is_null() || |
+ DCHECK(current.is_null() || |
current->property_dictionary()->FindEntry(name) == |
NameDictionary::kNotFound); |
@@ -809,7 +809,7 @@ Register PropertyHandlerCompiler::CheckPrototypes( |
} |
// Perform security check for access to the global object. |
- ASSERT(current_map->IsJSGlobalProxyMap() || |
+ DCHECK(current_map->IsJSGlobalProxyMap() || |
!current_map->is_access_check_needed()); |
if (current_map->IsJSGlobalProxyMap()) { |
__ CheckAccessGlobalProxy(reg, scratch1, miss); |
@@ -850,10 +850,10 @@ Register NamedLoadHandlerCompiler::CallbackFrontend(Register object_reg, |
Register reg = FrontendHeader(object_reg, name, &miss); |
if (!holder()->HasFastProperties()) { |
- ASSERT(!holder()->IsGlobalObject()); |
- ASSERT(!reg.is(scratch2())); |
- ASSERT(!reg.is(scratch3())); |
- ASSERT(!reg.is(scratch4())); |
+ DCHECK(!holder()->IsGlobalObject()); |
+ DCHECK(!reg.is(scratch2())); |
+ DCHECK(!reg.is(scratch3())); |
+ DCHECK(!reg.is(scratch4())); |
// Load the properties dictionary. |
Register dictionary = scratch4(); |
@@ -911,9 +911,9 @@ void NamedLoadHandlerCompiler::GenerateLoadCallback( |
STATIC_ASSERT(PropertyCallbackArguments::kDataIndex == 4); |
STATIC_ASSERT(PropertyCallbackArguments::kThisIndex == 5); |
STATIC_ASSERT(PropertyCallbackArguments::kArgsLength == 6); |
- ASSERT(!scratch2().is(reg)); |
- ASSERT(!scratch3().is(reg)); |
- ASSERT(!scratch4().is(reg)); |
+ DCHECK(!scratch2().is(reg)); |
+ DCHECK(!scratch3().is(reg)); |
+ DCHECK(!scratch4().is(reg)); |
__ push(receiver()); |
if (heap()->InNewSpace(callback->data())) { |
__ li(scratch3(), callback); |
@@ -952,8 +952,8 @@ void NamedLoadHandlerCompiler::GenerateLoadCallback( |
void NamedLoadHandlerCompiler::GenerateLoadInterceptor(Register holder_reg, |
LookupResult* lookup, |
Handle<Name> name) { |
- ASSERT(holder()->HasNamedInterceptor()); |
- ASSERT(!holder()->GetNamedInterceptor()->getter()->IsUndefined()); |
+ DCHECK(holder()->HasNamedInterceptor()); |
+ DCHECK(!holder()->GetNamedInterceptor()->getter()->IsUndefined()); |
// So far the most popular follow ups for interceptor loads are FIELD |
// and CALLBACKS, so inline only them, other cases may be added |
@@ -977,7 +977,7 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor(Register holder_reg, |
// Compile the interceptor call, followed by inline code to load the |
// property from further up the prototype chain if the call fails. |
// Check that the maps haven't changed. |
- ASSERT(holder_reg.is(receiver()) || holder_reg.is(scratch1())); |
+ DCHECK(holder_reg.is(receiver()) || holder_reg.is(scratch1())); |
// Preserve the receiver register explicitly whenever it is different from |
// the holder and it is needed should the interceptor return without any |
@@ -1130,7 +1130,7 @@ Register* PropertyAccessCompiler::store_calling_convention() { |
// receiver, name, scratch1, scratch2, scratch3. |
Register receiver = StoreIC::ReceiverRegister(); |
Register name = StoreIC::NameRegister(); |
- ASSERT(a3.is(KeyedStoreIC::MapRegister())); |
+ DCHECK(a3.is(KeyedStoreIC::MapRegister())); |
static Register registers[] = { receiver, name, a3, t0, t1 }; |
return registers; |
} |
@@ -1237,7 +1237,7 @@ Handle<Code> PropertyICCompiler::CompilePolymorphic(TypeHandleList* types, |
// Polymorphic keyed stores may use the map register |
Register map_reg = scratch1(); |
- ASSERT(kind() != Code::KEYED_STORE_IC || |
+ DCHECK(kind() != Code::KEYED_STORE_IC || |
map_reg.is(KeyedStoreIC::MapRegister())); |
int receiver_count = types->length(); |
@@ -1252,14 +1252,14 @@ Handle<Code> PropertyICCompiler::CompilePolymorphic(TypeHandleList* types, |
// Separate compare from branch, to provide path for above JumpIfSmi(). |
__ Subu(match, map_reg, Operand(map)); |
if (type->Is(HeapType::Number())) { |
- ASSERT(!number_case.is_unused()); |
+ DCHECK(!number_case.is_unused()); |
__ bind(&number_case); |
} |
__ Jump(handlers->at(current), RelocInfo::CODE_TARGET, |
eq, match, Operand(zero_reg)); |
} |
} |
- ASSERT(number_of_handled_maps != 0); |
+ DCHECK(number_of_handled_maps != 0); |
__ bind(&miss); |
TailCallBuiltin(masm(), MissBuiltin(kind())); |
@@ -1322,8 +1322,8 @@ void ElementHandlerCompiler::GenerateLoadDictionaryElement( |
Register key = LoadIC::NameRegister(); |
Register receiver = LoadIC::ReceiverRegister(); |
- ASSERT(receiver.is(a1)); |
- ASSERT(key.is(a2)); |
+ DCHECK(receiver.is(a1)); |
+ DCHECK(key.is(a2)); |
__ UntagAndJumpIfNotSmi(t2, key, &miss); |
__ lw(t0, FieldMemOperand(receiver, JSObject::kElementsOffset)); |