OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 accumulator = (accumulator | (snapshot_byte & 0x7f)) << 7; | 140 accumulator = (accumulator | (snapshot_byte & 0x7f)) << 7; |
141 } | 141 } |
142 UNREACHABLE(); | 142 UNREACHABLE(); |
143 return accumulator; | 143 return accumulator; |
144 } | 144 } |
145 | 145 |
146 bool AtEOF() { | 146 bool AtEOF() { |
147 return position_ == length_; | 147 return position_ == length_; |
148 } | 148 } |
149 | 149 |
150 const int position() { return position_; } | 150 int position() { return position_; } |
151 | 151 |
152 private: | 152 private: |
153 const byte* data_; | 153 const byte* data_; |
154 int length_; | 154 int length_; |
155 int position_; | 155 int position_; |
156 }; | 156 }; |
157 | 157 |
158 | 158 |
159 // It is very common to have a reference to the object at word 10 in space 2, | 159 // It is very common to have a reference to the object at word 10 in space 2, |
160 // the object at word 5 in space 2 and the object at word 28 in space 4. This | 160 // the object at word 5 in space 2 and the object at word 28 in space 4. This |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 | 405 |
406 friend class ObjectSerializer; | 406 friend class ObjectSerializer; |
407 friend class Deserializer; | 407 friend class Deserializer; |
408 | 408 |
409 DISALLOW_COPY_AND_ASSIGN(Serializer); | 409 DISALLOW_COPY_AND_ASSIGN(Serializer); |
410 }; | 410 }; |
411 | 411 |
412 } } // namespace v8::internal | 412 } } // namespace v8::internal |
413 | 413 |
414 #endif // V8_SERIALIZE_H_ | 414 #endif // V8_SERIALIZE_H_ |
OLD | NEW |