blob: 7a936134816019a283e9fef3bda4ac20ac8f2d82 [file] [log] [blame]
Elliott Hughes2faa5f12012-01-30 14:42:07 -08001/*
2 * Copyright (C) 2011 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
Brian Carlstrom3320cf42011-10-04 14:58:28 -070016
Mathieu Chartier193bad92013-08-29 18:46:00 -070017#ifndef ART_COMPILER_COMPILED_METHOD_H_
18#define ART_COMPILER_COMPILED_METHOD_H_
Brian Carlstrom3320cf42011-10-04 14:58:28 -070019
Ian Rogers700a4022014-05-19 16:49:03 -070020#include <memory>
Brian Carlstrom265091e2013-01-30 14:08:26 -080021#include <string>
Brian Carlstrom3320cf42011-10-04 14:58:28 -070022#include <vector>
23
Ian Rogersd582fa42014-11-05 23:46:43 -080024#include "arch/instruction_set.h"
Vladimir Marko80afd022015-05-19 18:08:00 +010025#include "base/bit_utils.h"
Alex Lighte64300b2015-12-15 15:02:47 -080026#include "base/length_prefixed_array.h"
Vladimir Markof4da6752014-08-01 19:04:18 +010027#include "method_reference.h"
Vladimir Markof4da6752014-08-01 19:04:18 +010028#include "utils/array_ref.h"
Brian Carlstrom3320cf42011-10-04 14:58:28 -070029
30namespace art {
31
Mathieu Chartier193bad92013-08-29 18:46:00 -070032class CompilerDriver;
Vladimir Marko35831e82015-09-11 11:59:18 +010033class CompiledMethodStorage;
Mathieu Chartier193bad92013-08-29 18:46:00 -070034
Logan Chien598c5132012-04-28 22:00:44 +080035class CompiledCode {
36 public:
Brian Carlstrom265091e2013-01-30 14:08:26 -080037 // For Quick to supply an code blob
Mathieu Chartier193bad92013-08-29 18:46:00 -070038 CompiledCode(CompilerDriver* compiler_driver, InstructionSet instruction_set,
Vladimir Marko35831e82015-09-11 11:59:18 +010039 const ArrayRef<const uint8_t>& quick_code);
Mathieu Chartiere5f13e52015-02-24 09:37:21 -080040
41 virtual ~CompiledCode();
Logan Chien598c5132012-04-28 22:00:44 +080042
Logan Chien598c5132012-04-28 22:00:44 +080043 InstructionSet GetInstructionSet() const {
44 return instruction_set_;
45 }
46
Vladimir Marko35831e82015-09-11 11:59:18 +010047 ArrayRef<const uint8_t> GetQuickCode() const {
48 return GetArray(quick_code_);
Logan Chien598c5132012-04-28 22:00:44 +080049 }
50
Ian Rogersef7d42f2014-01-06 12:55:46 -080051 bool operator==(const CompiledCode& rhs) const;
52
Logan Chien598c5132012-04-28 22:00:44 +080053 // To align an offset from a page-aligned value to make it suitable
54 // for code storage. For example on ARM, to ensure that PC relative
55 // valu computations work out as expected.
Mathieu Chartiere5f13e52015-02-24 09:37:21 -080056 size_t AlignCode(size_t offset) const;
57 static size_t AlignCode(size_t offset, InstructionSet instruction_set);
Logan Chien598c5132012-04-28 22:00:44 +080058
59 // returns the difference between the code address and a usable PC.
60 // mainly to cope with kThumb2 where the lower bit must be set.
61 size_t CodeDelta() const;
Dave Allison50abf0a2014-06-23 13:19:59 -070062 static size_t CodeDelta(InstructionSet instruction_set);
Logan Chien598c5132012-04-28 22:00:44 +080063
64 // Returns a pointer suitable for invoking the code at the argument
65 // code_pointer address. Mainly to cope with kThumb2 where the
66 // lower bit must be set to indicate Thumb mode.
67 static const void* CodePointer(const void* code_pointer,
68 InstructionSet instruction_set);
69
Vladimir Marko35831e82015-09-11 11:59:18 +010070 protected:
71 template <typename T>
72 static ArrayRef<const T> GetArray(const LengthPrefixedArray<T>* array) {
73 if (array == nullptr) {
74 return ArrayRef<const T>();
75 }
76 DCHECK_NE(array->size(), 0u);
77 return ArrayRef<const T>(&array->At(0), array->size());
78 }
79
80 CompilerDriver* GetCompilerDriver() {
81 return compiler_driver_;
82 }
Brian Carlstrom265091e2013-01-30 14:08:26 -080083
Logan Chien598c5132012-04-28 22:00:44 +080084 private:
Ian Rogersef7d42f2014-01-06 12:55:46 -080085 CompilerDriver* const compiler_driver_;
Mathieu Chartier193bad92013-08-29 18:46:00 -070086
Logan Chien598c5132012-04-28 22:00:44 +080087 const InstructionSet instruction_set_;
Brian Carlstrom8227cc12013-03-06 14:26:48 -080088
Ian Rogersef7d42f2014-01-06 12:55:46 -080089 // Used to store the PIC code for Quick.
Vladimir Marko35831e82015-09-11 11:59:18 +010090 const LengthPrefixedArray<uint8_t>* const quick_code_;
Logan Chien598c5132012-04-28 22:00:44 +080091};
92
Yevgeny Roubane3ea8382014-08-08 16:29:38 +070093class SrcMapElem {
94 public:
95 uint32_t from_;
96 int32_t to_;
Yevgeny Roubane3ea8382014-08-08 16:29:38 +070097};
98
Vladimir Marko35831e82015-09-11 11:59:18 +010099inline bool operator<(const SrcMapElem& lhs, const SrcMapElem& rhs) {
100 if (lhs.from_ != rhs.from_) {
101 return lhs.from_ < rhs.from_;
102 }
103 return lhs.to_ < rhs.to_;
104}
105
106inline bool operator==(const SrcMapElem& lhs, const SrcMapElem& rhs) {
107 return lhs.from_ == rhs.from_ && lhs.to_ == rhs.to_;
108}
109
Andreas Gampee21dc3d2014-12-08 16:59:43 -0800110template <class Allocator>
111class SrcMap FINAL : public std::vector<SrcMapElem, Allocator> {
Yevgeny Roubane3ea8382014-08-08 16:29:38 +0700112 public:
Andreas Gampee21dc3d2014-12-08 16:59:43 -0800113 using std::vector<SrcMapElem, Allocator>::begin;
114 using typename std::vector<SrcMapElem, Allocator>::const_iterator;
115 using std::vector<SrcMapElem, Allocator>::empty;
116 using std::vector<SrcMapElem, Allocator>::end;
117 using std::vector<SrcMapElem, Allocator>::resize;
118 using std::vector<SrcMapElem, Allocator>::shrink_to_fit;
119 using std::vector<SrcMapElem, Allocator>::size;
120
121 explicit SrcMap() {}
Mathieu Chartiere5f13e52015-02-24 09:37:21 -0800122 explicit SrcMap(const Allocator& alloc) : std::vector<SrcMapElem, Allocator>(alloc) {}
Andreas Gampee21dc3d2014-12-08 16:59:43 -0800123
124 template <class InputIt>
125 SrcMap(InputIt first, InputIt last, const Allocator& alloc)
126 : std::vector<SrcMapElem, Allocator>(first, last, alloc) {}
127
David Srbecky6f715892015-03-30 14:21:42 +0100128 void push_back(const SrcMapElem& elem) {
Yevgeny Roubane3ea8382014-08-08 16:29:38 +0700129 if (!empty()) {
David Srbecky6f715892015-03-30 14:21:42 +0100130 // Check that the addresses are inserted in sorted order.
131 DCHECK_GE(elem.from_, this->back().from_);
132 // If two consequitive entries map to the same value, ignore the later.
133 // E.g. for map {{0, 1}, {4, 1}, {8, 2}}, all values in [0,8) map to 1.
134 if (elem.to_ == this->back().to_) {
135 return;
136 }
Yevgeny Roubane3ea8382014-08-08 16:29:38 +0700137 }
David Srbecky6f715892015-03-30 14:21:42 +0100138 std::vector<SrcMapElem, Allocator>::push_back(elem);
Yevgeny Roubane3ea8382014-08-08 16:29:38 +0700139 }
140
David Srbecky6f715892015-03-30 14:21:42 +0100141 // Returns true and the corresponding "to" value if the mapping is found.
142 // Oterwise returns false and 0.
143 std::pair<bool, int32_t> Find(uint32_t from) const {
144 // Finds first mapping such that lb.from_ >= from.
145 auto lb = std::lower_bound(begin(), end(), SrcMapElem {from, INT32_MIN});
146 if (lb != end() && lb->from_ == from) {
147 // Found exact match.
148 return std::make_pair(true, lb->to_);
149 } else if (lb != begin()) {
150 // The previous mapping is still in effect.
151 return std::make_pair(true, (--lb)->to_);
152 } else {
153 // Not found because 'from' is smaller than first entry in the map.
154 return std::make_pair(false, 0);
Yevgeny Roubane3ea8382014-08-08 16:29:38 +0700155 }
156 }
157};
158
Andreas Gampee21dc3d2014-12-08 16:59:43 -0800159using DefaultSrcMap = SrcMap<std::allocator<SrcMapElem>>;
Andreas Gampee21dc3d2014-12-08 16:59:43 -0800160
161
Vladimir Markof4da6752014-08-01 19:04:18 +0100162enum LinkerPatchType {
163 kLinkerPatchMethod,
164 kLinkerPatchCall,
165 kLinkerPatchCallRelative, // NOTE: Actual patching is instruction_set-dependent.
166 kLinkerPatchType,
Vladimir Marko20f85592015-03-19 10:07:02 +0000167 kLinkerPatchDexCacheArray, // NOTE: Actual patching is instruction_set-dependent.
Vladimir Markof4da6752014-08-01 19:04:18 +0100168};
169
170class LinkerPatch {
171 public:
172 static LinkerPatch MethodPatch(size_t literal_offset,
173 const DexFile* target_dex_file,
174 uint32_t target_method_idx) {
Vladimir Marko20f85592015-03-19 10:07:02 +0000175 LinkerPatch patch(literal_offset, kLinkerPatchMethod, target_dex_file);
176 patch.method_idx_ = target_method_idx;
177 return patch;
Vladimir Markof4da6752014-08-01 19:04:18 +0100178 }
179
180 static LinkerPatch CodePatch(size_t literal_offset,
181 const DexFile* target_dex_file,
182 uint32_t target_method_idx) {
Vladimir Marko20f85592015-03-19 10:07:02 +0000183 LinkerPatch patch(literal_offset, kLinkerPatchCall, target_dex_file);
184 patch.method_idx_ = target_method_idx;
185 return patch;
Vladimir Markof4da6752014-08-01 19:04:18 +0100186 }
187
188 static LinkerPatch RelativeCodePatch(size_t literal_offset,
189 const DexFile* target_dex_file,
190 uint32_t target_method_idx) {
Vladimir Marko20f85592015-03-19 10:07:02 +0000191 LinkerPatch patch(literal_offset, kLinkerPatchCallRelative, target_dex_file);
192 patch.method_idx_ = target_method_idx;
193 return patch;
Vladimir Markof4da6752014-08-01 19:04:18 +0100194 }
195
196 static LinkerPatch TypePatch(size_t literal_offset,
197 const DexFile* target_dex_file,
198 uint32_t target_type_idx) {
Vladimir Marko20f85592015-03-19 10:07:02 +0000199 LinkerPatch patch(literal_offset, kLinkerPatchType, target_dex_file);
200 patch.type_idx_ = target_type_idx;
201 return patch;
202 }
203
204 static LinkerPatch DexCacheArrayPatch(size_t literal_offset,
205 const DexFile* target_dex_file,
206 uint32_t pc_insn_offset,
207 size_t element_offset) {
208 DCHECK(IsUint<32>(element_offset));
209 LinkerPatch patch(literal_offset, kLinkerPatchDexCacheArray, target_dex_file);
210 patch.pc_insn_offset_ = pc_insn_offset;
211 patch.element_offset_ = element_offset;
212 return patch;
Vladimir Markof4da6752014-08-01 19:04:18 +0100213 }
214
215 LinkerPatch(const LinkerPatch& other) = default;
216 LinkerPatch& operator=(const LinkerPatch& other) = default;
217
218 size_t LiteralOffset() const {
219 return literal_offset_;
220 }
221
222 LinkerPatchType Type() const {
223 return patch_type_;
224 }
225
Vladimir Marko20f85592015-03-19 10:07:02 +0000226 bool IsPcRelative() const {
227 return Type() == kLinkerPatchCallRelative || Type() == kLinkerPatchDexCacheArray;
228 }
229
Vladimir Markof4da6752014-08-01 19:04:18 +0100230 MethodReference TargetMethod() const {
231 DCHECK(patch_type_ == kLinkerPatchMethod ||
232 patch_type_ == kLinkerPatchCall || patch_type_ == kLinkerPatchCallRelative);
Vladimir Marko20f85592015-03-19 10:07:02 +0000233 return MethodReference(target_dex_file_, method_idx_);
Vladimir Markof4da6752014-08-01 19:04:18 +0100234 }
235
236 const DexFile* TargetTypeDexFile() const {
237 DCHECK(patch_type_ == kLinkerPatchType);
238 return target_dex_file_;
239 }
240
241 uint32_t TargetTypeIndex() const {
242 DCHECK(patch_type_ == kLinkerPatchType);
Vladimir Marko20f85592015-03-19 10:07:02 +0000243 return type_idx_;
244 }
245
246 const DexFile* TargetDexCacheDexFile() const {
247 DCHECK(patch_type_ == kLinkerPatchDexCacheArray);
248 return target_dex_file_;
249 }
250
251 size_t TargetDexCacheElementOffset() const {
252 DCHECK(patch_type_ == kLinkerPatchDexCacheArray);
253 return element_offset_;
254 }
255
256 uint32_t PcInsnOffset() const {
257 DCHECK(patch_type_ == kLinkerPatchDexCacheArray);
258 return pc_insn_offset_;
Vladimir Markof4da6752014-08-01 19:04:18 +0100259 }
260
261 private:
Vladimir Marko20f85592015-03-19 10:07:02 +0000262 LinkerPatch(size_t literal_offset, LinkerPatchType patch_type, const DexFile* target_dex_file)
263 : target_dex_file_(target_dex_file),
264 literal_offset_(literal_offset),
265 patch_type_(patch_type) {
266 cmp1_ = 0u;
267 cmp2_ = 0u;
268 // The compiler rejects methods that are too big, so the compiled code
269 // of a single method really shouln't be anywhere close to 16MiB.
270 DCHECK(IsUint<24>(literal_offset));
Vladimir Markof4da6752014-08-01 19:04:18 +0100271 }
272
Vladimir Markof4da6752014-08-01 19:04:18 +0100273 const DexFile* target_dex_file_;
Vladimir Marko20f85592015-03-19 10:07:02 +0000274 uint32_t literal_offset_ : 24; // Method code size up to 16MiB.
275 LinkerPatchType patch_type_ : 8;
276 union {
277 uint32_t cmp1_; // Used for relational operators.
278 uint32_t method_idx_; // Method index for Call/Method patches.
279 uint32_t type_idx_; // Type index for Type patches.
280 uint32_t element_offset_; // Element offset in the dex cache arrays.
Vladimir Marko35831e82015-09-11 11:59:18 +0100281 static_assert(sizeof(method_idx_) == sizeof(cmp1_), "needed by relational operators");
282 static_assert(sizeof(type_idx_) == sizeof(cmp1_), "needed by relational operators");
283 static_assert(sizeof(element_offset_) == sizeof(cmp1_), "needed by relational operators");
Vladimir Marko20f85592015-03-19 10:07:02 +0000284 };
285 union {
286 uint32_t cmp2_; // Used for relational operators.
287 // Literal offset of the insn loading PC (same as literal_offset if it's the same insn,
288 // may be different if the PC-relative addressing needs multiple insns).
289 uint32_t pc_insn_offset_;
290 static_assert(sizeof(pc_insn_offset_) == sizeof(cmp2_), "needed by relational operators");
291 };
Vladimir Markof4da6752014-08-01 19:04:18 +0100292
293 friend bool operator==(const LinkerPatch& lhs, const LinkerPatch& rhs);
294 friend bool operator<(const LinkerPatch& lhs, const LinkerPatch& rhs);
295};
296
297inline bool operator==(const LinkerPatch& lhs, const LinkerPatch& rhs) {
298 return lhs.literal_offset_ == rhs.literal_offset_ &&
299 lhs.patch_type_ == rhs.patch_type_ &&
Vladimir Marko20f85592015-03-19 10:07:02 +0000300 lhs.target_dex_file_ == rhs.target_dex_file_ &&
301 lhs.cmp1_ == rhs.cmp1_ &&
302 lhs.cmp2_ == rhs.cmp2_;
Vladimir Markof4da6752014-08-01 19:04:18 +0100303}
304
305inline bool operator<(const LinkerPatch& lhs, const LinkerPatch& rhs) {
306 return (lhs.literal_offset_ != rhs.literal_offset_) ? lhs.literal_offset_ < rhs.literal_offset_
307 : (lhs.patch_type_ != rhs.patch_type_) ? lhs.patch_type_ < rhs.patch_type_
Vladimir Marko20f85592015-03-19 10:07:02 +0000308 : (lhs.target_dex_file_ != rhs.target_dex_file_) ? lhs.target_dex_file_ < rhs.target_dex_file_
309 : (lhs.cmp1_ != rhs.cmp1_) ? lhs.cmp1_ < rhs.cmp1_
310 : lhs.cmp2_ < rhs.cmp2_;
Vladimir Markof4da6752014-08-01 19:04:18 +0100311}
312
Yevgeny Roubane3ea8382014-08-08 16:29:38 +0700313class CompiledMethod FINAL : public CompiledCode {
Brian Carlstrom3320cf42011-10-04 14:58:28 -0700314 public:
Andreas Gampee21dc3d2014-12-08 16:59:43 -0800315 // Constructs a CompiledMethod.
316 // Note: Consider using the static allocation methods below that will allocate the CompiledMethod
317 // in the swap space.
Ian Rogers72d32622014-05-06 16:20:11 -0700318 CompiledMethod(CompilerDriver* driver,
Mathieu Chartier193bad92013-08-29 18:46:00 -0700319 InstructionSet instruction_set,
Andreas Gampee21dc3d2014-12-08 16:59:43 -0800320 const ArrayRef<const uint8_t>& quick_code,
Brian Carlstrom3320cf42011-10-04 14:58:28 -0700321 const size_t frame_size_in_bytes,
Brian Carlstrom3320cf42011-10-04 14:58:28 -0700322 const uint32_t core_spill_mask,
323 const uint32_t fp_spill_mask,
Vladimir Marko35831e82015-09-11 11:59:18 +0100324 const ArrayRef<const SrcMapElem>& src_mapping_table,
Andreas Gampee21dc3d2014-12-08 16:59:43 -0800325 const ArrayRef<const uint8_t>& mapping_table,
326 const ArrayRef<const uint8_t>& vmap_table,
327 const ArrayRef<const uint8_t>& native_gc_map,
328 const ArrayRef<const uint8_t>& cfi_info,
David Srbeckyc6b4dd82015-04-07 20:32:43 +0100329 const ArrayRef<const LinkerPatch>& patches);
Brian Carlstrom3320cf42011-10-04 14:58:28 -0700330
Mathieu Chartiere5f13e52015-02-24 09:37:21 -0800331 virtual ~CompiledMethod();
Brian Carlstrom3320cf42011-10-04 14:58:28 -0700332
Andreas Gampee21dc3d2014-12-08 16:59:43 -0800333 static CompiledMethod* SwapAllocCompiledMethod(
334 CompilerDriver* driver,
335 InstructionSet instruction_set,
336 const ArrayRef<const uint8_t>& quick_code,
337 const size_t frame_size_in_bytes,
338 const uint32_t core_spill_mask,
339 const uint32_t fp_spill_mask,
Vladimir Marko35831e82015-09-11 11:59:18 +0100340 const ArrayRef<const SrcMapElem>& src_mapping_table,
Andreas Gampee21dc3d2014-12-08 16:59:43 -0800341 const ArrayRef<const uint8_t>& mapping_table,
342 const ArrayRef<const uint8_t>& vmap_table,
343 const ArrayRef<const uint8_t>& native_gc_map,
344 const ArrayRef<const uint8_t>& cfi_info,
David Srbeckyc6b4dd82015-04-07 20:32:43 +0100345 const ArrayRef<const LinkerPatch>& patches);
Andreas Gampee21dc3d2014-12-08 16:59:43 -0800346
347 static void ReleaseSwapAllocatedCompiledMethod(CompilerDriver* driver, CompiledMethod* m);
348
Ian Rogers0c7abda2012-09-19 13:33:42 -0700349 size_t GetFrameSizeInBytes() const {
350 return frame_size_in_bytes_;
Logan Chien110bcba2012-04-16 19:11:28 +0800351 }
Ian Rogers0c7abda2012-09-19 13:33:42 -0700352
353 uint32_t GetCoreSpillMask() const {
354 return core_spill_mask_;
355 }
356
357 uint32_t GetFpSpillMask() const {
358 return fp_spill_mask_;
359 }
360
Vladimir Marko35831e82015-09-11 11:59:18 +0100361 ArrayRef<const SrcMapElem> GetSrcMappingTable() const {
362 return GetArray(src_mapping_table_);
Yevgeny Roubane3ea8382014-08-08 16:29:38 +0700363 }
364
Vladimir Marko35831e82015-09-11 11:59:18 +0100365 ArrayRef<const uint8_t> GetMappingTable() const {
366 return GetArray(mapping_table_);
Ian Rogers0c7abda2012-09-19 13:33:42 -0700367 }
368
Vladimir Marko35831e82015-09-11 11:59:18 +0100369 ArrayRef<const uint8_t> GetVmapTable() const {
370 return GetArray(vmap_table_);
Ian Rogers0c7abda2012-09-19 13:33:42 -0700371 }
372
Vladimir Marko35831e82015-09-11 11:59:18 +0100373 ArrayRef<const uint8_t> GetGcMap() const {
374 return GetArray(gc_map_);
Ian Rogers0c7abda2012-09-19 13:33:42 -0700375 }
Logan Chien110bcba2012-04-16 19:11:28 +0800376
Vladimir Marko35831e82015-09-11 11:59:18 +0100377 ArrayRef<const uint8_t> GetCFIInfo() const {
378 return GetArray(cfi_info_);
Mark Mendellae9fd932014-02-10 16:14:35 -0800379 }
380
Vladimir Markob207e142015-04-02 21:25:21 +0100381 ArrayRef<const LinkerPatch> GetPatches() const {
Vladimir Marko35831e82015-09-11 11:59:18 +0100382 return GetArray(patches_);
Vladimir Markof4da6752014-08-01 19:04:18 +0100383 }
384
Brian Carlstrom3320cf42011-10-04 14:58:28 -0700385 private:
Ian Rogersa1827042013-04-18 16:36:43 -0700386 // For quick code, the size of the activation used by the code.
Ian Rogers0c7abda2012-09-19 13:33:42 -0700387 const size_t frame_size_in_bytes_;
Ian Rogersa1827042013-04-18 16:36:43 -0700388 // For quick code, a bit mask describing spilled GPR callee-save registers.
Ian Rogers169c9a72011-11-13 20:13:17 -0800389 const uint32_t core_spill_mask_;
Ian Rogersa1827042013-04-18 16:36:43 -0700390 // For quick code, a bit mask describing spilled FPR callee-save registers.
Ian Rogers169c9a72011-11-13 20:13:17 -0800391 const uint32_t fp_spill_mask_;
David Srbecky6f715892015-03-30 14:21:42 +0100392 // For quick code, a set of pairs (PC, DEX) mapping from native PC offset to DEX offset.
Vladimir Marko35831e82015-09-11 11:59:18 +0100393 const LengthPrefixedArray<SrcMapElem>* const src_mapping_table_;
Ian Rogers96faf5b2013-08-09 22:05:32 -0700394 // For quick code, a uleb128 encoded map from native PC offset to dex PC aswell as dex PC to
395 // native PC offset. Size prefixed.
Vladimir Marko35831e82015-09-11 11:59:18 +0100396 const LengthPrefixedArray<uint8_t>* const mapping_table_;
Ian Rogers96faf5b2013-08-09 22:05:32 -0700397 // For quick code, a uleb128 encoded map from GPR/FPR register to dex register. Size prefixed.
Vladimir Marko35831e82015-09-11 11:59:18 +0100398 const LengthPrefixedArray<uint8_t>* const vmap_table_;
Ian Rogersa1827042013-04-18 16:36:43 -0700399 // For quick code, a map keyed by native PC indices to bitmaps describing what dalvik registers
Elliott Hughes956af0f2014-12-11 14:34:28 -0800400 // are live.
Vladimir Marko35831e82015-09-11 11:59:18 +0100401 const LengthPrefixedArray<uint8_t>* const gc_map_;
Mark Mendellae9fd932014-02-10 16:14:35 -0800402 // For quick code, a FDE entry for the debug_frame section.
Vladimir Marko35831e82015-09-11 11:59:18 +0100403 const LengthPrefixedArray<uint8_t>* const cfi_info_;
Vladimir Markof4da6752014-08-01 19:04:18 +0100404 // For quick code, linker patches needed by the method.
Vladimir Marko35831e82015-09-11 11:59:18 +0100405 const LengthPrefixedArray<LinkerPatch>* const patches_;
Brian Carlstrom3320cf42011-10-04 14:58:28 -0700406};
407
Brian Carlstrom3320cf42011-10-04 14:58:28 -0700408} // namespace art
409
Mathieu Chartier193bad92013-08-29 18:46:00 -0700410#endif // ART_COMPILER_COMPILED_METHOD_H_