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

Unified Diff: src/factory.cc

Issue 2152693002: [stubs] Introduce NonPrimitiveToPrimitive builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments. Created 4 years, 5 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/factory.h ('k') | src/globals.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index 347ed38db28db5fda8b1a5f48d3e33ec23b94454..1208de275b52f549f82db378ac29d717e16565af 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -2382,6 +2382,18 @@ Handle<Object> Factory::ToBoolean(bool value) {
return value ? true_value() : false_value();
}
+Handle<String> Factory::ToPrimitiveHintString(ToPrimitiveHint hint) {
+ switch (hint) {
+ case ToPrimitiveHint::kDefault:
+ return default_string();
+ case ToPrimitiveHint::kNumber:
+ return number_string();
+ case ToPrimitiveHint::kString:
+ return string_string();
+ }
+ UNREACHABLE();
+ return Handle<String>::null();
+}
} // namespace internal
} // namespace v8
« no previous file with comments | « src/factory.h ('k') | src/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698