Lines Matching defs:idx

69 const char* DexFileVerifier::CheckLoadStringByIdx(uint32_t idx, const char* error_string) {
70 if (UNLIKELY(!CheckIndex(idx, dex_file_->NumStringIds(), error_string))) {
73 return dex_file_->StringDataByIdx(idx);
81 uint32_t idx = type_id.descriptor_idx_;
82 return CheckLoadStringByIdx(idx, error_string);
85 const DexFile::FieldId* DexFileVerifier::CheckLoadFieldId(uint32_t idx, const char* error_string) {
86 if (UNLIKELY(!CheckIndex(idx, dex_file_->NumFieldIds(), error_string))) {
89 return &dex_file_->GetFieldId(idx);
92 const DexFile::MethodId* DexFileVerifier::CheckLoadMethodId(uint32_t idx, const char* err_string) {
93 if (UNLIKELY(!CheckIndex(idx, dex_file_->NumMethodIds(), err_string))) {
96 return &dex_file_->GetMethodId(idx);
100 #define LOAD_STRING(var, idx, error) \
101 const char* var = CheckLoadStringByIdx(idx, error); \
106 // Helper macro to load string by type idx and return false on error.
114 #define LOAD_METHOD(var, idx, error_string, error_stmt) \
115 const DexFile::MethodId* var = CheckLoadMethodId(idx, error_string); \
121 #define LOAD_FIELD(var, idx, fmt, error_stmt) \
122 const DexFile::FieldId* var = CheckLoadFieldId(idx, fmt); \
447 bool DexFileVerifier::CheckClassDataItemField(uint32_t idx, uint32_t access_flags,
449 if (!CheckIndex(idx, header_->field_ids_size_, "class_data_item field_idx")) {
467 bool DexFileVerifier::CheckClassDataItemMethod(uint32_t idx, uint32_t access_flags,
469 if (!CheckIndex(idx, header_->method_ids_size_, "class_data_item method_idx")) {
563 uint32_t idx = ReadUnsignedLittleEndian(value_arg + 1);
564 if (!CheckIndex(idx, header_->string_ids_size_, "encoded_value string")) {
574 uint32_t idx = ReadUnsignedLittleEndian(value_arg + 1);
575 if (!CheckIndex(idx, header_->type_ids_size_, "encoded_value type")) {
586 uint32_t idx = ReadUnsignedLittleEndian(value_arg + 1);
587 if (!CheckIndex(idx, header_->field_ids_size_, "encoded_value field")) {
597 uint32_t idx = ReadUnsignedLittleEndian(value_arg + 1);
598 if (!CheckIndex(idx, header_->method_ids_size_, "encoded_value method")) {
654 uint32_t idx = DecodeUnsignedLeb128(&ptr_);
655 if (!CheckIndex(idx, header_->type_ids_size_, "encoded_annotation type_idx")) {
663 idx = DecodeUnsignedLeb128(&ptr_);
664 if (!CheckIndex(idx, header_->string_ids_size_, "annotation_element name_idx")) {
668 if (UNLIKELY(last_idx >= idx && i != 0)) {
670 last_idx, idx);
678 last_idx = idx;
1687 ErrorStringPrintf("Redefinition of class with type idx: '%d'", item->class_idx_);
1826 uint32_t idx = DecodeUnsignedLeb128(&data);
1828 if (UNLIKELY(last_idx >= idx && i != 0)) {
1829 ErrorStringPrintf("Out-of-order entry types: %x then %x", last_idx, idx);
1833 last_idx = idx;