OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 // Review notes: | 5 // Review notes: |
6 // | 6 // |
7 // - The use of macros in these inline functions may seem superfluous | 7 // - The use of macros in these inline functions may seem superfluous |
8 // but it is absolutely needed to make sure gcc generates optimal | 8 // but it is absolutely needed to make sure gcc generates optimal |
9 // code. gcc is not happy when attempting to inline too deep. | 9 // code. gcc is not happy when attempting to inline too deep. |
10 // | 10 // |
(...skipping 1923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1934 double Oddball::to_number_raw() const { | 1934 double Oddball::to_number_raw() const { |
1935 return READ_DOUBLE_FIELD(this, kToNumberRawOffset); | 1935 return READ_DOUBLE_FIELD(this, kToNumberRawOffset); |
1936 } | 1936 } |
1937 | 1937 |
1938 void Oddball::set_to_number_raw(double value) { | 1938 void Oddball::set_to_number_raw(double value) { |
1939 WRITE_DOUBLE_FIELD(this, kToNumberRawOffset, value); | 1939 WRITE_DOUBLE_FIELD(this, kToNumberRawOffset, value); |
1940 } | 1940 } |
1941 | 1941 |
1942 ACCESSORS(Oddball, to_string, String, kToStringOffset) | 1942 ACCESSORS(Oddball, to_string, String, kToStringOffset) |
1943 ACCESSORS(Oddball, to_number, Object, kToNumberOffset) | 1943 ACCESSORS(Oddball, to_number, Object, kToNumberOffset) |
1944 ACCESSORS(Oddball, to_boolean, Oddball, kToBooleanOffset) | |
1945 ACCESSORS(Oddball, type_of, String, kTypeOfOffset) | 1944 ACCESSORS(Oddball, type_of, String, kTypeOfOffset) |
1946 | 1945 |
1947 | 1946 |
1948 byte Oddball::kind() const { | 1947 byte Oddball::kind() const { |
1949 return Smi::cast(READ_FIELD(this, kKindOffset))->value(); | 1948 return Smi::cast(READ_FIELD(this, kKindOffset))->value(); |
1950 } | 1949 } |
1951 | 1950 |
1952 | 1951 |
1953 void Oddball::set_kind(byte value) { | 1952 void Oddball::set_kind(byte value) { |
1954 WRITE_FIELD(this, kKindOffset, Smi::FromInt(value)); | 1953 WRITE_FIELD(this, kKindOffset, Smi::FromInt(value)); |
(...skipping 6163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8118 #undef WRITE_INT64_FIELD | 8117 #undef WRITE_INT64_FIELD |
8119 #undef READ_BYTE_FIELD | 8118 #undef READ_BYTE_FIELD |
8120 #undef WRITE_BYTE_FIELD | 8119 #undef WRITE_BYTE_FIELD |
8121 #undef NOBARRIER_READ_BYTE_FIELD | 8120 #undef NOBARRIER_READ_BYTE_FIELD |
8122 #undef NOBARRIER_WRITE_BYTE_FIELD | 8121 #undef NOBARRIER_WRITE_BYTE_FIELD |
8123 | 8122 |
8124 } // namespace internal | 8123 } // namespace internal |
8125 } // namespace v8 | 8124 } // namespace v8 |
8126 | 8125 |
8127 #endif // V8_OBJECTS_INL_H_ | 8126 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |