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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 virtual int RootIndex(HeapObject* o); | 537 virtual int RootIndex(HeapObject* o); |
538 virtual int PartialSnapshotCacheIndex(HeapObject* o); | 538 virtual int PartialSnapshotCacheIndex(HeapObject* o); |
539 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { | 539 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { |
540 // Scripts should be referred only through shared function infos. We can't | 540 // Scripts should be referred only through shared function infos. We can't |
541 // allow them to be part of the partial snapshot because they contain a | 541 // allow them to be part of the partial snapshot because they contain a |
542 // unique ID, and deserializing several partial snapshots containing script | 542 // unique ID, and deserializing several partial snapshots containing script |
543 // would cause dupes. | 543 // would cause dupes. |
544 ASSERT(!o->IsScript()); | 544 ASSERT(!o->IsScript()); |
545 return o->IsString() || o->IsSharedFunctionInfo() || | 545 return o->IsString() || o->IsSharedFunctionInfo() || |
546 o->IsHeapNumber() || o->IsCode() || | 546 o->IsHeapNumber() || o->IsCode() || |
| 547 o->IsSerializedScopeInfo() || |
547 o->map() == HEAP->fixed_cow_array_map(); | 548 o->map() == HEAP->fixed_cow_array_map(); |
548 } | 549 } |
549 | 550 |
550 private: | 551 private: |
551 Serializer* startup_serializer_; | 552 Serializer* startup_serializer_; |
552 DISALLOW_COPY_AND_ASSIGN(PartialSerializer); | 553 DISALLOW_COPY_AND_ASSIGN(PartialSerializer); |
553 }; | 554 }; |
554 | 555 |
555 | 556 |
556 class StartupSerializer : public Serializer { | 557 class StartupSerializer : public Serializer { |
(...skipping 23 matching lines...) Expand all Loading... |
580 virtual int RootIndex(HeapObject* o) { return kInvalidRootIndex; } | 581 virtual int RootIndex(HeapObject* o) { return kInvalidRootIndex; } |
581 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { | 582 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { |
582 return false; | 583 return false; |
583 } | 584 } |
584 }; | 585 }; |
585 | 586 |
586 | 587 |
587 } } // namespace v8::internal | 588 } } // namespace v8::internal |
588 | 589 |
589 #endif // V8_SERIALIZE_H_ | 590 #endif // V8_SERIALIZE_H_ |
OLD | NEW |