[runtime] Deprecate RUNTIME_ASSERT from atomics.
This removes explicit uses of the RUNTIME_ASSERT macro from some runtime function. The implicit ones in CONVERT_FOO_ARG_CHECKED will be addressed in a separate CL for all runtime modules at once. R=binji@chromium.org BUG=v8:5066 Review-Url: https://codereview.chromium.org/2034063002 Cr-Commit-Position: refs/heads/master@{#36810}
This commit is contained in:
parent
c91c396112
commit
21d7ec0569
@ -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());
|
||||
|
@ -24,10 +24,10 @@ RUNTIME_FUNCTION(Runtime_AtomicsFutexWait) {
|
||||
CONVERT_SIZE_ARG_CHECKED(index, 1);
|
||||
CONVERT_INT32_ARG_CHECKED(value, 2);
|
||||
CONVERT_DOUBLE_ARG_CHECKED(timeout, 3);
|
||||
RUNTIME_ASSERT(sta->GetBuffer()->is_shared());
|
||||
RUNTIME_ASSERT(index < NumberToSize(isolate, sta->length()));
|
||||
RUNTIME_ASSERT(sta->type() == kExternalInt32Array);
|
||||
RUNTIME_ASSERT(timeout == V8_INFINITY || !std::isnan(timeout));
|
||||
CHECK(sta->GetBuffer()->is_shared());
|
||||
CHECK_LT(index, NumberToSize(isolate, sta->length()));
|
||||
CHECK_EQ(sta->type(), kExternalInt32Array);
|
||||
CHECK(timeout == V8_INFINITY || !std::isnan(timeout));
|
||||
|
||||
Handle<JSArrayBuffer> array_buffer = sta->GetBuffer();
|
||||
size_t addr = (index << 2) + NumberToSize(isolate, sta->byte_offset());
|
||||
@ -42,9 +42,9 @@ RUNTIME_FUNCTION(Runtime_AtomicsFutexWake) {
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, sta, 0);
|
||||
CONVERT_SIZE_ARG_CHECKED(index, 1);
|
||||
CONVERT_INT32_ARG_CHECKED(count, 2);
|
||||
RUNTIME_ASSERT(sta->GetBuffer()->is_shared());
|
||||
RUNTIME_ASSERT(index < NumberToSize(isolate, sta->length()));
|
||||
RUNTIME_ASSERT(sta->type() == kExternalInt32Array);
|
||||
CHECK(sta->GetBuffer()->is_shared());
|
||||
CHECK_LT(index, NumberToSize(isolate, sta->length()));
|
||||
CHECK_EQ(sta->type(), kExternalInt32Array);
|
||||
|
||||
Handle<JSArrayBuffer> array_buffer = sta->GetBuffer();
|
||||
size_t addr = (index << 2) + NumberToSize(isolate, sta->byte_offset());
|
||||
@ -61,10 +61,10 @@ RUNTIME_FUNCTION(Runtime_AtomicsFutexWakeOrRequeue) {
|
||||
CONVERT_INT32_ARG_CHECKED(count, 2);
|
||||
CONVERT_INT32_ARG_CHECKED(value, 3);
|
||||
CONVERT_SIZE_ARG_CHECKED(index2, 4);
|
||||
RUNTIME_ASSERT(sta->GetBuffer()->is_shared());
|
||||
RUNTIME_ASSERT(index1 < NumberToSize(isolate, sta->length()));
|
||||
RUNTIME_ASSERT(index2 < NumberToSize(isolate, sta->length()));
|
||||
RUNTIME_ASSERT(sta->type() == kExternalInt32Array);
|
||||
CHECK(sta->GetBuffer()->is_shared());
|
||||
CHECK_LT(index1, NumberToSize(isolate, sta->length()));
|
||||
CHECK_LT(index2, NumberToSize(isolate, sta->length()));
|
||||
CHECK_EQ(sta->type(), kExternalInt32Array);
|
||||
|
||||
Handle<JSArrayBuffer> array_buffer = sta->GetBuffer();
|
||||
size_t addr1 = (index1 << 2) + NumberToSize(isolate, sta->byte_offset());
|
||||
@ -80,9 +80,9 @@ RUNTIME_FUNCTION(Runtime_AtomicsFutexNumWaitersForTesting) {
|
||||
DCHECK(args.length() == 2);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, sta, 0);
|
||||
CONVERT_SIZE_ARG_CHECKED(index, 1);
|
||||
RUNTIME_ASSERT(sta->GetBuffer()->is_shared());
|
||||
RUNTIME_ASSERT(index < NumberToSize(isolate, sta->length()));
|
||||
RUNTIME_ASSERT(sta->type() == kExternalInt32Array);
|
||||
CHECK(sta->GetBuffer()->is_shared());
|
||||
CHECK_LT(index, NumberToSize(isolate, sta->length()));
|
||||
CHECK_EQ(sta->type(), kExternalInt32Array);
|
||||
|
||||
Handle<JSArrayBuffer> array_buffer = sta->GetBuffer();
|
||||
size_t addr = (index << 2) + NumberToSize(isolate, sta->byte_offset());
|
||||
|
Loading…
Reference in New Issue
Block a user