OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1114 double HeapNumber::value() { | 1114 double HeapNumber::value() { |
1115 return READ_DOUBLE_FIELD(this, kValueOffset); | 1115 return READ_DOUBLE_FIELD(this, kValueOffset); |
1116 } | 1116 } |
1117 | 1117 |
1118 | 1118 |
1119 void HeapNumber::set_value(double value) { | 1119 void HeapNumber::set_value(double value) { |
1120 WRITE_DOUBLE_FIELD(this, kValueOffset, value); | 1120 WRITE_DOUBLE_FIELD(this, kValueOffset, value); |
1121 } | 1121 } |
1122 | 1122 |
1123 | 1123 |
| 1124 int HeapNumber::get_exponent() { |
| 1125 return ((READ_INT_FIELD(this, kExponentOffset) & kExponentMask) >> |
| 1126 kExponentShift) - kExponentBias; |
| 1127 } |
| 1128 |
| 1129 |
| 1130 int HeapNumber::get_sign() { |
| 1131 return READ_INT_FIELD(this, kExponentOffset) & kSignMask; |
| 1132 } |
| 1133 |
| 1134 |
1124 ACCESSORS(JSObject, properties, FixedArray, kPropertiesOffset) | 1135 ACCESSORS(JSObject, properties, FixedArray, kPropertiesOffset) |
1125 | 1136 |
1126 | 1137 |
1127 Array* JSObject::elements() { | 1138 Array* JSObject::elements() { |
1128 Object* array = READ_FIELD(this, kElementsOffset); | 1139 Object* array = READ_FIELD(this, kElementsOffset); |
1129 // In the assert below Dictionary is covered under FixedArray. | 1140 // In the assert below Dictionary is covered under FixedArray. |
1130 ASSERT(array->IsFixedArray() || array->IsPixelArray() || | 1141 ASSERT(array->IsFixedArray() || array->IsPixelArray() || |
1131 array->IsExternalArray()); | 1142 array->IsExternalArray()); |
1132 return reinterpret_cast<Array*>(array); | 1143 return reinterpret_cast<Array*>(array); |
1133 } | 1144 } |
(...skipping 1943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3077 #undef WRITE_INT_FIELD | 3088 #undef WRITE_INT_FIELD |
3078 #undef READ_SHORT_FIELD | 3089 #undef READ_SHORT_FIELD |
3079 #undef WRITE_SHORT_FIELD | 3090 #undef WRITE_SHORT_FIELD |
3080 #undef READ_BYTE_FIELD | 3091 #undef READ_BYTE_FIELD |
3081 #undef WRITE_BYTE_FIELD | 3092 #undef WRITE_BYTE_FIELD |
3082 | 3093 |
3083 | 3094 |
3084 } } // namespace v8::internal | 3095 } } // namespace v8::internal |
3085 | 3096 |
3086 #endif // V8_OBJECTS_INL_H_ | 3097 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |