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

Unified Diff: src/snapshot/code-serializer.h

Issue 1992723002: [serializer] prepare attached references for general use. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: address comments Created 4 years, 7 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/context-measure.cc ('k') | src/snapshot/code-serializer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/snapshot/code-serializer.h
diff --git a/src/snapshot/code-serializer.h b/src/snapshot/code-serializer.h
index 48f3bc525907e81acb8276486d44f920d94b70f9..8ed4cf67ac9f9f16a8890e21bd892a3480320084 100644
--- a/src/snapshot/code-serializer.h
+++ b/src/snapshot/code-serializer.h
@@ -20,11 +20,6 @@ class CodeSerializer : public Serializer {
MUST_USE_RESULT static MaybeHandle<SharedFunctionInfo> Deserialize(
Isolate* isolate, ScriptData* cached_data, Handle<String> source);
- static const int kSourceObjectIndex = 0;
- STATIC_ASSERT(kSourceObjectReference == kSourceObjectIndex);
-
- static const int kCodeStubsBaseIndex = 1;
-
String* source() const {
DCHECK(!AllowHeapAllocation::IsAllowed());
return source_;
@@ -35,7 +30,7 @@ class CodeSerializer : public Serializer {
private:
CodeSerializer(Isolate* isolate, SnapshotByteSink* sink, String* source)
: Serializer(isolate, sink), source_(source) {
- back_reference_map_.AddSourceString(source);
+ reference_map_.AddAttachedReference(source);
}
~CodeSerializer() override { OutputStatistics("CodeSerializer"); }
@@ -45,11 +40,10 @@ class CodeSerializer : public Serializer {
void SerializeBuiltin(int builtin_index, HowToCode how_to_code,
WhereToPoint where_to_point);
- void SerializeCodeStub(uint32_t stub_key, HowToCode how_to_code,
+ void SerializeCodeStub(Code* code_stub, HowToCode how_to_code,
WhereToPoint where_to_point);
void SerializeGeneric(HeapObject* heap_object, HowToCode how_to_code,
WhereToPoint where_to_point);
- int AddCodeStubKey(uint32_t stub_key);
DisallowHeapAllocation no_gc_;
String* source_;
« no previous file with comments | « src/context-measure.cc ('k') | src/snapshot/code-serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698