Chromium Code Reviews| 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_index, | 12 intptr_t token_index, |
| 13 intptr_t try_index) { | 13 intptr_t try_index) { |
| 14 ASSERT((kind == RawPcDescriptors::kRuntimeCall) || | |
| 15 (kind == RawPcDescriptors::kOther) || | |
| 16 (deopt_id != Isolate::kNoDeoptId)); | |
|
Ivan Posva
2014/09/26 16:27:08
Separate CL: Move kNoDeoptId somewhere more sensib
| |
| 14 struct PcDesc data; | 17 struct PcDesc data; |
| 15 data.pc_offset = pc_offset; | 18 data.pc_offset = pc_offset; |
| 16 data.kind = kind; | 19 data.kind = kind; |
| 17 data.deopt_id = deopt_id; | 20 data.deopt_id = deopt_id; |
| 18 data.SetTokenPos(token_index); | 21 data.SetTokenPos(token_index); |
| 19 data.try_index = try_index; | 22 data.try_index = try_index; |
| 20 list_.Add(data); | 23 list_.Add(data); |
| 21 if (try_index >= 0) { | 24 if (try_index >= 0) { |
| 22 has_try_index_ = true; | 25 has_try_index_ = true; |
| 23 } | 26 } |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 75 } | 78 } |
| 76 | 79 |
| 77 | 80 |
| 78 RawStackmap* StackmapTableBuilder::MapAt(intptr_t index) const { | 81 RawStackmap* StackmapTableBuilder::MapAt(intptr_t index) const { |
| 79 Stackmap& map = Stackmap::Handle(); | 82 Stackmap& map = Stackmap::Handle(); |
| 80 map ^= list_.At(index); | 83 map ^= list_.At(index); |
| 81 return map.raw(); | 84 return map.raw(); |
| 82 } | 85 } |
| 83 | 86 |
| 84 } // namespace dart | 87 } // namespace dart |
| OLD | NEW |