Chromium Code Reviews| Index: runtime/vm/code_descriptors.cc |
| =================================================================== |
| --- runtime/vm/code_descriptors.cc (revision 11533) |
| +++ runtime/vm/code_descriptors.cc (working copy) |
| @@ -4,6 +4,8 @@ |
| #include "vm/code_descriptors.h" |
| +#include "vm/code_generator.h" |
| + |
| namespace dart { |
| void DescriptorList::AddDescriptor(PcDescriptors::Kind kind, |
| @@ -21,15 +23,17 @@ |
| } |
| -void DescriptorList::AddDeoptInfo(intptr_t pc_offset, |
| - intptr_t deopt_id, |
| - intptr_t token_index, |
| - intptr_t deopt_array_index) { |
| +void DescriptorList::AddDeoptIndex(intptr_t pc_offset, |
| + intptr_t deopt_id, |
| + intptr_t deopt_reason, |
| + intptr_t deopt_array_index) { |
| struct PcDesc data; |
| data.pc_offset = pc_offset; |
| data.kind = PcDescriptors::kDeoptIndex; |
| data.deopt_id = deopt_id; |
| - data.token_index = token_index; |
| + // Token index is used for deopt reason. |
| + ASSERT((kDeoptUnknown <= deopt_reason) && (deopt_reason < kDeoptNumReasons)); |
| + data.token_index = deopt_reason; |
|
siva
2012/08/30 01:37:30
overloading token_index field as deopt_reason can
srdjan
2012/08/30 17:16:16
Done.
|
| // Try_index is reused for deopt_array_index. |
| data.try_index = deopt_array_index; |
| list_.Add(data); |