Chromium Code Reviews| Index: runtime/vm/raw_object.h |
| =================================================================== |
| --- runtime/vm/raw_object.h (revision 41280) |
| +++ runtime/vm/raw_object.h (working copy) |
| @@ -1215,6 +1215,12 @@ |
| } |
| // Variable length data follows here. |
| RawObject** data() { OPEN_ARRAY_START(RawObject*, RawObject*); } |
|
Ivan Posva
2014/10/29 05:17:27
Should we have the non-const data() accessor in th
koda
2014/10/29 20:10:27
Changed from/to to use VariableDescAddr.
PTAL
|
| + RawObject* const* data() const { OPEN_ARRAY_START(RawObject*, RawObject*); } |
| + const VariableDesc* VariableDescAddr(intptr_t index) const { |
|
Ivan Posva
2014/10/29 05:17:27
Why did you have to move this functionality to Raw
koda
2014/10/29 20:10:27
I wanted to keep the tricky representation details
|
| + ASSERT((index >= 0) && (index < num_variables_)); |
| + // data() points to the first component of the first descriptor. |
| + return &(reinterpret_cast<const VariableDesc*>(data())[index]); |
| + } |
| RawObject** to(intptr_t num_vars) { |
| const intptr_t data_length = num_vars * (sizeof(VariableDesc)/kWordSize); |
| return reinterpret_cast<RawObject**>(&ptr()->data()[data_length - 1]); |