Index: runtime/vm/object.h |
diff --git a/runtime/vm/object.h b/runtime/vm/object.h |
index 1fbca5a5d2808f5fa1eee4d65a1d720949de305b..fbbfabc1b17133da72486ae233ff086c6b6d99a4 100644 |
--- a/runtime/vm/object.h |
+++ b/runtime/vm/object.h |
@@ -28,6 +28,7 @@ CLASS_LIST(DEFINE_FORWARD_DECLARATION) |
class Api; |
class Assembler; |
class Code; |
+class DeoptInstr; |
class LocalScope; |
class Symbols; |
@@ -2328,8 +2329,13 @@ class DeoptInfo : public Object { |
}; |
public: |
+ // The number of instructions. |
intptr_t Length() const; |
+ // The number of real (non-suffix) instructions needed to execute the |
+ // deoptimization translation. |
+ intptr_t TranslationLength() const; |
+ |
static RawDeoptInfo* New(intptr_t num_commands); |
static const intptr_t kBytesPerElement = (kNumberOfEntries * kWordSize); |
@@ -2357,6 +2363,11 @@ class DeoptInfo : public Object { |
return index; |
} |
+ // Unpack the entire translation into an array of deoptimization |
+ // instructions. This copies any shared suffixes into the array. |
+ void ToInstructions(const Array& table, |
+ GrowableArray<DeoptInstr*>* instructions) const; |
+ |
private: |
intptr_t* EntryAddr(intptr_t index, intptr_t entry_offset) const { |
ASSERT((index >=0) && (index < Length())); |