Home | History | Annotate | Download | only in runtime

Lines Matching refs:DexRegisterLocation

55 class DexRegisterLocation {
109 "art::DexRegisterLocation::Kind has a size different from one byte.");
157 DexRegisterLocation() : kind_(Kind::kNone), value_(0) {}
159 DexRegisterLocation(Kind kind, int32_t value) : kind_(kind), value_(value) {}
161 static DexRegisterLocation None() {
162 return DexRegisterLocation(Kind::kNone, 0);
177 bool operator==(DexRegisterLocation other) const {
181 bool operator!=(DexRegisterLocation other) const {
192 std::ostream& operator<<(std::ostream& stream, const DexRegisterLocation::Kind& kind);
198 * [DexRegisterLocation+].
200 * DexRegisterLocations are either 1- or 5-byte wide (see art::DexRegisterLocation::Kind).
209 void SetRegisterInfo(size_t offset, const DexRegisterLocation& dex_register_location) {
210 DexRegisterLocation::Kind kind = ComputeCompressedKind(dex_register_location);
212 if (DexRegisterLocation::IsShortLocationKind(kind)) {
214 if (kind == DexRegisterLocation::Kind::kInStack) {
230 if (kind == DexRegisterLocation::Kind::kInStackLargeOffset) {
239 region_.StoreUnaligned<DexRegisterLocation::Kind>(offset, kind);
240 region_.StoreUnaligned<int32_t>(offset + sizeof(DexRegisterLocation::Kind), value);
251 DexRegisterLocation::Kind kind = ExtractKindAtOffset(offset);
252 if (DexRegisterLocation::IsShortLocationKind(kind)) {
264 DexRegisterLocation::Kind GetLocationInternalKind(size_t location_catalog_entry_index) const {
266 return DexRegisterLocation::Kind::kNone;
272 DexRegisterLocation GetDexRegisterLocation(size_t location_catalog_entry_index) const {
274 return DexRegisterLocation::None();
279 DexRegisterLocation::Kind kind = ExtractKindFromShortLocation(first_byte);
280 if (DexRegisterLocation::IsShortLocationKind(kind)) {
283 if (kind == DexRegisterLocation::Kind::kInStack) {
287 return DexRegisterLocation(kind, value);
290 int32_t value = region_.LoadUnaligned<int32_t>(offset + sizeof(DexRegisterLocation::Kind));
291 if (kind == DexRegisterLocation::Kind::kInStackLargeOffset) {
295 return DexRegisterLocation(kind, value);
300 static DexRegisterLocation::Kind ComputeCompressedKind(const DexRegisterLocation& location) {
301 DexRegisterLocation::Kind kind = location.GetInternalKind();
303 case DexRegisterLocation::Kind::kInStack:
305 ? DexRegisterLocation::Kind::kInStack
306 : DexRegisterLocation::Kind::kInStackLargeOffset;
308 case DexRegisterLocation::Kind::kInRegister:
309 case DexRegisterLocation::Kind::kInRegisterHigh:
314 case DexRegisterLocation::Kind::kInFpuRegister:
315 case DexRegisterLocation::Kind::kInFpuRegisterHigh:
320 case DexRegisterLocation::Kind::kConstant:
322 ? DexRegisterLocation::Kind::kConstant
323 : DexRegisterLocation::Kind::kConstantLargeValue;
325 case DexRegisterLocation::Kind::kConstantLargeValue:
326 case DexRegisterLocation::Kind::kInStackLargeOffset:
327 case DexRegisterLocation::Kind::kNone:
334 static bool CanBeEncodedAsShortLocation(const DexRegisterLocation& location) {
335 DexRegisterLocation::Kind kind = location.GetInternalKind();
337 case DexRegisterLocation::Kind::kInStack:
340 case DexRegisterLocation::Kind::kInRegister:
341 case DexRegisterLocation::Kind::kInRegisterHigh:
342 case DexRegisterLocation::Kind::kInFpuRegister:
343 case DexRegisterLocation::Kind::kInFpuRegisterHigh:
346 case DexRegisterLocation::Kind::kConstant:
349 case DexRegisterLocation::Kind::kConstantLargeValue:
350 case DexRegisterLocation::Kind::kInStackLargeOffset:
351 case DexRegisterLocation::Kind::kNone:
357 static size_t EntrySize(const DexRegisterLocation& location) {
366 return sizeof(DexRegisterLocation::Kind) + sizeof(int32_t);
378 // mapped to a DexRegisterLocation::Kind::kNone location).
407 static ShortLocation MakeShortLocation(DexRegisterLocation::Kind kind, int32_t value) {
415 static DexRegisterLocation::Kind ExtractKindFromShortLocation(ShortLocation location) {
417 DCHECK_LE(kind, static_cast<uint8_t>(DexRegisterLocation::Kind::kLastLocationKind));
419 DCHECK_NE(kind, static_cast<uint8_t>(DexRegisterLocation::Kind::kNone));
420 return static_cast<DexRegisterLocation::Kind>(kind);
428 DexRegisterLocation::Kind ExtractKindAtOffset(size_t offset) const {
458 DexRegisterLocation::Kind GetLocationKind(uint16_t dex_register_number,
462 return DexRegisterLocation::ConvertToSurfaceKind(
467 DexRegisterLocation::Kind GetLocationInternalKind(uint16_t dex_register_number,
473 DexRegisterLocation GetDexRegisterLocation(uint16_t dex_register_number,
482 DexRegisterLocation location =
484 DCHECK(location.GetKind() == DexRegisterLocation::Kind::kInStack);
493 DexRegisterLocation location =
495 DCHECK_EQ(location.GetKind(), DexRegisterLocation::Kind::kConstant);
503 DexRegisterLocation location =
505 DCHECK(location.GetInternalKind() == DexRegisterLocation::Kind::kInRegister ||
506 location.GetInternalKind() == DexRegisterLocation::Kind::kInRegisterHigh ||
507 location.GetInternalKind() == DexRegisterLocation::Kind::kInFpuRegister ||
508 location.GetInternalKind() == DexRegisterLocation::Kind::kInFpuRegisterHigh)
648 // have been mapped to a DexRegisterLocation::Kind::kNone location).
1630 DexRegisterLocation::Kind kind =
1632 DexRegisterLocation::IsShortLocationKind(kind)) {