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

Unified Diff: src/objects.cc

Issue 2608143003: [builtins] Migrate more Date builtins to TurboFan builtins. (Closed)
Patch Set: Fix invalid @@toPrimitive. Created 3 years, 12 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/runtime/runtime.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 fb860a8f5bed924036568ef78e9b084235577e49..e6a2c113fd4e22ca22b8cfcfe967a2443691a187 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -19335,27 +19335,6 @@ void JSDate::SetValue(Object* value, bool is_value_nan) {
}
-// static
-MaybeHandle<Object> JSDate::ToPrimitive(Handle<JSReceiver> receiver,
- Handle<Object> hint) {
- Isolate* const isolate = receiver->GetIsolate();
- if (hint->IsString()) {
- Handle<String> hint_string = Handle<String>::cast(hint);
- if (hint_string->Equals(isolate->heap()->number_string())) {
- return JSReceiver::OrdinaryToPrimitive(receiver,
- OrdinaryToPrimitiveHint::kNumber);
- }
- if (hint_string->Equals(isolate->heap()->default_string()) ||
- hint_string->Equals(isolate->heap()->string_string())) {
- return JSReceiver::OrdinaryToPrimitive(receiver,
- OrdinaryToPrimitiveHint::kString);
- }
- }
- THROW_NEW_ERROR(isolate, NewTypeError(MessageTemplate::kInvalidHint, hint),
- Object);
-}
-
-
void JSDate::SetCachedFields(int64_t local_time_ms, DateCache* date_cache) {
int days = DateCache::DaysFromTime(local_time_ms);
int time_in_day_ms = DateCache::TimeInDay(local_time_ms, days);
« no previous file with comments | « src/objects.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698