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 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1041 Serializer::~Serializer() { | 1041 Serializer::~Serializer() { |
1042 for (int i = 0; i <= LAST_SPACE; i++) { | 1042 for (int i = 0; i <= LAST_SPACE; i++) { |
1043 delete allocator_[i]; | 1043 delete allocator_[i]; |
1044 } | 1044 } |
1045 if (reference_encoder_) delete reference_encoder_; | 1045 if (reference_encoder_) delete reference_encoder_; |
1046 delete writer_; | 1046 delete writer_; |
1047 } | 1047 } |
1048 | 1048 |
1049 | 1049 |
1050 bool Serializer::serialization_enabled_ = false; | 1050 bool Serializer::serialization_enabled_ = false; |
| 1051 bool Serializer::too_late_to_enable_now_ = false; |
1051 | 1052 |
1052 | 1053 |
1053 #ifdef DEBUG | 1054 #ifdef DEBUG |
1054 static const int kMaxTagLength = 32; | 1055 static const int kMaxTagLength = 32; |
1055 | 1056 |
1056 void Serializer::Synchronize(const char* tag) { | 1057 void Serializer::Synchronize(const char* tag) { |
1057 if (FLAG_debug_serialization) { | 1058 if (FLAG_debug_serialization) { |
1058 int length = StrLength(tag); | 1059 int length = StrLength(tag); |
1059 ASSERT(length <= kMaxTagLength); | 1060 ASSERT(length <= kMaxTagLength); |
1060 writer_->PutC('S'); | 1061 writer_->PutC('S'); |
(...skipping 1372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2433 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize); | 2434 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize); |
2434 } | 2435 } |
2435 } | 2436 } |
2436 int allocation_address = fullness_[space]; | 2437 int allocation_address = fullness_[space]; |
2437 fullness_[space] = allocation_address + size; | 2438 fullness_[space] = allocation_address + size; |
2438 return allocation_address; | 2439 return allocation_address; |
2439 } | 2440 } |
2440 | 2441 |
2441 | 2442 |
2442 } } // namespace v8::internal | 2443 } } // namespace v8::internal |
OLD | NEW |