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

Unified Diff: src/objects-inl.h

Issue 2587373002: Revert of [runtime] Add fast-paths for common conversion methods (Closed)
Patch Set: Created 4 years 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.cc ('k') | src/regexp/regexp-utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index ece40a5e38b12e20d0ce83f655cf97cea046533c..e3b47427e38251435c4d4ab36f7498d7ec34029b 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -1102,13 +1102,6 @@
}
// static
-MaybeHandle<Object> Object::ToPropertyKey(Isolate* isolate,
- Handle<Object> value) {
- if (value->IsSmi() || HeapObject::cast(*value)->IsName()) return value;
- return ConvertToPropertyKey(isolate, value);
-}
-
-// static
MaybeHandle<Object> Object::ToPrimitive(Handle<Object> input,
ToPrimitiveHint hint) {
if (input->IsPrimitive()) return input;
@@ -1143,22 +1136,6 @@
MaybeHandle<String> Object::ToString(Isolate* isolate, Handle<Object> input) {
if (input->IsString()) return Handle<String>::cast(input);
return ConvertToString(isolate, input);
-}
-
-// static
-MaybeHandle<Object> Object::ToLength(Isolate* isolate, Handle<Object> input) {
- if (input->IsSmi()) {
- int value = std::max(Smi::cast(*input)->value(), 0);
- return handle(Smi::FromInt(value), isolate);
- }
- return ConvertToLength(isolate, input);
-}
-
-// static
-MaybeHandle<Object> Object::ToIndex(Isolate* isolate, Handle<Object> input,
- MessageTemplate::Template error_index) {
- if (input->IsSmi() && Smi::cast(*input)->value() >= 0) return input;
- return ConvertToIndex(isolate, input, error_index);
}
bool Object::HasSpecificClassOf(String* name) {
« no previous file with comments | « src/objects.cc ('k') | src/regexp/regexp-utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698