Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 023caa5ddf93f7a2fdf595121a0581553a23440f..179def457e474a35a4b369ae85a97b4891a27a92 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -1000,6 +1000,11 @@ bool Object::IsTheHole() { |
} |
+bool Object::IsException() { |
+ return IsOddball() && Oddball::cast(this)->kind() == Oddball::kException; |
+} |
+ |
+ |
bool Object::IsUninitialized() { |
return IsOddball() && Oddball::cast(this)->kind() == Oddball::kUninitialized; |
} |
@@ -1046,20 +1051,6 @@ Handle<Object> Object::ToSmi(Isolate* isolate, Handle<Object> object) { |
} |
-// TODO(ishell): Use handlified version instead. |
-MaybeObject* Object::ToSmi() { |
- if (IsSmi()) return this; |
- if (IsHeapNumber()) { |
- double value = HeapNumber::cast(this)->value(); |
- int int_value = FastD2I(value); |
- if (value == FastI2D(int_value) && Smi::IsValid(int_value)) { |
- return Smi::FromInt(int_value); |
- } |
- } |
- return Failure::Exception(); |
-} |
- |
- |
MaybeHandle<JSReceiver> Object::ToObject(Isolate* isolate, |
Handle<Object> object) { |
return ToObject( |