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

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

Issue 2041353003: [runtime] Deprecate RUNTIME_ASSERT from primitive ops. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed offline comment. 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 | « src/runtime/runtime-maths.cc ('k') | src/runtime/runtime-regexp.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-numbers.cc
diff --git a/src/runtime/runtime-numbers.cc b/src/runtime/runtime-numbers.cc
index 0317b0ca2f0bc95e2203a8eb24585d5088e18052..edd83bc5e80adb19b31ec41ff1dbe1a738658e54 100644
--- a/src/runtime/runtime-numbers.cc
+++ b/src/runtime/runtime-numbers.cc
@@ -17,7 +17,7 @@ RUNTIME_FUNCTION(Runtime_NumberToRadixString) {
HandleScope scope(isolate);
DCHECK(args.length() == 2);
CONVERT_SMI_ARG_CHECKED(radix, 1);
- RUNTIME_ASSERT(2 <= radix && radix <= 36);
+ CHECK(2 <= radix && radix <= 36);
// Fast case where the result is a one character string.
if (args[0]->IsSmi()) {
@@ -56,8 +56,8 @@ RUNTIME_FUNCTION(Runtime_NumberToFixed) {
CONVERT_DOUBLE_ARG_CHECKED(f_number, 1);
int f = FastD2IChecked(f_number);
// See DoubleToFixedCString for these constants:
- RUNTIME_ASSERT(f >= 0 && f <= 20);
- RUNTIME_ASSERT(!Double(value).IsSpecial());
+ CHECK(f >= 0 && f <= 20);
+ CHECK(!Double(value).IsSpecial());
char* str = DoubleToFixedCString(value, f);
Handle<String> result = isolate->factory()->NewStringFromAsciiChecked(str);
DeleteArray(str);
@@ -72,8 +72,8 @@ RUNTIME_FUNCTION(Runtime_NumberToExponential) {
CONVERT_DOUBLE_ARG_CHECKED(value, 0);
CONVERT_DOUBLE_ARG_CHECKED(f_number, 1);
int f = FastD2IChecked(f_number);
- RUNTIME_ASSERT(f >= -1 && f <= 20);
- RUNTIME_ASSERT(!Double(value).IsSpecial());
+ CHECK(f >= -1 && f <= 20);
+ CHECK(!Double(value).IsSpecial());
char* str = DoubleToExponentialCString(value, f);
Handle<String> result = isolate->factory()->NewStringFromAsciiChecked(str);
DeleteArray(str);
@@ -88,8 +88,8 @@ RUNTIME_FUNCTION(Runtime_NumberToPrecision) {
CONVERT_DOUBLE_ARG_CHECKED(value, 0);
CONVERT_DOUBLE_ARG_CHECKED(f_number, 1);
int f = FastD2IChecked(f_number);
- RUNTIME_ASSERT(f >= 1 && f <= 21);
- RUNTIME_ASSERT(!Double(value).IsSpecial());
+ CHECK(f >= 1 && f <= 21);
+ CHECK(!Double(value).IsSpecial());
char* str = DoubleToPrecisionCString(value, f);
Handle<String> result = isolate->factory()->NewStringFromAsciiChecked(str);
DeleteArray(str);
@@ -121,7 +121,7 @@ RUNTIME_FUNCTION(Runtime_StringParseInt) {
CONVERT_ARG_HANDLE_CHECKED(String, subject, 0);
CONVERT_NUMBER_CHECKED(int, radix, Int32, args[1]);
// Step 8.a. is already handled in the JS function.
- RUNTIME_ASSERT(radix == 0 || (2 <= radix && radix <= 36));
+ CHECK(radix == 0 || (2 <= radix && radix <= 36));
subject = String::Flatten(subject);
double value;
« no previous file with comments | « src/runtime/runtime-maths.cc ('k') | src/runtime/runtime-regexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698