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

Unified Diff: src/runtime/runtime-collections.cc

Issue 2045193002: [runtime] Deprecate RUNTIME_ASSERT from object ops. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. Created 4 years, 6 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 | « no previous file | src/runtime/runtime-compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-collections.cc
diff --git a/src/runtime/runtime-collections.cc b/src/runtime/runtime-collections.cc
index 8da822817eed1114901bbd0312f6c29a52c9c0ca..b25a5ef5c2f5a531bae09267200621b49a2638da 100644
--- a/src/runtime/runtime-collections.cc
+++ b/src/runtime/runtime-collections.cc
@@ -31,7 +31,7 @@ RUNTIME_FUNCTION(Runtime_JSCollectionGetTable) {
SealHandleScope shs(isolate);
DCHECK(args.length() == 1);
CONVERT_ARG_CHECKED(JSObject, object, 0);
- RUNTIME_ASSERT(object->IsJSSet() || object->IsJSMap());
+ CHECK(object->IsJSSet() || object->IsJSMap());
return static_cast<JSCollection*>(object)->table();
}
@@ -91,8 +91,8 @@ RUNTIME_FUNCTION(Runtime_SetIteratorInitialize) {
CONVERT_ARG_HANDLE_CHECKED(JSSetIterator, holder, 0);
CONVERT_ARG_HANDLE_CHECKED(JSSet, set, 1);
CONVERT_SMI_ARG_CHECKED(kind, 2)
- RUNTIME_ASSERT(kind == JSSetIterator::kKindValues ||
- kind == JSSetIterator::kKindEntries);
+ CHECK(kind == JSSetIterator::kKindValues ||
+ kind == JSSetIterator::kKindEntries);
Handle<OrderedHashSet> table(OrderedHashSet::cast(set->table()));
holder->set_table(*table);
holder->set_index(Smi::FromInt(0));
@@ -186,9 +186,9 @@ RUNTIME_FUNCTION(Runtime_MapIteratorInitialize) {
CONVERT_ARG_HANDLE_CHECKED(JSMapIterator, holder, 0);
CONVERT_ARG_HANDLE_CHECKED(JSMap, map, 1);
CONVERT_SMI_ARG_CHECKED(kind, 2)
- RUNTIME_ASSERT(kind == JSMapIterator::kKindKeys ||
- kind == JSMapIterator::kKindValues ||
- kind == JSMapIterator::kKindEntries);
+ CHECK(kind == JSMapIterator::kKindKeys ||
+ kind == JSMapIterator::kKindValues ||
+ kind == JSMapIterator::kKindEntries);
Handle<OrderedHashMap> table(OrderedHashMap::cast(map->table()));
holder->set_table(*table);
holder->set_index(Smi::FromInt(0));
@@ -232,7 +232,7 @@ RUNTIME_FUNCTION(Runtime_GetWeakMapEntries) {
DCHECK(args.length() == 2);
CONVERT_ARG_HANDLE_CHECKED(JSWeakCollection, holder, 0);
CONVERT_NUMBER_CHECKED(int, max_entries, Int32, args[1]);
- RUNTIME_ASSERT(max_entries >= 0);
+ CHECK(max_entries >= 0);
Handle<ObjectHashTable> table(ObjectHashTable::cast(holder->table()));
if (max_entries == 0 || max_entries > table->NumberOfElements()) {
@@ -286,10 +286,10 @@ RUNTIME_FUNCTION(Runtime_WeakCollectionGet) {
CONVERT_ARG_HANDLE_CHECKED(JSWeakCollection, weak_collection, 0);
CONVERT_ARG_HANDLE_CHECKED(Object, key, 1);
CONVERT_SMI_ARG_CHECKED(hash, 2)
- RUNTIME_ASSERT(key->IsJSReceiver() || key->IsSymbol());
+ CHECK(key->IsJSReceiver() || key->IsSymbol());
Handle<ObjectHashTable> table(
ObjectHashTable::cast(weak_collection->table()));
- RUNTIME_ASSERT(table->IsKey(isolate, *key));
+ CHECK(table->IsKey(isolate, *key));
Handle<Object> lookup(table->Lookup(key, hash), isolate);
return lookup->IsTheHole(isolate) ? isolate->heap()->undefined_value()
: *lookup;
@@ -302,10 +302,10 @@ RUNTIME_FUNCTION(Runtime_WeakCollectionHas) {
CONVERT_ARG_HANDLE_CHECKED(JSWeakCollection, weak_collection, 0);
CONVERT_ARG_HANDLE_CHECKED(Object, key, 1);
CONVERT_SMI_ARG_CHECKED(hash, 2)
- RUNTIME_ASSERT(key->IsJSReceiver() || key->IsSymbol());
+ CHECK(key->IsJSReceiver() || key->IsSymbol());
Handle<ObjectHashTable> table(
ObjectHashTable::cast(weak_collection->table()));
- RUNTIME_ASSERT(table->IsKey(isolate, *key));
+ CHECK(table->IsKey(isolate, *key));
Handle<Object> lookup(table->Lookup(key, hash), isolate);
return isolate->heap()->ToBoolean(!lookup->IsTheHole(isolate));
}
@@ -317,10 +317,10 @@ RUNTIME_FUNCTION(Runtime_WeakCollectionDelete) {
CONVERT_ARG_HANDLE_CHECKED(JSWeakCollection, weak_collection, 0);
CONVERT_ARG_HANDLE_CHECKED(Object, key, 1);
CONVERT_SMI_ARG_CHECKED(hash, 2)
- RUNTIME_ASSERT(key->IsJSReceiver() || key->IsSymbol());
+ CHECK(key->IsJSReceiver() || key->IsSymbol());
Handle<ObjectHashTable> table(
ObjectHashTable::cast(weak_collection->table()));
- RUNTIME_ASSERT(table->IsKey(isolate, *key));
+ CHECK(table->IsKey(isolate, *key));
bool was_present = JSWeakCollection::Delete(weak_collection, key, hash);
return isolate->heap()->ToBoolean(was_present);
}
@@ -331,12 +331,12 @@ RUNTIME_FUNCTION(Runtime_WeakCollectionSet) {
DCHECK(args.length() == 4);
CONVERT_ARG_HANDLE_CHECKED(JSWeakCollection, weak_collection, 0);
CONVERT_ARG_HANDLE_CHECKED(Object, key, 1);
- RUNTIME_ASSERT(key->IsJSReceiver() || key->IsSymbol());
+ CHECK(key->IsJSReceiver() || key->IsSymbol());
CONVERT_ARG_HANDLE_CHECKED(Object, value, 2);
CONVERT_SMI_ARG_CHECKED(hash, 3)
Handle<ObjectHashTable> table(
ObjectHashTable::cast(weak_collection->table()));
- RUNTIME_ASSERT(table->IsKey(isolate, *key));
+ CHECK(table->IsKey(isolate, *key));
JSWeakCollection::Set(weak_collection, key, value, hash);
return *weak_collection;
}
@@ -347,7 +347,7 @@ RUNTIME_FUNCTION(Runtime_GetWeakSetValues) {
DCHECK(args.length() == 2);
CONVERT_ARG_HANDLE_CHECKED(JSWeakCollection, holder, 0);
CONVERT_NUMBER_CHECKED(int, max_values, Int32, args[1]);
- RUNTIME_ASSERT(max_values >= 0);
+ CHECK(max_values >= 0);
Handle<ObjectHashTable> table(ObjectHashTable::cast(holder->table()));
if (max_values == 0 || max_values > table->NumberOfElements()) {
« no previous file with comments | « no previous file | src/runtime/runtime-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698