Commit fafa7635 authored by adamk's avatar adamk Committed by Commit bot

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}
parent 88724ec4
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment