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

Unified Diff: src/objects.h

Issue 1556333002: [runtime] Migrate several Date builtins to C++. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments Created 4 years, 11 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/js/date.js ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 9b235d5c7a64e258d5c770829e9021d56a953cad..bf40d54ba62bd3bebbd610270652f926ba9a09cc 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -1967,6 +1967,10 @@ class JSReceiver: public HeapObject {
// caching.
class JSObject: public JSReceiver {
public:
+ static MUST_USE_RESULT MaybeHandle<JSObject> New(
+ Handle<JSFunction> constructor, Handle<JSReceiver> new_target,
+ Handle<AllocationSite> site = Handle<AllocationSite>::null());
+
// [properties]: Backing storage for properties.
// properties is a FixedArray in the fast case and a Dictionary in the
// slow case.
@@ -7530,6 +7534,10 @@ class DateCache;
// Representation for JS date objects.
class JSDate: public JSObject {
public:
+ static MUST_USE_RESULT MaybeHandle<JSDate> New(Handle<JSFunction> constructor,
+ Handle<JSReceiver> new_target,
+ double tv);
+
// If one component is NaN, all of them are, indicating a NaN time value.
// [value]: the time value.
DECL_ACCESSORS(value, Object)
@@ -7553,6 +7561,9 @@ class JSDate: public JSObject {
DECLARE_CAST(JSDate)
+ // Returns the time value (UTC) identifying the current time.
+ static double CurrentTimeValue(Isolate* isolate);
+
// Returns the date field with the specified index.
// See FieldIndex for the list of date fields.
static Object* GetField(Object* date, Smi* index);
« no previous file with comments | « src/js/date.js ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698