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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api.h" | 8 #include "src/api.h" |
9 #include "src/base/platform/platform.h" | 9 #include "src/base/platform/platform.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 1618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1629 } | 1629 } |
1630 | 1630 |
1631 | 1631 |
1632 void Serializer::ObjectSerializer::VisitCell(RelocInfo* rinfo) { | 1632 void Serializer::ObjectSerializer::VisitCell(RelocInfo* rinfo) { |
1633 // Out-of-line constant pool entries will be visited by the ConstantPoolArray. | 1633 // Out-of-line constant pool entries will be visited by the ConstantPoolArray. |
1634 if (FLAG_enable_ool_constant_pool && rinfo->IsInConstantPool()) return; | 1634 if (FLAG_enable_ool_constant_pool && rinfo->IsInConstantPool()) return; |
1635 | 1635 |
1636 int skip = OutputRawData(rinfo->pc(), kCanReturnSkipInsteadOfSkipping); | 1636 int skip = OutputRawData(rinfo->pc(), kCanReturnSkipInsteadOfSkipping); |
1637 Cell* object = Cell::cast(rinfo->target_cell()); | 1637 Cell* object = Cell::cast(rinfo->target_cell()); |
1638 serializer_->SerializeObject(object, kPlain, kInnerPointer, skip); | 1638 serializer_->SerializeObject(object, kPlain, kInnerPointer, skip); |
1639 bytes_processed_so_far_ += kPointerSize; | |
1639 } | 1640 } |
Slava Chigrin
2014/08/27 17:47:13
Seems, this increment was missed, so pointers go o
| |
1640 | 1641 |
1641 | 1642 |
1642 void Serializer::ObjectSerializer::VisitExternalAsciiString( | 1643 void Serializer::ObjectSerializer::VisitExternalAsciiString( |
1643 v8::String::ExternalAsciiStringResource** resource_pointer) { | 1644 v8::String::ExternalAsciiStringResource** resource_pointer) { |
1644 Address references_start = reinterpret_cast<Address>(resource_pointer); | 1645 Address references_start = reinterpret_cast<Address>(resource_pointer); |
1645 OutputRawData(references_start); | 1646 OutputRawData(references_start); |
1646 for (int i = 0; i < Natives::GetBuiltinsCount(); i++) { | 1647 for (int i = 0; i < Natives::GetBuiltinsCount(); i++) { |
1647 Object* source = | 1648 Object* source = |
1648 serializer_->isolate()->heap()->natives_source_cache()->get(i); | 1649 serializer_->isolate()->heap()->natives_source_cache()->get(i); |
1649 if (!source->IsUndefined()) { | 1650 if (!source->IsUndefined()) { |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1956 | 1957 |
1957 int SerializedCodeData::CheckSum(String* string) { | 1958 int SerializedCodeData::CheckSum(String* string) { |
1958 int checksum = Version::Hash(); | 1959 int checksum = Version::Hash(); |
1959 #ifdef DEBUG | 1960 #ifdef DEBUG |
1960 uint32_t seed = static_cast<uint32_t>(checksum); | 1961 uint32_t seed = static_cast<uint32_t>(checksum); |
1961 checksum = static_cast<int>(IteratingStringHasher::Hash(string, seed)); | 1962 checksum = static_cast<int>(IteratingStringHasher::Hash(string, seed)); |
1962 #endif // DEBUG | 1963 #endif // DEBUG |
1963 return checksum; | 1964 return checksum; |
1964 } | 1965 } |
1965 } } // namespace v8::internal | 1966 } } // namespace v8::internal |
OLD | NEW |