OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 8499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8510 static double CurrentTimeValue(Isolate* isolate); | 8510 static double CurrentTimeValue(Isolate* isolate); |
8511 | 8511 |
8512 // Returns the date field with the specified index. | 8512 // Returns the date field with the specified index. |
8513 // See FieldIndex for the list of date fields. | 8513 // See FieldIndex for the list of date fields. |
8514 static Object* GetField(Object* date, Smi* index); | 8514 static Object* GetField(Object* date, Smi* index); |
8515 | 8515 |
8516 static Handle<Object> SetValue(Handle<JSDate> date, double v); | 8516 static Handle<Object> SetValue(Handle<JSDate> date, double v); |
8517 | 8517 |
8518 void SetValue(Object* value, bool is_value_nan); | 8518 void SetValue(Object* value, bool is_value_nan); |
8519 | 8519 |
8520 // ES6 section 20.3.4.45 Date.prototype [ @@toPrimitive ] | |
8521 static MUST_USE_RESULT MaybeHandle<Object> ToPrimitive( | |
8522 Handle<JSReceiver> receiver, Handle<Object> hint); | |
8523 | |
8524 // Dispatched behavior. | 8520 // Dispatched behavior. |
8525 DECLARE_PRINTER(JSDate) | 8521 DECLARE_PRINTER(JSDate) |
8526 DECLARE_VERIFIER(JSDate) | 8522 DECLARE_VERIFIER(JSDate) |
8527 | 8523 |
8528 // The order is important. It must be kept in sync with date macros | 8524 // The order is important. It must be kept in sync with date macros |
8529 // in macros.py. | 8525 // in macros.py. |
8530 enum FieldIndex { | 8526 enum FieldIndex { |
8531 kDateValue, | 8527 kDateValue, |
8532 kYear, | 8528 kYear, |
8533 kMonth, | 8529 kMonth, |
(...skipping 3219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11753 } | 11749 } |
11754 }; | 11750 }; |
11755 | 11751 |
11756 | 11752 |
11757 } // NOLINT, false-positive due to second-order macros. | 11753 } // NOLINT, false-positive due to second-order macros. |
11758 } // NOLINT, false-positive due to second-order macros. | 11754 } // NOLINT, false-positive due to second-order macros. |
11759 | 11755 |
11760 #include "src/objects/object-macros-undef.h" | 11756 #include "src/objects/object-macros-undef.h" |
11761 | 11757 |
11762 #endif // V8_OBJECTS_H_ | 11758 #endif // V8_OBJECTS_H_ |
OLD | NEW |