Commit 1e44e90e authored by jgruber's avatar jgruber Committed by Commit Bot

[snapshot] Convert CASE_BODY macro to function

The CASE_BODY macro is inconvenient for debugging, as gdb points only at
the SINGLE_CASE line, not the actual expanded line.

Converting it into a templatized function should preserve optimization
opportunities for the compiler while making debugging much easier.

Bug: v8:6624
Change-Id: I864eff190e39e3230c529ced5c4919aa875763b1
Reviewed-on: https://chromium-review.googlesource.com/612084
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47471}
parent 0d14ae17
This diff is collapsed.
......@@ -110,6 +110,14 @@ class Deserializer : public SerializerDeserializer {
// the heap. Return false if the object content has been deferred.
bool ReadData(Object** start, Object** end, int space,
Address object_address);
// A helper function for ReadData, templatized on the bytecode for efficiency.
// Returns the new value of {current}.
template <int where, int how, int within, int space_number_if_any>
inline Object** ReadDataCase(Isolate* isolate, Object** current,
Address current_object_address, byte data,
bool write_barrier_needed);
void ReadObject(int space_number, Object** write_back);
Address Allocate(int space_index, int size);
......@@ -120,7 +128,7 @@ class Deserializer : public SerializerDeserializer {
Isolate* isolate_;
// Objects from the attached object descriptions in the serialized user code.
List<Handle<HeapObject> > attached_objects_;
List<Handle<HeapObject>> attached_objects_;
SnapshotByteSource source_;
uint32_t magic_number_;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment