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

Side by Side Diff: test/cctest/test-serialize.cc

Issue 1529763002: [serializer] remove some dead code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « src/snapshot/snapshot-source-sink.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2007-2010 the V8 project authors. All rights reserved. 1 // Copyright 2007-2010 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 i::PrintF("Writing snapshot file failed.. Aborting.\n"); 86 i::PrintF("Writing snapshot file failed.. Aborting.\n");
87 exit(1); 87 exit(1);
88 } 88 }
89 fclose(file); 89 fclose(file);
90 } 90 }
91 91
92 92
93 static bool WriteToFile(Isolate* isolate, const char* snapshot_file) { 93 static bool WriteToFile(Isolate* isolate, const char* snapshot_file) {
94 SnapshotByteSink sink; 94 SnapshotByteSink sink;
95 StartupSerializer ser(isolate, &sink); 95 StartupSerializer ser(isolate, &sink);
96 ser.Serialize(); 96 ser.SerializeStrongReferences();
97 ser.SerializeWeakReferencesAndDeferred();
97 SnapshotData snapshot_data(ser); 98 SnapshotData snapshot_data(ser);
98 WritePayload(snapshot_data.RawData(), snapshot_file); 99 WritePayload(snapshot_data.RawData(), snapshot_file);
99 return true; 100 return true;
100 } 101 }
101 102
102 103
103 static void Serialize(v8::Isolate* isolate) { 104 static void Serialize(v8::Isolate* isolate) {
104 // We have to create one context. One reason for this is so that the builtins 105 // We have to create one context. One reason for this is so that the builtins
105 // can be loaded from v8natives.js and their addresses can be processed. This 106 // can be loaded from v8natives.js and their addresses can be processed. This
106 // will clear the pending fixups array, which would otherwise contain GC roots 107 // will clear the pending fixups array, which would otherwise contain GC roots
(...skipping 1657 matching lines...) Expand 10 before | Expand all | Expand 10 after
1764 delete script_data; 1765 delete script_data;
1765 } 1766 }
1766 1767
1767 1768
1768 TEST(SerializationMemoryStats) { 1769 TEST(SerializationMemoryStats) {
1769 FLAG_profile_deserialization = true; 1770 FLAG_profile_deserialization = true;
1770 FLAG_always_opt = false; 1771 FLAG_always_opt = false;
1771 v8::StartupData blob = v8::V8::CreateSnapshotDataBlob(); 1772 v8::StartupData blob = v8::V8::CreateSnapshotDataBlob();
1772 delete[] blob.data; 1773 delete[] blob.data;
1773 } 1774 }
OLDNEW
« no previous file with comments | « src/snapshot/snapshot-source-sink.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698