| 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 String::cast(this)->IsTwoByteRepresentation(); | 245 String::cast(this)->IsTwoByteRepresentation(); |
| 246 } | 246 } |
| 247 | 247 |
| 248 | 248 |
| 249 bool Object::IsExternalString() const { | 249 bool Object::IsExternalString() const { |
| 250 if (!IsString()) return false; | 250 if (!IsString()) return false; |
| 251 return StringShape(String::cast(this)).IsExternal(); | 251 return StringShape(String::cast(this)).IsExternal(); |
| 252 } | 252 } |
| 253 | 253 |
| 254 | 254 |
| 255 bool Object::IsExternalAsciiString() const { | 255 bool Object::IsExternalOneByteString() const { |
| 256 if (!IsString()) return false; | 256 if (!IsString()) return false; |
| 257 return StringShape(String::cast(this)).IsExternal() && | 257 return StringShape(String::cast(this)).IsExternal() && |
| 258 String::cast(this)->IsOneByteRepresentation(); | 258 String::cast(this)->IsOneByteRepresentation(); |
| 259 } | 259 } |
| 260 | 260 |
| 261 | 261 |
| 262 bool Object::IsExternalTwoByteString() const { | 262 bool Object::IsExternalTwoByteString() const { |
| 263 if (!IsString()) return false; | 263 if (!IsString()) return false; |
| 264 return StringShape(String::cast(this)).IsExternal() && | 264 return StringShape(String::cast(this)).IsExternal() && |
| 265 String::cast(this)->IsTwoByteRepresentation(); | 265 String::cast(this)->IsTwoByteRepresentation(); |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 } | 425 } |
| 426 | 426 |
| 427 | 427 |
| 428 STATIC_ASSERT((kStringRepresentationMask | kStringEncodingMask) == | 428 STATIC_ASSERT((kStringRepresentationMask | kStringEncodingMask) == |
| 429 Internals::kFullStringRepresentationMask); | 429 Internals::kFullStringRepresentationMask); |
| 430 | 430 |
| 431 STATIC_ASSERT(static_cast<uint32_t>(kStringEncodingMask) == | 431 STATIC_ASSERT(static_cast<uint32_t>(kStringEncodingMask) == |
| 432 Internals::kStringEncodingMask); | 432 Internals::kStringEncodingMask); |
| 433 | 433 |
| 434 | 434 |
| 435 bool StringShape::IsSequentialAscii() { | 435 bool StringShape::IsSequentialOneByte() { |
| 436 return full_representation_tag() == (kSeqStringTag | kOneByteStringTag); | 436 return full_representation_tag() == (kSeqStringTag | kOneByteStringTag); |
| 437 } | 437 } |
| 438 | 438 |
| 439 | 439 |
| 440 bool StringShape::IsSequentialTwoByte() { | 440 bool StringShape::IsSequentialTwoByte() { |
| 441 return full_representation_tag() == (kSeqStringTag | kTwoByteStringTag); | 441 return full_representation_tag() == (kSeqStringTag | kTwoByteStringTag); |
| 442 } | 442 } |
| 443 | 443 |
| 444 | 444 |
| 445 bool StringShape::IsExternalAscii() { | 445 bool StringShape::IsExternalOneByte() { |
| 446 return full_representation_tag() == (kExternalStringTag | kOneByteStringTag); | 446 return full_representation_tag() == (kExternalStringTag | kOneByteStringTag); |
| 447 } | 447 } |
| 448 | 448 |
| 449 | 449 |
| 450 STATIC_ASSERT((kExternalStringTag | kOneByteStringTag) == | 450 STATIC_ASSERT((kExternalStringTag | kOneByteStringTag) == |
| 451 Internals::kExternalAsciiRepresentationTag); | 451 Internals::kExternalOneByteRepresentationTag); |
| 452 | 452 |
| 453 STATIC_ASSERT(v8::String::ASCII_ENCODING == kOneByteStringTag); | 453 STATIC_ASSERT(v8::String::ONE_BYTE_ENCODING == kOneByteStringTag); |
| 454 | 454 |
| 455 | 455 |
| 456 bool StringShape::IsExternalTwoByte() { | 456 bool StringShape::IsExternalTwoByte() { |
| 457 return full_representation_tag() == (kExternalStringTag | kTwoByteStringTag); | 457 return full_representation_tag() == (kExternalStringTag | kTwoByteStringTag); |
| 458 } | 458 } |
| 459 | 459 |
| 460 | 460 |
| 461 STATIC_ASSERT((kExternalStringTag | kTwoByteStringTag) == | 461 STATIC_ASSERT((kExternalStringTag | kTwoByteStringTag) == |
| 462 Internals::kExternalTwoByteRepresentationTag); | 462 Internals::kExternalTwoByteRepresentationTag); |
| 463 | 463 |
| 464 STATIC_ASSERT(v8::String::TWO_BYTE_ENCODING == kTwoByteStringTag); | 464 STATIC_ASSERT(v8::String::TWO_BYTE_ENCODING == kTwoByteStringTag); |
| 465 | 465 |
| 466 uc32 FlatStringReader::Get(int index) { | 466 uc32 FlatStringReader::Get(int index) { |
| 467 DCHECK(0 <= index && index <= length_); | 467 DCHECK(0 <= index && index <= length_); |
| 468 if (is_ascii_) { | 468 if (is_one_byte_) { |
| 469 return static_cast<const byte*>(start_)[index]; | 469 return static_cast<const byte*>(start_)[index]; |
| 470 } else { | 470 } else { |
| 471 return static_cast<const uc16*>(start_)[index]; | 471 return static_cast<const uc16*>(start_)[index]; |
| 472 } | 472 } |
| 473 } | 473 } |
| 474 | 474 |
| 475 | 475 |
| 476 Handle<Object> StringTableShape::AsHandle(Isolate* isolate, HashTableKey* key) { | 476 Handle<Object> StringTableShape::AsHandle(Isolate* isolate, HashTableKey* key) { |
| 477 return key->AsHandle(isolate); | 477 return key->AsHandle(isolate); |
| 478 } | 478 } |
| (...skipping 2679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3158 CAST_ACCESSOR(Code) | 3158 CAST_ACCESSOR(Code) |
| 3159 CAST_ACCESSOR(CodeCacheHashTable) | 3159 CAST_ACCESSOR(CodeCacheHashTable) |
| 3160 CAST_ACCESSOR(CompilationCacheTable) | 3160 CAST_ACCESSOR(CompilationCacheTable) |
| 3161 CAST_ACCESSOR(ConsString) | 3161 CAST_ACCESSOR(ConsString) |
| 3162 CAST_ACCESSOR(ConstantPoolArray) | 3162 CAST_ACCESSOR(ConstantPoolArray) |
| 3163 CAST_ACCESSOR(DeoptimizationInputData) | 3163 CAST_ACCESSOR(DeoptimizationInputData) |
| 3164 CAST_ACCESSOR(DeoptimizationOutputData) | 3164 CAST_ACCESSOR(DeoptimizationOutputData) |
| 3165 CAST_ACCESSOR(DependentCode) | 3165 CAST_ACCESSOR(DependentCode) |
| 3166 CAST_ACCESSOR(DescriptorArray) | 3166 CAST_ACCESSOR(DescriptorArray) |
| 3167 CAST_ACCESSOR(ExternalArray) | 3167 CAST_ACCESSOR(ExternalArray) |
| 3168 CAST_ACCESSOR(ExternalAsciiString) | 3168 CAST_ACCESSOR(ExternalOneByteString) |
| 3169 CAST_ACCESSOR(ExternalFloat32Array) | 3169 CAST_ACCESSOR(ExternalFloat32Array) |
| 3170 CAST_ACCESSOR(ExternalFloat64Array) | 3170 CAST_ACCESSOR(ExternalFloat64Array) |
| 3171 CAST_ACCESSOR(ExternalInt16Array) | 3171 CAST_ACCESSOR(ExternalInt16Array) |
| 3172 CAST_ACCESSOR(ExternalInt32Array) | 3172 CAST_ACCESSOR(ExternalInt32Array) |
| 3173 CAST_ACCESSOR(ExternalInt8Array) | 3173 CAST_ACCESSOR(ExternalInt8Array) |
| 3174 CAST_ACCESSOR(ExternalString) | 3174 CAST_ACCESSOR(ExternalString) |
| 3175 CAST_ACCESSOR(ExternalTwoByteString) | 3175 CAST_ACCESSOR(ExternalTwoByteString) |
| 3176 CAST_ACCESSOR(ExternalUint16Array) | 3176 CAST_ACCESSOR(ExternalUint16Array) |
| 3177 CAST_ACCESSOR(ExternalUint32Array) | 3177 CAST_ACCESSOR(ExternalUint32Array) |
| 3178 CAST_ACCESSOR(ExternalUint8Array) | 3178 CAST_ACCESSOR(ExternalUint8Array) |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3359 DCHECK(index >= 0 && index < length()); | 3359 DCHECK(index >= 0 && index < length()); |
| 3360 switch (StringShape(this).full_representation_tag()) { | 3360 switch (StringShape(this).full_representation_tag()) { |
| 3361 case kSeqStringTag | kOneByteStringTag: | 3361 case kSeqStringTag | kOneByteStringTag: |
| 3362 return SeqOneByteString::cast(this)->SeqOneByteStringGet(index); | 3362 return SeqOneByteString::cast(this)->SeqOneByteStringGet(index); |
| 3363 case kSeqStringTag | kTwoByteStringTag: | 3363 case kSeqStringTag | kTwoByteStringTag: |
| 3364 return SeqTwoByteString::cast(this)->SeqTwoByteStringGet(index); | 3364 return SeqTwoByteString::cast(this)->SeqTwoByteStringGet(index); |
| 3365 case kConsStringTag | kOneByteStringTag: | 3365 case kConsStringTag | kOneByteStringTag: |
| 3366 case kConsStringTag | kTwoByteStringTag: | 3366 case kConsStringTag | kTwoByteStringTag: |
| 3367 return ConsString::cast(this)->ConsStringGet(index); | 3367 return ConsString::cast(this)->ConsStringGet(index); |
| 3368 case kExternalStringTag | kOneByteStringTag: | 3368 case kExternalStringTag | kOneByteStringTag: |
| 3369 return ExternalAsciiString::cast(this)->ExternalAsciiStringGet(index); | 3369 return ExternalOneByteString::cast(this)->ExternalOneByteStringGet(index); |
| 3370 case kExternalStringTag | kTwoByteStringTag: | 3370 case kExternalStringTag | kTwoByteStringTag: |
| 3371 return ExternalTwoByteString::cast(this)->ExternalTwoByteStringGet(index); | 3371 return ExternalTwoByteString::cast(this)->ExternalTwoByteStringGet(index); |
| 3372 case kSlicedStringTag | kOneByteStringTag: | 3372 case kSlicedStringTag | kOneByteStringTag: |
| 3373 case kSlicedStringTag | kTwoByteStringTag: | 3373 case kSlicedStringTag | kTwoByteStringTag: |
| 3374 return SlicedString::cast(this)->SlicedStringGet(index); | 3374 return SlicedString::cast(this)->SlicedStringGet(index); |
| 3375 default: | 3375 default: |
| 3376 break; | 3376 break; |
| 3377 } | 3377 } |
| 3378 | 3378 |
| 3379 UNREACHABLE(); | 3379 UNREACHABLE(); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3425 return NULL; | 3425 return NULL; |
| 3426 | 3426 |
| 3427 case kSeqStringTag | kTwoByteStringTag: | 3427 case kSeqStringTag | kTwoByteStringTag: |
| 3428 visitor->VisitTwoByteString( | 3428 visitor->VisitTwoByteString( |
| 3429 SeqTwoByteString::cast(string)->GetChars() + slice_offset, | 3429 SeqTwoByteString::cast(string)->GetChars() + slice_offset, |
| 3430 length - offset); | 3430 length - offset); |
| 3431 return NULL; | 3431 return NULL; |
| 3432 | 3432 |
| 3433 case kExternalStringTag | kOneByteStringTag: | 3433 case kExternalStringTag | kOneByteStringTag: |
| 3434 visitor->VisitOneByteString( | 3434 visitor->VisitOneByteString( |
| 3435 ExternalAsciiString::cast(string)->GetChars() + slice_offset, | 3435 ExternalOneByteString::cast(string)->GetChars() + slice_offset, |
| 3436 length - offset); | 3436 length - offset); |
| 3437 return NULL; | 3437 return NULL; |
| 3438 | 3438 |
| 3439 case kExternalStringTag | kTwoByteStringTag: | 3439 case kExternalStringTag | kTwoByteStringTag: |
| 3440 visitor->VisitTwoByteString( | 3440 visitor->VisitTwoByteString( |
| 3441 ExternalTwoByteString::cast(string)->GetChars() + slice_offset, | 3441 ExternalTwoByteString::cast(string)->GetChars() + slice_offset, |
| 3442 length - offset); | 3442 length - offset); |
| 3443 return NULL; | 3443 return NULL; |
| 3444 | 3444 |
| 3445 case kSlicedStringTag | kOneByteStringTag: | 3445 case kSlicedStringTag | kOneByteStringTag: |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3563 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kSecondOffset, value, mode); | 3563 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kSecondOffset, value, mode); |
| 3564 } | 3564 } |
| 3565 | 3565 |
| 3566 | 3566 |
| 3567 bool ExternalString::is_short() { | 3567 bool ExternalString::is_short() { |
| 3568 InstanceType type = map()->instance_type(); | 3568 InstanceType type = map()->instance_type(); |
| 3569 return (type & kShortExternalStringMask) == kShortExternalStringTag; | 3569 return (type & kShortExternalStringMask) == kShortExternalStringTag; |
| 3570 } | 3570 } |
| 3571 | 3571 |
| 3572 | 3572 |
| 3573 const ExternalAsciiString::Resource* ExternalAsciiString::resource() { | 3573 const ExternalOneByteString::Resource* ExternalOneByteString::resource() { |
| 3574 return *reinterpret_cast<Resource**>(FIELD_ADDR(this, kResourceOffset)); | 3574 return *reinterpret_cast<Resource**>(FIELD_ADDR(this, kResourceOffset)); |
| 3575 } | 3575 } |
| 3576 | 3576 |
| 3577 | 3577 |
| 3578 void ExternalAsciiString::update_data_cache() { | 3578 void ExternalOneByteString::update_data_cache() { |
| 3579 if (is_short()) return; | 3579 if (is_short()) return; |
| 3580 const char** data_field = | 3580 const char** data_field = |
| 3581 reinterpret_cast<const char**>(FIELD_ADDR(this, kResourceDataOffset)); | 3581 reinterpret_cast<const char**>(FIELD_ADDR(this, kResourceDataOffset)); |
| 3582 *data_field = resource()->data(); | 3582 *data_field = resource()->data(); |
| 3583 } | 3583 } |
| 3584 | 3584 |
| 3585 | 3585 |
| 3586 void ExternalAsciiString::set_resource( | 3586 void ExternalOneByteString::set_resource( |
| 3587 const ExternalAsciiString::Resource* resource) { | 3587 const ExternalOneByteString::Resource* resource) { |
| 3588 DCHECK(IsAligned(reinterpret_cast<intptr_t>(resource), kPointerSize)); | 3588 DCHECK(IsAligned(reinterpret_cast<intptr_t>(resource), kPointerSize)); |
| 3589 *reinterpret_cast<const Resource**>( | 3589 *reinterpret_cast<const Resource**>( |
| 3590 FIELD_ADDR(this, kResourceOffset)) = resource; | 3590 FIELD_ADDR(this, kResourceOffset)) = resource; |
| 3591 if (resource != NULL) update_data_cache(); | 3591 if (resource != NULL) update_data_cache(); |
| 3592 } | 3592 } |
| 3593 | 3593 |
| 3594 | 3594 |
| 3595 const uint8_t* ExternalAsciiString::GetChars() { | 3595 const uint8_t* ExternalOneByteString::GetChars() { |
| 3596 return reinterpret_cast<const uint8_t*>(resource()->data()); | 3596 return reinterpret_cast<const uint8_t*>(resource()->data()); |
| 3597 } | 3597 } |
| 3598 | 3598 |
| 3599 | 3599 |
| 3600 uint16_t ExternalAsciiString::ExternalAsciiStringGet(int index) { | 3600 uint16_t ExternalOneByteString::ExternalOneByteStringGet(int index) { |
| 3601 DCHECK(index >= 0 && index < length()); | 3601 DCHECK(index >= 0 && index < length()); |
| 3602 return GetChars()[index]; | 3602 return GetChars()[index]; |
| 3603 } | 3603 } |
| 3604 | 3604 |
| 3605 | 3605 |
| 3606 const ExternalTwoByteString::Resource* ExternalTwoByteString::resource() { | 3606 const ExternalTwoByteString::Resource* ExternalTwoByteString::resource() { |
| 3607 return *reinterpret_cast<Resource**>(FIELD_ADDR(this, kResourceOffset)); | 3607 return *reinterpret_cast<Resource**>(FIELD_ADDR(this, kResourceOffset)); |
| 3608 } | 3608 } |
| 3609 | 3609 |
| 3610 | 3610 |
| (...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4253 | 4253 |
| 4254 | 4254 |
| 4255 int HeapObject::SizeFromMap(Map* map) { | 4255 int HeapObject::SizeFromMap(Map* map) { |
| 4256 int instance_size = map->instance_size(); | 4256 int instance_size = map->instance_size(); |
| 4257 if (instance_size != kVariableSizeSentinel) return instance_size; | 4257 if (instance_size != kVariableSizeSentinel) return instance_size; |
| 4258 // Only inline the most frequent cases. | 4258 // Only inline the most frequent cases. |
| 4259 InstanceType instance_type = map->instance_type(); | 4259 InstanceType instance_type = map->instance_type(); |
| 4260 if (instance_type == FIXED_ARRAY_TYPE) { | 4260 if (instance_type == FIXED_ARRAY_TYPE) { |
| 4261 return FixedArray::BodyDescriptor::SizeOf(map, this); | 4261 return FixedArray::BodyDescriptor::SizeOf(map, this); |
| 4262 } | 4262 } |
| 4263 if (instance_type == ASCII_STRING_TYPE || | 4263 if (instance_type == ONE_BYTE_STRING_TYPE || |
| 4264 instance_type == ASCII_INTERNALIZED_STRING_TYPE) { | 4264 instance_type == ONE_BYTE_INTERNALIZED_STRING_TYPE) { |
| 4265 return SeqOneByteString::SizeFor( | 4265 return SeqOneByteString::SizeFor( |
| 4266 reinterpret_cast<SeqOneByteString*>(this)->length()); | 4266 reinterpret_cast<SeqOneByteString*>(this)->length()); |
| 4267 } | 4267 } |
| 4268 if (instance_type == BYTE_ARRAY_TYPE) { | 4268 if (instance_type == BYTE_ARRAY_TYPE) { |
| 4269 return reinterpret_cast<ByteArray*>(this)->ByteArraySize(); | 4269 return reinterpret_cast<ByteArray*>(this)->ByteArraySize(); |
| 4270 } | 4270 } |
| 4271 if (instance_type == FREE_SPACE_TYPE) { | 4271 if (instance_type == FREE_SPACE_TYPE) { |
| 4272 return reinterpret_cast<FreeSpace*>(this)->nobarrier_size(); | 4272 return reinterpret_cast<FreeSpace*>(this)->nobarrier_size(); |
| 4273 } | 4273 } |
| 4274 if (instance_type == STRING_TYPE || | 4274 if (instance_type == STRING_TYPE || |
| (...skipping 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5577 ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset) | 5577 ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset) |
| 5578 | 5578 |
| 5579 ACCESSORS(PolymorphicCodeCache, cache, Object, kCacheOffset) | 5579 ACCESSORS(PolymorphicCodeCache, cache, Object, kCacheOffset) |
| 5580 | 5580 |
| 5581 bool Script::HasValidSource() { | 5581 bool Script::HasValidSource() { |
| 5582 Object* src = this->source(); | 5582 Object* src = this->source(); |
| 5583 if (!src->IsString()) return true; | 5583 if (!src->IsString()) return true; |
| 5584 String* src_str = String::cast(src); | 5584 String* src_str = String::cast(src); |
| 5585 if (!StringShape(src_str).IsExternal()) return true; | 5585 if (!StringShape(src_str).IsExternal()) return true; |
| 5586 if (src_str->IsOneByteRepresentation()) { | 5586 if (src_str->IsOneByteRepresentation()) { |
| 5587 return ExternalAsciiString::cast(src)->resource() != NULL; | 5587 return ExternalOneByteString::cast(src)->resource() != NULL; |
| 5588 } else if (src_str->IsTwoByteRepresentation()) { | 5588 } else if (src_str->IsTwoByteRepresentation()) { |
| 5589 return ExternalTwoByteString::cast(src)->resource() != NULL; | 5589 return ExternalTwoByteString::cast(src)->resource() != NULL; |
| 5590 } | 5590 } |
| 5591 return true; | 5591 return true; |
| 5592 } | 5592 } |
| 5593 | 5593 |
| 5594 | 5594 |
| 5595 void SharedFunctionInfo::DontAdaptArguments() { | 5595 void SharedFunctionInfo::DontAdaptArguments() { |
| 5596 DCHECK(code()->kind() == Code::BUILTIN); | 5596 DCHECK(code()->kind() == Code::BUILTIN); |
| 5597 set_formal_parameter_count(kDontAdaptArgumentsSentinel); | 5597 set_formal_parameter_count(kDontAdaptArgumentsSentinel); |
| (...skipping 1536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7134 } | 7134 } |
| 7135 | 7135 |
| 7136 | 7136 |
| 7137 template<typename StaticVisitor> | 7137 template<typename StaticVisitor> |
| 7138 void Foreign::ForeignIterateBody() { | 7138 void Foreign::ForeignIterateBody() { |
| 7139 StaticVisitor::VisitExternalReference( | 7139 StaticVisitor::VisitExternalReference( |
| 7140 reinterpret_cast<Address*>(FIELD_ADDR(this, kForeignAddressOffset))); | 7140 reinterpret_cast<Address*>(FIELD_ADDR(this, kForeignAddressOffset))); |
| 7141 } | 7141 } |
| 7142 | 7142 |
| 7143 | 7143 |
| 7144 void ExternalAsciiString::ExternalAsciiStringIterateBody(ObjectVisitor* v) { | 7144 void ExternalOneByteString::ExternalOneByteStringIterateBody(ObjectVisitor* v) { |
| 7145 typedef v8::String::ExternalAsciiStringResource Resource; | 7145 typedef v8::String::ExternalOneByteStringResource Resource; |
| 7146 v->VisitExternalAsciiString( | 7146 v->VisitExternalOneByteString( |
| 7147 reinterpret_cast<Resource**>(FIELD_ADDR(this, kResourceOffset))); | 7147 reinterpret_cast<Resource**>(FIELD_ADDR(this, kResourceOffset))); |
| 7148 } | 7148 } |
| 7149 | 7149 |
| 7150 | 7150 |
| 7151 template<typename StaticVisitor> | 7151 template <typename StaticVisitor> |
| 7152 void ExternalAsciiString::ExternalAsciiStringIterateBody() { | 7152 void ExternalOneByteString::ExternalOneByteStringIterateBody() { |
| 7153 typedef v8::String::ExternalAsciiStringResource Resource; | 7153 typedef v8::String::ExternalOneByteStringResource Resource; |
| 7154 StaticVisitor::VisitExternalAsciiString( | 7154 StaticVisitor::VisitExternalOneByteString( |
| 7155 reinterpret_cast<Resource**>(FIELD_ADDR(this, kResourceOffset))); | 7155 reinterpret_cast<Resource**>(FIELD_ADDR(this, kResourceOffset))); |
| 7156 } | 7156 } |
| 7157 | 7157 |
| 7158 | 7158 |
| 7159 void ExternalTwoByteString::ExternalTwoByteStringIterateBody(ObjectVisitor* v) { | 7159 void ExternalTwoByteString::ExternalTwoByteStringIterateBody(ObjectVisitor* v) { |
| 7160 typedef v8::String::ExternalStringResource Resource; | 7160 typedef v8::String::ExternalStringResource Resource; |
| 7161 v->VisitExternalTwoByteString( | 7161 v->VisitExternalTwoByteString( |
| 7162 reinterpret_cast<Resource**>(FIELD_ADDR(this, kResourceOffset))); | 7162 reinterpret_cast<Resource**>(FIELD_ADDR(this, kResourceOffset))); |
| 7163 } | 7163 } |
| 7164 | 7164 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7248 #undef READ_SHORT_FIELD | 7248 #undef READ_SHORT_FIELD |
| 7249 #undef WRITE_SHORT_FIELD | 7249 #undef WRITE_SHORT_FIELD |
| 7250 #undef READ_BYTE_FIELD | 7250 #undef READ_BYTE_FIELD |
| 7251 #undef WRITE_BYTE_FIELD | 7251 #undef WRITE_BYTE_FIELD |
| 7252 #undef NOBARRIER_READ_BYTE_FIELD | 7252 #undef NOBARRIER_READ_BYTE_FIELD |
| 7253 #undef NOBARRIER_WRITE_BYTE_FIELD | 7253 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 7254 | 7254 |
| 7255 } } // namespace v8::internal | 7255 } } // namespace v8::internal |
| 7256 | 7256 |
| 7257 #endif // V8_OBJECTS_INL_H_ | 7257 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |