namespace linker { class LinkerPatch;
} // namespace linker
// TODO: Find a better name. This stores both method and non-method (thunks) code. class CompiledMethodStorage final : public CompiledCodeStorage { public: explicit CompiledMethodStorage(int swap_fd);
~CompiledMethodStorage();
// Returns the code associated with the given patch. // If the code has not been set, returns empty data. // If `debug_name` is not null, stores the associated debug name in `*debug_name`.
ArrayRef<const uint8_t> GetThunkCode(const linker::LinkerPatch& linker_patch, /*out*/ std::string* debug_name = nullptr) override;
// Sets the code and debug name associated with the given patch. void SetThunkCode(const linker::LinkerPatch& linker_patch,
ArrayRef<const uint8_t> code, const std::string& debug_name) override;
private: class ThunkMapKey; class ThunkMapValue; using ThunkMapValueType = std::pair<const ThunkMapKey, ThunkMapValue>; using ThunkMap = std::map<ThunkMapKey,
ThunkMapValue,
std::less<ThunkMapKey>,
SwapAllocator<ThunkMapValueType>>;
static_assert(std::is_same<ThunkMapValueType, ThunkMap::value_type>::value, "Value type check.");
// Swap pool and allocator used for native allocations. May be file-backed. Needs to be first // as other fields rely on this.
std::unique_ptr<SwapSpace> swap_space_;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.