• Home
  • Raw
  • Download

Lines Matching refs:program

130 …::string AsmEmitter::GetMethodSignatureFromProgram(const std::string &name, const Program &program)  in GetMethodSignatureFromProgram()  argument
136 const auto it_synonym = program.function_synonyms.find(name); in GetMethodSignatureFromProgram()
137 const bool is_method_known = (it_synonym != program.function_synonyms.end()); in GetMethodSignatureFromProgram()
257 …ontainer *container, const Value *value, std::vector<ScalarValueItem> *out, const Program &program, in CreateScalarMethodValueItem() argument
262 name = GetMethodSignatureFromProgram(name, program); in CreateScalarMethodValueItem()
280 …ontainer *container, const Value *value, std::vector<ScalarValueItem> *out, const Program &program, in CreateScalarLiteralArrayItem() argument
317 …ontainer *container, const Value *value, std::vector<ScalarValueItem> *out, const Program &program, in CreateScalarAnnotationValueItem() argument
321 auto *annotation_item = CreateAnnotationItem(container, annotation, program, entities); in CreateScalarAnnotationValueItem()
336 … std::vector<ScalarValueItem> *out, const Program &program, in CreateScalarValueItem() argument
369 … return CreateScalarMethodValueItem(container, value, out, program, entities.method_items); in CreateScalarValueItem()
375 return CreateScalarAnnotationValueItem(container, value, out, program, entities); in CreateScalarValueItem()
378 … return CreateScalarLiteralArrayItem(container, value, out, program, entities.literalarray_items); in CreateScalarValueItem()
388 … *AsmEmitter::CreateValueItem(ItemContainer *container, const Value *value, const Program &program, in CreateValueItem() argument
396 CreateScalarValueItem(container, &elem_value, &elements, program, entities); in CreateValueItem()
407 return CreateScalarValueItem(container, value, nullptr, program, entities); in CreateValueItem()
414 const Program &program, const AsmEmitter::AsmEntityCollections &entities) in CreateAnnotationItem() argument
417 auto it = program.record_table.find(record_name); in CreateAnnotationItem()
418 if (it == program.record_table.cend()) { in CreateAnnotationItem()
449 auto *item = CreateValueItem(container, value, program, entities); in CreateAnnotationItem()
494 … const Program &program, const AsmEmitter::AsmEntityCollections &entities) in AddAnnotations() argument
497 auto *annotation_item = CreateAnnotationItem(container, annotation, program, entities); in AddAnnotations()
502 auto &record = program.record_table.find(annotation.GetName())->second; in AddAnnotations()
560 void AsmEmitter::MakeStringItems(ItemContainer *items, const Program &program, in MakeStringItems() argument
563 for (const auto &s : program.strings) { in MakeStringItems()
570 void AsmEmitter::MakeLiteralItems(ItemContainer *items, const Program &program, in MakeLiteralItems() argument
573 for (const auto &[id, l] : program.literalarray_table) { in MakeLiteralItems()
578 for (const auto &[id, l] : program.literalarray_table) { in MakeLiteralItems()
585 ASSERT(program.array_types.find(Type("u1", 1)) != program.array_types.end()); in MakeLiteralItems()
591 ASSERT(program.array_types.find(Type("u8", 1)) != program.array_types.end()); in MakeLiteralItems()
597 ASSERT(program.array_types.find(Type("i8", 1)) != program.array_types.end()); in MakeLiteralItems()
603 ASSERT(program.array_types.find(Type("u16", 1)) != program.array_types.end()); in MakeLiteralItems()
609 ASSERT(program.array_types.find(Type("i16", 1)) != program.array_types.end()); in MakeLiteralItems()
615 ASSERT(program.array_types.find(Type("u32", 1)) != program.array_types.end()); in MakeLiteralItems()
621 ASSERT(program.array_types.find(Type("i32", 1)) != program.array_types.end()); in MakeLiteralItems()
627 ASSERT(program.array_types.find(Type("u64", 1)) != program.array_types.end()); in MakeLiteralItems()
633 ASSERT(program.array_types.find(Type("i64", 1)) != program.array_types.end()); in MakeLiteralItems()
639 ASSERT(program.array_types.find(Type("f32", 1)) != program.array_types.end()); in MakeLiteralItems()
645 ASSERT(program.array_types.find(Type("f64", 1)) != program.array_types.end()); in MakeLiteralItems()
651 ASSERT(program.array_types.find(Type( in MakeLiteralItems()
652 … Type::FromDescriptor(panda::panda_file::GetStringClassDescriptor(program.lang)), 1)) != in MakeLiteralItems()
653 program.array_types.end()); in MakeLiteralItems()
711 void AsmEmitter::MakeArrayTypeItems(ItemContainer *items, const Program &program, in MakeArrayTypeItems() argument
714 for (const auto &t : program.array_types) { in MakeArrayTypeItems()
722 ItemContainer *items, const Program &program, AsmEmitter::AsmEntityCollections &entities, in HandleRecordAsForeign() argument
737 auto *type_item = GetTypeItem(items, primitive_types, f.type, program); in HandleRecordAsForeign()
749 bool AsmEmitter::HandleBaseRecord(ItemContainer *items, const Program &program, const std::string &… in HandleBaseRecord() argument
754 auto it = program.record_table.find(base_name); in HandleBaseRecord()
755 if (it == program.record_table.cend()) { in HandleBaseRecord()
771 bool AsmEmitter::HandleInterfaces(ItemContainer *items, const Program &program, const std::string &… in HandleInterfaces() argument
776 auto it = program.record_table.find(item); in HandleInterfaces()
777 if (it == program.record_table.cend()) { in HandleInterfaces()
793 bool AsmEmitter::HandleFields(ItemContainer *items, const Program &program, AsmEmitter::AsmEntityCo… in HandleFields() argument
800 auto *type_item = GetTypeItem(items, primitive_types, f.type, program); in HandleFields()
817 bool AsmEmitter::HandleRecord(ItemContainer *items, const Program &program, AsmEmitter::AsmEntityCo… in HandleRecord() argument
833 if (!HandleBaseRecord(items, program, name, rec, record)) { in HandleRecord()
837 if (!HandleInterfaces(items, program, name, rec, record)) { in HandleRecord()
841 if (!HandleFields(items, program, entities, primitive_types, name, rec, record)) { in HandleRecord()
850 ItemContainer *items, const Program &program, AsmEmitter::AsmEntityCollections &entities, in MakeRecordItems() argument
853 for (const auto &[name, rec] : program.record_table) { in MakeRecordItems()
855 if (!HandleRecordAsForeign(items, program, entities, primitive_types, name, rec)) { in MakeRecordItems()
859 if (!HandleRecord(items, program, entities, primitive_types, name, rec)) { in MakeRecordItems()
880 bool AsmEmitter::HandleAreaForInner(ItemContainer *items, const Program &program, ClassItem **area, in HandleAreaForInner() argument
884 auto iter = program.record_table.find(record_owner_name); in HandleAreaForInner()
885 if (iter != program.record_table.end()) { in HandleAreaForInner()
907 bool AsmEmitter::HandleRecordOnwer(ItemContainer *items, const Program &program, ClassItem **area, in HandleRecordOnwer() argument
914 (*area)->SetSourceLang(program.lang); in HandleRecordOnwer()
916 if (!HandleAreaForInner(items, program, area, foreign_area, name, record_owner_name)) { in HandleRecordOnwer()
925 …ItemContainer *items, const Program &program, size_t idx, const std::string &name, const Function … in HandleFunctionParams() argument
931 auto *type_item = GetTypeItem(items, primitive_types, p, program); in HandleFunctionParams()
1004 ItemContainer *items, const Program &program, AsmEmitter::AsmEntityCollections &entities, in MakeFunctionItems() argument
1007 for (const auto &f : program.function_table) { in MakeFunctionItems()
1018 if (!HandleRecordOnwer(items, program, &area, &foreign_area, name, record_owner_name)) { in MakeFunctionItems()
1033 if (!HandleFunctionParams(items, program, idx, name, func, primitive_types, params)) { in MakeFunctionItems()
1041 auto *type_item = GetTypeItem(items, primitive_types, func.return_type, program); in MakeFunctionItems()
1056 bool AsmEmitter::MakeRecordAnnotations(ItemContainer *items, const Program &program, in MakeRecordAnnotations() argument
1059 for (const auto &[name, record] : program.record_table) { in MakeRecordAnnotations()
1065 if (!AddAnnotations(class_item, items, *record.metadata, program, entities)) { in MakeRecordAnnotations()
1073 if (!AddAnnotations(field_item, items, *field.metadata, program, entities)) { in MakeRecordAnnotations()
1081 auto *item = CreateValueItem(items, &value, program, entities); in MakeRecordAnnotations()
1120 bool AsmEmitter::AddMethodAndParamsAnnotations(ItemContainer *items, const Program &program, in AddMethodAndParamsAnnotations() argument
1124 if (!AddAnnotations(method, items, *func.metadata, program, entities)) { in AddMethodAndParamsAnnotations()
1134 if (!AddAnnotations(&param_item, items, *param.metadata, program, entities)) { in AddMethodAndParamsAnnotations()
1153 bool AsmEmitter::MakeFunctionDebugInfoAndAnnotations(ItemContainer *items, const Program &program, in MakeFunctionDebugInfoAndAnnotations() argument
1157 for (const auto &[name, func] : program.function_table) { in MakeFunctionDebugInfoAndAnnotations()
1169 if (!AddMethodAndParamsAnnotations(items, program, entities, method, func)) { in MakeFunctionDebugInfoAndAnnotations()
1201 void AsmEmitter::EmitDebugInfo(ItemContainer *items, const Program &program, const std::vector<uint… in EmitDebugInfo() argument
1216 auto &rec = program.record_table.find(record_name)->second; in EmitDebugInfo()
1234 bool AsmEmitter::EmitFunctions(ItemContainer *items, const Program &program, in EmitFunctions() argument
1237 for (const auto &f : program.function_table) { in EmitFunctions()
1272 EmitDebugInfo(items, program, bytes, method, func, name, emit_debug_info); in EmitFunctions()
1278 bool AsmEmitter::MakeItemsForSingleProgram(ItemContainer *items, const Program &program, bool emit_… in MakeItemsForSingleProgram() argument
1282 MakeStringItems(items, program, entities); in MakeItemsForSingleProgram()
1283 MakeArrayTypeItems(items, program, entities); in MakeItemsForSingleProgram()
1284 if (!MakeRecordItems(items, program, entities, primitive_types)) { in MakeItemsForSingleProgram()
1287 if (!MakeFunctionItems(items, program, entities, primitive_types, emit_debug_info)) { in MakeItemsForSingleProgram()
1290 MakeLiteralItems(items, program, entities); in MakeItemsForSingleProgram()
1292 if (!MakeRecordAnnotations(items, program, entities)) { in MakeItemsForSingleProgram()
1371 bool AsmEmitter::Emit(ItemContainer *items, const Program &program, PandaFileToPandaAsmMaps *maps, … in Emit() argument
1374 MakeSlotNumberRecord(const_cast<Program *>(&program)); in Emit()
1375 MakeSlotNumberAnnotation(const_cast<Program *>(&program)); in Emit()
1382 if (!MakeItemsForSingleProgram(items, program, emit_debug_info, entities, primitive_types)) { in Emit()
1387 if (!MakeFunctionDebugInfoAndAnnotations(items, program, entities, emit_debug_info)) { in Emit()
1401 if (!EmitFunctions(items, program, entities, emit_debug_info)) { in Emit()
1408 bool AsmEmitter::Emit(Writer *writer, const Program &program, std::map<std::string, size_t> *stat, in Emit() argument
1413 if (!Emit(&items, program, maps, debug_info, profile_opt)) { in Emit()
1424 bool AsmEmitter::Emit(const std::string &filename, const Program &program, std::map<std::string, si… in Emit() argument
1433 return Emit(&writer, program, stat, maps, debug_info, profile_opt); in Emit()
1436 std::unique_ptr<const panda_file::File> AsmEmitter::Emit(const Program &program, PandaFileToPandaAs… in Emit() argument
1439 if (!Emit(&items, program, maps)) { in Emit()
1458 const Type &type, const Program &program) in GetTypeItem() argument
1469 auto iter = program.record_table.find(name); in GetTypeItem()
1470 if (iter == program.record_table.end()) { in GetTypeItem()
1515 static void TryEmitPc(panda_file::LineNumberProgramItem *program, std::vector<uint8_t> *constant_po… in TryEmitPc() argument
1519 program->EmitAdvancePc(constant_pool, pc_inc); in TryEmitPc()
1524 void Function::EmitLocalVariable(panda_file::LineNumberProgramItem *program, ItemContainer *contain… in EmitLocalVariable() argument
1532 TryEmitPc(program, constant_pool, pc_inc); in EmitLocalVariable()
1536 program->EmitStartLocal(constant_pool, v.reg, variable_name, variable_type); in EmitLocalVariable()
1539program->EmitStartLocalExtended(constant_pool, v.reg, variable_name, variable_type, type_signature… in EmitLocalVariable()
1544 TryEmitPc(program, constant_pool, pc_inc); in EmitLocalVariable()
1545 program->EmitEndLocal(v.reg); in EmitLocalVariable()
1559 void Function::EmitNumber(panda_file::LineNumberProgramItem *program, std::vector<uint8_t> *constan… in EmitNumber() argument
1562 if (!program->EmitSpecialOpcode(pc_inc, line_inc)) { in EmitNumber()
1564 program->EmitAdvancePc(constant_pool, pc_inc); in EmitNumber()
1565 if (!program->EmitSpecialOpcode(0, line_inc)) { in EmitNumber()
1566 program->EmitAdvanceLine(constant_pool, line_inc); in EmitNumber()
1567 program->EmitSpecialOpcode(0, 0); in EmitNumber()
1570 program->EmitAdvanceLine(constant_pool, line_inc); in EmitNumber()
1571 program->EmitSpecialOpcode(0, 0); in EmitNumber()
1576 void Function::EmitLineNumber(panda_file::LineNumberProgramItem *program, std::vector<uint8_t> *con… in EmitLineNumber() argument
1582 EmitNumber(program, constant_pool, pc_inc, line_inc); in EmitLineNumber()
1587 void Function::EmitColumnNumber(panda_file::LineNumberProgramItem *program, std::vector<uint8_t> *c… in EmitColumnNumber() argument
1592 program->EmitColumn(constant_pool, pc_inc, cn); in EmitColumnNumber()
1619 auto *program = debug_item->GetLineNumberProgram(); in BuildLineNumberProgram() local
1622 program->EmitEnd(); in BuildLineNumberProgram()
1646 EmitLineNumber(program, constant_pool, prev_line_number, pc_inc, i); in BuildLineNumberProgram()
1649 EmitColumnNumber(program, constant_pool, prev_column_number, pc_inc, i); in BuildLineNumberProgram()
1658 EmitLocalVariable(program, container, constant_pool, pc_inc, end, iter->variable_index); in BuildLineNumberProgram()
1664 program->EmitEnd(); in BuildLineNumberProgram()