| 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 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 845 } | 845 } |
| 846 } | 846 } |
| 847 ASSERT_EQ(current, limit); | 847 ASSERT_EQ(current, limit); |
| 848 } | 848 } |
| 849 | 849 |
| 850 | 850 |
| 851 void SnapshotByteSink::PutInt(uintptr_t integer, const char* description) { | 851 void SnapshotByteSink::PutInt(uintptr_t integer, const char* description) { |
| 852 const int max_shift = ((kPointerSize * kBitsPerByte) / 7) * 7; | 852 const int max_shift = ((kPointerSize * kBitsPerByte) / 7) * 7; |
| 853 for (int shift = max_shift; shift > 0; shift -= 7) { | 853 for (int shift = max_shift; shift > 0; shift -= 7) { |
| 854 if (integer >= static_cast<uintptr_t>(1u) << shift) { | 854 if (integer >= static_cast<uintptr_t>(1u) << shift) { |
| 855 Put(((integer >> shift) & 0x7f) | 0x80, "IntPart"); | 855 Put((static_cast<int>((integer >> shift)) & 0x7f) | 0x80, "IntPart"); |
| 856 } | 856 } |
| 857 } | 857 } |
| 858 PutSection(integer & 0x7f, "IntLastPart"); | 858 PutSection(static_cast<int>(integer & 0x7f), "IntLastPart"); |
| 859 } | 859 } |
| 860 | 860 |
| 861 #ifdef DEBUG | 861 #ifdef DEBUG |
| 862 | 862 |
| 863 void Deserializer::Synchronize(const char* tag) { | 863 void Deserializer::Synchronize(const char* tag) { |
| 864 int data = source_->Get(); | 864 int data = source_->Get(); |
| 865 // If this assert fails then that indicates that you have a mismatch between | 865 // If this assert fails then that indicates that you have a mismatch between |
| 866 // the number of GC roots when serializing and deserializing. | 866 // the number of GC roots when serializing and deserializing. |
| 867 ASSERT_EQ(SYNCHRONIZE, data); | 867 ASSERT_EQ(SYNCHRONIZE, data); |
| 868 do { | 868 do { |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1352 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize); | 1352 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize); |
| 1353 } | 1353 } |
| 1354 } | 1354 } |
| 1355 int allocation_address = fullness_[space]; | 1355 int allocation_address = fullness_[space]; |
| 1356 fullness_[space] = allocation_address + size; | 1356 fullness_[space] = allocation_address + size; |
| 1357 return allocation_address; | 1357 return allocation_address; |
| 1358 } | 1358 } |
| 1359 | 1359 |
| 1360 | 1360 |
| 1361 } } // namespace v8::internal | 1361 } } // namespace v8::internal |
| OLD | NEW |