Index: runtime/vm/raw_object.h |
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h |
index 70fd2749d894381c58870d060586b7fd385872c6..35be68ab7643c5e93aa04ecb288549b3dda52c38 100644 |
--- a/runtime/vm/raw_object.h |
+++ b/runtime/vm/raw_object.h |
@@ -33,6 +33,7 @@ namespace dart { |
V(Instructions) \ |
V(ObjectPool) \ |
V(PcDescriptors) \ |
+ V(CodeSourceMap) \ |
V(Stackmap) \ |
V(LocalVarDescriptors) \ |
V(ExceptionHandlers) \ |
@@ -1055,6 +1056,7 @@ class RawCode : public RawObject { |
RawObject* owner_; // Function, Null, or a Class. |
RawExceptionHandlers* exception_handlers_; |
RawPcDescriptors* pc_descriptors_; |
+ RawCodeSourceMap* code_source_map_; |
RawArray* stackmaps_; |
RawObject** to_snapshot() { |
return reinterpret_cast<RawObject**>(&ptr()->stackmaps_); |
@@ -1202,6 +1204,23 @@ class RawPcDescriptors : public RawObject { |
}; |
+// CodeSourceMap stores a mapping between code PC ranges and source token |
+// positions. |
+class RawCodeSourceMap : public RawObject { |
+ private: |
+ RAW_HEAP_OBJECT_IMPLEMENTATION(CodeSourceMap); |
+ |
+ int32_t length_; // Number of entries. |
+ |
+ // Variable length data follows here. |
+ uint8_t* data() { OPEN_ARRAY_START(uint8_t, intptr_t); } |
+ const uint8_t* data() const { OPEN_ARRAY_START(uint8_t, intptr_t); } |
+ |
+ friend class Object; |
+ friend class SnapshotReader; |
+}; |
+ |
+ |
// Stackmap is an immutable representation of the layout of the stack at a |
// PC. The stack map representation consists of a bit map which marks each |
// live object index starting from the base of the frame. |
@@ -2286,6 +2305,7 @@ inline bool RawObject::IsVariableSizeClassId(intptr_t index) { |
(index == kInstructionsCid) || |
(index == kObjectPoolCid) || |
(index == kPcDescriptorsCid) || |
+ (index == kCodeSourceMapCid) || |
(index == kStackmapCid) || |
(index == kLocalVarDescriptorsCid) || |
(index == kExceptionHandlersCid) || |