Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index d6c60f1845e7b32f6ac9456fd4f6567fdce72233..c1e00842d69038834ce085857e297e82aa6b10f7 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -115,16 +115,6 @@ MaybeHandle<JSReceiver> Object::ToObject(Isolate* isolate, |
// static |
-MaybeHandle<Name> Object::ToName(Isolate* isolate, Handle<Object> input) { |
- ASSIGN_RETURN_ON_EXCEPTION( |
- isolate, input, Object::ToPrimitive(input, ToPrimitiveHint::kString), |
- Name); |
- if (input->IsName()) return Handle<Name>::cast(input); |
- return ToString(isolate, input); |
-} |
- |
- |
-// static |
MaybeHandle<Object> Object::ToNumber(Handle<Object> input) { |
while (true) { |
if (input->IsNumber()) { |
@@ -175,6 +165,16 @@ MaybeHandle<Object> Object::ToUint32(Isolate* isolate, Handle<Object> input) { |
// static |
+MaybeHandle<Name> Object::ConvertToName(Isolate* isolate, |
+ Handle<Object> input) { |
+ ASSIGN_RETURN_ON_EXCEPTION( |
+ isolate, input, Object::ToPrimitive(input, ToPrimitiveHint::kString), |
+ Name); |
+ if (input->IsName()) return Handle<Name>::cast(input); |
+ return ToString(isolate, input); |
+} |
+ |
+// static |
MaybeHandle<String> Object::ToString(Isolate* isolate, Handle<Object> input) { |
while (true) { |
if (input->IsString()) { |
@@ -892,26 +892,6 @@ bool Object::ToInt32(int32_t* value) { |
} |
-bool Object::ToUint32(uint32_t* value) { |
- if (IsSmi()) { |
- int num = Smi::cast(this)->value(); |
- if (num < 0) return false; |
- *value = static_cast<uint32_t>(num); |
- return true; |
- } |
- if (IsHeapNumber()) { |
- double num = HeapNumber::cast(this)->value(); |
- if (num < 0) return false; |
- uint32_t uint_value = FastD2UI(num); |
- if (FastUI2D(uint_value) == num) { |
- *value = uint_value; |
- return true; |
- } |
- } |
- return false; |
-} |
- |
- |
bool FunctionTemplateInfo::IsTemplateFor(Object* object) { |
if (!object->IsHeapObject()) return false; |
return IsTemplateFor(HeapObject::cast(object)->map()); |