Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/serialize.h

Issue 669133003: De-virtualize snapshot sink. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comment Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/mksnapshot.cc ('k') | src/serialize.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/compiler.h" 8 #include "src/compiler.h"
9 #include "src/hashmap.h" 9 #include "src/hashmap.h"
10 #include "src/heap-profiler.h" 10 #include "src/heap-profiler.h"
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 class SerializedCodeData { 732 class SerializedCodeData {
733 public: 733 public:
734 // Used by when consuming. 734 // Used by when consuming.
735 explicit SerializedCodeData(ScriptData* data, String* source) 735 explicit SerializedCodeData(ScriptData* data, String* source)
736 : script_data_(data), owns_script_data_(false) { 736 : script_data_(data), owns_script_data_(false) {
737 DisallowHeapAllocation no_gc; 737 DisallowHeapAllocation no_gc;
738 CHECK(IsSane(source)); 738 CHECK(IsSane(source));
739 } 739 }
740 740
741 // Used when producing. 741 // Used when producing.
742 SerializedCodeData(List<byte>* payload, CodeSerializer* cs); 742 SerializedCodeData(const List<byte>& payload, CodeSerializer* cs);
743 743
744 ~SerializedCodeData() { 744 ~SerializedCodeData() {
745 if (owns_script_data_) delete script_data_; 745 if (owns_script_data_) delete script_data_;
746 } 746 }
747 747
748 // Return ScriptData object and relinquish ownership over it to the caller. 748 // Return ScriptData object and relinquish ownership over it to the caller.
749 ScriptData* GetScriptData() { 749 ScriptData* GetScriptData() {
750 ScriptData* result = script_data_; 750 ScriptData* result = script_data_;
751 script_data_ = NULL; 751 script_data_ = NULL;
752 DCHECK(owns_script_data_); 752 DCHECK(owns_script_data_);
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 // Following the header, we store, in sequential order 829 // Following the header, we store, in sequential order
830 // - code stub keys 830 // - code stub keys
831 // - serialization payload 831 // - serialization payload
832 832
833 ScriptData* script_data_; 833 ScriptData* script_data_;
834 bool owns_script_data_; 834 bool owns_script_data_;
835 }; 835 };
836 } } // namespace v8::internal 836 } } // namespace v8::internal
837 837
838 #endif // V8_SERIALIZE_H_ 838 #endif // V8_SERIALIZE_H_
OLDNEW
« no previous file with comments | « src/mksnapshot.cc ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698