OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 5295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5306 } | 5306 } |
5307 | 5307 |
5308 | 5308 |
5309 void JSArrayBuffer::set_backing_store(void* value, WriteBarrierMode mode) { | 5309 void JSArrayBuffer::set_backing_store(void* value, WriteBarrierMode mode) { |
5310 intptr_t ptr = reinterpret_cast<intptr_t>(value); | 5310 intptr_t ptr = reinterpret_cast<intptr_t>(value); |
5311 WRITE_INTPTR_FIELD(this, kBackingStoreOffset, ptr); | 5311 WRITE_INTPTR_FIELD(this, kBackingStoreOffset, ptr); |
5312 } | 5312 } |
5313 | 5313 |
5314 | 5314 |
5315 ACCESSORS(JSArrayBuffer, byte_length, Object, kByteLengthOffset) | 5315 ACCESSORS(JSArrayBuffer, byte_length, Object, kByteLengthOffset) |
| 5316 ACCESSORS_TO_SMI(JSArrayBuffer, flag, kFlagOffset) |
| 5317 |
| 5318 |
| 5319 bool JSArrayBuffer::is_external() { |
| 5320 return BooleanBit::get(flag(), kIsExternalBit); |
| 5321 } |
| 5322 |
| 5323 |
| 5324 void JSArrayBuffer::set_is_external(bool value) { |
| 5325 set_flag(BooleanBit::set(flag(), kIsExternalBit, value)); |
| 5326 } |
5316 | 5327 |
5317 | 5328 |
5318 ACCESSORS(JSTypedArray, buffer, Object, kBufferOffset) | 5329 ACCESSORS(JSTypedArray, buffer, Object, kBufferOffset) |
5319 ACCESSORS(JSTypedArray, byte_offset, Object, kByteOffsetOffset) | 5330 ACCESSORS(JSTypedArray, byte_offset, Object, kByteOffsetOffset) |
5320 ACCESSORS(JSTypedArray, byte_length, Object, kByteLengthOffset) | 5331 ACCESSORS(JSTypedArray, byte_length, Object, kByteLengthOffset) |
5321 ACCESSORS(JSTypedArray, length, Object, kLengthOffset) | 5332 ACCESSORS(JSTypedArray, length, Object, kLengthOffset) |
5322 | 5333 |
5323 | |
5324 ACCESSORS(JSRegExp, data, Object, kDataOffset) | 5334 ACCESSORS(JSRegExp, data, Object, kDataOffset) |
5325 | 5335 |
5326 | 5336 |
5327 JSRegExp::Type JSRegExp::TypeTag() { | 5337 JSRegExp::Type JSRegExp::TypeTag() { |
5328 Object* data = this->data(); | 5338 Object* data = this->data(); |
5329 if (data->IsUndefined()) return JSRegExp::NOT_COMPILED; | 5339 if (data->IsUndefined()) return JSRegExp::NOT_COMPILED; |
5330 Smi* smi = Smi::cast(FixedArray::cast(data)->get(kTagIndex)); | 5340 Smi* smi = Smi::cast(FixedArray::cast(data)->get(kTagIndex)); |
5331 return static_cast<JSRegExp::Type>(smi->value()); | 5341 return static_cast<JSRegExp::Type>(smi->value()); |
5332 } | 5342 } |
5333 | 5343 |
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6212 #undef WRITE_UINT32_FIELD | 6222 #undef WRITE_UINT32_FIELD |
6213 #undef READ_SHORT_FIELD | 6223 #undef READ_SHORT_FIELD |
6214 #undef WRITE_SHORT_FIELD | 6224 #undef WRITE_SHORT_FIELD |
6215 #undef READ_BYTE_FIELD | 6225 #undef READ_BYTE_FIELD |
6216 #undef WRITE_BYTE_FIELD | 6226 #undef WRITE_BYTE_FIELD |
6217 | 6227 |
6218 | 6228 |
6219 } } // namespace v8::internal | 6229 } } // namespace v8::internal |
6220 | 6230 |
6221 #endif // V8_OBJECTS_INL_H_ | 6231 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |