MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / ComponentSize

Method ComponentSize

Bcore/src/main/cpp/dex/primitive.h:95–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93 }
94
95 static constexpr size_t ComponentSize(Type type) {
96 switch (type) {
97 case kPrimVoid: return 0;
98 case kPrimBoolean:
99 case kPrimByte: return 1;
100 case kPrimChar:
101 case kPrimShort: return 2;
102 case kPrimInt:
103 case kPrimFloat: return 4;
104 case kPrimLong:
105 case kPrimDouble: return 8;
106 case kPrimNot: return kObjectReferenceSize;
107 }
108 LOG(FATAL) << "Invalid type " << static_cast<int>(type);
109 UNREACHABLE();
110 }
111
112 static const char* Descriptor(Type type) {
113 switch (type) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected