| OLD | NEW | 
|---|
| 1 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file | 
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a | 
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. | 
| 4 | 4 | 
| 5 #include "vm/code_descriptors.h" | 5 #include "vm/code_descriptors.h" | 
| 6 | 6 | 
| 7 namespace dart { | 7 namespace dart { | 
| 8 | 8 | 
| 9 void DescriptorList::AddDescriptor(RawPcDescriptors::Kind kind, | 9 void DescriptorList::AddDescriptor(RawPcDescriptors::Kind kind, | 
| 10                                    intptr_t pc_offset, | 10                                    intptr_t pc_offset, | 
| 11                                    intptr_t deopt_id, | 11                                    intptr_t deopt_id, | 
| 12                                    intptr_t token_pos, | 12                                    intptr_t token_pos, | 
| 13                                    intptr_t try_index) { | 13                                    intptr_t try_index) { | 
| 14   ASSERT((kind == RawPcDescriptors::kRuntimeCall) || | 14   ASSERT((kind == RawPcDescriptors::kRuntimeCall) || | 
| 15          (kind == RawPcDescriptors::kOther) || | 15          (kind == RawPcDescriptors::kOther) || | 
| 16          (deopt_id != Isolate::kNoDeoptId)); | 16          (deopt_id != Thread::kNoDeoptId)); | 
| 17 | 17 | 
| 18   intptr_t merged_kind_try = | 18   intptr_t merged_kind_try = | 
| 19       RawPcDescriptors::MergedKindTry::Encode(kind, try_index); | 19       RawPcDescriptors::MergedKindTry::Encode(kind, try_index); | 
| 20 | 20 | 
| 21   PcDescriptors::EncodeInteger(&encoded_data_, merged_kind_try); | 21   PcDescriptors::EncodeInteger(&encoded_data_, merged_kind_try); | 
| 22   PcDescriptors::EncodeInteger(&encoded_data_, pc_offset - prev_pc_offset); | 22   PcDescriptors::EncodeInteger(&encoded_data_, pc_offset - prev_pc_offset); | 
| 23   PcDescriptors::EncodeInteger(&encoded_data_, deopt_id - prev_deopt_id); | 23   PcDescriptors::EncodeInteger(&encoded_data_, deopt_id - prev_deopt_id); | 
| 24   PcDescriptors::EncodeInteger(&encoded_data_, token_pos - prev_token_pos); | 24   PcDescriptors::EncodeInteger(&encoded_data_, token_pos - prev_token_pos); | 
| 25 | 25 | 
| 26   prev_pc_offset = pc_offset; | 26   prev_pc_offset = pc_offset; | 
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 106                               list_[i].needs_stacktrace, | 106                               list_[i].needs_stacktrace, | 
| 107                               has_catch_all); | 107                               has_catch_all); | 
| 108       handlers.SetHandledTypes(i, *list_[i].handler_types); | 108       handlers.SetHandledTypes(i, *list_[i].handler_types); | 
| 109     } | 109     } | 
| 110   } | 110   } | 
| 111   return handlers.raw(); | 111   return handlers.raw(); | 
| 112 } | 112 } | 
| 113 | 113 | 
| 114 | 114 | 
| 115 }  // namespace dart | 115 }  // namespace dart | 
| OLD | NEW | 
|---|