From fafa7635891d4d04f5003e15fa154b725ca53d0d Mon Sep 17 00:00:00 2001 From: adamk Date: Fri, 25 Mar 2016 14:54:31 -0700 Subject: [PATCH] Replace IS_OBJECT with IS_RECEIVER in regexp.js "IS_RECEIVER" used to be called "IS_SPEC_OBJECT", which might be a better name: it's what the spec means when it says "Type(O) is Object". R=littledan@chromium.org BUG=v8:4602 LOG=n Review URL: https://codereview.chromium.org/1838593002 Cr-Commit-Position: refs/heads/master@{#35075} --- src/js/regexp.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/js/regexp.js b/src/js/regexp.js index a1055b3dd5..6fdc06cfe7 100644 --- a/src/js/regexp.js +++ b/src/js/regexp.js @@ -271,7 +271,7 @@ function RegExpSubclassExec(regexp, string) { var exec = regexp.exec; if (IS_CALLABLE(exec)) { var result = %_Call(exec, regexp, string); - if (!IS_OBJECT(result) && !IS_NULL(result)) { + if (!IS_RECEIVER(result) && !IS_NULL(result)) { throw MakeTypeError(kInvalidRegExpExecResult); } return result; @@ -341,7 +341,7 @@ function RegExpTest(string) { // ES#sec-regexp.prototype.test RegExp.prototype.test ( S ) function RegExpSubclassTest(string) { - if (!IS_OBJECT(this)) { + if (!IS_RECEIVER(this)) { throw MakeTypeError(kIncompatibleMethodReceiver, 'RegExp.prototype.test', this); } @@ -552,7 +552,7 @@ function RegExpMatch(string) { // ES#sec-regexp.prototype-@@match // RegExp.prototype [ @@match ] ( string ) function RegExpSubclassMatch(string) { - if (!IS_OBJECT(this)) { + if (!IS_RECEIVER(this)) { throw MakeTypeError(kIncompatibleMethodReceiver, "RegExp.prototype.@@match", this); } @@ -863,7 +863,7 @@ function SetAdvancedStringIndex(regexp, string, unicode) { // ES#sec-regexp.prototype-@@replace // RegExp.prototype [ @@replace ] ( string, replaceValue ) function RegExpSubclassReplace(string, replace) { - if (!IS_OBJECT(this)) { + if (!IS_RECEIVER(this)) { throw MakeTypeError(kIncompatibleMethodReceiver, "RegExp.prototype.@@replace", this); } @@ -944,7 +944,7 @@ function RegExpSearch(string) { // ES#sec-regexp.prototype-@@search // RegExp.prototype [ @@search ] ( string ) function RegExpSubclassSearch(string) { - if (!IS_OBJECT(this)) { + if (!IS_RECEIVER(this)) { throw MakeTypeError(kIncompatibleMethodReceiver, "RegExp.prototype.@@search", this); }