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

Side by Side Diff: src/objects.h

Issue 2652553003: Access double fields in C++ as uint64_t fields to preserve signaling bit of a NaN. (Closed)
Patch Set: More fixes Created 3 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 unified diff | Download patch
« no previous file with comments | « src/heap/heap.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1818 matching lines...) Expand 10 before | Expand all | Expand 10 after
1829 1829
1830 1830
1831 // The HeapNumber class describes heap allocated numbers that cannot be 1831 // The HeapNumber class describes heap allocated numbers that cannot be
1832 // represented in a Smi (small integer) 1832 // represented in a Smi (small integer)
1833 class HeapNumber: public HeapObject { 1833 class HeapNumber: public HeapObject {
1834 public: 1834 public:
1835 // [value]: number value. 1835 // [value]: number value.
1836 inline double value() const; 1836 inline double value() const;
1837 inline void set_value(double value); 1837 inline void set_value(double value);
1838 1838
1839 inline uint64_t value_as_bits() const;
1840 inline void set_value_as_bits(uint64_t bits);
1841
1839 DECLARE_CAST(HeapNumber) 1842 DECLARE_CAST(HeapNumber)
1840 1843
1841 // Dispatched behavior. 1844 // Dispatched behavior.
1842 bool HeapNumberBooleanValue(); 1845 bool HeapNumberBooleanValue();
1843 1846
1844 V8_EXPORT_PRIVATE void HeapNumberPrint(std::ostream& os); // NOLINT 1847 V8_EXPORT_PRIVATE void HeapNumberPrint(std::ostream& os); // NOLINT
1845 DECLARE_VERIFIER(HeapNumber) 1848 DECLARE_VERIFIER(HeapNumber)
1846 1849
1847 inline int get_exponent(); 1850 inline int get_exponent();
1848 inline int get_sign(); 1851 inline int get_sign();
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
2501 int unused_property_fields, const char* reason); 2504 int unused_property_fields, const char* reason);
2502 2505
2503 inline bool IsUnboxedDoubleField(FieldIndex index); 2506 inline bool IsUnboxedDoubleField(FieldIndex index);
2504 2507
2505 // Access fast-case object properties at index. 2508 // Access fast-case object properties at index.
2506 static Handle<Object> FastPropertyAt(Handle<JSObject> object, 2509 static Handle<Object> FastPropertyAt(Handle<JSObject> object,
2507 Representation representation, 2510 Representation representation,
2508 FieldIndex index); 2511 FieldIndex index);
2509 inline Object* RawFastPropertyAt(FieldIndex index); 2512 inline Object* RawFastPropertyAt(FieldIndex index);
2510 inline double RawFastDoublePropertyAt(FieldIndex index); 2513 inline double RawFastDoublePropertyAt(FieldIndex index);
2514 inline uint64_t RawFastDoublePropertyAsBitsAt(FieldIndex index);
2511 2515
2512 inline void FastPropertyAtPut(FieldIndex index, Object* value); 2516 inline void FastPropertyAtPut(FieldIndex index, Object* value);
2513 inline void RawFastPropertyAtPut(FieldIndex index, Object* value); 2517 inline void RawFastPropertyAtPut(FieldIndex index, Object* value);
2514 inline void RawFastDoublePropertyAtPut(FieldIndex index, double value); 2518 inline void RawFastDoublePropertyAsBitsAtPut(FieldIndex index, uint64_t bits);
2515 inline void WriteToField(int descriptor, PropertyDetails details, 2519 inline void WriteToField(int descriptor, PropertyDetails details,
2516 Object* value); 2520 Object* value);
2517 2521
2518 // Access to in object properties. 2522 // Access to in object properties.
2519 inline int GetInObjectPropertyOffset(int index); 2523 inline int GetInObjectPropertyOffset(int index);
2520 inline Object* InObjectPropertyAt(int index); 2524 inline Object* InObjectPropertyAt(int index);
2521 inline Object* InObjectPropertyAtPut(int index, 2525 inline Object* InObjectPropertyAtPut(int index,
2522 Object* value, 2526 Object* value,
2523 WriteBarrierMode mode 2527 WriteBarrierMode mode
2524 = UPDATE_WRITE_BARRIER); 2528 = UPDATE_WRITE_BARRIER);
(...skipping 9188 matching lines...) Expand 10 before | Expand all | Expand 10 after
11713 } 11717 }
11714 }; 11718 };
11715 11719
11716 11720
11717 } // NOLINT, false-positive due to second-order macros. 11721 } // NOLINT, false-positive due to second-order macros.
11718 } // NOLINT, false-positive due to second-order macros. 11722 } // NOLINT, false-positive due to second-order macros.
11719 11723
11720 #include "src/objects/object-macros-undef.h" 11724 #include "src/objects/object-macros-undef.h"
11721 11725
11722 #endif // V8_OBJECTS_H_ 11726 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698