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 #ifndef V8_SERIALIZE_H_ | 5 #ifndef V8_SERIALIZE_H_ |
6 #define V8_SERIALIZE_H_ | 6 #define V8_SERIALIZE_H_ |
7 | 7 |
8 #include "src/hashmap.h" | 8 #include "src/hashmap.h" |
9 #include "src/isolate.h" | 9 #include "src/isolate.h" |
10 #include "src/snapshot-source-sink.h" | 10 #include "src/snapshot-source-sink.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 LAZY_DEOPTIMIZATION | 30 LAZY_DEOPTIMIZATION |
31 }; | 31 }; |
32 | 32 |
33 const int kTypeCodeCount = LAZY_DEOPTIMIZATION + 1; | 33 const int kTypeCodeCount = LAZY_DEOPTIMIZATION + 1; |
34 const int kFirstTypeCode = UNCLASSIFIED; | 34 const int kFirstTypeCode = UNCLASSIFIED; |
35 | 35 |
36 const int kReferenceIdBits = 16; | 36 const int kReferenceIdBits = 16; |
37 const int kReferenceIdMask = (1 << kReferenceIdBits) - 1; | 37 const int kReferenceIdMask = (1 << kReferenceIdBits) - 1; |
38 const int kReferenceTypeShift = kReferenceIdBits; | 38 const int kReferenceTypeShift = kReferenceIdBits; |
39 | 39 |
40 const int kDeoptTableSerializeEntryCount = 12; | 40 const int kDeoptTableSerializeEntryCount = 64; |
41 | 41 |
42 // ExternalReferenceTable is a helper class that defines the relationship | 42 // ExternalReferenceTable is a helper class that defines the relationship |
43 // between external references and their encodings. It is used to build | 43 // between external references and their encodings. It is used to build |
44 // hashmaps in ExternalReferenceEncoder and ExternalReferenceDecoder. | 44 // hashmaps in ExternalReferenceEncoder and ExternalReferenceDecoder. |
45 class ExternalReferenceTable { | 45 class ExternalReferenceTable { |
46 public: | 46 public: |
47 static ExternalReferenceTable* instance(Isolate* isolate); | 47 static ExternalReferenceTable* instance(Isolate* isolate); |
48 | 48 |
49 ~ExternalReferenceTable() { } | 49 ~ExternalReferenceTable() { } |
50 | 50 |
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 private: | 557 private: |
558 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { | 558 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { |
559 return false; | 559 return false; |
560 } | 560 } |
561 }; | 561 }; |
562 | 562 |
563 | 563 |
564 } } // namespace v8::internal | 564 } } // namespace v8::internal |
565 | 565 |
566 #endif // V8_SERIALIZE_H_ | 566 #endif // V8_SERIALIZE_H_ |
OLD | NEW |