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

Unified Diff: src/objects.cc

Issue 1756413003: [runtime] Rename IsUndetectableObject to IsUndetectable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 1100adb3fc98d2bee567ea5ed65e78ed7d96d219..65255b29efc7773741dab230cf59b390e658f8a2 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -218,7 +218,7 @@ bool Object::BooleanValue() {
if (IsBoolean()) return IsTrue();
if (IsSmi()) return Smi::cast(this)->value() != 0;
if (IsUndefined() || IsNull()) return false;
- if (IsUndetectableObject()) return false; // Undetectable object is false.
+ if (IsUndetectable()) return false; // Undetectable object is false.
if (IsString()) return String::cast(this)->length() != 0;
if (IsHeapNumber()) return HeapNumber::cast(this)->HeapNumberBooleanValue();
return true;
@@ -292,7 +292,7 @@ Maybe<bool> Object::Equals(Handle<Object> x, Handle<Object> y) {
return Just(NumberEquals(*x, Handle<Oddball>::cast(y)->to_number()));
} else if (y->IsString()) {
return Just(NumberEquals(x, String::ToNumber(Handle<String>::cast(y))));
- } else if (y->IsJSReceiver() && !y->IsUndetectableObject()) {
+ } else if (y->IsJSReceiver() && !y->IsUndetectable()) {
if (!JSReceiver::ToPrimitive(Handle<JSReceiver>::cast(y))
.ToHandle(&y)) {
return Nothing<bool>();
@@ -310,7 +310,7 @@ Maybe<bool> Object::Equals(Handle<Object> x, Handle<Object> y) {
} else if (y->IsBoolean()) {
x = String::ToNumber(Handle<String>::cast(x));
return Just(NumberEquals(*x, Handle<Oddball>::cast(y)->to_number()));
- } else if (y->IsJSReceiver() && !y->IsUndetectableObject()) {
+ } else if (y->IsJSReceiver() && !y->IsUndetectable()) {
if (!JSReceiver::ToPrimitive(Handle<JSReceiver>::cast(y))
.ToHandle(&y)) {
return Nothing<bool>();
@@ -326,7 +326,7 @@ Maybe<bool> Object::Equals(Handle<Object> x, Handle<Object> y) {
} else if (y->IsString()) {
y = String::ToNumber(Handle<String>::cast(y));
return Just(NumberEquals(Handle<Oddball>::cast(x)->to_number(), *y));
- } else if (y->IsJSReceiver() && !y->IsUndetectableObject()) {
+ } else if (y->IsJSReceiver() && !y->IsUndetectable()) {
if (!JSReceiver::ToPrimitive(Handle<JSReceiver>::cast(y))
.ToHandle(&y)) {
return Nothing<bool>();
@@ -338,7 +338,7 @@ Maybe<bool> Object::Equals(Handle<Object> x, Handle<Object> y) {
} else if (x->IsSymbol()) {
if (y->IsSymbol()) {
return Just(x.is_identical_to(y));
- } else if (y->IsJSReceiver() && !y->IsUndetectableObject()) {
+ } else if (y->IsJSReceiver() && !y->IsUndetectable()) {
if (!JSReceiver::ToPrimitive(Handle<JSReceiver>::cast(y))
.ToHandle(&y)) {
return Nothing<bool>();
@@ -350,7 +350,7 @@ Maybe<bool> Object::Equals(Handle<Object> x, Handle<Object> y) {
if (y->IsSimd128Value()) {
return Just(Simd128Value::Equals(Handle<Simd128Value>::cast(x),
Handle<Simd128Value>::cast(y)));
- } else if (y->IsJSReceiver() && !y->IsUndetectableObject()) {
+ } else if (y->IsJSReceiver() && !y->IsUndetectable()) {
if (!JSReceiver::ToPrimitive(Handle<JSReceiver>::cast(y))
.ToHandle(&y)) {
return Nothing<bool>();
@@ -358,7 +358,7 @@ Maybe<bool> Object::Equals(Handle<Object> x, Handle<Object> y) {
} else {
return Just(false);
}
- } else if (x->IsJSReceiver() && !x->IsUndetectableObject()) {
+ } else if (x->IsJSReceiver() && !x->IsUndetectable()) {
if (y->IsJSReceiver()) {
return Just(x.is_identical_to(y));
} else if (y->IsNull() || y->IsUndefined()) {
@@ -370,9 +370,7 @@ Maybe<bool> Object::Equals(Handle<Object> x, Handle<Object> y) {
return Nothing<bool>();
}
} else {
- return Just(
- (x->IsNull() || x->IsUndefined() || x->IsUndetectableObject()) &&
Michael Achenbach 2016/03/03 08:07:06 This change is rubber-stamped.
Benedikt Meurer 2016/03/03 08:09:44 This is the same change that Toon did earlier for
- (y->IsNull() || y->IsUndefined() || y->IsUndetectableObject()));
+ return Just(x->IsUndetectable() && y->IsUndetectable());
}
}
}
@@ -397,7 +395,7 @@ bool Object::StrictEquals(Object* that) {
Handle<String> Object::TypeOf(Isolate* isolate, Handle<Object> object) {
if (object->IsNumber()) return isolate->factory()->number_string();
if (object->IsOddball()) return handle(Oddball::cast(*object)->type_of());
- if (object->IsUndetectableObject()) {
+ if (object->IsUndetectable()) {
return isolate->factory()->undefined_string();
}
if (object->IsString()) return isolate->factory()->string_string();
@@ -1934,7 +1932,7 @@ void JSObject::JSObjectShortPrint(StringStream* accumulator) {
break;
}
// All other JSObjects are rather similar to each other (JSObject,
- // JSGlobalProxy, JSGlobalObject, JSUndetectableObject, JSValue).
+ // JSGlobalProxy, JSGlobalObject, JSUndetectable, JSValue).
default: {
Map* map_of_this = map();
Heap* heap = GetHeap();
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698