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

Unified Diff: runtime/vm/raw_object.h

Issue 356923006: Iterate over PcDescriptors only via iterators, not via an index. (preparation for more compression … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 5 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
Index: runtime/vm/raw_object.h
===================================================================
--- runtime/vm/raw_object.h (revision 38030)
+++ runtime/vm/raw_object.h (working copy)
@@ -902,18 +902,33 @@
class RawPcDescriptors : public RawObject {
- RAW_HEAP_OBJECT_IMPLEMENTATION(PcDescriptors);
+ public:
+ enum Kind {
+ kDeopt, // Deoptimization continuation point.
+ kIcCall, // IC call.
+ kOptStaticCall, // Call directly to known target, e.g. static call.
+ kUnoptStaticCall, // Call to a known target via a stub.
+ kClosureCall, // Closure call.
+ kRuntimeCall, // Runtime call.
+ kOsrEntry, // OSR entry point in unoptimized code.
+ kOther
+ };
- intptr_t length_; // Number of descriptors.
-
struct PcDescriptorRec {
uword pc;
int32_t deopt_id;
int32_t token_pos; // Or deopt reason.
int16_t try_index; // Or deopt index.
- int8_t kind;
+ int8_t kind_;
+
+ Kind kind() const { return static_cast<Kind>(kind_); }
};
+ private:
+ RAW_HEAP_OBJECT_IMPLEMENTATION(PcDescriptors);
+
+ intptr_t length_; // Number of descriptors.
+
// Variable length data follows here.
PcDescriptorRec* data() { OPEN_ARRAY_START(PcDescriptorRec, intptr_t); }

Powered by Google App Engine
This is Rietveld 408576698