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

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

Issue 2034063002: [runtime] Deprecate RUNTIME_ASSERT from atomics. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-runtime-assert-3
Patch Set: 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-futex.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-atomics.cc
diff --git a/src/runtime/runtime-atomics.cc b/src/runtime/runtime-atomics.cc
index dd309f7dd754e281df42efb7f8bde1dc11a9ec29..28a87418830cbcbdfc2bc097d3f1947dbadadcc1 100644
--- a/src/runtime/runtime-atomics.cc
+++ b/src/runtime/runtime-atomics.cc
@@ -354,8 +354,8 @@ RUNTIME_FUNCTION(Runtime_AtomicsCompareExchange) {
CONVERT_SIZE_ARG_CHECKED(index, 1);
CONVERT_NUMBER_ARG_HANDLE_CHECKED(oldobj, 2);
CONVERT_NUMBER_ARG_HANDLE_CHECKED(newobj, 3);
- RUNTIME_ASSERT(sta->GetBuffer()->is_shared());
- RUNTIME_ASSERT(index < NumberToSize(isolate, sta->length()));
+ CHECK(sta->GetBuffer()->is_shared());
+ CHECK_LT(index, NumberToSize(isolate, sta->length()));
uint8_t* source = static_cast<uint8_t*>(sta->GetBuffer()->backing_store()) +
NumberToSize(isolate, sta->byte_offset());
@@ -387,8 +387,8 @@ RUNTIME_FUNCTION(Runtime_AtomicsAdd) {
CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, sta, 0);
CONVERT_SIZE_ARG_CHECKED(index, 1);
CONVERT_NUMBER_ARG_HANDLE_CHECKED(value, 2);
- RUNTIME_ASSERT(sta->GetBuffer()->is_shared());
- RUNTIME_ASSERT(index < NumberToSize(isolate, sta->length()));
+ CHECK(sta->GetBuffer()->is_shared());
+ CHECK_LT(index, NumberToSize(isolate, sta->length()));
uint8_t* source = static_cast<uint8_t*>(sta->GetBuffer()->backing_store()) +
NumberToSize(isolate, sta->byte_offset());
@@ -419,8 +419,8 @@ RUNTIME_FUNCTION(Runtime_AtomicsSub) {
CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, sta, 0);
CONVERT_SIZE_ARG_CHECKED(index, 1);
CONVERT_NUMBER_ARG_HANDLE_CHECKED(value, 2);
- RUNTIME_ASSERT(sta->GetBuffer()->is_shared());
- RUNTIME_ASSERT(index < NumberToSize(isolate, sta->length()));
+ CHECK(sta->GetBuffer()->is_shared());
+ CHECK_LT(index, NumberToSize(isolate, sta->length()));
uint8_t* source = static_cast<uint8_t*>(sta->GetBuffer()->backing_store()) +
NumberToSize(isolate, sta->byte_offset());
@@ -451,8 +451,8 @@ RUNTIME_FUNCTION(Runtime_AtomicsAnd) {
CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, sta, 0);
CONVERT_SIZE_ARG_CHECKED(index, 1);
CONVERT_NUMBER_ARG_HANDLE_CHECKED(value, 2);
- RUNTIME_ASSERT(sta->GetBuffer()->is_shared());
- RUNTIME_ASSERT(index < NumberToSize(isolate, sta->length()));
+ CHECK(sta->GetBuffer()->is_shared());
+ CHECK_LT(index, NumberToSize(isolate, sta->length()));
uint8_t* source = static_cast<uint8_t*>(sta->GetBuffer()->backing_store()) +
NumberToSize(isolate, sta->byte_offset());
@@ -483,8 +483,8 @@ RUNTIME_FUNCTION(Runtime_AtomicsOr) {
CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, sta, 0);
CONVERT_SIZE_ARG_CHECKED(index, 1);
CONVERT_NUMBER_ARG_HANDLE_CHECKED(value, 2);
- RUNTIME_ASSERT(sta->GetBuffer()->is_shared());
- RUNTIME_ASSERT(index < NumberToSize(isolate, sta->length()));
+ CHECK(sta->GetBuffer()->is_shared());
+ CHECK_LT(index, NumberToSize(isolate, sta->length()));
uint8_t* source = static_cast<uint8_t*>(sta->GetBuffer()->backing_store()) +
NumberToSize(isolate, sta->byte_offset());
@@ -515,8 +515,8 @@ RUNTIME_FUNCTION(Runtime_AtomicsXor) {
CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, sta, 0);
CONVERT_SIZE_ARG_CHECKED(index, 1);
CONVERT_NUMBER_ARG_HANDLE_CHECKED(value, 2);
- RUNTIME_ASSERT(sta->GetBuffer()->is_shared());
- RUNTIME_ASSERT(index < NumberToSize(isolate, sta->length()));
+ CHECK(sta->GetBuffer()->is_shared());
+ CHECK_LT(index, NumberToSize(isolate, sta->length()));
uint8_t* source = static_cast<uint8_t*>(sta->GetBuffer()->backing_store()) +
NumberToSize(isolate, sta->byte_offset());
@@ -547,8 +547,8 @@ RUNTIME_FUNCTION(Runtime_AtomicsExchange) {
CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, sta, 0);
CONVERT_SIZE_ARG_CHECKED(index, 1);
CONVERT_NUMBER_ARG_HANDLE_CHECKED(value, 2);
- RUNTIME_ASSERT(sta->GetBuffer()->is_shared());
- RUNTIME_ASSERT(index < NumberToSize(isolate, sta->length()));
+ CHECK(sta->GetBuffer()->is_shared());
+ CHECK_LT(index, NumberToSize(isolate, sta->length()));
uint8_t* source = static_cast<uint8_t*>(sta->GetBuffer()->backing_store()) +
NumberToSize(isolate, sta->byte_offset());
« no previous file with comments | « no previous file | src/runtime/runtime-futex.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698