| Index: src/runtime/runtime-regexp.cc
|
| diff --git a/src/runtime/runtime-regexp.cc b/src/runtime/runtime-regexp.cc
|
| index e7d169a067d3baf66b0016f650ff9c151eb6e5cf..6c0c079b801caed940ceaae27e0ea2cccf07b8f9 100644
|
| --- a/src/runtime/runtime-regexp.cc
|
| +++ b/src/runtime/runtime-regexp.cc
|
| @@ -685,7 +685,7 @@ Object* StringReplaceGlobalRegExpWithStringHelper(
|
|
|
| RUNTIME_FUNCTION(Runtime_StringReplaceGlobalRegExpWithString) {
|
| HandleScope scope(isolate);
|
| - DCHECK(args.length() == 4);
|
| + DCHECK_EQ(4, args.length());
|
|
|
| CONVERT_ARG_HANDLE_CHECKED(String, subject, 0);
|
| CONVERT_ARG_HANDLE_CHECKED(String, replacement, 2);
|
| @@ -698,7 +698,7 @@ RUNTIME_FUNCTION(Runtime_StringReplaceGlobalRegExpWithString) {
|
|
|
| RUNTIME_FUNCTION(Runtime_StringSplit) {
|
| HandleScope handle_scope(isolate);
|
| - DCHECK(args.length() == 3);
|
| + DCHECK_EQ(3, args.length());
|
| CONVERT_ARG_HANDLE_CHECKED(String, subject, 0);
|
| CONVERT_ARG_HANDLE_CHECKED(String, pattern, 1);
|
| CONVERT_NUMBER_CHECKED(uint32_t, limit, Uint32, args[2]);
|
| @@ -781,7 +781,7 @@ RUNTIME_FUNCTION(Runtime_StringSplit) {
|
| // RegExpCreate ( P, F )
|
| RUNTIME_FUNCTION(Runtime_RegExpCreate) {
|
| HandleScope scope(isolate);
|
| - DCHECK(args.length() == 1);
|
| + DCHECK_EQ(1, args.length());
|
| CONVERT_ARG_HANDLE_CHECKED(Object, source_object, 0);
|
|
|
| Handle<String> source;
|
| @@ -806,7 +806,7 @@ RUNTIME_FUNCTION(Runtime_RegExpCreate) {
|
|
|
| RUNTIME_FUNCTION(Runtime_RegExpExec) {
|
| HandleScope scope(isolate);
|
| - DCHECK(args.length() == 4);
|
| + DCHECK_EQ(4, args.length());
|
| CONVERT_ARG_HANDLE_CHECKED(JSRegExp, regexp, 0);
|
| CONVERT_ARG_HANDLE_CHECKED(String, subject, 1);
|
| CONVERT_INT32_ARG_CHECKED(index, 2);
|
| @@ -822,7 +822,7 @@ RUNTIME_FUNCTION(Runtime_RegExpExec) {
|
|
|
| RUNTIME_FUNCTION(Runtime_RegExpInternalReplace) {
|
| HandleScope scope(isolate);
|
| - DCHECK(args.length() == 3);
|
| + DCHECK_EQ(3, args.length());
|
| CONVERT_ARG_HANDLE_CHECKED(JSRegExp, regexp, 0);
|
| CONVERT_ARG_HANDLE_CHECKED(String, subject, 1);
|
| CONVERT_ARG_HANDLE_CHECKED(String, replacement, 2);
|
| @@ -1237,7 +1237,7 @@ MUST_USE_RESULT MaybeHandle<String> RegExpReplace(Isolate* isolate,
|
| // This is only called for StringReplaceGlobalRegExpWithFunction.
|
| RUNTIME_FUNCTION(Runtime_RegExpExecMultiple) {
|
| HandleScope handles(isolate);
|
| - DCHECK(args.length() == 4);
|
| + DCHECK_EQ(4, args.length());
|
|
|
| CONVERT_ARG_HANDLE_CHECKED(JSRegExp, regexp, 0);
|
| CONVERT_ARG_HANDLE_CHECKED(String, subject, 1);
|
| @@ -1259,7 +1259,7 @@ RUNTIME_FUNCTION(Runtime_RegExpExecMultiple) {
|
|
|
| RUNTIME_FUNCTION(Runtime_StringReplaceNonGlobalRegExpWithFunction) {
|
| HandleScope scope(isolate);
|
| - DCHECK(args.length() == 3);
|
| + DCHECK_EQ(3, args.length());
|
|
|
| CONVERT_ARG_HANDLE_CHECKED(String, subject, 0);
|
| CONVERT_ARG_HANDLE_CHECKED(JSRegExp, regexp, 1);
|
| @@ -1336,7 +1336,7 @@ Handle<JSArray> NewJSArrayWithElements(Isolate* isolate,
|
| // RegExp.prototype [ @@split ] ( string, limit )
|
| RUNTIME_FUNCTION(Runtime_RegExpSplit) {
|
| HandleScope scope(isolate);
|
| - DCHECK(args.length() == 3);
|
| + DCHECK_EQ(3, args.length());
|
|
|
| DCHECK(args[1]->IsString());
|
|
|
| @@ -1490,7 +1490,7 @@ RUNTIME_FUNCTION(Runtime_RegExpSplit) {
|
| // RegExp.prototype [ @@replace ] ( string, replaceValue )
|
| RUNTIME_FUNCTION(Runtime_RegExpReplace) {
|
| HandleScope scope(isolate);
|
| - DCHECK(args.length() == 3);
|
| + DCHECK_EQ(3, args.length());
|
|
|
| CONVERT_ARG_HANDLE_CHECKED(JSReceiver, recv, 0);
|
| CONVERT_ARG_HANDLE_CHECKED(String, string, 1);
|
| @@ -1657,7 +1657,7 @@ RUNTIME_FUNCTION(Runtime_RegExpReplace) {
|
|
|
| RUNTIME_FUNCTION(Runtime_RegExpExecReThrow) {
|
| SealHandleScope shs(isolate);
|
| - DCHECK(args.length() == 4);
|
| + DCHECK_EQ(4, args.length());
|
| Object* exception = isolate->pending_exception();
|
| isolate->clear_pending_exception();
|
| return isolate->ReThrow(exception);
|
| @@ -1665,7 +1665,7 @@ RUNTIME_FUNCTION(Runtime_RegExpExecReThrow) {
|
|
|
| RUNTIME_FUNCTION(Runtime_RegExpInitializeAndCompile) {
|
| HandleScope scope(isolate);
|
| - DCHECK(args.length() == 3);
|
| + DCHECK_EQ(3, args.length());
|
| CONVERT_ARG_HANDLE_CHECKED(JSRegExp, regexp, 0);
|
| CONVERT_ARG_HANDLE_CHECKED(String, source, 1);
|
| CONVERT_ARG_HANDLE_CHECKED(String, flags, 2);
|
| @@ -1678,7 +1678,7 @@ RUNTIME_FUNCTION(Runtime_RegExpInitializeAndCompile) {
|
|
|
| RUNTIME_FUNCTION(Runtime_IsRegExp) {
|
| SealHandleScope shs(isolate);
|
| - DCHECK(args.length() == 1);
|
| + DCHECK_EQ(1, args.length());
|
| CONVERT_ARG_CHECKED(Object, obj, 0);
|
| return isolate->heap()->ToBoolean(obj->IsJSRegExp());
|
| }
|
|
|