Index: runtime/vm/object.h |
diff --git a/runtime/vm/object.h b/runtime/vm/object.h |
index f3aaf2575accb4c0b7cecc5da9078b368d84cc26..0320fb00a171b2d93396ee53f90ba30656e7c47f 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; |
@@ -2319,7 +2320,12 @@ class DeoptInfo : public Object { |
}; |
public: |
- intptr_t Length() const; |
+ // The number of instructions. |
+ intptr_t GetLength() const; |
Kevin Millikin (Google)
2012/10/05 14:31:55
Accidental rename. I'll rename it back to Length(
srdjan
2012/10/08 16:37:58
Please upload the most recent version.
|
+ |
+ // The number of real (non-suffix) instructions needed to execute the |
+ // deoptimization translation. |
+ intptr_t TranslationLength() const; |
static RawDeoptInfo* New(intptr_t num_commands); |
@@ -2348,9 +2354,14 @@ 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())); |
+ ASSERT((index >=0) && (index < GetLength())); |
intptr_t data_index = (index * kNumberOfEntries) + entry_offset; |
return &raw_ptr()->data_[data_index]; |
} |