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

Unified Diff: runtime/vm/raw_object.h

Issue 1634863002: Introduce CodeSourceMap object to hold pc -> token position mappings (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 | « runtime/vm/object.cc ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) ||
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698