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

Unified Diff: src/mips64/stub-cache-mips64.cc

Issue 430503007: Rename ASSERT* to DCHECK*. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE and fixes Created 6 years, 4 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/mips64/simulator-mips64.cc ('k') | src/mksnapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/stub-cache-mips64.cc
diff --git a/src/mips64/stub-cache-mips64.cc b/src/mips64/stub-cache-mips64.cc
index affb10fc55142c3df7517d4ce3bfb558cc785180..8115194347b28cfb536f5242e216e683055e63c8 100644
--- a/src/mips64/stub-cache-mips64.cc
+++ b/src/mips64/stub-cache-mips64.cc
@@ -36,12 +36,12 @@ static void ProbeTable(Isolate* isolate,
uint64_t map_off_addr = reinterpret_cast<uint64_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,28 +157,28 @@ 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);
- // ASSERT(sizeof(Entry) == 3 * kPointerSize);
+ // DCHECK(sizeof(Entry) == 12);
+ // DCHECK(sizeof(Entry) == 3 * kPointerSize);
// 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,
@@ -273,7 +273,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));
__ ld(scratch, FieldMemOperand(scratch, Cell::kValueOffset));
__ LoadRoot(at, Heap::kTheHoleValueRootIndex);
@@ -296,7 +296,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());
@@ -346,7 +346,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 &&
@@ -378,7 +378,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;
@@ -447,7 +447,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);
@@ -467,12 +467,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()) {
@@ -521,7 +521,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;
@@ -576,7 +576,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);
@@ -605,7 +605,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);
@@ -630,18 +630,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.
__ Dsubu(sp, sp, Operand((argc + 1) * kPointerSize));
__ sd(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));
__ sd(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;
@@ -718,8 +718,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.
@@ -740,7 +740,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()));
@@ -748,10 +748,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);
@@ -810,7 +810,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);
@@ -851,10 +851,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();
@@ -912,9 +912,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);
@@ -953,8 +953,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
@@ -978,7 +978,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
@@ -1131,7 +1131,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, a4, a5 };
return registers;
}
@@ -1238,7 +1238,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();
@@ -1253,14 +1253,14 @@ Handle<Code> PropertyICCompiler::CompilePolymorphic(TypeHandleList* types,
// Separate compare from branch, to provide path for above JumpIfSmi().
__ Dsubu(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()));
@@ -1323,12 +1323,12 @@ 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(a6, key, &miss);
__ ld(a4, FieldMemOperand(receiver, JSObject::kElementsOffset));
- ASSERT(kSmiTagSize + kSmiShiftSize == 32);
+ DCHECK(kSmiTagSize + kSmiShiftSize == 32);
__ LoadFromNumberDictionary(&slow, a4, key, v0, a6, a3, a5);
__ Ret();
« no previous file with comments | « src/mips64/simulator-mips64.cc ('k') | src/mksnapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698