From d45e64ce96ab76bf6b44c5e67b42e0b1708a3444 Mon Sep 17 00:00:00 2001 From: Daniel Kofanov Date: Fri, 12 Sep 2025 23:15:03 +0800 Subject: [PATCH] tmp 1. Split '_containers.h' 2. SDK - separate 'public/contextState.h' Issue:https://gitee.com/openharmony/arkcompiler_ets_frontend/issues/ICV4PE?from=project-issue Change-Id: I0bf341ecc1ed53da0087dcb18b6fac3b73812548 Signed-off-by: Daniel Kofanov --- static_core/assembler/assembly-literals.h | 5 +- .../bytecodeopt_peepholes.h | 1 - .../bytecode_optimizer/check_resolver.h | 1 - static_core/bytecode_optimizer/reg_encoder.h | 1 + .../bytecode_optimizer/runtime_adapter.cpp | 1 + .../bytecode_optimizer/runtime_adapter.h | 4 +- .../bytecodeopt_peepholes_runtime_test.cpp | 1 + .../compiler/aot/aot_builder/aot_builder.h | 1 - static_core/compiler/aot/aot_manager.h | 5 +- .../compiler/code_info/code_info_builder.h | 2 +- static_core/compiler/code_info/vreg_info.h | 2 + static_core/compiler/compiler_options.cpp | 28 ++++ static_core/compiler/compiler_options.h | 28 +--- .../optimizer/analysis/alias_analysis.cpp | 1 + .../optimizer/analysis/alias_analysis.h | 1 - .../optimizer/analysis/alias_visitor.h | 3 +- .../optimizer/analysis/bounds_analysis.h | 2 +- .../optimizer/analysis/dominators_tree.h | 2 +- .../optimizer/analysis/linear_order.h | 3 +- .../optimizer/analysis/live_registers.cpp | 1 + .../optimizer/analysis/live_registers.h | 1 - .../optimizer/analysis/liveness_analyzer.cpp | 2 + .../optimizer/analysis/liveness_analyzer.h | 2 +- .../optimizer/analysis/liveness_use_table.h | 3 +- static_core/compiler/optimizer/analysis/rpo.h | 1 - .../optimizer/code_generator/codegen.cpp | 2 +- .../optimizer/code_generator/codegen.h | 1 - .../optimizer/code_generator/encode.h | 29 +--- .../code_generator/encode_visitor.cpp | 1 + .../optimizer/code_generator/label_holder.h | 55 ++++++++ .../optimizer/code_generator/operands.h | 1 - .../code_generator/registers_description.h | 1 + .../optimizer/code_generator/type_info.h | 1 - .../compiler/optimizer/ir/basicblock.cpp | 1 + static_core/compiler/optimizer/ir/dump.h | 2 +- static_core/compiler/optimizer/ir/graph-inl.h | 39 ++++++ static_core/compiler/optimizer/ir/graph.h | 16 +-- .../compiler/optimizer/ir/graph_cloner.h | 2 +- static_core/compiler/optimizer/ir/inst.h | 9 +- static_core/compiler/optimizer/ir/locations.h | 3 +- .../compiler/optimizer/ir/runtime_interface.h | 11 +- .../optimizer/ir/visualizer_printer.h | 2 +- .../optimizer/ir_builder/inst_builder.h | 5 +- .../optimizer/optimizations/adjust_arefs.cpp | 1 + .../optimizations/balance_expressions.h | 1 - .../optimizations/branch_elimination.h | 2 +- .../optimizer/optimizations/cleanup.h | 1 + .../optimizations/condition_chain_cache.h | 1 - .../compiler/optimizer/optimizations/cse.h | 1 - .../compiler/optimizer/optimizations/escape.h | 1 + .../optimizer/optimizations/if_conversion.h | 3 +- .../optimizer/optimizations/inlining.h | 2 +- .../optimizer/optimizations/loop_unswitch.h | 1 + .../optimizations/lower_boxed_boolean.cpp | 1 - .../optimizations/lower_boxed_boolean.h | 1 + .../compiler/optimizer/optimizations/lse.cpp | 1 + .../optimizer/optimizations/move_constants.h | 3 + .../optimizer/optimizations/peepholes.cpp | 2 + .../optimizer/optimizations/peepholes.h | 1 - .../regalloc/interference_graph.h | 3 +- .../optimizations/regalloc/location_mask.h | 3 +- .../optimizations/regalloc/reg_alloc_base.h | 2 +- .../regalloc/reg_alloc_graph_coloring.h | 2 +- .../regalloc/reg_alloc_linear_scan.h | 2 +- .../optimizations/regalloc/reg_map.h | 2 +- .../regalloc/spill_fills_resolver.h | 2 +- .../optimizations/regalloc/working_ranges.h | 2 +- .../optimizer/optimizations/scheduler.h | 3 + .../compiler/optimizer/optimizations/vn.h | 1 + static_core/compiler/optimizer/pass_manager.h | 2 +- .../optimizer/pass_manager_statistics.h | 3 +- static_core/compiler/optimizer/pipeline.cpp | 1 + .../templates/ir-dyn-base-types.h.erb | 4 +- .../compiler/tests/aarch64/codegen_test.cpp | 2 +- .../compiler/tests/bounds_analysis_test.cpp | 2 +- .../compiler/tests/profiling_merger_test.cpp | 2 +- static_core/compiler/tests/unit_test.cpp | 1 + static_core/compiler/tools/debug/jit_writer.h | 2 +- .../cross_values_getters_generator.rb | 2 + static_core/irtoc/backend/compilation.h | 1 + .../compiler/dangling_pointers_checker.h | 1 + static_core/libarkbase/mem/arena_allocator.h | 5 - static_core/libarkbase/mem/base_mem_stats.h | 1 - static_core/libarkbase/mem/code_allocator.h | 2 +- static_core/libarkbase/mem/mem.h | 1 - .../mem/weighted_adaptive_tlab_average.h | 2 +- static_core/libarkbase/os/mem.h | 2 +- .../libarkbase/tests/arena_allocator_test.cpp | 2 +- .../libarkbase/tests/bit_vector_test.cpp | 2 +- .../libarkbase/tests/small_vector_test.cpp | 2 +- static_core/libarkbase/utils/arch.h | 1 - .../libarkbase/utils/arena_containers.h | 66 ++------- static_core/libarkbase/utils/arena_deque.h | 31 +++++ .../libarkbase/utils/arena_forward_list.h | 31 +++++ static_core/libarkbase/utils/arena_list.h | 31 +++++ static_core/libarkbase/utils/arena_map.h | 34 +++++ static_core/libarkbase/utils/arena_queue.h | 32 +++++ static_core/libarkbase/utils/arena_set.h | 31 +++++ static_core/libarkbase/utils/arena_stack.h | 32 +++++ static_core/libarkbase/utils/arena_string.h | 32 +++++ .../libarkbase/utils/arena_unordered_map.h | 43 ++++++ .../libarkbase/utils/arena_unordered_set.h | 31 +++++ static_core/libarkbase/utils/arena_vector.h | 32 +++++ static_core/libarkbase/utils/bit_table.h | 3 +- static_core/libarkbase/utils/bit_utils.h | 12 +- static_core/libarkbase/utils/bit_vector.h | 2 + static_core/libarkbase/utils/math_helpers.h | 9 +- static_core/libarkbase/utils/pandargs.h | 3 - static_core/libarkbase/utils/utils.h | 3 +- .../libarkfile/literal_data_accessor.h | 35 +---- static_core/libarkfile/literal_tag.h | 59 +++++++++ .../asmjit/0002-Add-Panda-Allocator.patch | 4 +- .../0007-Fixed-libarbase-include-path.patch | 4 +- .../0001-Fixed-libarbase-include-path.patch | 3 +- .../vixl/0002-split_arena_containers.patch | 22 +++ .../ets/runtime/ani/ani_interaction_api.cpp | 1 + .../ets/runtime/ani/verify/ani_verifier.h | 2 +- .../ets/runtime/ani/verify/env_ani_verifier.h | 3 +- .../runtime/ani/verify/verify_ani_checker.h | 2 +- .../ani/verify/verify_ani_interaction_api.cpp | 2 +- .../plugins/ets/runtime/ets_class_linker.h | 2 +- .../runtime/ets_class_linker_extension.cpp | 1 + .../plugins/ets/runtime/ets_exceptions.cpp | 1 + .../ets/runtime/ets_itable_builder.cpp | 3 +- .../runtime/ets_native_library_provider.cpp | 2 +- .../ets/runtime/ets_native_library_provider.h | 3 +- .../ets/runtime/ets_object_state_table.h | 2 +- static_core/plugins/ets/runtime/ets_stubs.cpp | 2 + static_core/plugins/ets/runtime/ets_vm.h | 2 +- .../plugins/ets/runtime/ets_vm_api.cpp | 3 +- .../ets/runtime/interop_js/call/call_ets.cpp | 1 + .../ets_proxy/ets_class_wrapper.cpp | 3 +- .../runtime/interop_js/interop_context.cpp | 1 + .../runtime/interop_js/js_proxy/js_proxy.cpp | 2 +- .../runtime/interop_js/js_proxy/js_proxy.h | 2 +- .../ets/runtime/interop_js/js_refconvert.cpp | 1 + .../plugins/ets/runtime/interop_js/js_value.h | 1 + .../runtime/intrinsics/escompat_RegExp.cpp | 2 +- .../intrinsics/helpers/array_buffer_helper.h | 4 +- .../helpers/ets_to_string_cache.cpp | 2 + .../runtime/intrinsics/std_core_Console.cpp | 2 +- .../runtime/intrinsics/std_core_Method.cpp | 2 +- .../runtime/intrinsics/std_core_Promise.cpp | 2 +- .../intrinsics/std_core_StackTrace.cpp | 2 +- .../ets/runtime/static_object_accessor.cpp | 1 + .../runtime/types/ets_abc_runtime_linker.h | 2 + .../ets/runtime/types/ets_arraybuffer-inl.h | 2 + .../ets/runtime/types/ets_arraybuffer.h | 1 + .../plugins/ets/runtime/types/ets_class.cpp | 3 +- .../plugins/ets/runtime/types/ets_class.h | 2 +- .../ets/runtime/types/ets_escompat_array.h | 1 + .../runtime/types/ets_finalizable_weak_ref.h | 1 + .../plugins/ets/runtime/types/ets_job.h | 1 + .../plugins/ets/runtime/types/ets_map.h | 1 + .../plugins/ets/runtime/types/ets_promise.h | 1 + .../ets/runtime/types/ets_promise_ref.h | 1 + .../ets/runtime/types/ets_string_builder.h | 1 + .../ets/runtime/types/ets_sync_primitives.h | 1 + .../plugins/ets/runtime/types/ets_tuple.h | 1 + .../ets/runtime/types/ets_typeapi_type.h | 1 + .../ets/runtime/types/ets_typed_arrays.h | 1 + .../runtime/types/ets_typed_unsigned_arrays.h | 1 + .../ets/runtime/types/ets_weak_reference.h | 1 + .../runtime/types/ets_class_file_test.cpp | 1 + static_core/runtime/arch/helpers.h | 2 +- static_core/runtime/cha.cpp | 1 + static_core/runtime/cha.h | 2 + static_core/runtime/class_initializer.cpp | 4 + static_core/runtime/class_initializer.h | 9 +- static_core/runtime/class_linker.cpp | 1 + static_core/runtime/class_linker_context.h | 2 +- .../runtime/class_linker_extension.cpp | 1 + static_core/runtime/compiler.cpp | 2 + static_core/runtime/compiler.h | 7 +- .../compiler_queue_aged_counter_priority.h | 2 +- .../runtime/compiler_queue_counter_priority.h | 2 +- static_core/runtime/compiler_queue_simple.h | 2 +- .../runtime/compiler_task_manager_worker.h | 2 +- .../core/core_class_linker_extension.cpp | 2 + .../runtime/core/core_language_context.cpp | 3 + static_core/runtime/core/core_vm.h | 1 - static_core/runtime/coretypes/string.cpp | 1 + .../runtime/coroutines/coroutine_stats.h | 2 +- .../runtime/coroutines/priority_queue.h | 2 +- .../stackful_coroutine_state_info.h | 2 +- static_core/runtime/coroutines/utils.h | 2 +- static_core/runtime/deoptimization.h | 1 + static_core/runtime/dprofiler/dprofiler.h | 2 +- static_core/runtime/entrypoints/entrypoints.h | 2 +- .../runtime/entrypoints/entrypoints_gen.h.erb | 1 - static_core/runtime/global_handle_storage.h | 2 +- static_core/runtime/handle_storage.h | 2 +- static_core/runtime/hotreload/hotreload.cpp | 3 +- static_core/runtime/hotreload/hotreload.h | 2 +- static_core/runtime/imtable_builder.cpp | 1 + static_core/runtime/include/cframe.h | 4 +- .../runtime/include/cframe_iterators.h | 1 + static_core/runtime/include/class_linker.h | 3 +- .../runtime/include/class_linker_extension.h | 2 +- .../runtime/include/compiler_interface-inl.h | 118 +++++++++++++++++ .../runtime/include/compiler_interface.h | 125 +----------------- static_core/runtime/include/coretypes/array.h | 2 +- .../runtime/include/coretypes/dyn_objects.h | 2 +- .../runtime/include/coretypes/string.h | 4 +- static_core/runtime/include/exceptions.h | 3 +- static_core/runtime/include/histogram-inl.h | 1 - static_core/runtime/include/histogram.h | 2 +- static_core/runtime/include/imtable_builder.h | 4 +- static_core/runtime/include/itable_builder.h | 4 +- .../runtime/include/language_context.h | 8 +- static_core/runtime/include/managed_thread.h | 5 + static_core/runtime/include/mem/allocator.h | 4 +- .../runtime/include/mem/panda_containers.h | 124 ----------------- static_core/runtime/include/mem/panda_deque.h | 32 +++++ .../runtime/include/mem/panda_forward_list.h | 31 +++++ static_core/runtime/include/mem/panda_list.h | 32 +++++ static_core/runtime/include/mem/panda_map.h | 39 ++++++ static_core/runtime/include/mem/panda_queue.h | 40 ++++++ static_core/runtime/include/mem/panda_set.h | 32 +++++ .../runtime/include/mem/panda_small_vector.h | 32 +++++ static_core/runtime/include/mem/panda_stack.h | 33 +++++ .../runtime/include/mem/panda_unordered_map.h | 43 ++++++ .../runtime/include/mem/panda_unordered_set.h | 31 +++++ .../runtime/include/mem/panda_vector.h | 31 +++++ static_core/runtime/include/method.h | 4 +- static_core/runtime/include/object_header.h | 2 +- static_core/runtime/include/panda_vm.h | 4 +- static_core/runtime/include/runtime.h | 2 +- .../runtime/include/runtime_notification.h | 2 +- static_core/runtime/include/thread.h | 7 +- .../runtime/include/tooling/debug_interface.h | 2 +- .../runtime/include/vtable_builder_base-inl.h | 1 + .../runtime/include/vtable_builder_base.h | 3 +- static_core/runtime/interpreter/frame.h | 2 +- .../runtime/interpreter/interpreter.cpp | 6 + .../runtime/interpreter/runtime_interface.h | 1 + .../jit/libprofile/aot_profiling_data.h | 2 +- .../runtime/jit/libprofile/pgo_file_builder.h | 2 +- static_core/runtime/jit/profiling_data.h | 2 +- static_core/runtime/jit/profiling_saver.h | 2 +- static_core/runtime/language_context.cpp | 1 + static_core/runtime/lock_order_graph.h | 2 +- static_core/runtime/mem/allocator.cpp | 1 + static_core/runtime/mem/bump-allocator.h | 2 +- static_core/runtime/mem/gc/card_table-inl.h | 2 +- static_core/runtime/mem/gc/card_table.h | 3 +- .../runtime/mem/gc/dynamic/gc_dynamic_data.h | 2 +- .../runtime/mem/gc/g1/collection_set.h | 2 +- .../runtime/mem/gc/g1/g1-allocator.cpp | 2 + .../gc/g1/g1-evacuate-regions-worker-state.h | 2 +- static_core/runtime/mem/gc/g1/g1-gc.cpp | 2 + static_core/runtime/mem/gc/g1/hot_cards.h | 2 +- .../runtime/mem/gc/g1/update_remset_thread.h | 2 +- static_core/runtime/mem/gc/gc.cpp | 1 + static_core/runtime/mem/gc/gc.h | 2 +- .../mem/gc/gc_adaptive_marking_stack.h | 2 +- .../runtime/mem/gc/gc_adaptive_stack.h | 2 +- static_core/runtime/mem/gc/gc_barrier_set.h | 3 +- static_core/runtime/mem/gc/gc_queue.h | 2 +- static_core/runtime/mem/gc/gc_root.h | 3 +- static_core/runtime/mem/gc/gc_stats.h | 2 +- .../reference-processor/reference_processor.h | 2 +- .../mem/gc/static/gc_marker_static-inl.h | 1 + .../runtime/mem/gc/workers/gc_workers_tasks.h | 1 + static_core/runtime/mem/heap_manager.cpp | 2 + static_core/runtime/mem/heap_manager.h | 4 +- static_core/runtime/mem/heap_verifier.cpp | 1 + .../runtime/mem/humongous_obj_allocator.h | 1 - static_core/runtime/mem/internal_allocator.h | 2 +- static_core/runtime/mem/lock_config_helper.h | 2 +- .../runtime/mem/mem_stats_additional_info.h | 2 +- static_core/runtime/mem/memory_manager.h | 1 + static_core/runtime/mem/object_helpers-inl.h | 1 + static_core/runtime/mem/object_helpers.cpp | 1 + .../mem/refstorage/global_object_storage.cpp | 2 +- .../mem/refstorage/global_object_storage.h | 2 +- .../mem/refstorage/reference_storage.cpp | 1 + static_core/runtime/mem/region_allocator.h | 2 + static_core/runtime/mem/region_space.h | 2 +- static_core/runtime/mem/rem_set.h | 3 +- static_core/runtime/method.cpp | 1 + static_core/runtime/methodtrace/trace.cpp | 6 +- static_core/runtime/methodtrace/trace.h | 2 +- static_core/runtime/monitor_pool.h | 3 +- static_core/runtime/object_header.cpp | 1 + static_core/runtime/osr.h | 1 + static_core/runtime/panda_vm.cpp | 1 + .../runtime/profilesaver/profile_dump_info.h | 5 +- .../runtime/profilesaver/profile_saver.h | 2 +- static_core/runtime/profiling/profiling.h | 5 +- static_core/runtime/runtime.cpp | 2 +- static_core/runtime/runtime_controller.cpp | 2 +- static_core/runtime/signal_handler.h | 2 +- static_core/runtime/string_table.h | 3 +- static_core/runtime/tests/c2i_bridge_test.cpp | 1 + .../runtime/tests/compilation_status_test.cpp | 1 + .../runtime/tests/compiler_thread_pool.cpp | 1 + static_core/runtime/tests/exception_test.cpp | 1 + .../interpreter_test_resolve_ctor_class.cpp | 1 + .../tests/interpreter_test_resolve_field.cpp | 1 + .../runtime/tests/interpreter_test_switch.cpp | 1 + static_core/runtime/tests/method_test.cpp | 1 + .../runtime/tests/object_helpers_test.cpp | 1 + static_core/runtime/tests/osr_code_test.cpp | 1 + .../tests/panda_tl_containers_test.cpp | 2 +- .../runtime/tests/stack_walker_test.cpp | 1 + .../runtime/tests/static_analyzer_test.cpp | 1 + static_core/runtime/thread.cpp | 2 + static_core/runtime/thread_manager.h | 2 +- static_core/runtime/thread_pool.h | 2 +- static_core/runtime/timing.cpp | 2 + static_core/runtime/timing.h | 2 +- static_core/runtime/tooling/debugger.h | 2 +- .../tooling/evaluation/expression_loader.cpp | 1 + .../tooling/memory_allocation_dumper.h | 4 +- .../tooling/pt_default_lang_extension.cpp | 1 + .../tooling/sampler/sampling_profiler.h | 2 +- static_core/runtime/vtable_builder_base.cpp | 1 + static_core/scripts/sdk/headers.txt | 1 + .../ark_js_napi_cli/ark_hz/ark_js_runtime.cpp | 2 +- .../tools/ark_js_napi_cli/js_runtime.cpp | 2 +- .../tools/ark_js_napi_cli/js_runtime.h | 2 +- .../tools/ark_js_napi_cli/utils/utils.cpp | 2 +- static_core/verification/absint/abs_int_inl.h | 2 +- .../verification/absint/exec_context.h | 2 +- .../verification/cache/file_entity_cache.h | 2 +- .../verification/cache/results_cache.cpp | 2 +- static_core/verification/cflow/cflow_info.h | 2 +- .../verification/config/context/context.h | 2 +- .../config_handler_method_options.cpp | 2 +- .../handlers/config_handler_options.cpp | 2 +- .../config/handlers/literal_parser.h | 2 +- .../config/options/method_options.h | 3 +- .../config/options/msg_set_parser.h | 2 +- static_core/verification/jobs/service.h | 2 +- static_core/verification/type/type_system.h | 2 +- static_core/verification/type/type_type.cpp | 2 + static_core/verification/util/panda_or_std.h | 2 +- .../verification/util/shifted_vector.h | 2 +- static_core/verification/value/variables.h | 2 +- .../verification/verification_options.h | 2 +- 341 files changed, 1488 insertions(+), 649 deletions(-) create mode 100644 static_core/compiler/optimizer/code_generator/label_holder.h create mode 100644 static_core/compiler/optimizer/ir/graph-inl.h create mode 100644 static_core/libarkbase/utils/arena_deque.h create mode 100644 static_core/libarkbase/utils/arena_forward_list.h create mode 100644 static_core/libarkbase/utils/arena_list.h create mode 100644 static_core/libarkbase/utils/arena_map.h create mode 100644 static_core/libarkbase/utils/arena_queue.h create mode 100644 static_core/libarkbase/utils/arena_set.h create mode 100644 static_core/libarkbase/utils/arena_stack.h create mode 100644 static_core/libarkbase/utils/arena_string.h create mode 100644 static_core/libarkbase/utils/arena_unordered_map.h create mode 100644 static_core/libarkbase/utils/arena_unordered_set.h create mode 100644 static_core/libarkbase/utils/arena_vector.h create mode 100644 static_core/libarkfile/literal_tag.h create mode 100644 static_core/patches/vixl/0002-split_arena_containers.patch delete mode 100644 static_core/runtime/include/mem/panda_containers.h create mode 100644 static_core/runtime/include/mem/panda_deque.h create mode 100644 static_core/runtime/include/mem/panda_forward_list.h create mode 100644 static_core/runtime/include/mem/panda_list.h create mode 100644 static_core/runtime/include/mem/panda_map.h create mode 100644 static_core/runtime/include/mem/panda_queue.h create mode 100644 static_core/runtime/include/mem/panda_set.h create mode 100644 static_core/runtime/include/mem/panda_small_vector.h create mode 100644 static_core/runtime/include/mem/panda_stack.h create mode 100644 static_core/runtime/include/mem/panda_unordered_map.h create mode 100644 static_core/runtime/include/mem/panda_unordered_set.h create mode 100644 static_core/runtime/include/mem/panda_vector.h diff --git a/static_core/assembler/assembly-literals.h b/static_core/assembler/assembly-literals.h index f74841b118..42ded45a35 100644 --- a/static_core/assembler/assembly-literals.h +++ b/static_core/assembler/assembly-literals.h @@ -18,8 +18,11 @@ #include #include +#include + +#include "libarkfile/literal_tag.h" +#include "libarkfile/include/type.h" -#include "libarkfile/literal_data_accessor-inl.h" namespace ark::pandasm { diff --git a/static_core/bytecode_optimizer/bytecodeopt_peepholes.h b/static_core/bytecode_optimizer/bytecodeopt_peepholes.h index c03ca9da62..f353dc56f9 100644 --- a/static_core/bytecode_optimizer/bytecodeopt_peepholes.h +++ b/static_core/bytecode_optimizer/bytecodeopt_peepholes.h @@ -22,7 +22,6 @@ #include "compiler/optimizer/ir/graph.h" #include "compiler/optimizer/ir/graph_visitor.h" #include "compiler/optimizer/ir/inst.h" -#include "libarkbase/utils/arena_containers.h" #include "runtime_adapter.h" /* diff --git a/static_core/bytecode_optimizer/check_resolver.h b/static_core/bytecode_optimizer/check_resolver.h index 59d5ed1856..9cb0451822 100644 --- a/static_core/bytecode_optimizer/check_resolver.h +++ b/static_core/bytecode_optimizer/check_resolver.h @@ -19,7 +19,6 @@ #include "compiler/optimizer/ir/graph.h" #include "compiler/optimizer/ir/inst.h" #include "compiler/optimizer/pass.h" -#include "libarkbase/utils/arena_containers.h" /* * Check Resolver. diff --git a/static_core/bytecode_optimizer/reg_encoder.h b/static_core/bytecode_optimizer/reg_encoder.h index 3edac7c454..ea60814ebd 100644 --- a/static_core/bytecode_optimizer/reg_encoder.h +++ b/static_core/bytecode_optimizer/reg_encoder.h @@ -20,6 +20,7 @@ #include "compiler/optimizer/pass.h" #include "compiler/optimizer/ir/inst.h" #include "compiler/optimizer/ir/graph_visitor.h" +#include "libarkbase/utils/arena_unordered_map.h" /* * Register Encoder. diff --git a/static_core/bytecode_optimizer/runtime_adapter.cpp b/static_core/bytecode_optimizer/runtime_adapter.cpp index 67c24427eb..2b2269ecf8 100644 --- a/static_core/bytecode_optimizer/runtime_adapter.cpp +++ b/static_core/bytecode_optimizer/runtime_adapter.cpp @@ -15,6 +15,7 @@ #include "bytecode_optimizer/runtime_adapter.h" #include "runtime/include/method.h" +#include "libarkfile/method_data_accessor-inl.h" namespace ark { diff --git a/static_core/bytecode_optimizer/runtime_adapter.h b/static_core/bytecode_optimizer/runtime_adapter.h index 2100eae71e..98c5a1fab1 100644 --- a/static_core/bytecode_optimizer/runtime_adapter.h +++ b/static_core/bytecode_optimizer/runtime_adapter.h @@ -17,7 +17,7 @@ #include "compiler/optimizer/ir/runtime_interface.h" #include "libarkfile/bytecode_instruction.h" -#include "libarkfile/class_data_accessor-inl.h" +#include "libarkfile/class_data_accessor.h" #include "libarkfile/code_data_accessor.h" #include "libarkfile/field_data_accessor.h" #include "libarkfile/file.h" @@ -27,6 +27,8 @@ #include "libarkfile/proto_data_accessor-inl.h" #include "libarkfile/type_helper.h" +#include + namespace ark { using compiler::RuntimeInterface; diff --git a/static_core/bytecode_optimizer/tests/bytecodeopt_peepholes_runtime_test.cpp b/static_core/bytecode_optimizer/tests/bytecodeopt_peepholes_runtime_test.cpp index 9dfe97e3d0..ded99b44aa 100644 --- a/static_core/bytecode_optimizer/tests/bytecodeopt_peepholes_runtime_test.cpp +++ b/static_core/bytecode_optimizer/tests/bytecodeopt_peepholes_runtime_test.cpp @@ -19,6 +19,7 @@ #include "assembler/assembly-parser.h" #include "bytecode_optimizer/optimize_bytecode.h" #include "runtime/include/class_linker.h" +#include "runtime/include/class-inl.h" #include "runtime/include/runtime.h" #include "mangling.h" diff --git a/static_core/compiler/aot/aot_builder/aot_builder.h b/static_core/compiler/aot/aot_builder/aot_builder.h index d40cf2f87d..1c2d0ec087 100644 --- a/static_core/compiler/aot/aot_builder/aot_builder.h +++ b/static_core/compiler/aot/aot_builder/aot_builder.h @@ -20,7 +20,6 @@ #include "aot/aot_file.h" #include "elf_builder.h" #include "libarkbase/utils/arch.h" -#include "libarkbase/utils/arena_containers.h" #include "libarkbase/utils/bit_vector.h" #include "optimizer/ir/runtime_interface.h" #include diff --git a/static_core/compiler/aot/aot_manager.h b/static_core/compiler/aot/aot_manager.h index 39014c2bb2..640875438b 100644 --- a/static_core/compiler/aot/aot_manager.h +++ b/static_core/compiler/aot/aot_manager.h @@ -18,8 +18,9 @@ #include "aot_file.h" #include "libarkfile/file.h" -#include "libarkbase/utils/arena_containers.h" -#include "runtime/include/mem/panda_containers.h" +#include "runtime/include/mem/panda_unordered_set.h" +#include "runtime/include/mem/panda_unordered_map.h" +#include "runtime/include/mem/panda_list.h" #include "runtime/include/mem/panda_string.h" #include "runtime/include/method.h" #include "libarkbase/utils/expected.h" diff --git a/static_core/compiler/code_info/code_info_builder.h b/static_core/compiler/code_info/code_info_builder.h index 557d840d55..74556792bd 100644 --- a/static_core/compiler/code_info/code_info_builder.h +++ b/static_core/compiler/code_info/code_info_builder.h @@ -17,7 +17,7 @@ #define PANDA_CODE_INFO_BUILDER_H #include "code_info.h" -#include "libarkbase/utils/arena_containers.h" +#include "libarkbase/utils/arena_vector.h" #include "libarkbase/utils/bit_vector.h" namespace ark::compiler { diff --git a/static_core/compiler/code_info/vreg_info.h b/static_core/compiler/code_info/vreg_info.h index bf44c3f42a..4c346a74fd 100644 --- a/static_core/compiler/code_info/vreg_info.h +++ b/static_core/compiler/code_info/vreg_info.h @@ -17,6 +17,8 @@ #define PANDA_COMPILER_CODE_INFO_VREG_INFO_H #include "libarkbase/utils/bit_field.h" +#include "libarkbase/utils/bit_utils.h" +#include "libarkbase/utils/type_helpers.h" namespace ark::compiler { diff --git a/static_core/compiler/compiler_options.cpp b/static_core/compiler/compiler_options.cpp index eb743e1386..42e75d05d0 100644 --- a/static_core/compiler/compiler_options.cpp +++ b/static_core/compiler/compiler_options.cpp @@ -15,7 +15,35 @@ #include "compiler_options.h" +#include + namespace ark::compiler { // NOLINTNEXTLINE(fuchsia-statically-constructed-objects) CompilerOptions g_options(""); +static std::regex g_regex; + +void CompilerOptions::SetCompilerRegex(const std::string &newRegexPattern) +{ + ASSERT(!WasSetCompilerRegexWithSignature()); + Options::SetCompilerRegex(newRegexPattern); + g_regex = newRegexPattern; +} + +bool CompilerOptions::MatchesRegex(std::string methodName) +{ + if (!WasSetCompilerRegex() && !WasSetCompilerRegexWithSignature()) { + return true; + } + if (!regexInitialized_) { + if (WasSetCompilerRegexWithSignature() && WasSetCompilerRegex()) { + LOG(FATAL, COMPILER) + << "'--compiler-regex' and '--compiler-regex-with-signature' cannot be used together."; + } + g_regex = WasSetCompilerRegex() ? GetCompilerRegex() : GetCompilerRegexWithSignature(); + regexInitialized_ = true; + } + return std::regex_match(methodName, g_regex); +} + + } // namespace ark::compiler diff --git a/static_core/compiler/compiler_options.h b/static_core/compiler/compiler_options.h index 7290b1b12c..225bfdc643 100644 --- a/static_core/compiler/compiler_options.h +++ b/static_core/compiler/compiler_options.h @@ -22,8 +22,6 @@ #include "libarkbase/cpu_features.h" #include "compiler_options_gen.h" -#include - namespace ark::compiler { #include "cpu_features.inc" @@ -63,29 +61,9 @@ public: LOG(FATAL, COMPILER) << "'SetCompilerRegexWithSignature()' is not supported."; } - void SetCompilerRegex(const std::string &newRegexPattern) - { - ASSERT(!WasSetCompilerRegexWithSignature()); - Options::SetCompilerRegex(newRegexPattern); - regex_ = newRegexPattern; - } + void SetCompilerRegex(const std::string &newRegexPattern); - template - bool MatchesRegex(const T &methodName) - { - if (!WasSetCompilerRegex() && !WasSetCompilerRegexWithSignature()) { - return true; - } - if (!regexInitialized_) { - if (WasSetCompilerRegexWithSignature() && WasSetCompilerRegex()) { - LOG(FATAL, COMPILER) - << "'--compiler-regex' and '--compiler-regex-with-signature' cannot be used together."; - } - regex_ = WasSetCompilerRegex() ? GetCompilerRegex() : GetCompilerRegexWithSignature(); - regexInitialized_ = true; - } - return std::regex_match(methodName, regex_); - } + bool MatchesRegex(std::string methodName); void AdjustCpuFeatures(bool crossCompilation) { @@ -149,8 +127,6 @@ private: } } - // `--compiler-regex`: - std::regex regex_; bool regexInitialized_ {false}; std::bitset features_; }; diff --git a/static_core/compiler/optimizer/analysis/alias_analysis.cpp b/static_core/compiler/optimizer/analysis/alias_analysis.cpp index 36fea9882d..255e3a149a 100644 --- a/static_core/compiler/optimizer/analysis/alias_analysis.cpp +++ b/static_core/compiler/optimizer/analysis/alias_analysis.cpp @@ -18,6 +18,7 @@ #include "optimizer/ir/graph.h" #include "optimizer/analysis/alias_analysis.h" #include "compiler_logger.h" +#include "libarkbase/utils/arena_queue.h" /** * See "Efficient Field-sensitive pointer analysis for C" by "David J. Pearce diff --git a/static_core/compiler/optimizer/analysis/alias_analysis.h b/static_core/compiler/optimizer/analysis/alias_analysis.h index 556e526889..4738302420 100644 --- a/static_core/compiler/optimizer/analysis/alias_analysis.h +++ b/static_core/compiler/optimizer/analysis/alias_analysis.h @@ -19,7 +19,6 @@ #include "alias_visitor.h" #include "optimizer/ir/graph_visitor.h" #include "optimizer/pass.h" -#include "libarkbase/utils/arena_containers.h" namespace ark::compiler { class BasicBlock; diff --git a/static_core/compiler/optimizer/analysis/alias_visitor.h b/static_core/compiler/optimizer/analysis/alias_visitor.h index 8d944be5d7..f4d76d7d4d 100644 --- a/static_core/compiler/optimizer/analysis/alias_visitor.h +++ b/static_core/compiler/optimizer/analysis/alias_visitor.h @@ -18,7 +18,8 @@ #include "optimizer/ir/graph.h" #include "optimizer/ir/graph_visitor.h" -#include "libarkbase/utils/arena_containers.h" +#include "libarkbase/utils/arena_unordered_set.h" +#include "libarkbase/utils/arena_unordered_map.h" namespace ark::compiler { diff --git a/static_core/compiler/optimizer/analysis/bounds_analysis.h b/static_core/compiler/optimizer/analysis/bounds_analysis.h index b6060faa3a..6809d66bba 100644 --- a/static_core/compiler/optimizer/analysis/bounds_analysis.h +++ b/static_core/compiler/optimizer/analysis/bounds_analysis.h @@ -21,7 +21,7 @@ #include "optimizer/ir/datatype.h" #include "optimizer/ir/inst.h" #include "optimizer/pass.h" -#include "libarkbase/utils/arena_containers.h" +#include "libarkbase/utils/arena_unordered_map.h" namespace ark::compiler { /** diff --git a/static_core/compiler/optimizer/analysis/dominators_tree.h b/static_core/compiler/optimizer/analysis/dominators_tree.h index 017f84511f..e57f49cf58 100644 --- a/static_core/compiler/optimizer/analysis/dominators_tree.h +++ b/static_core/compiler/optimizer/analysis/dominators_tree.h @@ -17,7 +17,7 @@ #define COMPILER_OPTIMIZER_ANALYSIS_DOMINATORS_TREE_H #include "optimizer/pass.h" -#include "libarkbase/utils/arena_containers.h" +#include "libarkbase/utils/arena_vector.h" namespace ark::compiler { class BasicBlock; diff --git a/static_core/compiler/optimizer/analysis/linear_order.h b/static_core/compiler/optimizer/analysis/linear_order.h index 09a73bd8be..7f0483865d 100644 --- a/static_core/compiler/optimizer/analysis/linear_order.h +++ b/static_core/compiler/optimizer/analysis/linear_order.h @@ -18,7 +18,8 @@ #include "optimizer/ir/marker.h" #include "optimizer/pass.h" -#include "libarkbase/utils/arena_containers.h" +#include "libarkbase/utils/arena_vector.h" +#include "libarkbase/utils/arena_list.h" namespace ark::compiler { class BasicBlock; diff --git a/static_core/compiler/optimizer/analysis/live_registers.cpp b/static_core/compiler/optimizer/analysis/live_registers.cpp index f50c7147ac..21f16b974c 100644 --- a/static_core/compiler/optimizer/analysis/live_registers.cpp +++ b/static_core/compiler/optimizer/analysis/live_registers.cpp @@ -16,6 +16,7 @@ #include #include "liveness_analyzer.h" #include "live_registers.h" +#include "libarkbase/utils/arena_queue.h" namespace ark::compiler { diff --git a/static_core/compiler/optimizer/analysis/live_registers.h b/static_core/compiler/optimizer/analysis/live_registers.h index 0704927725..c0fe04f16b 100644 --- a/static_core/compiler/optimizer/analysis/live_registers.h +++ b/static_core/compiler/optimizer/analysis/live_registers.h @@ -18,7 +18,6 @@ #include #include -#include "libarkbase/utils/arena_containers.h" #include "optimizer/pass.h" #include "optimizer/analysis/liveness_analyzer.h" diff --git a/static_core/compiler/optimizer/analysis/liveness_analyzer.cpp b/static_core/compiler/optimizer/analysis/liveness_analyzer.cpp index dce386649c..bcd00fb016 100644 --- a/static_core/compiler/optimizer/analysis/liveness_analyzer.cpp +++ b/static_core/compiler/optimizer/analysis/liveness_analyzer.cpp @@ -23,6 +23,8 @@ #include "optimizer/optimizations/locations_builder.h" #include "optimizer/optimizations/regalloc/reg_type.h" +#include + namespace ark::compiler { LivenessAnalyzer::LivenessAnalyzer(Graph *graph) : Analysis(graph), diff --git a/static_core/compiler/optimizer/analysis/liveness_analyzer.h b/static_core/compiler/optimizer/analysis/liveness_analyzer.h index ec8287afa4..b27cbadf29 100644 --- a/static_core/compiler/optimizer/analysis/liveness_analyzer.h +++ b/static_core/compiler/optimizer/analysis/liveness_analyzer.h @@ -16,7 +16,6 @@ #ifndef COMPILER_OPTIMIZER_ANALYSIS_LIVENESS_ANALIZER_H #define COMPILER_OPTIMIZER_ANALYSIS_LIVENESS_ANALIZER_H -#include "libarkbase/utils/arena_containers.h" #include "optimizer/analysis/liveness_use_table.h" #include "optimizer/ir/constants.h" #include "optimizer/ir/inst.h" @@ -24,6 +23,7 @@ #include "optimizer/pass.h" #include "optimizer/ir/locations.h" #include "compiler_logger.h" +#include "libarkbase/utils/arena_list.h" namespace ark::compiler { class BasicBlock; diff --git a/static_core/compiler/optimizer/analysis/liveness_use_table.h b/static_core/compiler/optimizer/analysis/liveness_use_table.h index 7452a3069f..1e3232ae29 100644 --- a/static_core/compiler/optimizer/analysis/liveness_use_table.h +++ b/static_core/compiler/optimizer/analysis/liveness_use_table.h @@ -16,8 +16,9 @@ #ifndef COMPILER_OPTIMIZER_ANALYSIS_USE_TABLE_H #define COMPILER_OPTIMIZER_ANALYSIS_USE_TABLE_H -#include "libarkbase/utils/arena_containers.h" #include "optimizer/ir/inst.h" +#include "libarkbase/utils/arena_map.h" +#include "libarkbase/utils/arena_unordered_map.h" namespace ark::compiler { using FixedUses = ArenaMap; diff --git a/static_core/compiler/optimizer/analysis/rpo.h b/static_core/compiler/optimizer/analysis/rpo.h index 1e01ce2b5c..c3eb57aa18 100644 --- a/static_core/compiler/optimizer/analysis/rpo.h +++ b/static_core/compiler/optimizer/analysis/rpo.h @@ -16,7 +16,6 @@ #ifndef COMPILER_OPTIMIZER_ANALYSIS_RPO_H #define COMPILER_OPTIMIZER_ANALYSIS_RPO_H -#include "libarkbase/utils/arena_containers.h" #include "optimizer/ir/marker.h" #include "optimizer/pass.h" #include diff --git a/static_core/compiler/optimizer/code_generator/codegen.cpp b/static_core/compiler/optimizer/code_generator/codegen.cpp index c18adc1403..e38c68c62c 100644 --- a/static_core/compiler/optimizer/code_generator/codegen.cpp +++ b/static_core/compiler/optimizer/code_generator/codegen.cpp @@ -20,6 +20,7 @@ Codegen Hi-Level implementation #include "codegen.h" #include "encode_visitor.h" #include "compiler_options.h" +#include "optimizer/ir/graph-inl.h" #include "optimizer/ir/inst.h" #include "relocations.h" #include "include/compiler_interface.h" @@ -32,7 +33,6 @@ Codegen Hi-Level implementation #include "libarkbase/events/events.h" #include "libarkbase/utils/tsan_interface.h" #include "libarkbase/utils/utils.h" -#include "libarkbase/utils/arena_containers.h" #include #include diff --git a/static_core/compiler/optimizer/code_generator/codegen.h b/static_core/compiler/optimizer/code_generator/codegen.h index 4153bf8b09..1ba51b3856 100644 --- a/static_core/compiler/optimizer/code_generator/codegen.h +++ b/static_core/compiler/optimizer/code_generator/codegen.h @@ -39,7 +39,6 @@ Codegen interface for compiler #include "optimizer/ir/graph_visitor.h" #include "optimizer/optimizations/regalloc/spill_fills_resolver.h" #include "optimizer/pass_manager.h" -#include "libarkbase/utils/arena_containers.h" #include "libarkbase/utils/cframe_layout.h" namespace ark::compiler { diff --git a/static_core/compiler/optimizer/code_generator/encode.h b/static_core/compiler/optimizer/code_generator/encode.h index 274db4c579..ef435e6a18 100644 --- a/static_core/compiler/optimizer/code_generator/encode.h +++ b/static_core/compiler/optimizer/code_generator/encode.h @@ -29,6 +29,7 @@ #include #include "operands.h" +#include "label_holder.h" #include "optimizer/select_transform_type.h" #include "registers_description.h" #include "libarkbase/utils/cframe_layout.h" @@ -79,34 +80,6 @@ namespace memory_order { enum Order { ACQUIRE, RELEASE, FULL }; } // namespace memory_order -class LabelHolder { -public: - using LabelId = uintptr_t; - static constexpr LabelId INVALID_LABEL = static_cast(-1); - - explicit LabelHolder(Encoder *enc) : enc_ {enc} {}; - virtual ~LabelHolder() = default; - - // NOTE (igorban) : hide all this methods in CallConv - virtual void CreateLabels(LabelId size) = 0; - virtual LabelId CreateLabel() = 0; - virtual LabelId Size() = 0; - - Encoder *GetEncoder() const - { - return enc_; - } - - NO_COPY_SEMANTIC(LabelHolder); - NO_MOVE_SEMANTIC(LabelHolder); - -protected: - virtual void BindLabel(LabelId) = 0; - -private: - Encoder *enc_ {nullptr}; - friend Encoder; -}; class Encoder { public: diff --git a/static_core/compiler/optimizer/code_generator/encode_visitor.cpp b/static_core/compiler/optimizer/code_generator/encode_visitor.cpp index 58e694e047..56198b4dba 100644 --- a/static_core/compiler/optimizer/code_generator/encode_visitor.cpp +++ b/static_core/compiler/optimizer/code_generator/encode_visitor.cpp @@ -17,6 +17,7 @@ #include "optimizer/code_generator/operands.h" #include "optimizer/ir/datatype.h" #include "libarkbase/utils/regmask.h" +#include "libarkbase/events/events.h" namespace ark::compiler { diff --git a/static_core/compiler/optimizer/code_generator/label_holder.h b/static_core/compiler/optimizer/code_generator/label_holder.h new file mode 100644 index 0000000000..b0154bde80 --- /dev/null +++ b/static_core/compiler/optimizer/code_generator/label_holder.h @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef COMPILER_OPTIMIZER_CODEGEN_LABEL_HOLDER_H +#define COMPILER_OPTIMIZER_CODEGEN_LABEL_HOLDER_H + +namespace ark::compiler { +class Encoder; + +class LabelHolder { +public: + using LabelId = uintptr_t; + static constexpr LabelId INVALID_LABEL = static_cast(-1); + + explicit LabelHolder(Encoder *enc) : enc_ {enc} {}; + virtual ~LabelHolder() = default; + + // NOTE (igorban) : hide all this methods in CallConv + virtual void CreateLabels(LabelId size) = 0; + virtual LabelId CreateLabel() = 0; + virtual LabelId Size() = 0; + + Encoder *GetEncoder() const + { + return enc_; + } + + NO_COPY_SEMANTIC(LabelHolder); + NO_MOVE_SEMANTIC(LabelHolder); + +protected: + virtual void BindLabel(LabelId) = 0; + +private: + Encoder *enc_ {nullptr}; + friend Encoder; +}; + +} // namespace ark::compiler + + +#endif // COMPILER_OPTIMIZER_CODEGEN_LABEL_HOLDER_H + diff --git a/static_core/compiler/optimizer/code_generator/operands.h b/static_core/compiler/optimizer/code_generator/operands.h index ec42a8316a..46241112ed 100644 --- a/static_core/compiler/optimizer/code_generator/operands.h +++ b/static_core/compiler/optimizer/code_generator/operands.h @@ -25,7 +25,6 @@ Arch-feature definitions #include "type_info.h" #include "libarkbase/utils/arch.h" -#include "libarkbase/utils/arena_containers.h" #include "libarkbase/utils/bit_field.h" #include "libarkbase/utils/bit_utils.h" #include "libarkbase/utils/regmask.h" diff --git a/static_core/compiler/optimizer/code_generator/registers_description.h b/static_core/compiler/optimizer/code_generator/registers_description.h index b0238e88fc..f8a50a6e74 100644 --- a/static_core/compiler/optimizer/code_generator/registers_description.h +++ b/static_core/compiler/optimizer/code_generator/registers_description.h @@ -18,6 +18,7 @@ #include "operands.h" #include "libarkbase/utils/arch.h" +#include "libarkbase/utils/arena_vector.h" /* Register file wrapper used for get major data and for Regalloc diff --git a/static_core/compiler/optimizer/code_generator/type_info.h b/static_core/compiler/optimizer/code_generator/type_info.h index 0aee0b49a8..9ab1c24364 100644 --- a/static_core/compiler/optimizer/code_generator/type_info.h +++ b/static_core/compiler/optimizer/code_generator/type_info.h @@ -24,7 +24,6 @@ Arch-feature definitions #include #include "libarkbase/utils/arch.h" -#include "libarkbase/utils/arena_containers.h" #include "libarkbase/utils/bit_field.h" #include "libarkbase/utils/bit_utils.h" #include "libarkbase/utils/regmask.h" diff --git a/static_core/compiler/optimizer/ir/basicblock.cpp b/static_core/compiler/optimizer/ir/basicblock.cpp index bb78d7a21e..51febb8018 100644 --- a/static_core/compiler/optimizer/ir/basicblock.cpp +++ b/static_core/compiler/optimizer/ir/basicblock.cpp @@ -18,6 +18,7 @@ #include "inst.h" #include "optimizer/analysis/loop_analyzer.h" #include "optimizer/analysis/dominators_tree.h" +#include "optimizer/code_generator/encode.h" namespace ark::compiler { class Inst; diff --git a/static_core/compiler/optimizer/ir/dump.h b/static_core/compiler/optimizer/ir/dump.h index 5b79871712..d05b4a98d7 100644 --- a/static_core/compiler/optimizer/ir/dump.h +++ b/static_core/compiler/optimizer/ir/dump.h @@ -15,7 +15,7 @@ #ifndef COMPILER_OPTIMIZER_IR_DUMP_H #define COMPILER_OPTIMIZER_IR_DUMP_H -#include "libarkbase/utils/arena_containers.h" +#include "libarkbase/utils/arena_string.h" namespace ark::compiler { diff --git a/static_core/compiler/optimizer/ir/graph-inl.h b/static_core/compiler/optimizer/ir/graph-inl.h new file mode 100644 index 0000000000..54658ec06e --- /dev/null +++ b/static_core/compiler/optimizer/ir/graph-inl.h @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef COMPILER_OPTIMIZER_IR_GRAPH_INL_H +#define COMPILER_OPTIMIZER_IR_GRAPH_INL_H + +#include "optimizer/code_generator/encode.h" + +namespace ark::compiler { + +template +size_t Graph::EstimateCodeSize() +{ + if constexpr (GRAPH_ENCODED) { + return encoder_->BufferSize(); + } + auto maxIrInstsCount = GetCurrentInstructionId(); + auto encoder = GetEncoder(); + ASSERT(encoder != nullptr); + auto maxArchInstsPerIrInsts = encoder->MaxArchInstPerEncoded(); + auto maxBytesInArchInst = GetInstructionSizeBits(GetArch()); + return maxIrInstsCount * maxArchInstsPerIrInsts * maxBytesInArchInst; +} + +} // namespace ark::compiler + +#endif // COMPILER_OPTIMIZER_IR_GRAPH_INL_H diff --git a/static_core/compiler/optimizer/ir/graph.h b/static_core/compiler/optimizer/ir/graph.h index e2b0d02dd1..e95c30a5cc 100644 --- a/static_core/compiler/optimizer/ir/graph.h +++ b/static_core/compiler/optimizer/ir/graph.h @@ -23,7 +23,8 @@ #include "marker.h" #include "optimizer/code_generator/method_properties.h" #include "optimizer/pass_manager.h" -#include "libarkbase/utils/arena_containers.h" +#include "libarkbase/utils/arena_map.h" +#include "libarkbase/utils/arena_set.h" #include #include @@ -1031,18 +1032,7 @@ public: SpillFillData GetDataForNativeParam(DataType::Type type); template - size_t EstimateCodeSize() - { - if constexpr (GRAPH_ENCODED) { - return encoder_->BufferSize(); - } - auto maxIrInstsCount = GetCurrentInstructionId(); - auto encoder = GetEncoder(); - ASSERT(encoder != nullptr); - auto maxArchInstsPerIrInsts = encoder->MaxArchInstPerEncoded(); - auto maxBytesInArchInst = GetInstructionSizeBits(GetArch()); - return maxIrInstsCount * maxArchInstsPerIrInsts * maxBytesInArchInst; - } + size_t EstimateCodeSize(); EventWriter &GetEventWriter() { diff --git a/static_core/compiler/optimizer/ir/graph_cloner.h b/static_core/compiler/optimizer/ir/graph_cloner.h index a4605a1e18..8d3f8048a3 100644 --- a/static_core/compiler/optimizer/ir/graph_cloner.h +++ b/static_core/compiler/optimizer/ir/graph_cloner.h @@ -22,7 +22,7 @@ #include "optimizer/ir/analysis.h" #include "optimizer/ir/basicblock.h" #include "optimizer/ir/graph.h" -#include "libarkbase/utils/arena_containers.h" +#include "libarkbase/utils/arena_unordered_map.h" #include "libarkbase/utils/hash.h" namespace ark::compiler { diff --git a/static_core/compiler/optimizer/ir/inst.h b/static_core/compiler/optimizer/ir/inst.h index 33b4e3306e..778280a0ec 100644 --- a/static_core/compiler/optimizer/ir/inst.h +++ b/static_core/compiler/optimizer/ir/inst.h @@ -26,7 +26,6 @@ #include "ir-dyn-base-types.h" #include "marker.h" -#include "libarkbase/utils/arena_containers.h" #include "libarkbase/utils/span.h" #include "libarkbase/utils/bit_field.h" #include "libarkbase/utils/bit_utils.h" @@ -3641,7 +3640,7 @@ public: inline bool IsEqualConst(double value, [[maybe_unused]] bool supportInt32 = false) { // Special compare for NaN - if (GetType() == DataType::FLOAT64 && std::isnan(value) && std::isnan(bit_cast(value_))) { + if (GetType() == DataType::FLOAT64 && IsNan(value) && IsNan(bit_cast(value_))) { return true; } return IsEqualConst(DataType::FLOAT64, bit_cast(value)); @@ -3649,7 +3648,7 @@ public: inline bool IsEqualConst(float value, [[maybe_unused]] bool supportInt32 = false) { // Special compare for NaN - if (GetType() == DataType::FLOAT32 && std::isnan(value) && std::isnan(bit_cast(value_))) { + if (GetType() == DataType::FLOAT32 && IsNan(value) && IsNan(bit_cast(value_))) { return true; } return IsEqualConst(DataType::FLOAT32, bit_cast(value)); @@ -3689,10 +3688,10 @@ public: { ASSERT(DataType::IsFloatType(GetType())); if (GetType() == DataType::FLOAT32) { - return std::isnan(GetFloatValue()); + return IsNan(GetFloatValue()); } // DataType::FLOAT64 - return std::isnan(GetDoubleValue()); + return IsNan(GetDoubleValue()); } void SetImmTableSlot(ImmTableSlot immSlot) diff --git a/static_core/compiler/optimizer/ir/locations.h b/static_core/compiler/optimizer/ir/locations.h index 9143d611de..5ec16f541e 100644 --- a/static_core/compiler/optimizer/ir/locations.h +++ b/static_core/compiler/optimizer/ir/locations.h @@ -19,10 +19,11 @@ #include "compiler/optimizer/code_generator/target_info.h" #include "compiler/optimizer/ir/constants.h" #include "compiler/optimizer/ir/datatype.h" -#include "libarkbase/utils/arena_containers.h" +#include "libarkbase/mem/arena_allocator.h" #include "libarkbase/utils/bit_field.h" #include "libarkbase/utils/arch.h" #include "libarkbase/utils/regmask.h" +#include "libarkbase/utils/span.h" #include diff --git a/static_core/compiler/optimizer/ir/runtime_interface.h b/static_core/compiler/optimizer/ir/runtime_interface.h index ad88a61810..2f8213449b 100644 --- a/static_core/compiler/optimizer/ir/runtime_interface.h +++ b/static_core/compiler/optimizer/ir/runtime_interface.h @@ -22,15 +22,19 @@ #include "ir-dyn-base-types.h" #include "libarkbase/mem/gc_barrier.h" #include "runtime/include/coretypes/tagged_value.h" +#include "runtime/include/object_header.h" #include "runtime/profiling/profiling.h" #include "source_languages.h" #include "libarkbase/utils/arch.h" #include "libarkbase/utils/span.h" -#include "libarkbase/utils/arena_containers.h" #include "libarkbase/mem/mem.h" +#include "libarkbase/utils/arena_vector.h" +#include "libarkfile/file_items.h" +#include "libarkfile/bytecode_instruction.h" namespace ark { class Thread; +class Field; } // namespace ark namespace ark::compiler { @@ -637,6 +641,11 @@ public: return nullptr; } + virtual bool IsInBootContext([[maybe_unused]] ClassPtr klass) const + { + return false; + } + // returns Class for Field virtual ClassPtr GetClassForField([[maybe_unused]] FieldPtr field) const { diff --git a/static_core/compiler/optimizer/ir/visualizer_printer.h b/static_core/compiler/optimizer/ir/visualizer_printer.h index 8b893d5c3c..654ee77f04 100644 --- a/static_core/compiler/optimizer/ir/visualizer_printer.h +++ b/static_core/compiler/optimizer/ir/visualizer_printer.h @@ -16,7 +16,7 @@ #define COMPILER_OPTIMIZER_IR_VISUALIZER_PRINTER_H #include -#include +#include "libarkbase/utils/arena_string.h" namespace ark::compiler { // This class dump graph in C1Visualizer format diff --git a/static_core/compiler/optimizer/ir_builder/inst_builder.h b/static_core/compiler/optimizer/ir_builder/inst_builder.h index aba6e6694d..90d1b0183f 100644 --- a/static_core/compiler/optimizer/ir_builder/inst_builder.h +++ b/static_core/compiler/optimizer/ir_builder/inst_builder.h @@ -23,9 +23,11 @@ #include "code_info/vreg_info.h" #include "libarkfile/code_data_accessor.h" #include "libarkfile/file_items.h" + #include "compiler_logger.h" #include "libarkfile/bytecode_instruction.h" +#include "libarkbase/utils/arena_unordered_set.h" namespace ark::compiler { constexpr int64_t INVALID_OFFSET = std::numeric_limits::max(); @@ -112,8 +114,7 @@ public: bool IsInBootContext() { - auto method = static_cast(GetGraph()->GetMethod()); - return method->GetClass()->GetLoadContext()->IsBootContext(); + return GetRuntime()->IsInBootContext(GetRuntime()->GetClass(GetGraph()->GetMethod())); } void AddCatchPhiInputs(const ArenaUnorderedSet &catchHandlers, const InstVector &defs, diff --git a/static_core/compiler/optimizer/optimizations/adjust_arefs.cpp b/static_core/compiler/optimizer/optimizations/adjust_arefs.cpp index 95db08f36c..5cfca67d5a 100644 --- a/static_core/compiler/optimizer/optimizations/adjust_arefs.cpp +++ b/static_core/compiler/optimizer/optimizations/adjust_arefs.cpp @@ -17,6 +17,7 @@ #include "optimizer/ir/basicblock.h" #include "optimizer/ir/graph.h" #include "optimizer/analysis/loop_analyzer.h" +#include "optimizer/code_generator/encode.h" namespace ark::compiler { AdjustRefs::AdjustRefs(Graph *graph) diff --git a/static_core/compiler/optimizer/optimizations/balance_expressions.h b/static_core/compiler/optimizer/optimizations/balance_expressions.h index 705cff8ea5..44a0f94d8c 100644 --- a/static_core/compiler/optimizer/optimizations/balance_expressions.h +++ b/static_core/compiler/optimizer/optimizations/balance_expressions.h @@ -19,7 +19,6 @@ #include "optimizer/ir/basicblock.h" #include "optimizer/ir/graph.h" #include "optimizer/pass.h" -#include "libarkbase/utils/arena_containers.h" namespace ark::compiler { class BalanceExpressions : public Optimization { diff --git a/static_core/compiler/optimizer/optimizations/branch_elimination.h b/static_core/compiler/optimizer/optimizations/branch_elimination.h index 7e2cd8e100..6fad935f2a 100644 --- a/static_core/compiler/optimizer/optimizations/branch_elimination.h +++ b/static_core/compiler/optimizer/optimizations/branch_elimination.h @@ -18,7 +18,7 @@ #include "optimizer/ir/graph.h" #include "optimizer/pass.h" -#include "libarkbase/utils/arena_containers.h" +#include "libarkbase/utils/arena_unordered_map.h" namespace ark::compiler { class PANDA_PUBLIC_API BranchElimination : public Optimization { diff --git a/static_core/compiler/optimizer/optimizations/cleanup.h b/static_core/compiler/optimizer/optimizations/cleanup.h index 35185276fa..98ddd88ee7 100644 --- a/static_core/compiler/optimizer/optimizations/cleanup.h +++ b/static_core/compiler/optimizer/optimizations/cleanup.h @@ -18,6 +18,7 @@ #include "optimizer/ir/graph.h" #include "optimizer/pass.h" +#include "libarkbase/utils/arena_unordered_map.h" namespace ark::compiler { class PANDA_PUBLIC_API Cleanup final : public Optimization { diff --git a/static_core/compiler/optimizer/optimizations/condition_chain_cache.h b/static_core/compiler/optimizer/optimizations/condition_chain_cache.h index 25ce0fb556..f8f4a244cf 100644 --- a/static_core/compiler/optimizer/optimizations/condition_chain_cache.h +++ b/static_core/compiler/optimizer/optimizations/condition_chain_cache.h @@ -16,7 +16,6 @@ #ifndef COMPILER_OPTIMIZER_OPTIMIZATIONS_CONDITION_CHAIN_CACHE_H #define COMPILER_OPTIMIZER_OPTIMIZATIONS_CONDITION_CHAIN_CACHE_H -#include "libarkbase/utils/arena_containers.h" namespace ark::compiler { class ConditionChain; diff --git a/static_core/compiler/optimizer/optimizations/cse.h b/static_core/compiler/optimizer/optimizations/cse.h index 22c7b73636..abea870be3 100644 --- a/static_core/compiler/optimizer/optimizations/cse.h +++ b/static_core/compiler/optimizer/optimizations/cse.h @@ -21,7 +21,6 @@ #include "optimizer/ir/basicblock.h" #include "optimizer/ir/inst.h" #include "optimizer/pass.h" -#include "libarkbase/utils/arena_containers.h" #include "vn.h" #include "compiler_logger.h" #include "libarkbase/utils/logger.h" diff --git a/static_core/compiler/optimizer/optimizations/escape.h b/static_core/compiler/optimizer/optimizations/escape.h index fe083a43b7..ab371b42a6 100644 --- a/static_core/compiler/optimizer/optimizations/escape.h +++ b/static_core/compiler/optimizer/optimizations/escape.h @@ -29,6 +29,7 @@ #include "optimizer/ir/runtime_interface.h" #include "libarkbase/mem/arena_allocator.h" #include "libarkbase/utils/bit_vector.h" +#include "libarkbase/utils/arena_unordered_map.h" #include "compiler_logger.h" #include "libarkbase/utils/logger.h" diff --git a/static_core/compiler/optimizer/optimizations/if_conversion.h b/static_core/compiler/optimizer/optimizations/if_conversion.h index 1d55175211..345e6f42a0 100644 --- a/static_core/compiler/optimizer/optimizations/if_conversion.h +++ b/static_core/compiler/optimizer/optimizations/if_conversion.h @@ -17,7 +17,8 @@ #define COMPILER_OPTIMIZER_ANALYSIS_IF_CONVERSION_H #include "optimizer/ir/graph.h" -#include "libarkbase/utils/arena_containers.h" +#include "optimizer/code_generator/encode.h" + namespace ark::compiler { class BasicBlock; diff --git a/static_core/compiler/optimizer/optimizations/inlining.h b/static_core/compiler/optimizer/optimizations/inlining.h index 4b747c391a..96c2e3f8ab 100644 --- a/static_core/compiler/optimizer/optimizations/inlining.h +++ b/static_core/compiler/optimizer/optimizations/inlining.h @@ -21,7 +21,7 @@ #include "optimizer/ir/inst.h" #include "optimizer/ir/runtime_interface.h" #include "compiler_options.h" -#include "libarkbase/utils/arena_containers.h" +#include "libarkbase/utils/arena_unordered_set.h" // NOLINTNEXTLINE(cppcoreguidelines-macro-usage,-warnings-as-errors) #define LOG_INLINING(level) COMPILER_LOG(level, INLINING) << GetLogIndent() diff --git a/static_core/compiler/optimizer/optimizations/loop_unswitch.h b/static_core/compiler/optimizer/optimizations/loop_unswitch.h index c288944a4c..d18d9b5c45 100644 --- a/static_core/compiler/optimizer/optimizations/loop_unswitch.h +++ b/static_core/compiler/optimizer/optimizations/loop_unswitch.h @@ -18,6 +18,7 @@ #include "optimizer/optimizations/loop_transform.h" #include "compiler_options.h" +#include "libarkbase/utils/arena_queue.h" namespace ark::compiler { class LoopUnswitch : public LoopTransform { diff --git a/static_core/compiler/optimizer/optimizations/lower_boxed_boolean.cpp b/static_core/compiler/optimizer/optimizations/lower_boxed_boolean.cpp index a6703470e4..f46d5cf5e8 100644 --- a/static_core/compiler/optimizer/optimizations/lower_boxed_boolean.cpp +++ b/static_core/compiler/optimizer/optimizations/lower_boxed_boolean.cpp @@ -23,7 +23,6 @@ #include "optimizer/ir/graph.h" #include "optimizer/ir/graph_visitor.h" #include "optimizer/ir/inst.h" -#include "libarkbase/utils/arena_containers.h" namespace ark::compiler { diff --git a/static_core/compiler/optimizer/optimizations/lower_boxed_boolean.h b/static_core/compiler/optimizer/optimizations/lower_boxed_boolean.h index 8e714e68d8..5295a78ba8 100644 --- a/static_core/compiler/optimizer/optimizations/lower_boxed_boolean.h +++ b/static_core/compiler/optimizer/optimizations/lower_boxed_boolean.h @@ -23,6 +23,7 @@ #include "optimizer/ir/inst.h" #include "optimizer/pass.h" #include "optimizer/ir/graph_visitor.h" +#include "libarkbase/utils/arena_unordered_map.h" namespace ark::compiler { diff --git a/static_core/compiler/optimizer/optimizations/lse.cpp b/static_core/compiler/optimizer/optimizations/lse.cpp index f64d9f6198..1845979c41 100644 --- a/static_core/compiler/optimizer/optimizations/lse.cpp +++ b/static_core/compiler/optimizer/optimizations/lse.cpp @@ -22,6 +22,7 @@ #include "optimizer/analysis/rpo.h" #include "optimizer/analysis/loop_analyzer.h" #include "optimizer/optimizations/lse.h" +#include "libarkbase/utils/arena_queue.h" namespace ark::compiler { diff --git a/static_core/compiler/optimizer/optimizations/move_constants.h b/static_core/compiler/optimizer/optimizations/move_constants.h index da3954e942..12932123d6 100644 --- a/static_core/compiler/optimizer/optimizations/move_constants.h +++ b/static_core/compiler/optimizer/optimizations/move_constants.h @@ -19,6 +19,9 @@ #include "optimizer/pass.h" #include "optimizer/ir/basicblock.h" #include "compiler_options.h" +#include "libarkbase/utils/arena_unordered_map.h" + + namespace ark::compiler { diff --git a/static_core/compiler/optimizer/optimizations/peepholes.cpp b/static_core/compiler/optimizer/optimizations/peepholes.cpp index 6ab9c997ec..79876f14a2 100644 --- a/static_core/compiler/optimizer/optimizations/peepholes.cpp +++ b/static_core/compiler/optimizer/optimizations/peepholes.cpp @@ -20,6 +20,8 @@ #include "optimizer/optimizations/const_folding.h" #include "optimizer/optimizations/object_type_check_elimination.h" +#include + namespace ark::compiler { void Peepholes::InvalidateAnalyses() diff --git a/static_core/compiler/optimizer/optimizations/peepholes.h b/static_core/compiler/optimizer/optimizations/peepholes.h index b57075a341..35b76ce2dc 100644 --- a/static_core/compiler/optimizer/optimizations/peepholes.h +++ b/static_core/compiler/optimizer/optimizations/peepholes.h @@ -23,7 +23,6 @@ #include "compiler_options.h" #include "optimizer/ir/analysis.h" #include "optimizer/ir/graph_visitor.h" -#include "libarkbase/utils/arena_containers.h" namespace ark::compiler { diff --git a/static_core/compiler/optimizer/optimizations/regalloc/interference_graph.h b/static_core/compiler/optimizer/optimizations/regalloc/interference_graph.h index 6aa52f5bb3..581539e4d0 100644 --- a/static_core/compiler/optimizer/optimizations/regalloc/interference_graph.h +++ b/static_core/compiler/optimizer/optimizations/regalloc/interference_graph.h @@ -25,9 +25,8 @@ #include "libarkbase/macros.h" #include "libarkbase/utils/bit_utils.h" #include "optimizer/code_generator/operands.h" -#include -#include "libarkbase/utils/arena_containers.h" #include "libarkbase/utils/small_vector.h" +#include "libarkbase/utils/arena_unordered_set.h" namespace ark::compiler { class LifeIntervals; diff --git a/static_core/compiler/optimizer/optimizations/regalloc/location_mask.h b/static_core/compiler/optimizer/optimizations/regalloc/location_mask.h index bf14b6d9eb..55c42ef9bd 100644 --- a/static_core/compiler/optimizer/optimizations/regalloc/location_mask.h +++ b/static_core/compiler/optimizer/optimizations/regalloc/location_mask.h @@ -16,8 +16,9 @@ #define COMPILER_OPTIMIZER_OPTIMIZATIONS_LOCATION_MASK_H #include "libarkbase/mem/arena_allocator.h" -#include "libarkbase/utils/arena_containers.h" +#include "libarkbase/utils/arena_vector.h" #include +#include namespace ark::compiler { /// Helper-class to hold information about registers and stack slots usage. diff --git a/static_core/compiler/optimizer/optimizations/regalloc/reg_alloc_base.h b/static_core/compiler/optimizer/optimizations/regalloc/reg_alloc_base.h index 98e7eaae85..1acb2e9acf 100644 --- a/static_core/compiler/optimizer/optimizations/regalloc/reg_alloc_base.h +++ b/static_core/compiler/optimizer/optimizations/regalloc/reg_alloc_base.h @@ -18,7 +18,7 @@ #include "compiler/optimizer/ir/graph.h" #include "optimizer/analysis/liveness_analyzer.h" -#include "libarkbase/utils/arena_containers.h" + #include "location_mask.h" namespace ark::compiler { diff --git a/static_core/compiler/optimizer/optimizations/regalloc/reg_alloc_graph_coloring.h b/static_core/compiler/optimizer/optimizations/regalloc/reg_alloc_graph_coloring.h index ca912bae69..3ae6d06b14 100644 --- a/static_core/compiler/optimizer/optimizations/regalloc/reg_alloc_graph_coloring.h +++ b/static_core/compiler/optimizer/optimizations/regalloc/reg_alloc_graph_coloring.h @@ -23,7 +23,7 @@ #include "optimizer/code_generator/registers_description.h" #include "optimizer/optimizations/regalloc/working_ranges.h" #include "reg_map.h" -#include "libarkbase/utils/arena_containers.h" + #include "libarkbase/utils/small_vector.h" namespace ark::compiler { diff --git a/static_core/compiler/optimizer/optimizations/regalloc/reg_alloc_linear_scan.h b/static_core/compiler/optimizer/optimizations/regalloc/reg_alloc_linear_scan.h index a03bff558d..f568bc9c6e 100644 --- a/static_core/compiler/optimizer/optimizations/regalloc/reg_alloc_linear_scan.h +++ b/static_core/compiler/optimizer/optimizations/regalloc/reg_alloc_linear_scan.h @@ -16,7 +16,7 @@ #ifndef COMPILER_OPTIMIZER_OPTIMIZATIONS_REG_ALLOC_LINEAR_SCAN_H #define COMPILER_OPTIMIZER_OPTIMIZATIONS_REG_ALLOC_LINEAR_SCAN_H -#include "libarkbase/utils/arena_containers.h" + #include "optimizer/analysis/liveness_analyzer.h" #include "optimizer/code_generator/registers_description.h" #include "reg_alloc_base.h" diff --git a/static_core/compiler/optimizer/optimizations/regalloc/reg_map.h b/static_core/compiler/optimizer/optimizations/regalloc/reg_map.h index c9854fc0d6..d82a322b29 100644 --- a/static_core/compiler/optimizer/optimizations/regalloc/reg_map.h +++ b/static_core/compiler/optimizer/optimizations/regalloc/reg_map.h @@ -16,7 +16,7 @@ #ifndef COMPILER_OPTIMIZER_OPTIMIZATIONS_REG_MAP_H #define COMPILER_OPTIMIZER_OPTIMIZATIONS_REG_MAP_H -#include "libarkbase/utils/arena_containers.h" + #include "location_mask.h" #include "optimizer/ir/constants.h" #include "libarkbase/utils/arch.h" diff --git a/static_core/compiler/optimizer/optimizations/regalloc/spill_fills_resolver.h b/static_core/compiler/optimizer/optimizations/regalloc/spill_fills_resolver.h index 47549d970a..3b42892187 100644 --- a/static_core/compiler/optimizer/optimizations/regalloc/spill_fills_resolver.h +++ b/static_core/compiler/optimizer/optimizations/regalloc/spill_fills_resolver.h @@ -19,7 +19,7 @@ #include "compiler/optimizer/ir/graph_visitor.h" #include "optimizer/code_generator/registers_description.h" #include "optimizer/ir/inst.h" -#include "libarkbase/utils/arena_containers.h" + namespace ark::compiler { class RegAllocBase; diff --git a/static_core/compiler/optimizer/optimizations/regalloc/working_ranges.h b/static_core/compiler/optimizer/optimizations/regalloc/working_ranges.h index 827681ce0e..a2642202cf 100644 --- a/static_core/compiler/optimizer/optimizations/regalloc/working_ranges.h +++ b/static_core/compiler/optimizer/optimizations/regalloc/working_ranges.h @@ -17,7 +17,7 @@ #define COMPILER_OPTIMIZER_OPTIMIZATIONS_WORKING_RANGES_H #include "compiler/optimizer/analysis/liveness_analyzer.h" -#include "libarkbase/utils/arena_containers.h" + namespace ark::compiler { using InstructionsRanges = ArenaDeque; diff --git a/static_core/compiler/optimizer/optimizations/scheduler.h b/static_core/compiler/optimizer/optimizations/scheduler.h index b580b07c1c..bba6be5bc3 100644 --- a/static_core/compiler/optimizer/optimizations/scheduler.h +++ b/static_core/compiler/optimizer/optimizations/scheduler.h @@ -18,6 +18,9 @@ #include "optimizer/ir/graph.h" #include "compiler_options.h" +#include "libarkbase/utils/arena_unordered_map.h" + +#include namespace ark::compiler { class Scheduler : public Optimization { diff --git a/static_core/compiler/optimizer/optimizations/vn.h b/static_core/compiler/optimizer/optimizations/vn.h index afadd5b290..2b05e9fd45 100644 --- a/static_core/compiler/optimizer/optimizations/vn.h +++ b/static_core/compiler/optimizer/optimizations/vn.h @@ -21,6 +21,7 @@ #include #include #include "optimizer/ir/analysis.h" +#include "libarkbase/utils/arena_unordered_map.h" namespace ark::compiler { class Inst; diff --git a/static_core/compiler/optimizer/pass_manager.h b/static_core/compiler/optimizer/pass_manager.h index e81ad22f3d..d717f33de9 100644 --- a/static_core/compiler/optimizer/pass_manager.h +++ b/static_core/compiler/optimizer/pass_manager.h @@ -20,8 +20,8 @@ #include "compiler_options.h" #include "pass.h" #include "libarkbase/utils/bit_field.h" -#include "libarkbase/utils/arena_containers.h" #include "pass_manager_statistics.h" +#include "libarkbase/utils/arena_vector.h" namespace ark::compiler { class Graph; diff --git a/static_core/compiler/optimizer/pass_manager_statistics.h b/static_core/compiler/optimizer/pass_manager_statistics.h index 25c3aaa3cd..a109914851 100644 --- a/static_core/compiler/optimizer/pass_manager_statistics.h +++ b/static_core/compiler/optimizer/pass_manager_statistics.h @@ -17,7 +17,8 @@ #define PANDA_PASS_STATISTICS_H #include -#include "libarkbase/utils/arena_containers.h" +#include "libarkbase/utils/arena_list.h" +#include "libarkbase/utils/arena_stack.h" namespace ark::compiler { class Graph; diff --git a/static_core/compiler/optimizer/pipeline.cpp b/static_core/compiler/optimizer/pipeline.cpp index 8edff74bf2..3d1d59f74c 100644 --- a/static_core/compiler/optimizer/pipeline.cpp +++ b/static_core/compiler/optimizer/pipeline.cpp @@ -23,6 +23,7 @@ #include "optimizer/code_generator/codegen_native.h" #include "optimizer/code_generator/method_properties.h" #include "optimizer/ir/graph.h" +#include "optimizer/ir/graph-inl.h" #include "optimizer/ir/visualizer_printer.h" #include "optimizer/analysis/alias_analysis.h" #include "optimizer/analysis/linear_order.h" diff --git a/static_core/compiler/optimizer/templates/ir-dyn-base-types.h.erb b/static_core/compiler/optimizer/templates/ir-dyn-base-types.h.erb index 5ed4340aaa..23fa386144 100644 --- a/static_core/compiler/optimizer/templates/ir-dyn-base-types.h.erb +++ b/static_core/compiler/optimizer/templates/ir-dyn-base-types.h.erb @@ -17,10 +17,12 @@ #define COMPILER_OPTIMIZER_TEMPLATES_IR_DYN_BASE_TYPES_H #include "compiler/optimizer/ir/datatype.h" -#include "compiler/optimizer/code_generator/encode.h" +#include "compiler/optimizer/code_generator/label_holder.h" #include "profiling/profiling.h" #include "source_languages.h" +#include + <%= Common::include_plugin_files "compiler_base_types", "header_path_implementation_codegen" %> <%= Common::include_plugin_files "compiler_extensions", "main_header_path" %> diff --git a/static_core/compiler/tests/aarch64/codegen_test.cpp b/static_core/compiler/tests/aarch64/codegen_test.cpp index 0efc160c80..93a90408bf 100644 --- a/static_core/compiler/tests/aarch64/codegen_test.cpp +++ b/static_core/compiler/tests/aarch64/codegen_test.cpp @@ -23,7 +23,7 @@ #include "optimizer/code_generator/codegen.h" #include "optimizer/code_generator/codegen_native.h" #include "optimizer/code_generator/method_properties.h" -#include "utils-vixl.h" +#include "libarkbase/utils/-vixl.h" #include "aarch64/decoder-aarch64.h" #include "aarch64/disasm-aarch64.h" #include "aarch64/operands-aarch64.h" diff --git a/static_core/compiler/tests/bounds_analysis_test.cpp b/static_core/compiler/tests/bounds_analysis_test.cpp index 01429272a4..88ac78c3b3 100644 --- a/static_core/compiler/tests/bounds_analysis_test.cpp +++ b/static_core/compiler/tests/bounds_analysis_test.cpp @@ -17,7 +17,7 @@ #include "optimizer/analysis/bounds_analysis.h" #include "optimizer/optimizations/cleanup.h" #include "optimizer/optimizations/peepholes.h" -#include "libarkbase/utils/arena_containers.h" + namespace ark::compiler { class BoundsAnalysisTest : public CommonTest { diff --git a/static_core/compiler/tests/profiling_merger_test.cpp b/static_core/compiler/tests/profiling_merger_test.cpp index 5c9a3ce2dd..de102e914a 100644 --- a/static_core/compiler/tests/profiling_merger_test.cpp +++ b/static_core/compiler/tests/profiling_merger_test.cpp @@ -19,7 +19,7 @@ #include #include #include -#include "include/mem/panda_containers.h" + #include "include/method.h" #include "include/runtime.h" #include "jit/libprofile/aot_profiling_data.h" diff --git a/static_core/compiler/tests/unit_test.cpp b/static_core/compiler/tests/unit_test.cpp index 0de8de254b..04c910f3bb 100644 --- a/static_core/compiler/tests/unit_test.cpp +++ b/static_core/compiler/tests/unit_test.cpp @@ -30,6 +30,7 @@ #include "compiler.h" #include "libarkbase/utils/expected.h" #include "compiler_options.h" +#include "runtime/include/class-inl.h" #include "libarkbase/utils/utf.h" diff --git a/static_core/compiler/tools/debug/jit_writer.h b/static_core/compiler/tools/debug/jit_writer.h index fb17669561..bc3f56ebd0 100644 --- a/static_core/compiler/tools/debug/jit_writer.h +++ b/static_core/compiler/tools/debug/jit_writer.h @@ -22,7 +22,7 @@ #include "aot/aot_file.h" #include "aot/aot_builder/elf_builder.h" #include "libarkbase/utils/arch.h" -#include "libarkbase/utils/arena_containers.h" + #include "libarkbase/utils/bit_vector.h" #include "optimizer/ir/runtime_interface.h" #include diff --git a/static_core/cross_values/cross_values_getters_generator.rb b/static_core/cross_values/cross_values_getters_generator.rb index a4d19c9b58..9496d8b925 100755 --- a/static_core/cross_values/cross_values_getters_generator.rb +++ b/static_core/cross_values/cross_values_getters_generator.rb @@ -22,6 +22,8 @@ $header = %{ #ifndef CROSS_VALUES_CROSS_VALUES_H #define CROSS_VALUES_CROSS_VALUES_H +#include "libarkbase/utils/logger.h" + } Dir.glob("#{ARGV[1]}/*values_gen.h").each do |values_h| diff --git a/static_core/irtoc/backend/compilation.h b/static_core/irtoc/backend/compilation.h index ac9455ab9d..21b491cf8b 100644 --- a/static_core/irtoc/backend/compilation.h +++ b/static_core/irtoc/backend/compilation.h @@ -17,6 +17,7 @@ #define PANDA_IRTOC_COMPILATION_H #include "function.h" +#include namespace ark::irtoc { using compiler::Graph; diff --git a/static_core/irtoc/backend/compiler/dangling_pointers_checker.h b/static_core/irtoc/backend/compiler/dangling_pointers_checker.h index eeb82cd0fd..5494861506 100644 --- a/static_core/irtoc/backend/compiler/dangling_pointers_checker.h +++ b/static_core/irtoc/backend/compiler/dangling_pointers_checker.h @@ -19,6 +19,7 @@ #include "compiler/optimizer/pass.h" #include "compiler/optimizer/ir/basicblock.h" #include "compiler/compiler_options.h" +#include "libarkbase/utils/arena_set.h" namespace ark::compiler { class DanglingPointersChecker : public Analysis { diff --git a/static_core/libarkbase/mem/arena_allocator.h b/static_core/libarkbase/mem/arena_allocator.h index 1edca77ad2..a0b4686674 100644 --- a/static_core/libarkbase/mem/arena_allocator.h +++ b/static_core/libarkbase/mem/arena_allocator.h @@ -17,20 +17,15 @@ #define LIBPANDABASE_MEM_ARENA_ALLOCATOR_H #include -#include #include #include #include #include -#include #include "libarkbase/concepts.h" #include "libarkbase/mem/base_mem_stats.h" -#include "malloc_mem_pool-inl.h" -#include "mmap_mem_pool-inl.h" #include "mem.h" #include "mem_pool.h" -#include "arena-inl.h" #include "libarkbase/os/mutex.h" #define USE_MMAP_POOL_FOR_ARENAS diff --git a/static_core/libarkbase/mem/base_mem_stats.h b/static_core/libarkbase/mem/base_mem_stats.h index 08274fb2f9..d4c686af12 100644 --- a/static_core/libarkbase/mem/base_mem_stats.h +++ b/static_core/libarkbase/mem/base_mem_stats.h @@ -16,7 +16,6 @@ #ifndef PANDA_BASE_MEM_STATS_H #define PANDA_BASE_MEM_STATS_H -#include "libarkbase/os/mutex.h" #include #include "libarkbase/macros.h" #include "space.h" diff --git a/static_core/libarkbase/mem/code_allocator.h b/static_core/libarkbase/mem/code_allocator.h index 001f8bd572..977c56c78c 100644 --- a/static_core/libarkbase/mem/code_allocator.h +++ b/static_core/libarkbase/mem/code_allocator.h @@ -16,7 +16,7 @@ #ifndef PANDA_CODEALLOCATOR_H #define PANDA_CODEALLOCATOR_H -#include "libarkbase/utils/arena_containers.h" +#include "libarkbase/mem/arena_allocator.h" #include "libarkbase/os/mem.h" #include "libarkbase/os/mutex.h" diff --git a/static_core/libarkbase/mem/mem.h b/static_core/libarkbase/mem/mem.h index 77039b678d..2e361b1811 100644 --- a/static_core/libarkbase/mem/mem.h +++ b/static_core/libarkbase/mem/mem.h @@ -21,7 +21,6 @@ #include #include -#include #include namespace ark { diff --git a/static_core/libarkbase/mem/weighted_adaptive_tlab_average.h b/static_core/libarkbase/mem/weighted_adaptive_tlab_average.h index 22ab11272d..fa630f84e7 100644 --- a/static_core/libarkbase/mem/weighted_adaptive_tlab_average.h +++ b/static_core/libarkbase/mem/weighted_adaptive_tlab_average.h @@ -18,7 +18,7 @@ #include #include "libarkbase/macros.h" -#include "runtime/include/mem/panda_containers.h" +#include "runtime/include/mem/panda_vector.h" namespace ark { class WeightedAdaptiveTlabAverage { diff --git a/static_core/libarkbase/os/mem.h b/static_core/libarkbase/os/mem.h index 945a05fd71..a3cfb54b25 100644 --- a/static_core/libarkbase/os/mem.h +++ b/static_core/libarkbase/os/mem.h @@ -17,6 +17,7 @@ #define PANDA_LIBPANDABASE_PBASE_OS_MEM_H_ #include "file.h" +#include "error.h" #include "libarkbase/macros.h" #include "libarkbase/utils/expected.h" #include "libarkbase/utils/span.h" @@ -31,7 +32,6 @@ #error "Unsupported target: please provide mmap API" #endif -#include #include #include #include diff --git a/static_core/libarkbase/tests/arena_allocator_test.cpp b/static_core/libarkbase/tests/arena_allocator_test.cpp index d56c209874..3e9f1ac1df 100644 --- a/static_core/libarkbase/tests/arena_allocator_test.cpp +++ b/static_core/libarkbase/tests/arena_allocator_test.cpp @@ -20,7 +20,7 @@ #include "libarkbase/mem/mem.h" #include "libarkbase/mem/mem_config.h" -#include "libarkbase/utils/arena_containers.h" + #include "gtest/gtest.h" #include "libarkbase/utils/logger.h" diff --git a/static_core/libarkbase/tests/bit_vector_test.cpp b/static_core/libarkbase/tests/bit_vector_test.cpp index 7efcbb0390..a2cc8743b6 100644 --- a/static_core/libarkbase/tests/bit_vector_test.cpp +++ b/static_core/libarkbase/tests/bit_vector_test.cpp @@ -15,7 +15,7 @@ #include "libarkbase/utils/bit_vector.h" #include "libarkbase/mem/pool_manager.h" -#include "libarkbase/utils/arena_containers.h" + #include diff --git a/static_core/libarkbase/tests/small_vector_test.cpp b/static_core/libarkbase/tests/small_vector_test.cpp index 7d2460b6f5..1de6135472 100644 --- a/static_core/libarkbase/tests/small_vector_test.cpp +++ b/static_core/libarkbase/tests/small_vector_test.cpp @@ -14,7 +14,7 @@ */ #include "libarkbase/mem/pool_manager.h" -#include "libarkbase/utils/arena_containers.h" + #include "libarkbase/utils/small_vector.h" #include diff --git a/static_core/libarkbase/utils/arch.h b/static_core/libarkbase/utils/arch.h index fe7cffcc8b..d333756ea5 100644 --- a/static_core/libarkbase/utils/arch.h +++ b/static_core/libarkbase/utils/arch.h @@ -17,7 +17,6 @@ #define PANDA_ARCH_H #include "libarkbase/macros.h" -#include "libarkbase/utils/math_helpers.h" #include "libarkbase/utils/regmask.h" #include "libarkbase/concepts.h" diff --git a/static_core/libarkbase/utils/arena_containers.h b/static_core/libarkbase/utils/arena_containers.h index 262ed52e95..0dd32c7ca7 100644 --- a/static_core/libarkbase/utils/arena_containers.h +++ b/static_core/libarkbase/utils/arena_containers.h @@ -16,60 +16,16 @@ #ifndef LIBPANDABASE_UTILS_ARENA_CONTAINERS_H_ #define LIBPANDABASE_UTILS_ARENA_CONTAINERS_H_ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "libarkbase/mem/arena_allocator.h" -#include "libarkbase/mem/arena_allocator_stl_adapter.h" - -namespace ark { - -template -using ArenaVector = std::vector>; -template -using ArenaDeque = std::deque>; -template > -using ArenaStack = std::stack; -template > -using ArenaQueue = std::queue; -template -using ArenaList = std::list>; -template -using ArenaForwardList = std::forward_list>; -template , bool USE_OOM_HANDLER = false> -using ArenaSet = std::set>; -template , bool USE_OOM_HANDLER = false> -using ArenaMap = std::map, USE_OOM_HANDLER>>; -template , bool USE_OOM_HANDLER = false> -using ArenaMultiMap = std::multimap, USE_OOM_HANDLER>>; -template , class KeyEqual = std::equal_to, - bool USE_OOM_HANDLER = false> -using ArenaUnorderedMultiMap = - std::unordered_multimap, USE_OOM_HANDLER>>; -template , class KeyEqual = std::equal_to, - bool USE_OOM_HANDLER = false> -using ArenaUnorderedMap = - std::unordered_map, false>>; -template -using ArenaDoubleUnorderedMap = - ArenaUnorderedMap, std::equal_to, USE_OOM_HANDLER>, - std::hash, std::equal_to, USE_OOM_HANDLER>; -template , class KeyEqual = std::equal_to, bool USE_OOM_HANDLER = false> -using ArenaUnorderedSet = std::unordered_set>; -template -using ArenaStringT = std::basic_string, ArenaAllocatorAdapter>; -using ArenaString = ArenaStringT; - -} // namespace ark +#include "arena_deque.h" +#include "arena_list.h" +#include "arena_forward_list.h" +#include "arena_stack.h" +#include "arena_queue.h" +#include "arena_vector.h" +#include "arena_set.h" +#include "arena_string.h" +#include "arena_map.h" +#include "arena_unordered_map.h" +#include "arena_unordered_set.h" #endif // LIBPANDABASE_UTILS_ARENA_CONTAINERS_H_ diff --git a/static_core/libarkbase/utils/arena_deque.h b/static_core/libarkbase/utils/arena_deque.h new file mode 100644 index 0000000000..94928b0160 --- /dev/null +++ b/static_core/libarkbase/utils/arena_deque.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef LIBPANDABASE_UTILS_ARENA_DEQUE_H_ +#define LIBPANDABASE_UTILS_ARENA_DEQUE_H_ + +#include + +#include "libarkbase/mem/arena_allocator.h" +#include "libarkbase/mem/arena_allocator_stl_adapter.h" + +namespace ark { + +template +using ArenaDeque = std::deque>; + +} // namespace ark + +#endif // LIBPANDABASE_UTILS_ARENA_DEQUE_H_ diff --git a/static_core/libarkbase/utils/arena_forward_list.h b/static_core/libarkbase/utils/arena_forward_list.h new file mode 100644 index 0000000000..4c14982e52 --- /dev/null +++ b/static_core/libarkbase/utils/arena_forward_list.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef LIBPANDABASE_UTILS_ARENA_FORWARD_LIST_H_ +#define LIBPANDABASE_UTILS_ARENA_FORWARD_LIST_H_ + +#include + +#include "libarkbase/mem/arena_allocator.h" +#include "libarkbase/mem/arena_allocator_stl_adapter.h" + +namespace ark { + +template +using ArenaForwardList = std::forward_list>; + +} // namespace ark + +#endif // LIBPANDABASE_UTILS_ARENA_FORWARD_LIST_H_ diff --git a/static_core/libarkbase/utils/arena_list.h b/static_core/libarkbase/utils/arena_list.h new file mode 100644 index 0000000000..04bf764a39 --- /dev/null +++ b/static_core/libarkbase/utils/arena_list.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef LIBPANDABASE_UTILS_ARENA_LIST_H_ +#define LIBPANDABASE_UTILS_ARENA_LIST_H_ + +#include + +#include "libarkbase/mem/arena_allocator.h" +#include "libarkbase/mem/arena_allocator_stl_adapter.h" + +namespace ark { + +template +using ArenaList = std::list>; + +} // namespace ark + +#endif // LIBPANDABASE_UTILS_ARENA_LIST_H_ diff --git a/static_core/libarkbase/utils/arena_map.h b/static_core/libarkbase/utils/arena_map.h new file mode 100644 index 0000000000..2a4fad9b20 --- /dev/null +++ b/static_core/libarkbase/utils/arena_map.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef LIBPANDABASE_UTILS_ARENA_MAP_H_ +#define LIBPANDABASE_UTILS_ARENA_MAP_H_ + + +#include + +#include "libarkbase/mem/arena_allocator.h" +#include "libarkbase/mem/arena_allocator_stl_adapter.h" + +namespace ark { + +template , bool USE_OOM_HANDLER = false> +using ArenaMap = std::map, USE_OOM_HANDLER>>; +template , bool USE_OOM_HANDLER = false> +using ArenaMultiMap = std::multimap, USE_OOM_HANDLER>>; + +} // namespace ark + +#endif // LIBPANDABASE_UTILS_ARENA_MAP_H_ diff --git a/static_core/libarkbase/utils/arena_queue.h b/static_core/libarkbase/utils/arena_queue.h new file mode 100644 index 0000000000..8981d14116 --- /dev/null +++ b/static_core/libarkbase/utils/arena_queue.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef LIBPANDABASE_UTILS_ARENA_QUEUE_H_ +#define LIBPANDABASE_UTILS_ARENA_QUEUE_H_ + +#include + +#include "arena_deque.h" +#include "libarkbase/mem/arena_allocator.h" +#include "libarkbase/mem/arena_allocator_stl_adapter.h" + +namespace ark { + +template > +using ArenaQueue = std::queue; + +} // namespace ark + +#endif // LIBPANDABASE_UTILS_ARENA_QUEUE_H_ diff --git a/static_core/libarkbase/utils/arena_set.h b/static_core/libarkbase/utils/arena_set.h new file mode 100644 index 0000000000..6ed6ce34b3 --- /dev/null +++ b/static_core/libarkbase/utils/arena_set.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef LIBPANDABASE_UTILS_ARENA_SET_H_ +#define LIBPANDABASE_UTILS_ARENA_SET_H_ + +#include + +#include "libarkbase/mem/arena_allocator.h" +#include "libarkbase/mem/arena_allocator_stl_adapter.h" + +namespace ark { + +template , bool USE_OOM_HANDLER = false> +using ArenaSet = std::set>; + +} // namespace ark + +#endif // LIBPANDABASE_UTILS_ARENA_SET_H_ diff --git a/static_core/libarkbase/utils/arena_stack.h b/static_core/libarkbase/utils/arena_stack.h new file mode 100644 index 0000000000..d9238b4ed1 --- /dev/null +++ b/static_core/libarkbase/utils/arena_stack.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef LIBPANDABASE_UTILS_ARENA_STACK_H_ +#define LIBPANDABASE_UTILS_ARENA_STACK_H_ + +#include + +#include "arena_deque.h" +#include "libarkbase/mem/arena_allocator.h" +#include "libarkbase/mem/arena_allocator_stl_adapter.h" + +namespace ark { + +template > +using ArenaStack = std::stack; + +} // namespace ark + +#endif // LIBPANDABASE_UTILS_ARENA_STACK_H_ diff --git a/static_core/libarkbase/utils/arena_string.h b/static_core/libarkbase/utils/arena_string.h new file mode 100644 index 0000000000..50a911d32d --- /dev/null +++ b/static_core/libarkbase/utils/arena_string.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef LIBPANDABASE_UTILS_ARENA_STRING_H_ +#define LIBPANDABASE_UTILS_ARENA_STRING_H_ + +#include + +#include "libarkbase/mem/arena_allocator.h" +#include "libarkbase/mem/arena_allocator_stl_adapter.h" + +namespace ark { + +template +using ArenaStringT = std::basic_string, ArenaAllocatorAdapter>; +using ArenaString = ArenaStringT; + +} // namespace ark + +#endif // LIBPANDABASE_UTILS_ARENA_STRING_H_ diff --git a/static_core/libarkbase/utils/arena_unordered_map.h b/static_core/libarkbase/utils/arena_unordered_map.h new file mode 100644 index 0000000000..6e08f4a227 --- /dev/null +++ b/static_core/libarkbase/utils/arena_unordered_map.h @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef LIBPANDABASE_UTILS_ARENA_UNORDERED_MAP_H_ +#define LIBPANDABASE_UTILS_ARENA_UNORDERED_MAP_H_ + +#include + +#include "libarkbase/mem/arena_allocator.h" +#include "libarkbase/mem/arena_allocator_stl_adapter.h" + +namespace ark { + +template , class KeyEqual = std::equal_to, + bool USE_OOM_HANDLER = false> +using ArenaUnorderedMap = + std::unordered_map, false>>; + +template +using ArenaDoubleUnorderedMap = + ArenaUnorderedMap, std::equal_to, USE_OOM_HANDLER>, + std::hash, std::equal_to, USE_OOM_HANDLER>; + +template , class KeyEqual = std::equal_to, + bool USE_OOM_HANDLER = false> +using ArenaUnorderedMultiMap = + std::unordered_multimap, USE_OOM_HANDLER>>; + +} // namespace ark + +#endif // LIBPANDABASE_UTILS_ARENA_UNORDERED_MAP_H_ diff --git a/static_core/libarkbase/utils/arena_unordered_set.h b/static_core/libarkbase/utils/arena_unordered_set.h new file mode 100644 index 0000000000..7d8b67ba70 --- /dev/null +++ b/static_core/libarkbase/utils/arena_unordered_set.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef LIBPANDABASE_UTILS_ARENA_UNORDERED_SET_H_ +#define LIBPANDABASE_UTILS_ARENA_UNORDERED_SET_H_ + +#include + +#include "libarkbase/mem/arena_allocator.h" +#include "libarkbase/mem/arena_allocator_stl_adapter.h" + +namespace ark { + +template , class KeyEqual = std::equal_to, bool USE_OOM_HANDLER = false> +using ArenaUnorderedSet = std::unordered_set>; + +} // namespace ark + +#endif // LIBPANDABASE_UTILS_ARENA_UNORDERED_SET_H_ diff --git a/static_core/libarkbase/utils/arena_vector.h b/static_core/libarkbase/utils/arena_vector.h new file mode 100644 index 0000000000..c45a2bb60d --- /dev/null +++ b/static_core/libarkbase/utils/arena_vector.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef LIBPANDABASE_UTILS_ARENA_VECTOR_H_ +#define LIBPANDABASE_UTILS_ARENA_VECTOR_H_ + + +#include + +#include "libarkbase/mem/arena_allocator.h" +#include "libarkbase/mem/arena_allocator_stl_adapter.h" + +namespace ark { + +template +using ArenaVector = std::vector>; + +} // namespace ark + +#endif // LIBPANDABASE_UTILS_ARENA_VECTOR_H_ diff --git a/static_core/libarkbase/utils/bit_table.h b/static_core/libarkbase/utils/bit_table.h index fe56d465ee..718e4f4c95 100644 --- a/static_core/libarkbase/utils/bit_table.h +++ b/static_core/libarkbase/utils/bit_table.h @@ -16,7 +16,8 @@ #ifndef PANDA_BITTABLE_H #define PANDA_BITTABLE_H -#include "libarkbase/utils/arena_containers.h" +#include "libarkbase/utils/arena_deque.h" +#include "libarkbase/utils/arena_unordered_map.h" #include "libarkbase/utils/bit_memory_region.h" #include "libarkbase/utils/bit_memory_stream.h" #include "libarkbase/utils/bit_vector.h" diff --git a/static_core/libarkbase/utils/bit_utils.h b/static_core/libarkbase/utils/bit_utils.h index a50c723625..4b3cfbe640 100644 --- a/static_core/libarkbase/utils/bit_utils.h +++ b/static_core/libarkbase/utils/bit_utils.h @@ -19,9 +19,7 @@ #include "libarkbase/globals.h" #include "libarkbase/macros.h" -#include #include -#include #include #include @@ -372,6 +370,14 @@ inline constexpr uint32_t BitsNumInType() return sizeof(T) * ark::BITS_PER_BYTE; } +template +bool IsNan(T arg) +{ + static_assert(std::is_floating_point_v); + // Assuming 'fno-signaling-nans': + return __builtin_isnan(arg); +} + template constexpr To CastFloatToInt(From value) { @@ -389,7 +395,7 @@ constexpr To CastFloatToInt(From value) } else { res = MAX_INT; } - } else if (std::isnan(value)) { + } else if (IsNan(value)) { res = 0; } else { res = MIN_INT; diff --git a/static_core/libarkbase/utils/bit_vector.h b/static_core/libarkbase/utils/bit_vector.h index a2b06dd49a..24f95fe04a 100644 --- a/static_core/libarkbase/utils/bit_vector.h +++ b/static_core/libarkbase/utils/bit_vector.h @@ -24,6 +24,8 @@ #include "libarkbase/utils/type_helpers.h" #include +#include + namespace ark { template diff --git a/static_core/libarkbase/utils/math_helpers.h b/static_core/libarkbase/utils/math_helpers.h index b5ac86ce6c..6173db0124 100644 --- a/static_core/libarkbase/utils/math_helpers.h +++ b/static_core/libarkbase/utils/math_helpers.h @@ -21,7 +21,6 @@ #include #include #include -#include namespace ark::helpers::math { @@ -117,10 +116,10 @@ template T Min(T a, T b) { static_assert(std::is_floating_point_v); - if (std::isnan(a)) { + if (IsNan(a)) { return a; } - if (a == 0.0 && b == 0.0 && std::signbit(b)) { + if (a == 0.0 && b == 0.0 && __builtin_signbit(b)) { return b; } return a <= b ? a : b; @@ -130,10 +129,10 @@ template T Max(T a, T b) { static_assert(std::is_floating_point_v); - if (std::isnan(a)) { + if (IsNan(a)) { return a; } - if (a == 0.0 && b == 0.0 && std::signbit(a)) { + if (a == 0.0 && b == 0.0 && __builtin_signbit(a)) { return b; } return a >= b ? a : b; diff --git a/static_core/libarkbase/utils/pandargs.h b/static_core/libarkbase/utils/pandargs.h index 4fad4cfe82..a2ddff9a41 100644 --- a/static_core/libarkbase/utils/pandargs.h +++ b/static_core/libarkbase/utils/pandargs.h @@ -16,11 +16,8 @@ #ifndef LIBPANDABASE_UTILS_PANDARGS_H_ #define LIBPANDABASE_UTILS_PANDARGS_H_ -#include #include -#include #include -#include #include #include #include diff --git a/static_core/libarkbase/utils/utils.h b/static_core/libarkbase/utils/utils.h index 83422760f2..3b2769559e 100644 --- a/static_core/libarkbase/utils/utils.h +++ b/static_core/libarkbase/utils/utils.h @@ -19,7 +19,6 @@ #include "libarkbase/macros.h" #include -#include namespace ark { // ---------------------------------------------------------------------------- @@ -68,7 +67,7 @@ PANDA_PUBLIC_API uint32_t CountDigits(uint64_t v); ALWAYS_INLINE inline void MemcpyUnsafe(void *dest, const void *src, size_t length) { - std::copy_n(static_cast(src), length, static_cast(dest)); + __builtin_memcpy(dest, src, length); } } // namespace ark diff --git a/static_core/libarkfile/literal_data_accessor.h b/static_core/libarkfile/literal_data_accessor.h index dd2ed7c9bd..8fa8ca2c63 100644 --- a/static_core/libarkfile/literal_data_accessor.h +++ b/static_core/libarkfile/literal_data_accessor.h @@ -16,6 +16,7 @@ #ifndef LIBPANDAFILE_LITERAL_DATA_ACCESSOR_H_ #define LIBPANDAFILE_LITERAL_DATA_ACCESSOR_H_ +#include "libarkfile/literal_tag.h" #include "libarkfile/file.h" #include "libarkfile/field_data_accessor.h" #include "libarkfile/helpers.h" @@ -25,40 +26,6 @@ namespace ark::panda_file { using StringData = File::StringData; -/* LiteralTag could be extended by different language -// For example, JAVA could use it to represent Array of Integer -// by adding `INTARRAY` in the future -*/ -enum class LiteralTag : uint8_t { - TAGVALUE = 0x00, - BOOL = 0x01, - INTEGER = 0x02, - FLOAT = 0x03, - DOUBLE = 0x04, - STRING = 0x05, - BIGINT = 0x06, - METHOD = 0x07, - GENERATORMETHOD = 0x08, - ACCESSOR = 0x09, - METHODAFFILIATE = 0x0a, - ARRAY_U1 = 0x0b, - ARRAY_U8 = 0x0c, - ARRAY_I8 = 0x0d, - ARRAY_U16 = 0x0e, - ARRAY_I16 = 0x0f, - ARRAY_U32 = 0x10, - ARRAY_I32 = 0x11, - ARRAY_U64 = 0x12, - ARRAY_I64 = 0x13, - ARRAY_F32 = 0x14, - ARRAY_F64 = 0x15, - ARRAY_STRING = 0x16, - ASYNCGENERATORMETHOD = 0x17, - ASYNCMETHOD = 0x18, - LITERALARRAY = 0x19, - NULLVALUE = 0xff -}; - class PANDA_PUBLIC_API LiteralDataAccessor { public: LiteralDataAccessor(const File &pandaFile, File::EntityId literalDataId); diff --git a/static_core/libarkfile/literal_tag.h b/static_core/libarkfile/literal_tag.h new file mode 100644 index 0000000000..4bf87d6d68 --- /dev/null +++ b/static_core/libarkfile/literal_tag.h @@ -0,0 +1,59 @@ +/** + * Copyright (c) 2021-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef LIBPANDAFILE_LITERAL_TAG_H_ +#define LIBPANDAFILE_LITERAL_TAG_H_ + +#include + +namespace ark::panda_file { + +/* LiteralTag could be extended by different language +// For example, JAVA could use it to represent Array of Integer +// by adding `INTARRAY` in the future +*/ +enum class LiteralTag : uint8_t { + TAGVALUE = 0x00, + BOOL = 0x01, + INTEGER = 0x02, + FLOAT = 0x03, + DOUBLE = 0x04, + STRING = 0x05, + BIGINT = 0x06, + METHOD = 0x07, + GENERATORMETHOD = 0x08, + ACCESSOR = 0x09, + METHODAFFILIATE = 0x0a, + ARRAY_U1 = 0x0b, + ARRAY_U8 = 0x0c, + ARRAY_I8 = 0x0d, + ARRAY_U16 = 0x0e, + ARRAY_I16 = 0x0f, + ARRAY_U32 = 0x10, + ARRAY_I32 = 0x11, + ARRAY_U64 = 0x12, + ARRAY_I64 = 0x13, + ARRAY_F32 = 0x14, + ARRAY_F64 = 0x15, + ARRAY_STRING = 0x16, + ASYNCGENERATORMETHOD = 0x17, + ASYNCMETHOD = 0x18, + LITERALARRAY = 0x19, + NULLVALUE = 0xff +}; + +} // namespace ark::panda_file + +#endif // LIBPANDAFILE_LITERAL_TAG_H_ diff --git a/static_core/patches/asmjit/0002-Add-Panda-Allocator.patch b/static_core/patches/asmjit/0002-Add-Panda-Allocator.patch index bc333a3d80..c5c89ac90d 100644 --- a/static_core/patches/asmjit/0002-Add-Panda-Allocator.patch +++ b/static_core/patches/asmjit/0002-Add-Panda-Allocator.patch @@ -115,7 +115,7 @@ index 9b3466d..3fb88dc 100644 #include "../core/zonetree.h" #include "../core/zonevector.h" -+#include "mem/arena_allocator.h" ++#include "libarkbase/mem/arena_allocator.h" + ASMJIT_BEGIN_NAMESPACE @@ -229,7 +229,7 @@ index 52e9f12..881771b 100644 #include "../core/support.h" -+#include "mem/arena_allocator.h" ++#include "libarkbase/mem/arena_allocator.h" + ASMJIT_BEGIN_NAMESPACE diff --git a/static_core/patches/asmjit/0007-Fixed-libarbase-include-path.patch b/static_core/patches/asmjit/0007-Fixed-libarbase-include-path.patch index c305925f6f..9ca62c52b6 100644 --- a/static_core/patches/asmjit/0007-Fixed-libarbase-include-path.patch +++ b/static_core/patches/asmjit/0007-Fixed-libarbase-include-path.patch @@ -45,7 +45,7 @@ index 81102a5..784ddcd 100644 #include "../core/zonetree.h" #include "../core/zonevector.h" --#include "mem/arena_allocator.h" +-#include "libarkbase/mem/arena_allocator.h" +#include "libarkbase/mem/arena_allocator.h" ASMJIT_BEGIN_NAMESPACE @@ -58,7 +58,7 @@ index 04b2f7b..2110813 100644 #include "../core/support.h" --#include "mem/arena_allocator.h" +-#include "libarkbase/mem/arena_allocator.h" +#include "libarkbase/mem/arena_allocator.h" ASMJIT_BEGIN_NAMESPACE diff --git a/static_core/patches/vixl/0001-Fixed-libarbase-include-path.patch b/static_core/patches/vixl/0001-Fixed-libarbase-include-path.patch index 5bbb24eb92..110673173c 100644 --- a/static_core/patches/vixl/0001-Fixed-libarbase-include-path.patch +++ b/static_core/patches/vixl/0001-Fixed-libarbase-include-path.patch @@ -25,5 +25,4 @@ index 12746635..cbed73c5 100644 #include #include -- -2.42.0-openssl - +2.42.0-openssl \ No newline at end of file diff --git a/static_core/patches/vixl/0002-split_arena_containers.patch b/static_core/patches/vixl/0002-split_arena_containers.patch new file mode 100644 index 0000000000..2247b7dbc4 --- /dev/null +++ b/static_core/patches/vixl/0002-split_arena_containers.patch @@ -0,0 +1,22 @@ +diff --git a/src/utils-vixl.h b/src/utils-vixl.h +index 12746635..c18cd890 100644 +--- a/src/utils-vixl.h ++++ b/src/utils-vixl.h +@@ -42,9 +42,14 @@ + #endif + + #ifdef VIXL_USE_PANDA_ALLOC +-#include "libarkbase/mem/arena_allocator_stl_adapter.h" +-#include "libarkbase/mem/arena_allocator.h" +-#include "libarkbase/utils/arena_containers.h" ++#include "libarkbase/mem/arena_allocator_stl_adapter.h" ++#include "libarkbase/mem/arena_allocator.h" ++#include "libarkbase/utils/arena_list.h" ++#include "libarkbase/utils/arena_map.h" ++#include "libarkbase/utils/arena_string.h" ++#include "libarkbase/utils/arena_unordered_map.h" ++#include "libarkbase/utils/arena_unordered_set.h" ++#include "libarkbase/utils/arena_vector.h" + #else + #include + #include diff --git a/static_core/plugins/ets/runtime/ani/ani_interaction_api.cpp b/static_core/plugins/ets/runtime/ani/ani_interaction_api.cpp index badce1b047..0a8b59af39 100644 --- a/static_core/plugins/ets/runtime/ani/ani_interaction_api.cpp +++ b/static_core/plugins/ets/runtime/ani/ani_interaction_api.cpp @@ -42,6 +42,7 @@ #include "plugins/ets/runtime/types/ets_namespace.h" #include "plugins/ets/runtime/types/ets_object.h" #include "runtime/coroutines/coroutine_scopes.h" +#include "runtime/include/class-inl.h" // NOLINTBEGIN(cppcoreguidelines-macro-usage) diff --git a/static_core/plugins/ets/runtime/ani/verify/ani_verifier.h b/static_core/plugins/ets/runtime/ani/verify/ani_verifier.h index c4726d1bb3..1ee6bd70b7 100644 --- a/static_core/plugins/ets/runtime/ani/verify/ani_verifier.h +++ b/static_core/plugins/ets/runtime/ani/verify/ani_verifier.h @@ -18,7 +18,7 @@ #include "libarkbase/macros.h" #include "plugins/ets/runtime/ani/verify/types/vref.h" -#include "runtime/include/mem/panda_containers.h" +#include "runtime/include/mem/panda_map.h" #include "runtime/include/mem/panda_smart_pointers.h" #include diff --git a/static_core/plugins/ets/runtime/ani/verify/env_ani_verifier.h b/static_core/plugins/ets/runtime/ani/verify/env_ani_verifier.h index f9ed76c6af..dd063cb2e0 100644 --- a/static_core/plugins/ets/runtime/ani/verify/env_ani_verifier.h +++ b/static_core/plugins/ets/runtime/ani/verify/env_ani_verifier.h @@ -19,8 +19,9 @@ #include "libarkbase/macros.h" #include "plugins/ets/runtime/ani/ani.h" #include "plugins/ets/runtime/ani/verify/types/vref.h" -#include "runtime/include/mem/panda_containers.h" #include "runtime/include/mem/panda_smart_pointers.h" +#include "runtime/include/mem/panda_vector.h" +#include "runtime/include/mem/panda_set.h" #include "runtime/include/mem/panda_string.h" #include diff --git a/static_core/plugins/ets/runtime/ani/verify/verify_ani_checker.h b/static_core/plugins/ets/runtime/ani/verify/verify_ani_checker.h index b99f7ebd1f..ece1c025f6 100644 --- a/static_core/plugins/ets/runtime/ani/verify/verify_ani_checker.h +++ b/static_core/plugins/ets/runtime/ani/verify/verify_ani_checker.h @@ -17,7 +17,7 @@ #define PANDA_PLUGINS_ETS_RUNTIME_ANI_VERIFY_VERIFY_CHECKER_H #include "plugins/ets/runtime/ani/ani.h" -#include "runtime/include/mem/panda_containers.h" +#include "runtime/include/mem/panda_small_vector.h" #include "runtime/include/mem/panda_string.h" // clang-format off diff --git a/static_core/plugins/ets/runtime/ani/verify/verify_ani_interaction_api.cpp b/static_core/plugins/ets/runtime/ani/verify/verify_ani_interaction_api.cpp index ebafa3fac0..eec2bafd4b 100644 --- a/static_core/plugins/ets/runtime/ani/verify/verify_ani_interaction_api.cpp +++ b/static_core/plugins/ets/runtime/ani/verify/verify_ani_interaction_api.cpp @@ -23,7 +23,7 @@ #include "plugins/ets/runtime/ani/verify/verify_ani_cast_api.h" #include "plugins/ets/runtime/ani/verify/verify_ani_checker.h" #include "plugins/ets/runtime/ets_napi_env.h" -#include "runtime/include/mem/panda_containers.h" + // NOLINTBEGIN(cppcoreguidelines-macro-usage) #define VERIFY_ANI_ARGS(...) \ diff --git a/static_core/plugins/ets/runtime/ets_class_linker.h b/static_core/plugins/ets/runtime/ets_class_linker.h index 682373a473..4db0b503ab 100644 --- a/static_core/plugins/ets/runtime/ets_class_linker.h +++ b/static_core/plugins/ets/runtime/ets_class_linker.h @@ -19,7 +19,7 @@ #include "plugins/ets/runtime/ets_class_root.h" #include "runtime/include/mem/panda_smart_pointers.h" #include "runtime/include/mem/panda_string.h" -#include "runtime/include/mem/panda_containers.h" + namespace ark { class Method; diff --git a/static_core/plugins/ets/runtime/ets_class_linker_extension.cpp b/static_core/plugins/ets/runtime/ets_class_linker_extension.cpp index 67ab3941a2..23943eee6d 100644 --- a/static_core/plugins/ets/runtime/ets_class_linker_extension.cpp +++ b/static_core/plugins/ets/runtime/ets_class_linker_extension.cpp @@ -31,6 +31,7 @@ #include "runtime/class_linker_context.h" #include "runtime/include/class_linker_extension.h" #include "runtime/include/class_linker-inl.h" +#include "runtime/include/class-inl.h" #include "runtime/include/language_context.h" #include "runtime/include/mem/panda_string.h" #include "runtime/include/panda_vm.h" diff --git a/static_core/plugins/ets/runtime/ets_exceptions.cpp b/static_core/plugins/ets/runtime/ets_exceptions.cpp index dca96adfa8..fc0eb6995c 100644 --- a/static_core/plugins/ets/runtime/ets_exceptions.cpp +++ b/static_core/plugins/ets/runtime/ets_exceptions.cpp @@ -24,6 +24,7 @@ #include "plugins/ets/runtime/types/ets_method.h" #include "plugins/ets/runtime/types/ets_string.h" #include "plugins/ets/runtime/types/ets_error_options.h" +#include "runtime/include/class-inl.h" namespace ark::ets { diff --git a/static_core/plugins/ets/runtime/ets_itable_builder.cpp b/static_core/plugins/ets/runtime/ets_itable_builder.cpp index c6d14776be..4150214f84 100644 --- a/static_core/plugins/ets/runtime/ets_itable_builder.cpp +++ b/static_core/plugins/ets/runtime/ets_itable_builder.cpp @@ -19,8 +19,9 @@ #include "plugins/ets/runtime/ets_vm.h" #include "plugins/ets/runtime/ets_vtable_builder.h" #include "runtime/include/class_linker.h" +#include "runtime/include/class-inl.h" #include "runtime/include/exceptions.h" -#include "runtime/include/mem/panda_containers.h" + namespace ark::ets { diff --git a/static_core/plugins/ets/runtime/ets_native_library_provider.cpp b/static_core/plugins/ets/runtime/ets_native_library_provider.cpp index 728cf46ab8..f81952b7c5 100644 --- a/static_core/plugins/ets/runtime/ets_native_library_provider.cpp +++ b/static_core/plugins/ets/runtime/ets_native_library_provider.cpp @@ -16,7 +16,7 @@ #include "plugins/ets/runtime/ets_native_library_provider.h" #include "ets_native_library.h" -#include "include/mem/panda_containers.h" + #include "include/mem/panda_string.h" #include "plugins/ets/runtime/ani/ani.h" #include "plugins/ets/runtime/ani/ani_interaction_api.h" diff --git a/static_core/plugins/ets/runtime/ets_native_library_provider.h b/static_core/plugins/ets/runtime/ets_native_library_provider.h index 63a7edb7d2..3e4bf0b17c 100644 --- a/static_core/plugins/ets/runtime/ets_native_library_provider.h +++ b/static_core/plugins/ets/runtime/ets_native_library_provider.h @@ -20,7 +20,8 @@ #include "libarkbase/os/mutex.h" #include "plugins/ets/runtime/ani/ani.h" #include "plugins/ets/runtime/ets_native_library.h" -#include "runtime/include/mem/panda_containers.h" +#include "runtime/include/mem/panda_vector.h" +#include "runtime/include/mem/panda_set.h" namespace ark::ets { class NativeLibraryProvider { diff --git a/static_core/plugins/ets/runtime/ets_object_state_table.h b/static_core/plugins/ets/runtime/ets_object_state_table.h index c6a18fcf45..9b958c7b34 100644 --- a/static_core/plugins/ets/runtime/ets_object_state_table.h +++ b/static_core/plugins/ets/runtime/ets_object_state_table.h @@ -21,7 +21,7 @@ #include "libarkbase/os/mutex.h" -#include "runtime/include/mem/panda_containers.h" + #include "plugins/ets/runtime/ets_coroutine.h" #include "plugins/ets/runtime/ets_mark_word.h" diff --git a/static_core/plugins/ets/runtime/ets_stubs.cpp b/static_core/plugins/ets/runtime/ets_stubs.cpp index 50a018d8a0..48cabdc8e4 100644 --- a/static_core/plugins/ets/runtime/ets_stubs.cpp +++ b/static_core/plugins/ets/runtime/ets_stubs.cpp @@ -29,6 +29,8 @@ #include "plugins/ets/runtime/interop_js/xref_object_operator.h" #endif +#include "runtime/include/class-inl.h" + namespace ark::ets { #ifdef PANDA_ETS_INTEROP_JS using JSValue = interop::js::JSValue; diff --git a/static_core/plugins/ets/runtime/ets_vm.h b/static_core/plugins/ets/runtime/ets_vm.h index c2fe8a2330..c9c9049eef 100644 --- a/static_core/plugins/ets/runtime/ets_vm.h +++ b/static_core/plugins/ets/runtime/ets_vm.h @@ -36,7 +36,7 @@ #include "runtime/include/gc_task.h" #include "runtime/include/language_context.h" #include "runtime/include/managed_thread.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/include/mem/panda_string.h" #include "runtime/include/method.h" #include "runtime/include/object_header.h" diff --git a/static_core/plugins/ets/runtime/ets_vm_api.cpp b/static_core/plugins/ets/runtime/ets_vm_api.cpp index d64a205649..a43fffcebe 100644 --- a/static_core/plugins/ets/runtime/ets_vm_api.cpp +++ b/static_core/plugins/ets/runtime/ets_vm_api.cpp @@ -16,7 +16,8 @@ #include #include "ets_vm_api.h" #include "ets_vm.h" -#include "libarkbase/panda_gen_options/generated/logger_options.h" +#include "generated/logger_options.h" +#include "runtime/include/class-inl.h" #ifdef PANDA_TARGET_OHOS #include diff --git a/static_core/plugins/ets/runtime/interop_js/call/call_ets.cpp b/static_core/plugins/ets/runtime/interop_js/call/call_ets.cpp index b485c4770a..103fb107fe 100644 --- a/static_core/plugins/ets/runtime/interop_js/call/call_ets.cpp +++ b/static_core/plugins/ets/runtime/interop_js/call/call_ets.cpp @@ -17,6 +17,7 @@ #include "plugins/ets/runtime/interop_js/call/arg_convertors.h" #include "plugins/ets/runtime/interop_js/call/proto_reader.h" #include "plugins/ets/runtime/interop_js/code_scopes.h" +#include "runtime/include/class-inl.h" namespace ark::ets::interop::js { diff --git a/static_core/plugins/ets/runtime/interop_js/ets_proxy/ets_class_wrapper.cpp b/static_core/plugins/ets/runtime/interop_js/ets_proxy/ets_class_wrapper.cpp index ef787718cb..3a24fa7fe2 100644 --- a/static_core/plugins/ets/runtime/interop_js/ets_proxy/ets_class_wrapper.cpp +++ b/static_core/plugins/ets/runtime/interop_js/ets_proxy/ets_class_wrapper.cpp @@ -21,7 +21,7 @@ #include #include "plugins/ets/runtime/ets_coroutine.h" -#include "include/mem/panda_containers.h" + #include "interop_js/interop_common.h" #include "interop_js/js_proxy/js_proxy.h" #include "interop_js/js_refconvert.h" @@ -33,6 +33,7 @@ #include "plugins/ets/runtime/interop_js/code_scopes.h" #include "runtime/mem/local_object_handle.h" #include "plugins/ets/runtime/ets_platform_types.h" +#include "runtime/include/class-inl.h" // NOLINTBEGIN(readability-identifier-naming, readability-redundant-declaration) // CC-OFFNXT(G.FMT.10-CPP) project code style diff --git a/static_core/plugins/ets/runtime/interop_js/interop_context.cpp b/static_core/plugins/ets/runtime/interop_js/interop_context.cpp index 8592320e98..96ea80f04b 100644 --- a/static_core/plugins/ets/runtime/interop_js/interop_context.cpp +++ b/static_core/plugins/ets/runtime/interop_js/interop_context.cpp @@ -26,6 +26,7 @@ #include "plugins/ets/runtime/types/ets_abc_runtime_linker.h" #include "plugins/ets/runtime/types/ets_method.h" #include "runtime/include/runtime.h" +#include "runtime/include/class-inl.h" #include "runtime/mem/local_object_handle.h" #include "plugins/ets/runtime/interop_js/event_loop_module.h" diff --git a/static_core/plugins/ets/runtime/interop_js/js_proxy/js_proxy.cpp b/static_core/plugins/ets/runtime/interop_js/js_proxy/js_proxy.cpp index 3e61097a55..379dffc723 100644 --- a/static_core/plugins/ets/runtime/interop_js/js_proxy/js_proxy.cpp +++ b/static_core/plugins/ets/runtime/interop_js/js_proxy/js_proxy.cpp @@ -14,7 +14,7 @@ */ #include "include/class.h" -#include "include/mem/panda_containers.h" + #include "include/method.h" #include "plugins/ets/runtime/interop_js/js_proxy/js_proxy.h" #include "plugins/ets/runtime/interop_js/interop_context.h" diff --git a/static_core/plugins/ets/runtime/interop_js/js_proxy/js_proxy.h b/static_core/plugins/ets/runtime/interop_js/js_proxy/js_proxy.h index 40100d3642..55b10097c6 100644 --- a/static_core/plugins/ets/runtime/interop_js/js_proxy/js_proxy.h +++ b/static_core/plugins/ets/runtime/interop_js/js_proxy/js_proxy.h @@ -16,7 +16,7 @@ #ifndef PANDA_PLUGINS_ETS_RUNTIME_INTEROP_JS_JS_PROXY_JS_PROXY_H_ #define PANDA_PLUGINS_ETS_RUNTIME_INTEROP_JS_JS_PROXY_JS_PROXY_H_ -#include "include/mem/panda_containers.h" + #include "runtime/include/class.h" #include "runtime/include/method.h" diff --git a/static_core/plugins/ets/runtime/interop_js/js_refconvert.cpp b/static_core/plugins/ets/runtime/interop_js/js_refconvert.cpp index 1037c41a5c..d38fa99969 100644 --- a/static_core/plugins/ets/runtime/interop_js/js_refconvert.cpp +++ b/static_core/plugins/ets/runtime/interop_js/js_refconvert.cpp @@ -23,6 +23,7 @@ #include "plugins/ets/runtime/interop_js/js_refconvert_record.h" #include "plugins/ets/runtime/interop_js/js_refconvert_tuple.h" #include "plugins/ets/runtime/interop_js/js_refconvert_union.h" +#include "runtime/include/class-inl.h" namespace ark::ets::interop::js { diff --git a/static_core/plugins/ets/runtime/interop_js/js_value.h b/static_core/plugins/ets/runtime/interop_js/js_value.h index 6f8f8057e4..e59056d81b 100644 --- a/static_core/plugins/ets/runtime/interop_js/js_value.h +++ b/static_core/plugins/ets/runtime/interop_js/js_value.h @@ -22,6 +22,7 @@ #include "plugins/ets/runtime/interop_js/ets_proxy/shared_reference.h" #include "plugins/ets/runtime/types/ets_object.h" #include "runtime/include/coretypes/class.h" +#include "runtime/include/object_accessor-inl.h" #include "libarkbase/utils/small_vector.h" #include diff --git a/static_core/plugins/ets/runtime/intrinsics/escompat_RegExp.cpp b/static_core/plugins/ets/runtime/intrinsics/escompat_RegExp.cpp index 81d29c2fdf..38b9d2b010 100644 --- a/static_core/plugins/ets/runtime/intrinsics/escompat_RegExp.cpp +++ b/static_core/plugins/ets/runtime/intrinsics/escompat_RegExp.cpp @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "include/mem/panda_containers.h" + #include "plugins/ets/runtime/types/ets_string.h" #include "runtime/regexp/ecmascript/regexp_parser.h" #include "runtime/include/mem/panda_string.h" diff --git a/static_core/plugins/ets/runtime/intrinsics/helpers/array_buffer_helper.h b/static_core/plugins/ets/runtime/intrinsics/helpers/array_buffer_helper.h index 893134d448..49e3582ea5 100644 --- a/static_core/plugins/ets/runtime/intrinsics/helpers/array_buffer_helper.h +++ b/static_core/plugins/ets/runtime/intrinsics/helpers/array_buffer_helper.h @@ -20,8 +20,8 @@ #include #include -#include "include/mem/panda_string.h" -#include "include/mem/panda_containers.h" +#include "runtime/include/mem/panda_string.h" +#include "runtime/include/mem/panda_vector.h" namespace ark::ets { class EtsEscompatArrayBuffer; diff --git a/static_core/plugins/ets/runtime/intrinsics/helpers/ets_to_string_cache.cpp b/static_core/plugins/ets/runtime/intrinsics/helpers/ets_to_string_cache.cpp index ee6c672f9a..08ce3a7843 100644 --- a/static_core/plugins/ets/runtime/intrinsics/helpers/ets_to_string_cache.cpp +++ b/static_core/plugins/ets/runtime/intrinsics/helpers/ets_to_string_cache.cpp @@ -18,6 +18,8 @@ #include "ets_to_string_cache.h" #include "ets_intrinsics_helpers.h" #include "libarkbase/mem/mem.h" +#include "runtime/include/object_accessor-inl.h" + namespace ark::ets::detail { diff --git a/static_core/plugins/ets/runtime/intrinsics/std_core_Console.cpp b/static_core/plugins/ets/runtime/intrinsics/std_core_Console.cpp index b4d7ded751..5a892e1a57 100644 --- a/static_core/plugins/ets/runtime/intrinsics/std_core_Console.cpp +++ b/static_core/plugins/ets/runtime/intrinsics/std_core_Console.cpp @@ -18,7 +18,7 @@ #include "plugins/ets/runtime/ets_exceptions.h" #include "plugins/ets/runtime/types/ets_string.h" #include "runtime/include/mem/panda_string.h" -#include "runtime/include/mem/panda_containers.h" + #include "libarkbase/utils/utf.h" #include "intrinsics.h" #include "utility" diff --git a/static_core/plugins/ets/runtime/intrinsics/std_core_Method.cpp b/static_core/plugins/ets/runtime/intrinsics/std_core_Method.cpp index 7b38804c4c..22b4313be6 100644 --- a/static_core/plugins/ets/runtime/intrinsics/std_core_Method.cpp +++ b/static_core/plugins/ets/runtime/intrinsics/std_core_Method.cpp @@ -16,7 +16,7 @@ #include #include "ets_coroutine.h" #include "handle_scope.h" -#include "include/mem/panda_containers.h" + #include "libarkbase/macros.h" #include "libarkbase/mem/mem.h" #include "mem/vm_handle.h" diff --git a/static_core/plugins/ets/runtime/intrinsics/std_core_Promise.cpp b/static_core/plugins/ets/runtime/intrinsics/std_core_Promise.cpp index ea95e8c9a8..513bdd4793 100644 --- a/static_core/plugins/ets/runtime/intrinsics/std_core_Promise.cpp +++ b/static_core/plugins/ets/runtime/intrinsics/std_core_Promise.cpp @@ -26,7 +26,7 @@ #include "plugins/ets/runtime/job_queue.h" #include "runtime/coroutines/stackful_coroutine.h" #include "runtime/coroutines/coroutine_events.h" -#include "runtime/include/mem/panda_containers.h" + namespace ark::ets::intrinsics { diff --git a/static_core/plugins/ets/runtime/intrinsics/std_core_StackTrace.cpp b/static_core/plugins/ets/runtime/intrinsics/std_core_StackTrace.cpp index 71b2e32704..a188cd5251 100644 --- a/static_core/plugins/ets/runtime/intrinsics/std_core_StackTrace.cpp +++ b/static_core/plugins/ets/runtime/intrinsics/std_core_StackTrace.cpp @@ -14,7 +14,7 @@ */ #include "ets_handle.h" -#include "include/mem/panda_containers.h" + #include "runtime/runtime_helpers.h" #include "types/ets_method.h" #include "types/ets_stacktrace_element.h" diff --git a/static_core/plugins/ets/runtime/static_object_accessor.cpp b/static_core/plugins/ets/runtime/static_object_accessor.cpp index fc994daf62..b5b7e38ade 100644 --- a/static_core/plugins/ets/runtime/static_object_accessor.cpp +++ b/static_core/plugins/ets/runtime/static_object_accessor.cpp @@ -22,6 +22,7 @@ #include "plugins/ets/runtime/types/ets_method.h" #include "plugins/ets/runtime/types/ets_object.h" #include "plugins/ets/runtime/types/ets_box_primitive-inl.h" +#include "runtime/include/class-inl.h" namespace ark::ets { diff --git a/static_core/plugins/ets/runtime/types/ets_abc_runtime_linker.h b/static_core/plugins/ets/runtime/types/ets_abc_runtime_linker.h index f614b4d414..294853bcae 100644 --- a/static_core/plugins/ets/runtime/types/ets_abc_runtime_linker.h +++ b/static_core/plugins/ets/runtime/types/ets_abc_runtime_linker.h @@ -17,6 +17,7 @@ #define PANDA_PLUGINS_ETS_RUNTIME_TYPES_ETS_ABC_RUNTIME_LINKER_H #include "include/object_accessor.h" +#include "include/object_accessor-inl.h" #include "include/object_header.h" #include "libarkbase/mem/object_pointer.h" #include "plugins/ets/runtime/types/ets_array.h" @@ -24,6 +25,7 @@ #include "plugins/ets/runtime/types/ets_object.h" #include "plugins/ets/runtime/types/ets_runtime_linker.h" + namespace ark::ets { namespace test { diff --git a/static_core/plugins/ets/runtime/types/ets_arraybuffer-inl.h b/static_core/plugins/ets/runtime/types/ets_arraybuffer-inl.h index f53a49006c..71c24acc4e 100644 --- a/static_core/plugins/ets/runtime/types/ets_arraybuffer-inl.h +++ b/static_core/plugins/ets/runtime/types/ets_arraybuffer-inl.h @@ -17,6 +17,8 @@ #define PANDA_PLUGINS_ETS_RUNTIME_TYPES_ETS_ARRAYBUFFER_INL_H #include "runtime/include/thread_scopes.h" +#include "runtime/include/object_accessor-inl.h" + #include "plugins/ets/runtime/types/ets_arraybuffer.h" namespace ark::ets { diff --git a/static_core/plugins/ets/runtime/types/ets_arraybuffer.h b/static_core/plugins/ets/runtime/types/ets_arraybuffer.h index 694099feec..6e0f00f28f 100644 --- a/static_core/plugins/ets/runtime/types/ets_arraybuffer.h +++ b/static_core/plugins/ets/runtime/types/ets_arraybuffer.h @@ -25,6 +25,7 @@ #include "plugins/ets/runtime/ets_exceptions.h" #include "plugins/ets/runtime/ets_platform_types.h" #include "runtime/include/thread_scopes.h" +#include "runtime/include/object_accessor-inl.h" #include diff --git a/static_core/plugins/ets/runtime/types/ets_class.cpp b/static_core/plugins/ets/runtime/types/ets_class.cpp index 1058a955cc..d366ab6273 100644 --- a/static_core/plugins/ets/runtime/types/ets_class.cpp +++ b/static_core/plugins/ets/runtime/types/ets_class.cpp @@ -15,7 +15,7 @@ #include "ets_panda_file_items.h" #include "include/language_context.h" -#include "include/mem/panda_containers.h" + #include "libarkbase/utils/utf.h" #include "libarkbase/macros.h" #include "plugins/ets/runtime/ets_class_linker_extension.h" @@ -30,6 +30,7 @@ #include "plugins/ets/runtime/types/ets_class.h" #include "runtime/include/runtime.h" #include "runtime/mem/local_object_handle.h" +#include "runtime/include/class-inl.h" namespace ark::ets { diff --git a/static_core/plugins/ets/runtime/types/ets_class.h b/static_core/plugins/ets/runtime/types/ets_class.h index 7c461ac0c9..cc6cc876a2 100644 --- a/static_core/plugins/ets/runtime/types/ets_class.h +++ b/static_core/plugins/ets/runtime/types/ets_class.h @@ -17,7 +17,7 @@ #define PANDA_PLUGINS_ETS_RUNTIME_FFI_CLASSES_ETS_CLASS_H_ #include -#include "include/mem/panda_containers.h" + #include "include/mem/panda_string.h" #include "include/object_header.h" #include "include/runtime.h" diff --git a/static_core/plugins/ets/runtime/types/ets_escompat_array.h b/static_core/plugins/ets/runtime/types/ets_escompat_array.h index 8914e17f9a..b354e1d8a8 100644 --- a/static_core/plugins/ets/runtime/types/ets_escompat_array.h +++ b/static_core/plugins/ets/runtime/types/ets_escompat_array.h @@ -22,6 +22,7 @@ #include "libarkbase/mem/object_pointer.h" #include "runtime/include/thread.h" #include "runtime/include/managed_thread.h" +#include "runtime/include/object_accessor-inl.h" #include "runtime/coroutines/coroutine.h" #include "runtime/entrypoints/entrypoints.h" #include "plugins/ets/runtime/ets_class_linker_extension.h" diff --git a/static_core/plugins/ets/runtime/types/ets_finalizable_weak_ref.h b/static_core/plugins/ets/runtime/types/ets_finalizable_weak_ref.h index bc98d406a6..062eea4be5 100644 --- a/static_core/plugins/ets/runtime/types/ets_finalizable_weak_ref.h +++ b/static_core/plugins/ets/runtime/types/ets_finalizable_weak_ref.h @@ -18,6 +18,7 @@ #include "plugins/ets/runtime/types/ets_weak_reference.h" #include "plugins/ets/runtime/types/ets_primitives.h" #include "plugins/ets/runtime/ets_coroutine.h" +#include "runtime/include/object_accessor-inl.h" namespace ark::ets { diff --git a/static_core/plugins/ets/runtime/types/ets_job.h b/static_core/plugins/ets/runtime/types/ets_job.h index c7d0f47403..c1cc0953be 100644 --- a/static_core/plugins/ets/runtime/types/ets_job.h +++ b/static_core/plugins/ets/runtime/types/ets_job.h @@ -17,6 +17,7 @@ #define PANDA_RUNTIME_ETS_FFI_CLASSES_ETS_JOB_H_ #include "runtime/include/object_header.h" +#include "runtime/include/object_accessor-inl.h" #include "libarkbase/macros.h" #include "plugins/ets/runtime/ets_vm.h" #include "plugins/ets/runtime/types/ets_object.h" diff --git a/static_core/plugins/ets/runtime/types/ets_map.h b/static_core/plugins/ets/runtime/types/ets_map.h index e71af01b0d..21eb7af361 100644 --- a/static_core/plugins/ets/runtime/types/ets_map.h +++ b/static_core/plugins/ets/runtime/types/ets_map.h @@ -18,6 +18,7 @@ #include "ets_escompat_array.h" #include "ets_object.h" +#include "runtime/include/object_accessor-inl.h" namespace ark::ets { diff --git a/static_core/plugins/ets/runtime/types/ets_promise.h b/static_core/plugins/ets/runtime/types/ets_promise.h index 3487d80a49..46f351aab5 100644 --- a/static_core/plugins/ets/runtime/types/ets_promise.h +++ b/static_core/plugins/ets/runtime/types/ets_promise.h @@ -23,6 +23,7 @@ #include "plugins/ets/runtime/types/ets_sync_primitives.h" #include "plugins/ets/runtime/types/ets_primitives.h" #include "runtime/coroutines/coroutine_events.h" +#include "runtime/include/object_accessor-inl.h" namespace ark::ets { diff --git a/static_core/plugins/ets/runtime/types/ets_promise_ref.h b/static_core/plugins/ets/runtime/types/ets_promise_ref.h index 27e420f93d..152c521a20 100644 --- a/static_core/plugins/ets/runtime/types/ets_promise_ref.h +++ b/static_core/plugins/ets/runtime/types/ets_promise_ref.h @@ -17,6 +17,7 @@ #define PANDA_PLUGINS_ETS_RUNTIME_TYPES_ETS_PROMISE_REF_H #include "plugins/ets/runtime/types/ets_object.h" +#include "runtime/include/object_accessor-inl.h" namespace ark::ets { diff --git a/static_core/plugins/ets/runtime/types/ets_string_builder.h b/static_core/plugins/ets/runtime/types/ets_string_builder.h index e539c95b95..f7fdeeeece 100644 --- a/static_core/plugins/ets/runtime/types/ets_string_builder.h +++ b/static_core/plugins/ets/runtime/types/ets_string_builder.h @@ -17,6 +17,7 @@ #define PANDA_RUNTIME_ETS_ETS_STRING_BUILDER_H #include "runtime/include/object_header.h" +#include "runtime/include/object_accessor-inl.h" #include "plugins/ets/runtime/types/ets_string.h" #include "plugins/ets/runtime/types/ets_primitives.h" diff --git a/static_core/plugins/ets/runtime/types/ets_sync_primitives.h b/static_core/plugins/ets/runtime/types/ets_sync_primitives.h index bab5bfeb1d..e7b672d4b2 100644 --- a/static_core/plugins/ets/runtime/types/ets_sync_primitives.h +++ b/static_core/plugins/ets/runtime/types/ets_sync_primitives.h @@ -18,6 +18,7 @@ #include "libarkbase/mem/object_pointer.h" #include "libarkbase/macros.h" #include "runtime/include/thread_scopes.h" +#include "runtime/include/object_accessor-inl.h" #include "plugins/ets/runtime/ets_coroutine.h" #include "plugins/ets/runtime/types/ets_object.h" #include "plugins/ets/runtime/types/ets_waiters_list.h" diff --git a/static_core/plugins/ets/runtime/types/ets_tuple.h b/static_core/plugins/ets/runtime/types/ets_tuple.h index 431bc96453..2d9700da76 100644 --- a/static_core/plugins/ets/runtime/types/ets_tuple.h +++ b/static_core/plugins/ets/runtime/types/ets_tuple.h @@ -23,6 +23,7 @@ #include "libarkbase/macros.h" #include "plugins/ets/runtime/ets_coroutine.h" #include "plugins/ets/runtime/types/ets_object.h" +#include "runtime/include/object_accessor-inl.h" namespace ark::ets { diff --git a/static_core/plugins/ets/runtime/types/ets_typeapi_type.h b/static_core/plugins/ets/runtime/types/ets_typeapi_type.h index f0d3ea397d..39dce6119e 100644 --- a/static_core/plugins/ets/runtime/types/ets_typeapi_type.h +++ b/static_core/plugins/ets/runtime/types/ets_typeapi_type.h @@ -20,6 +20,7 @@ #include "plugins/ets/runtime/types/ets_object.h" #include "plugins/ets/runtime/types/ets_runtime_linker.h" #include "plugins/ets/runtime/types/ets_string.h" +#include "runtime/include/object_accessor-inl.h" namespace ark::ets { diff --git a/static_core/plugins/ets/runtime/types/ets_typed_arrays.h b/static_core/plugins/ets/runtime/types/ets_typed_arrays.h index 718939d4c5..f030c2d6ae 100644 --- a/static_core/plugins/ets/runtime/types/ets_typed_arrays.h +++ b/static_core/plugins/ets/runtime/types/ets_typed_arrays.h @@ -18,6 +18,7 @@ #include "plugins/ets/runtime/types/ets_object.h" #include "plugins/ets/runtime/types/ets_string.h" +#include "runtime/include/object_accessor-inl.h" namespace ark::ets { diff --git a/static_core/plugins/ets/runtime/types/ets_typed_unsigned_arrays.h b/static_core/plugins/ets/runtime/types/ets_typed_unsigned_arrays.h index 5d1bc3594e..1ca2701972 100644 --- a/static_core/plugins/ets/runtime/types/ets_typed_unsigned_arrays.h +++ b/static_core/plugins/ets/runtime/types/ets_typed_unsigned_arrays.h @@ -18,6 +18,7 @@ #include "plugins/ets/runtime/types/ets_object.h" #include "plugins/ets/runtime/types/ets_string.h" +#include "runtime/include/object_accessor-inl.h" namespace ark::ets { diff --git a/static_core/plugins/ets/runtime/types/ets_weak_reference.h b/static_core/plugins/ets/runtime/types/ets_weak_reference.h index 70525cde48..b195fcf9da 100644 --- a/static_core/plugins/ets/runtime/types/ets_weak_reference.h +++ b/static_core/plugins/ets/runtime/types/ets_weak_reference.h @@ -16,6 +16,7 @@ #define PANDA_PLUGINS_ETS_RUNTIME_TYPES_ETS_WEAK_REFERENCE_H #include "plugins/ets/runtime/types/ets_object.h" +#include "runtime/include/object_accessor-inl.h" namespace ark::ets { diff --git a/static_core/plugins/ets/tests/runtime/types/ets_class_file_test.cpp b/static_core/plugins/ets/tests/runtime/types/ets_class_file_test.cpp index 1c772a35da..565347869d 100644 --- a/static_core/plugins/ets/tests/runtime/types/ets_class_file_test.cpp +++ b/static_core/plugins/ets/tests/runtime/types/ets_class_file_test.cpp @@ -20,6 +20,7 @@ #include "types/ets_class.h" #include "types/ets_method.h" +#include "runtime/include/class-inl.h" // NOLINTBEGIN(readability-magic-numbers) diff --git a/static_core/runtime/arch/helpers.h b/static_core/runtime/arch/helpers.h index 0f1ac2da68..45698d62b5 100644 --- a/static_core/runtime/arch/helpers.h +++ b/static_core/runtime/arch/helpers.h @@ -19,7 +19,7 @@ #include "libarkbase/utils/bit_utils.h" #include "libarkbase/utils/span.h" #include "runtime/include/value.h" -#include "runtime/include/mem/panda_containers.h" +#include "runtime/include/mem/panda_vector.h" namespace ark::arch { diff --git a/static_core/runtime/cha.cpp b/static_core/runtime/cha.cpp index 0e19bfdfcc..f9bde33cfa 100644 --- a/static_core/runtime/cha.cpp +++ b/static_core/runtime/cha.cpp @@ -16,6 +16,7 @@ #include "runtime/cha.h" #include "libarkbase/events/events.h" +#include "runtime/include/class-inl.h" #include "runtime/include/locks.h" #include "runtime/include/runtime.h" #include "runtime/include/panda_vm.h" diff --git a/static_core/runtime/cha.h b/static_core/runtime/cha.h index fa19c55837..87946f24c0 100644 --- a/static_core/runtime/cha.h +++ b/static_core/runtime/cha.h @@ -16,6 +16,8 @@ #define PANDA_CHA_H #include "runtime/include/class.h" +#include "runtime/include/mem/panda_map.h" +#include "runtime/include/mem/panda_set.h" namespace ark { diff --git a/static_core/runtime/class_initializer.cpp b/static_core/runtime/class_initializer.cpp index 41a14add3f..685b242c88 100644 --- a/static_core/runtime/class_initializer.cpp +++ b/static_core/runtime/class_initializer.cpp @@ -19,7 +19,9 @@ #include "libarkfile/file_items.h" #include "libarkbase/macros.h" #include "runtime/include/class_linker.h" +#include "runtime/include/class-inl.h" #include "runtime/include/coretypes/tagged_value.h" +#include "runtime/include/coretypes/string.h" #include "runtime/include/runtime.h" #include "runtime/handle_scope-inl.h" #include "runtime/monitor.h" @@ -30,6 +32,8 @@ #include "verification/util/is_system.h" #include "verify_app_install.h" +#include + namespace ark { template class ObjectLockConfig { diff --git a/static_core/runtime/class_initializer.h b/static_core/runtime/class_initializer.h index 6a8470dd58..e9b98b6cf4 100644 --- a/static_core/runtime/class_initializer.h +++ b/static_core/runtime/class_initializer.h @@ -15,12 +15,17 @@ #ifndef PANDA_RUNTIME_CLASS_INITIALIZER_H_ #define PANDA_RUNTIME_CLASS_INITIALIZER_H_ -#include "runtime/include/class-inl.h" -#include "runtime/include/language_config.h" +#include namespace ark { +class Class; class ClassLinker; +class ManagedThread; +enum MTModeT : uint8_t; +template +class VMHandle; +class ObjectHeader; template class ClassInitializer { diff --git a/static_core/runtime/class_linker.cpp b/static_core/runtime/class_linker.cpp index 6dfa9359e6..e75dfa08c4 100644 --- a/static_core/runtime/class_linker.cpp +++ b/static_core/runtime/class_linker.cpp @@ -21,6 +21,7 @@ #include "runtime/include/coretypes/line_string.h" #include "runtime/include/field.h" #include "runtime/include/itable_builder.h" +#include "runtime/include/class-inl.h" #include "runtime/include/method.h" #include "runtime/include/panda_vm.h" #include "runtime/include/runtime.h" diff --git a/static_core/runtime/class_linker_context.h b/static_core/runtime/class_linker_context.h index 9714e8dfa3..8df53d16e6 100644 --- a/static_core/runtime/class_linker_context.h +++ b/static_core/runtime/class_linker_context.h @@ -22,7 +22,7 @@ #include "libarkbase/utils/bit_utils.h" #include "mem/refstorage/reference.h" #include "runtime/include/class.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/mem/gc/gc.h" #include "runtime/mem/gc/gc_root.h" #include "runtime/mem/object_helpers.h" diff --git a/static_core/runtime/class_linker_extension.cpp b/static_core/runtime/class_linker_extension.cpp index f8c2ba4f37..19fc238203 100644 --- a/static_core/runtime/class_linker_extension.cpp +++ b/static_core/runtime/class_linker_extension.cpp @@ -16,6 +16,7 @@ #include "runtime/include/class_linker_extension.h" #include "libarkbase/utils/utf.h" +#include "runtime/include/object_header-inl.h" #include "runtime/include/class_linker-inl.h" #include "runtime/include/class_linker.h" #include "runtime/include/coretypes/class.h" diff --git a/static_core/runtime/compiler.cpp b/static_core/runtime/compiler.cpp index d0c3e38568..9325c0447c 100644 --- a/static_core/runtime/compiler.cpp +++ b/static_core/runtime/compiler.cpp @@ -18,10 +18,12 @@ #include "intrinsics.h" #include "libarkfile/bytecode_instruction.h" #include "libarkfile/type_helper.h" +#include "libarkfile/literal_data_accessor-inl.h" #include "optimizer/ir/datatype.h" #include "optimizer/ir/runtime_interface.h" #include "runtime/cha.h" #include "runtime/jit/profiling_data.h" +#include "runtime/include/class-inl.h" #include "runtime/include/class_linker-inl.h" #include "runtime/include/exceptions.h" #include "runtime/include/field.h" diff --git a/static_core/runtime/compiler.h b/static_core/runtime/compiler.h index a38b3bd126..f9243d7951 100644 --- a/static_core/runtime/compiler.h +++ b/static_core/runtime/compiler.h @@ -26,7 +26,7 @@ #include "runtime/include/coretypes/array.h" #include "runtime/include/coretypes/tagged_value.h" #include "runtime/include/locks.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/include/method.h" #include "runtime/include/runtime_options.h" #include "runtime/interpreter/frame.h" @@ -388,6 +388,11 @@ public: return reinterpret_cast(MethodCast(method)->GetClass()); } + bool IsInBootContext([[maybe_unused]] ClassPtr klass) const override + { + return ClassCast(klass)->GetLoadContext()->IsBootContext(); + } + std::string GetBytecodeString(MethodPtr method, uintptr_t pc) const override; ark::pandasm::LiteralArray GetLiteralArray(MethodPtr method, LiteralArrayId id) const override; diff --git a/static_core/runtime/compiler_queue_aged_counter_priority.h b/static_core/runtime/compiler_queue_aged_counter_priority.h index 3493c715c0..1ba890e6f5 100644 --- a/static_core/runtime/compiler_queue_aged_counter_priority.h +++ b/static_core/runtime/compiler_queue_aged_counter_priority.h @@ -16,7 +16,7 @@ #define PANDA_RUNTIME_COMPILER_QUEUE_AGED_COUNTER_PRIORITY_H_ #include "runtime/compiler_queue_counter_priority.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/include/method-inl.h" namespace ark { diff --git a/static_core/runtime/compiler_queue_counter_priority.h b/static_core/runtime/compiler_queue_counter_priority.h index a6fc516f57..bc1f5167f7 100644 --- a/static_core/runtime/compiler_queue_counter_priority.h +++ b/static_core/runtime/compiler_queue_counter_priority.h @@ -20,7 +20,7 @@ #include "libarkbase/utils/time.h" #include "runtime/compiler_queue_interface.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/include/method-inl.h" namespace ark { diff --git a/static_core/runtime/compiler_queue_simple.h b/static_core/runtime/compiler_queue_simple.h index cc03f47143..77701e1ea3 100644 --- a/static_core/runtime/compiler_queue_simple.h +++ b/static_core/runtime/compiler_queue_simple.h @@ -16,7 +16,7 @@ #define PANDA_RUNTIME_COMPILER_QUEUE_SIMPLE_H_ #include "runtime/compiler_queue_interface.h" -#include "runtime/include/mem/panda_containers.h" + namespace ark { diff --git a/static_core/runtime/compiler_task_manager_worker.h b/static_core/runtime/compiler_task_manager_worker.h index 1191028576..78d35200ca 100644 --- a/static_core/runtime/compiler_task_manager_worker.h +++ b/static_core/runtime/compiler_task_manager_worker.h @@ -17,7 +17,7 @@ #include "runtime/compiler_worker.h" #include "runtime/include/runtime.h" -#include "runtime/include/mem/panda_containers.h" + #include "libarkbase/taskmanager/task.h" #include "libarkbase/taskmanager/task_queue.h" #include "libarkbase/taskmanager/task_manager.h" diff --git a/static_core/runtime/core/core_class_linker_extension.cpp b/static_core/runtime/core/core_class_linker_extension.cpp index 8fb5b21252..77a12cfdc5 100644 --- a/static_core/runtime/core/core_class_linker_extension.cpp +++ b/static_core/runtime/core/core_class_linker_extension.cpp @@ -16,7 +16,9 @@ #include "runtime/core/core_class_linker_extension.h" #include "include/class_root.h" +#include "runtime/include/class-inl.h" #include "runtime/include/coretypes/class.h" +#include "runtime/include/coretypes/string.h" #include "runtime/include/exceptions.h" #include "runtime/include/panda_vm.h" #include "libarkbase/utils/utf.h" diff --git a/static_core/runtime/core/core_language_context.cpp b/static_core/runtime/core/core_language_context.cpp index 3116a6a39d..f9ee75b6a7 100644 --- a/static_core/runtime/core/core_language_context.cpp +++ b/static_core/runtime/core/core_language_context.cpp @@ -17,9 +17,12 @@ #include "runtime/core/core_itable_builder.h" #include "runtime/core/core_vtable_builder.h" +#include "runtime/include/coretypes/string.h" #include "runtime/include/vtable_builder_standard-inl.h" +#include "runtime/include/class-inl.h" #include "runtime/handle_scope-inl.h" + namespace ark { static Class *GetExceptionClass(const uint8_t *mutf8Name, ManagedThread *thread, ClassLinker *classLinker) diff --git a/static_core/runtime/core/core_vm.h b/static_core/runtime/core/core_vm.h index c3c8eb0e32..be71cdf0ba 100644 --- a/static_core/runtime/core/core_vm.h +++ b/static_core/runtime/core/core_vm.h @@ -19,7 +19,6 @@ #include "libarkbase/macros.h" #include "libarkbase/utils/expected.h" #include "runtime/include/compiler_interface.h" -#include "runtime/include/mem/panda_smart_pointers.h" #include "runtime/include/mem/panda_string.h" #include "runtime/include/panda_vm.h" #include "runtime/mem/gc/gc_phase.h" diff --git a/static_core/runtime/coretypes/string.cpp b/static_core/runtime/coretypes/string.cpp index dc9b2e7028..490811017a 100644 --- a/static_core/runtime/coretypes/string.cpp +++ b/static_core/runtime/coretypes/string.cpp @@ -32,6 +32,7 @@ #include "runtime/include/runtime.h" #include "runtime/handle_base-inl.h" #include "runtime/include/panda_vm.h" +#include "runtime/include/object_accessor-inl.h" #include "runtime/include/coretypes/string.h" #include "runtime/include/coretypes/line_string.h" diff --git a/static_core/runtime/coroutines/coroutine_stats.h b/static_core/runtime/coroutines/coroutine_stats.h index db7ec5667d..5e23e9d610 100644 --- a/static_core/runtime/coroutines/coroutine_stats.h +++ b/static_core/runtime/coroutines/coroutine_stats.h @@ -16,7 +16,7 @@ #define PANDA_RUNTIME_COROUTINES_COROUTINE_STATS_H #include "runtime/include/histogram-inl.h" -#include "runtime/include/mem/panda_containers.h" +#include "runtime/include/mem/panda_vector.h" #include "runtime/coroutines/utils.h" #include diff --git a/static_core/runtime/coroutines/priority_queue.h b/static_core/runtime/coroutines/priority_queue.h index 8a8bffd8ed..5d4d6a0e60 100644 --- a/static_core/runtime/coroutines/priority_queue.h +++ b/static_core/runtime/coroutines/priority_queue.h @@ -16,7 +16,7 @@ #define PANDA_RUNTIME_COROUTINES_PRIORITY_QUEUE_H #include "libarkbase/macros.h" -#include "include/mem/panda_containers.h" + #include "runtime/coroutines/coroutine_worker.h" #include diff --git a/static_core/runtime/coroutines/stackful_coroutine_state_info.h b/static_core/runtime/coroutines/stackful_coroutine_state_info.h index 6d5030a443..68238009dc 100644 --- a/static_core/runtime/coroutines/stackful_coroutine_state_info.h +++ b/static_core/runtime/coroutines/stackful_coroutine_state_info.h @@ -20,7 +20,7 @@ #include "coroutines/coroutine.h" #include "runtime/coroutines/coroutine_context.h" #include "libarkbase/macros.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/include/stack_walker.h" namespace ark { diff --git a/static_core/runtime/coroutines/utils.h b/static_core/runtime/coroutines/utils.h index 84477dc4dc..d12d22976c 100644 --- a/static_core/runtime/coroutines/utils.h +++ b/static_core/runtime/coroutines/utils.h @@ -20,7 +20,7 @@ namespace ark { -// NOTE(konstanting): consider moving it to libpandabase +// NOTE(konstanting): consider moving it to libarkbase template constexpr size_t ToIndex(T idx) { diff --git a/static_core/runtime/deoptimization.h b/static_core/runtime/deoptimization.h index 08cfd1a48a..f100a5f63b 100644 --- a/static_core/runtime/deoptimization.h +++ b/static_core/runtime/deoptimization.h @@ -17,6 +17,7 @@ #include "runtime/include/exceptions.h" #include "runtime/include/stack_walker.h" +#include "runtime/include/mem/panda_set.h" namespace ark { diff --git a/static_core/runtime/dprofiler/dprofiler.h b/static_core/runtime/dprofiler/dprofiler.h index f432bba13a..4f29abaaed 100644 --- a/static_core/runtime/dprofiler/dprofiler.h +++ b/static_core/runtime/dprofiler/dprofiler.h @@ -21,7 +21,7 @@ #include "dprof/profiling_data.h" #include "libarkbase/macros.h" -#include "runtime/include/mem/panda_containers.h" +#include "runtime/include/mem/panda_unordered_set.h" #include "runtime/include/mem/panda_smart_pointers.h" #include "runtime/include/mem/panda_string.h" diff --git a/static_core/runtime/entrypoints/entrypoints.h b/static_core/runtime/entrypoints/entrypoints.h index 8c5c4e4839..3fe0b2e964 100644 --- a/static_core/runtime/entrypoints/entrypoints.h +++ b/static_core/runtime/entrypoints/entrypoints.h @@ -16,11 +16,11 @@ #define PANDA_RUNTIME_ENTRYPOINTS_ENTRYPOINTS_H_ #include "entrypoints_gen.h" -#include "runtime/include/thread.h" namespace ark { class Frame; +class ManagedThread; extern "C" Frame *CreateFrameWithSize(uint32_t size, uint32_t nregs, Method *method, Frame *prev); diff --git a/static_core/runtime/entrypoints/entrypoints_gen.h.erb b/static_core/runtime/entrypoints/entrypoints_gen.h.erb index 3f43fe0551..8dc118a55e 100644 --- a/static_core/runtime/entrypoints/entrypoints_gen.h.erb +++ b/static_core/runtime/entrypoints/entrypoints_gen.h.erb @@ -20,7 +20,6 @@ #include "libarkbase/macros.h" #include -#include #include "plugins_entrypoints_gen.h" namespace ark { diff --git a/static_core/runtime/global_handle_storage.h b/static_core/runtime/global_handle_storage.h index b8c856bd4c..f22a04419d 100644 --- a/static_core/runtime/global_handle_storage.h +++ b/static_core/runtime/global_handle_storage.h @@ -18,7 +18,7 @@ #include "runtime/include/coretypes/tagged_value.h" #include "runtime/include/mem/allocator.h" -#include "runtime/include/mem/panda_containers.h" +#include "runtime/include/mem/panda_vector.h" namespace ark { using InternalAllocatorPtr = mem::AllocatorPtr; diff --git a/static_core/runtime/handle_storage.h b/static_core/runtime/handle_storage.h index ee1f126c96..0919e3efee 100644 --- a/static_core/runtime/handle_storage.h +++ b/static_core/runtime/handle_storage.h @@ -18,7 +18,7 @@ #include "runtime/include/coretypes/tagged_value.h" #include "runtime/include/mem/allocator.h" -#include "runtime/include/mem/panda_containers.h" + namespace ark { class LocalScope; diff --git a/static_core/runtime/hotreload/hotreload.cpp b/static_core/runtime/hotreload/hotreload.cpp index c42614b5b0..1def3e7ab2 100644 --- a/static_core/runtime/hotreload/hotreload.cpp +++ b/static_core/runtime/hotreload/hotreload.cpp @@ -15,8 +15,9 @@ #include "runtime/handle_scope-inl.h" #include "runtime/include/mem/allocator.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/include/mem/panda_string.h" +#include "runtime/include/class-inl.h" #include "runtime/include/thread_scopes.h" #include "runtime/monitor_object_lock.h" #include "runtime/monitor.h" diff --git a/static_core/runtime/hotreload/hotreload.h b/static_core/runtime/hotreload/hotreload.h index afd73fe8b9..0c9c56bfd4 100644 --- a/static_core/runtime/hotreload/hotreload.h +++ b/static_core/runtime/hotreload/hotreload.h @@ -19,7 +19,7 @@ #include "libarkfile/file.h" #include "runtime/include/class.h" #include "runtime/include/managed_thread.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/include/panda_vm.h" #include "runtime/include/runtime.h" #include "runtime/mem/rendezvous.h" diff --git a/static_core/runtime/imtable_builder.cpp b/static_core/runtime/imtable_builder.cpp index ef29346554..3f6f4ff863 100644 --- a/static_core/runtime/imtable_builder.cpp +++ b/static_core/runtime/imtable_builder.cpp @@ -16,6 +16,7 @@ #include "libarkbase/macros.h" #include "runtime/include/imtable_builder.h" #include "runtime/include/class_linker.h" +#include "runtime/include/class-inl.h" namespace ark { void IMTableBuilder::Build(const panda_file::ClassDataAccessor *cda, ITable itable) diff --git a/static_core/runtime/include/cframe.h b/static_core/runtime/include/cframe.h index 08050f5a3c..d68fda1e89 100644 --- a/static_core/runtime/include/cframe.h +++ b/static_core/runtime/include/cframe.h @@ -17,14 +17,16 @@ #define PANDA_CFRAME_H #include -#include "compiler/code_info/code_info.h" +#include "compiler/code_info/vreg_info.h" #include "libarkbase/utils/cframe_layout.h" #include "runtime/interpreter/frame.h" #include "libarkbase/macros.h" + namespace ark { namespace compiler { class CodeInfo; +class StackMap; } // namespace compiler class Method; diff --git a/static_core/runtime/include/cframe_iterators.h b/static_core/runtime/include/cframe_iterators.h index 13d557bd88..17c2beed51 100644 --- a/static_core/runtime/include/cframe_iterators.h +++ b/static_core/runtime/include/cframe_iterators.h @@ -22,6 +22,7 @@ #include "runtime/arch/helpers.h" #include "runtime/include/cframe.h" #include "runtime/include/method.h" +#include "runtime/include/mem/panda_vector.h" #include "libarkbase/utils/bit_utils.h" namespace ark { diff --git a/static_core/runtime/include/class_linker.h b/static_core/runtime/include/class_linker.h index 1166e01784..187995aba7 100644 --- a/static_core/runtime/include/class_linker.h +++ b/static_core/runtime/include/class_linker.h @@ -30,11 +30,12 @@ #include "libarkfile/file_items.h" #include "runtime/class_linker_context.h" #include "runtime/include/class.h" +#include "runtime/include/class_linker_extension.h" #include "runtime/include/field.h" #include "runtime/include/itable_builder.h" #include "runtime/include/imtable_builder.h" #include "runtime/include/language_context.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/include/mem/panda_smart_pointers.h" #include "runtime/include/mem/panda_string.h" #include "runtime/include/method.h" diff --git a/static_core/runtime/include/class_linker_extension.h b/static_core/runtime/include/class_linker_extension.h index 643711fa85..1515f6c2ed 100644 --- a/static_core/runtime/include/class_linker_extension.h +++ b/static_core/runtime/include/class_linker_extension.h @@ -21,7 +21,7 @@ #include "runtime/class_linker_context.h" #include "runtime/include/class_root.h" #include "runtime/include/class.h" -#include "runtime/include/mem/panda_containers.h" + namespace ark { diff --git a/static_core/runtime/include/compiler_interface-inl.h b/static_core/runtime/include/compiler_interface-inl.h index a0f43029e2..c91f1dcb04 100644 --- a/static_core/runtime/include/compiler_interface-inl.h +++ b/static_core/runtime/include/compiler_interface-inl.h @@ -18,6 +18,7 @@ #include "runtime/include/compiler_interface.h" #include "runtime/include/panda_vm.h" +#include "runtime/interpreter/vregister.h" namespace ark { inline CompilerTask::~CompilerTask() @@ -26,6 +27,123 @@ inline CompilerTask::~CompilerTask() vm_->CleanUpTask(method_); } } + +class CompilerInterface::ExecState { +public: + ExecState(const uint8_t *pc, Frame *frame, Method *callee, size_t numArgs, const bool *spFlag) + : pc_(pc), frame_(frame), calleeMethod_(callee), numArgs_(numArgs), spFlag_(spFlag) + { + } + + const uint8_t *GetPc() const + { + return pc_; + } + + void SetPc(const uint8_t *pc) + { + pc_ = pc; + } + + Frame *GetFrame() const + { + return frame_; + } + + void SetFrame(Frame *frame) + { + frame_ = frame; + } + + size_t GetNumArgs() const + { + return numArgs_; + } + + const interpreter::VRegister &GetAcc() const + { + return acc_; + } + + interpreter::VRegister &GetAcc() + { + return acc_; + } + + void SetAcc(const interpreter::VRegister &acc) + { + acc_ = acc; + } + + interpreter::VRegister &GetArg(size_t i) + { + return args_[i]; + } + + void SetArg(size_t i, const interpreter::VRegister ®) + { + args_[i] = reg; + } + + const uint8_t *GetMethodInst() + { + return GetInstrOffset(frame_); + } + + const bool *GetSPFlag() const + { + return spFlag_; + } + + Method *GetCalleeMethod() + { + return calleeMethod_; + } + + static size_t GetSize(size_t nargs) + { + return sizeof(ExecState) + sizeof(interpreter::VRegister) * nargs; + } + + static constexpr uint32_t GetExecStateAccOffset() + { + return MEMBER_OFFSET(ExecState, acc_); + } + + static constexpr uint32_t GetExecStateArgsOffset() + { + return MEMBER_OFFSET(ExecState, args_); + } + + static constexpr uint32_t GetExecStatePcOffset() + { + return MEMBER_OFFSET(ExecState, pc_); + } + + static constexpr uint32_t GetExecStateFrameOffset() + { + return MEMBER_OFFSET(ExecState, frame_); + } + + static constexpr uint32_t GetExecStateSPFlagAddrOffset() + { + return MEMBER_OFFSET(ExecState, spFlag_); + } + + static constexpr uint32_t GetCalleeMethodOffset() + { + return MEMBER_OFFSET(ExecState, calleeMethod_); + } + +private: + const uint8_t *pc_; + Frame *frame_; + Method *calleeMethod_; + size_t numArgs_; + const bool *spFlag_; + interpreter::VRegister acc_; + __extension__ interpreter::VRegister args_[0]; // NOLINT(modernize-avoid-c-arrays) +}; } // namespace ark #endif // PANDA_RUNTIME_INCLUDE_COMPILER_INTERFACE_INL_H diff --git a/static_core/runtime/include/compiler_interface.h b/static_core/runtime/include/compiler_interface.h index f5277107e7..cd1b9ec29f 100644 --- a/static_core/runtime/include/compiler_interface.h +++ b/static_core/runtime/include/compiler_interface.h @@ -16,12 +16,8 @@ #define PANDA_RUNTIME_COMPILER_INTERFACE_H_ #include -#include #include "libarkbase/macros.h" -#include "libarkfile/file.h" -#include "runtime/include/coretypes/tagged_value.h" -#include "runtime/interpreter/frame.h" #include "runtime/thread_pool_queue.h" namespace ark { @@ -32,6 +28,9 @@ class TaggedValue; } // namespace coretypes class PandaVM; +class Method; +class Frame; +const uint8_t *GetInstrOffset(Frame *frame); class CompilerTask : public TaskInterface { NO_COPY_SEMANTIC(CompilerTask); @@ -85,127 +84,11 @@ private: PandaVM *vm_ {nullptr}; }; -class Method; class CompilerInterface { public: enum class ReturnReason { RET_OK = 0, RET_DEOPTIMIZATION = 1 }; - class ExecState { - public: - ExecState(const uint8_t *pc, Frame *frame, Method *callee, size_t numArgs, const bool *spFlag) - : pc_(pc), frame_(frame), calleeMethod_(callee), numArgs_(numArgs), spFlag_(spFlag) - { - } - - const uint8_t *GetPc() const - { - return pc_; - } - - void SetPc(const uint8_t *pc) - { - pc_ = pc; - } - - Frame *GetFrame() const - { - return frame_; - } - - void SetFrame(Frame *frame) - { - frame_ = frame; - } - - size_t GetNumArgs() const - { - return numArgs_; - } - - const interpreter::VRegister &GetAcc() const - { - return acc_; - } - - interpreter::VRegister &GetAcc() - { - return acc_; - } - - void SetAcc(const interpreter::VRegister &acc) - { - acc_ = acc; - } - - interpreter::VRegister &GetArg(size_t i) - { - return args_[i]; - } - - void SetArg(size_t i, const interpreter::VRegister ®) - { - args_[i] = reg; - } - - const uint8_t *GetMethodInst() - { - return frame_->GetInstrOffset(); - } - - const bool *GetSPFlag() const - { - return spFlag_; - } - - Method *GetCalleeMethod() - { - return calleeMethod_; - } - - static size_t GetSize(size_t nargs) - { - return sizeof(ExecState) + sizeof(interpreter::VRegister) * nargs; - } - - static constexpr uint32_t GetExecStateAccOffset() - { - return MEMBER_OFFSET(ExecState, acc_); - } - - static constexpr uint32_t GetExecStateArgsOffset() - { - return MEMBER_OFFSET(ExecState, args_); - } - - static constexpr uint32_t GetExecStatePcOffset() - { - return MEMBER_OFFSET(ExecState, pc_); - } - - static constexpr uint32_t GetExecStateFrameOffset() - { - return MEMBER_OFFSET(ExecState, frame_); - } - - static constexpr uint32_t GetExecStateSPFlagAddrOffset() - { - return MEMBER_OFFSET(ExecState, spFlag_); - } - - static constexpr uint32_t GetCalleeMethodOffset() - { - return MEMBER_OFFSET(ExecState, calleeMethod_); - } - - private: - const uint8_t *pc_; - Frame *frame_; - Method *calleeMethod_; - size_t numArgs_; - const bool *spFlag_; - interpreter::VRegister acc_; - __extension__ interpreter::VRegister args_[0]; // NOLINT(modernize-avoid-c-arrays) - }; + class ExecState; CompilerInterface() = default; diff --git a/static_core/runtime/include/coretypes/array.h b/static_core/runtime/include/coretypes/array.h index aa049c2e9d..8b5d0f5864 100644 --- a/static_core/runtime/include/coretypes/array.h +++ b/static_core/runtime/include/coretypes/array.h @@ -24,7 +24,7 @@ #include "libarkbase/mem/space.h" #include "libarkbase/utils/span.h" #include "libarkfile/bytecode_instruction-inl.h" -#include "runtime/include/class-inl.h" +#include "runtime/include/class.h" #include "runtime/include/language_context.h" #include "runtime/include/object_header.h" #include "runtime/mem/heap_manager.h" diff --git a/static_core/runtime/include/coretypes/dyn_objects.h b/static_core/runtime/include/coretypes/dyn_objects.h index 46035be026..15a39fb5dd 100644 --- a/static_core/runtime/include/coretypes/dyn_objects.h +++ b/static_core/runtime/include/coretypes/dyn_objects.h @@ -20,7 +20,7 @@ #include "runtime/include/coretypes/array.h" #include "runtime/include/coretypes/string.h" #include "runtime/include/coretypes/tagged_value.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/include/object_header.h" #include "runtime/mem/vm_handle.h" diff --git a/static_core/runtime/include/coretypes/string.h b/static_core/runtime/include/coretypes/string.h index c07df8ff55..3eff93dc0f 100644 --- a/static_core/runtime/include/coretypes/string.h +++ b/static_core/runtime/include/coretypes/string.h @@ -17,14 +17,14 @@ #define PANDA_RUNTIME_CORETYPES_COMMON_STRING_H_ #include -#include "objects/string/base_string-inl.h" -#include "objects/string/line_string-inl.h" + #include "libarkbase/utils/utf.h" #include "objects/base_class.h" #include "runtime/include/language_context.h" #include "runtime/include/exceptions.h" #include "runtime/include/object_accessor.h" #include "runtime/include/coretypes/line_string.h" +#include "runtime/include/object_accessor-inl.h" namespace ark::coretypes { class String : public ObjectHeader { diff --git a/static_core/runtime/include/exceptions.h b/static_core/runtime/include/exceptions.h index c91b1fd723..35a45ae6d1 100644 --- a/static_core/runtime/include/exceptions.h +++ b/static_core/runtime/include/exceptions.h @@ -15,7 +15,6 @@ #ifndef PANDA_RUNTIME_EXCEPTIONS_H_ #define PANDA_RUNTIME_EXCEPTIONS_H_ -#include "runtime/include/class-inl.h" #include "runtime/include/coretypes/array.h" #include "runtime/include/language_context.h" #include "runtime/include/method.h" @@ -23,6 +22,8 @@ namespace ark { +class Class; + void ThrowException(const LanguageContext &ctx, ManagedThread *thread, const uint8_t *mutf8Name, const uint8_t *mutf8Msg); diff --git a/static_core/runtime/include/histogram-inl.h b/static_core/runtime/include/histogram-inl.h index 4ba992a9fe..a390a156f7 100644 --- a/static_core/runtime/include/histogram-inl.h +++ b/static_core/runtime/include/histogram-inl.h @@ -17,7 +17,6 @@ #define PANDA_RUNTIME_HISTOGRAM_INL_H_ #include "histogram.h" -#include "mem/panda_containers.h" #include "mem/panda_string.h" namespace ark { diff --git a/static_core/runtime/include/histogram.h b/static_core/runtime/include/histogram.h index 88e6a0cf15..18b94b7fb4 100644 --- a/static_core/runtime/include/histogram.h +++ b/static_core/runtime/include/histogram.h @@ -18,7 +18,7 @@ #include "libarkbase/utils/type_converter.h" #include "libarkbase/macros.h" -#include "mem/panda_containers.h" +#include "mem/panda_map.h" #include "mem/panda_string.h" namespace ark { diff --git a/static_core/runtime/include/imtable_builder.h b/static_core/runtime/include/imtable_builder.h index d187975ff4..85c1713fdf 100644 --- a/static_core/runtime/include/imtable_builder.h +++ b/static_core/runtime/include/imtable_builder.h @@ -17,12 +17,12 @@ #include "libarkbase/macros.h" #include "libarkfile/class_data_accessor.h" -#include "runtime/include/class-inl.h" -#include "runtime/include/mem/panda_smart_pointers.h" +#include "runtime/include/itable.h" namespace ark { class ClassLinker; +class Class; class IMTableBuilder { public: diff --git a/static_core/runtime/include/itable_builder.h b/static_core/runtime/include/itable_builder.h index 479d816925..e42ae6f315 100644 --- a/static_core/runtime/include/itable_builder.h +++ b/static_core/runtime/include/itable_builder.h @@ -16,12 +16,10 @@ #define PANDA_RUNTIME_ITABLE_BUILDER_H_ #include "libarkbase/macros.h" -#include "libarkfile/class_data_accessor-inl.h" -#include "runtime/include/class-inl.h" -#include "runtime/include/mem/panda_smart_pointers.h" namespace ark { +class Class; class ClassLinker; class ITableBuilder { diff --git a/static_core/runtime/include/language_context.h b/static_core/runtime/include/language_context.h index 98c89c898b..c638e21d5e 100644 --- a/static_core/runtime/include/language_context.h +++ b/static_core/runtime/include/language_context.h @@ -16,22 +16,22 @@ #define PANDA_RUNTIME_LANGUAGE_CONTEXT_H_ #include "libarkbase/utils/utf.h" -#include "libarkfile/class_data_accessor-inl.h" #include "libarkfile/file_items.h" #include "libarkbase/macros.h" #include "compiler/code_info/vreg_info.h" #include "runtime/class_initializer.h" -#include "runtime/include/class-inl.h" -#include "runtime/include/class_linker_extension.h" #include "runtime/include/coretypes/tagged_value.h" +#include "runtime/include/class_linker_extension.h" #include "runtime/include/imtable_builder.h" #include "runtime/include/itable_builder.h" #include "runtime/include/language_config.h" #include "runtime/include/vtable_builder_interface.h" #include "runtime/include/tooling/pt_lang_extension.h" #include "runtime/include/stack_walker.h" -#include "runtime/mem/gc/gc_types.h" + namespace ark { +class Class; +class ClassLinkerExtension; class Thread; class Trace; class Runtime; diff --git a/static_core/runtime/include/managed_thread.h b/static_core/runtime/include/managed_thread.h index 2278a385ab..ddb0af10f6 100644 --- a/static_core/runtime/include/managed_thread.h +++ b/static_core/runtime/include/managed_thread.h @@ -16,6 +16,8 @@ #define PANDA_RUNTIME_MANAGED_THREAD_H #include "thread.h" +#include "runtime/include/stack_walker.h" +#include "runtime/include/mem/panda_stack.h" // NOLINTNEXTLINE(cppcoreguidelines-macro-usage) #define ASSERT_MANAGED_CODE() ASSERT(::ark::ManagedThread::GetCurrent()->IsManagedCode()) @@ -23,7 +25,10 @@ #define ASSERT_NATIVE_CODE() ASSERT(::ark::ManagedThread::GetCurrent()->IsInNativeCode()) namespace ark { +class WeightedAdaptiveTlabAverage; class MTThreadManager; +class LanguageContext; + /** * @brief Class represents managed thread * diff --git a/static_core/runtime/include/mem/allocator.h b/static_core/runtime/include/mem/allocator.h index 5574d22bc8..e85eaba6e7 100644 --- a/static_core/runtime/include/mem/allocator.h +++ b/static_core/runtime/include/mem/allocator.h @@ -15,8 +15,6 @@ #ifndef RUNTIME_MEM_ALLOCATOR_H #define RUNTIME_MEM_ALLOCATOR_H -#include - #include "libarkbase/mem/code_allocator.h" #include "libarkbase/mem/mem.h" #include "libarkbase/mem/pool_map.h" @@ -24,7 +22,7 @@ #include "libarkbase/macros.h" #include "runtime/mem/bump-allocator.h" #include "runtime/mem/freelist_allocator.h" -#include "runtime/mem/gc/bitmap.h" +//#include "runtime/mem/gc/bitmap.h" #include "runtime/mem/gc/gc_types.h" #include "runtime/mem/humongous_obj_allocator.h" #include "runtime/mem/internal_allocator.h" diff --git a/static_core/runtime/include/mem/panda_containers.h b/static_core/runtime/include/mem/panda_containers.h deleted file mode 100644 index a74ebd9a2c..0000000000 --- a/static_core/runtime/include/mem/panda_containers.h +++ /dev/null @@ -1,124 +0,0 @@ -/** - * Copyright (c) 2021-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef PANDA_RUNTIME_MEM_PANDA_CONTAINERS_H -#define PANDA_RUNTIME_MEM_PANDA_CONTAINERS_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "libarkbase/utils/small_vector.h" -#include "runtime/mem/allocator_adapter.h" - -namespace ark { - -template -using PandaForwardList = std::forward_list>; -// Thread local version of PandaForwardList -template -using PandaForwardListTL = std::forward_list>; - -template -using PandaList = std::list>; -// Thread local version of PandaList -template -using PandaListTL = std::list>; - -template -using PandaDeque = std::deque>; -// Thread local version of PandaDeque -template -using PandaDequeTL = std::deque>; - -template > -using PandaQueue = std::queue; -// Thread local version of PandaQueue -template > -using PandaQueueTL = std::queue; - -template > -using PandaStack = std::stack; -// Thread local version of PandaStack -template > -using PandaStackTL = std::stack; - -template > -using PandaSet = std::set>; -// Thread local version of PandaSet -template > -using PandaSetTL = std::set>; - -template , class KeyEqual = std::equal_to> -using PandaUnorderedSet = std::unordered_set>; -// Thread local version of PandaUnorderedSet -template , class KeyEqual = std::equal_to> -using PandaUnorderedSetTL = std::unordered_set>; - -template -using PandaVector = std::vector>; -// Thread local version of PandaVector -template -using PandaVectorTL = std::vector>; - -// For small vector with static allocation support -static constexpr size_t STATIC_CAPACITY_DEFAULT = 8; -template -using PandaSmallVector = SmallVector>; -template -using PandaSmallVectorTL = SmallVector>; - -template , class Compare = std::less> -using PandaPriorityQueue = std::priority_queue; -// Thread local version of PandaPriorityQueue -template , class Compare = std::less> -using PandaPriorityQueueTL = std::priority_queue; - -template > -using PandaMap = std::map>>; -// Thread local version of PandaMap -template > -using PandaMapTL = std::map, mem::AllocScope::LOCAL>>; - -template > -using PandaMultiMap = std::multimap>>; -// Thread local version of PandaMultiMap -template > -using PandaMultiMapTL = - std::multimap, mem::AllocScope::LOCAL>>; - -template , class KeyEqual = std::equal_to> -using PandaUnorderedMap = std::unordered_map>>; -// Thread local version of PandaUnorderedMap -template , class KeyEqual = std::equal_to> -using PandaUnorderedMapTL = - std::unordered_map, mem::AllocScope::LOCAL>>; - -template , class KeyEqual = std::equal_to> -using PandaUnorderedMultiMap = - std::unordered_multimap>>; -// Thread local version of PandaUnorderedMultiMap -template , class KeyEqual = std::equal_to> -using PandaUnorderedMultiMapTL = - std::unordered_multimap, mem::AllocScope::LOCAL>>; -} // namespace ark - -#endif // PANDA_RUNTIME_MEM_PANDA_CONTAINERS_H diff --git a/static_core/runtime/include/mem/panda_deque.h b/static_core/runtime/include/mem/panda_deque.h new file mode 100644 index 0000000000..0011a1c2bd --- /dev/null +++ b/static_core/runtime/include/mem/panda_deque.h @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef PANDA_RUNTIME_MEM_PANDA_DEQUE_H +#define PANDA_RUNTIME_MEM_PANDA_DEQUE_H + +#include + +#include "runtime/mem/allocator_adapter.h" + +namespace ark { + +template +using PandaDeque = std::deque>; +// Thread local version of PandaDeque +template +using PandaDequeTL = std::deque>; + +} // namespace ark + +#endif // PANDA_RUNTIME_MEM_PANDA_DEQUE_H diff --git a/static_core/runtime/include/mem/panda_forward_list.h b/static_core/runtime/include/mem/panda_forward_list.h new file mode 100644 index 0000000000..1441437e5d --- /dev/null +++ b/static_core/runtime/include/mem/panda_forward_list.h @@ -0,0 +1,31 @@ +/** + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef PANDA_RUNTIME_MEM_PANDA_FORWARD_LIST_H +#define PANDA_RUNTIME_MEM_PANDA_FORWARD_LIST_H + +#include +#include "runtime/mem/allocator_adapter.h" + +namespace ark { + +template +using PandaForwardList = std::forward_list>; +// Thread local version of PandaForwardList +template +using PandaForwardListTL = std::forward_list>; + +} // namespace ark + +#endif // PANDA_RUNTIME_MEM_PANDA_FORWARD_LIST_H diff --git a/static_core/runtime/include/mem/panda_list.h b/static_core/runtime/include/mem/panda_list.h new file mode 100644 index 0000000000..464a3bfe76 --- /dev/null +++ b/static_core/runtime/include/mem/panda_list.h @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef PANDA_RUNTIME_MEM_PANDA_LIST_H +#define PANDA_RUNTIME_MEM_PANDA_LIST_H + +#include + +#include "runtime/mem/allocator_adapter.h" + +namespace ark { + +template +using PandaList = std::list>; +// Thread local version of PandaList +template +using PandaListTL = std::list>; + +} // namespace ark + +#endif // PANDA_RUNTIME_MEM_PANDA_LIST_H diff --git a/static_core/runtime/include/mem/panda_map.h b/static_core/runtime/include/mem/panda_map.h new file mode 100644 index 0000000000..a152b982bd --- /dev/null +++ b/static_core/runtime/include/mem/panda_map.h @@ -0,0 +1,39 @@ +/** + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef PANDA_RUNTIME_MEM_PANDA_MAP_H +#define PANDA_RUNTIME_MEM_PANDA_MAP_H + +#include + +#include "runtime/mem/allocator_adapter.h" + +namespace ark { + +template > +using PandaMap = std::map>>; +// Thread local version of PandaMap +template > +using PandaMapTL = std::map, mem::AllocScope::LOCAL>>; + +template > +using PandaMultiMap = std::multimap>>; +// Thread local version of PandaMultiMap +template > +using PandaMultiMapTL = + std::multimap, mem::AllocScope::LOCAL>>; + +} // namespace ark + +#endif // PANDA_RUNTIME_MEM_PANDA_MAP_H diff --git a/static_core/runtime/include/mem/panda_queue.h b/static_core/runtime/include/mem/panda_queue.h new file mode 100644 index 0000000000..22ea5ae352 --- /dev/null +++ b/static_core/runtime/include/mem/panda_queue.h @@ -0,0 +1,40 @@ +/** + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef PANDA_RUNTIME_MEM_PANDA_QUEUE_H +#define PANDA_RUNTIME_MEM_PANDA_QUEUE_H + +#include +#include "panda_deque.h" +#include "panda_vector.h" + +#include "runtime/mem/allocator_adapter.h" + +namespace ark { + +template > +using PandaQueue = std::queue; +// Thread local version of PandaQueue +template > +using PandaQueueTL = std::queue; + +template , class Compare = std::less> +using PandaPriorityQueue = std::priority_queue; +// Thread local version of PandaPriorityQueue +template , class Compare = std::less> +using PandaPriorityQueueTL = std::priority_queue; + +} // namespace ark + +#endif // PANDA_RUNTIME_MEM_PANDA_QUEUE_H diff --git a/static_core/runtime/include/mem/panda_set.h b/static_core/runtime/include/mem/panda_set.h new file mode 100644 index 0000000000..0e555b2c4a --- /dev/null +++ b/static_core/runtime/include/mem/panda_set.h @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef PANDA_RUNTIME_MEM_PANDA_SET_H +#define PANDA_RUNTIME_MEM_PANDA_SET_H + +#include + +#include "runtime/mem/allocator_adapter.h" + +namespace ark { + +template > +using PandaSet = std::set>; +// Thread local version of PandaSet +template > +using PandaSetTL = std::set>; + +} // namespace ark + +#endif // PANDA_RUNTIME_MEM_PANDA_SET_H diff --git a/static_core/runtime/include/mem/panda_small_vector.h b/static_core/runtime/include/mem/panda_small_vector.h new file mode 100644 index 0000000000..0c3f9d525d --- /dev/null +++ b/static_core/runtime/include/mem/panda_small_vector.h @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef PANDA_RUNTIME_MEM_PANDA_SMALL_VECTOR_H +#define PANDA_RUNTIME_MEM_PANDA_SMALL_VECTOR_H + +#include "libarkbase/utils/small_vector.h" +#include "runtime/mem/allocator_adapter.h" + +namespace ark { + +// For small vector with static allocation support +static constexpr size_t STATIC_CAPACITY_DEFAULT = 8; +template +using PandaSmallVector = SmallVector>; +template +using PandaSmallVectorTL = SmallVector>; + +} // namespace ark + +#endif // PANDA_RUNTIME_MEM_PANDA_SMALL_VECTOR_H diff --git a/static_core/runtime/include/mem/panda_stack.h b/static_core/runtime/include/mem/panda_stack.h new file mode 100644 index 0000000000..b240b1198d --- /dev/null +++ b/static_core/runtime/include/mem/panda_stack.h @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef PANDA_RUNTIME_MEM_PANDA_STACK_H +#define PANDA_RUNTIME_MEM_PANDA_STACK_H + +#include +#include "panda_deque.h" + +#include "runtime/mem/allocator_adapter.h" + +namespace ark { + +template > +using PandaStack = std::stack; +// Thread local version of PandaStack +template > +using PandaStackTL = std::stack; + +} // namespace ark + +#endif // PANDA_RUNTIME_MEM_PANDA_STACK_H diff --git a/static_core/runtime/include/mem/panda_unordered_map.h b/static_core/runtime/include/mem/panda_unordered_map.h new file mode 100644 index 0000000000..5e531515f8 --- /dev/null +++ b/static_core/runtime/include/mem/panda_unordered_map.h @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef PANDA_RUNTIME_MEM_PANDA_UNORDERED_MAP_H +#define PANDA_RUNTIME_MEM_PANDA_UNORDERED_MAP_H + +#include + +#include "runtime/mem/allocator_adapter.h" + +namespace ark { + +template , class KeyEqual = std::equal_to> +using PandaUnorderedMap = std::unordered_map>>; +// Thread local version of PandaUnorderedMap +template , class KeyEqual = std::equal_to> +using PandaUnorderedMapTL = + std::unordered_map, mem::AllocScope::LOCAL>>; + +template , class KeyEqual = std::equal_to> +using PandaUnorderedMultiMap = + std::unordered_multimap>>; +// Thread local version of PandaUnorderedMultiMap +template , class KeyEqual = std::equal_to> +using PandaUnorderedMultiMapTL = + std::unordered_multimap, mem::AllocScope::LOCAL>>; + + +} // namespace ark + +#endif // PANDA_RUNTIME_MEM_PANDA_UNORDERED_MAP_H diff --git a/static_core/runtime/include/mem/panda_unordered_set.h b/static_core/runtime/include/mem/panda_unordered_set.h new file mode 100644 index 0000000000..05a60795bb --- /dev/null +++ b/static_core/runtime/include/mem/panda_unordered_set.h @@ -0,0 +1,31 @@ +/** + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef PANDA_RUNTIME_MEM_PANDA_UNORDERED_SET_H +#define PANDA_RUNTIME_MEM_PANDA_UNORDERED_SET_H + +#include +#include "runtime/mem/allocator_adapter.h" + +namespace ark { + +template , class KeyEqual = std::equal_to> +using PandaUnorderedSet = std::unordered_set>; +// Thread local version of PandaUnorderedSet +template , class KeyEqual = std::equal_to> +using PandaUnorderedSetTL = std::unordered_set>; + +} // namespace ark + +#endif // PANDA_RUNTIME_MEM_PANDA_UNORDERED_SET_H diff --git a/static_core/runtime/include/mem/panda_vector.h b/static_core/runtime/include/mem/panda_vector.h new file mode 100644 index 0000000000..bfc58bb4ca --- /dev/null +++ b/static_core/runtime/include/mem/panda_vector.h @@ -0,0 +1,31 @@ +/** + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef PANDA_RUNTIME_MEM_PANDA_VECTOR_H +#define PANDA_RUNTIME_MEM_PANDA_VECTOR_H + +#include +#include "runtime/mem/allocator_adapter.h" + +namespace ark { + +template +using PandaVector = std::vector>; +// Thread local version of PandaVector +template +using PandaVectorTL = std::vector>; + +} // namespace ark + +#endif // PANDA_RUNTIME_MEM_PANDA_VECTOR_H diff --git a/static_core/runtime/include/method.h b/static_core/runtime/include/method.h index 92234d545e..a1f4ba879a 100644 --- a/static_core/runtime/include/method.h +++ b/static_core/runtime/include/method.h @@ -31,7 +31,8 @@ #include "runtime/bridge/bridge.h" #include "runtime/include/compiler_interface.h" #include "runtime/include/class_helper.h" -#include "runtime/include/mem/panda_containers.h" +#include "runtime/include/mem/panda_small_vector.h" +#include "runtime/include/mem/panda_vector.h" #include "runtime/include/mem/panda_smart_pointers.h" #include "runtime/interpreter/frame.h" #include "value.h" @@ -39,6 +40,7 @@ namespace ark { class Class; +class Frame; class ManagedThread; class ProfilingData; diff --git a/static_core/runtime/include/object_header.h b/static_core/runtime/include/object_header.h index 7ece31d8db..9070ff6b10 100644 --- a/static_core/runtime/include/object_header.h +++ b/static_core/runtime/include/object_header.h @@ -33,7 +33,7 @@ #include #include -#include "runtime/mem/lock_config_helper.h" +//#include "runtime/mem/lock_config_helper.h" #include "runtime/include/class_helper.h" #include "runtime/mark_word.h" diff --git a/static_core/runtime/include/panda_vm.h b/static_core/runtime/include/panda_vm.h index 95a9f0bc0a..64a1234c00 100644 --- a/static_core/runtime/include/panda_vm.h +++ b/static_core/runtime/include/panda_vm.h @@ -15,11 +15,11 @@ #ifndef PANDA_RUNTIME_PANDA_VM_H #define PANDA_RUNTIME_PANDA_VM_H -#include "include/coretypes/line_string.h" +//#include "include/coretypes/line_string.h" #include "include/runtime_options.h" #include "jit/profile_saver_worker.h" #include "runtime/include/locks.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/include/mem/panda_string.h" #include "runtime/include/method.h" #include "runtime/include/runtime.h" diff --git a/static_core/runtime/include/runtime.h b/static_core/runtime/include/runtime.h index 889be978b6..7a37d101ed 100644 --- a/static_core/runtime/include/runtime.h +++ b/static_core/runtime/include/runtime.h @@ -30,7 +30,7 @@ #include "../libarkfile/file_items.h" #include "../libarkfile/literal_data_accessor.h" #include "runtime/include/class_linker.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/include/mem/panda_smart_pointers.h" #include "runtime/include/mem/panda_string.h" #include "runtime/include/method.h" diff --git a/static_core/runtime/include/runtime_notification.h b/static_core/runtime/include/runtime_notification.h index 2723d23fee..2e5be86352 100644 --- a/static_core/runtime/include/runtime_notification.h +++ b/static_core/runtime/include/runtime_notification.h @@ -23,7 +23,7 @@ #include "runtime/include/console_call_type.h" #include "runtime/include/coretypes/tagged_value.h" #include "runtime/include/locks.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/include/mem/panda_string.h" #include "runtime/include/runtime.h" #include "runtime/handle_scope-inl.h" diff --git a/static_core/runtime/include/thread.h b/static_core/runtime/include/thread.h index faefbb3198..ee506f36fe 100644 --- a/static_core/runtime/include/thread.h +++ b/static_core/runtime/include/thread.h @@ -25,18 +25,13 @@ #include "libarkbase/mem/gc_barrier.h" #include "libarkbase/mem/ringbuf/lock_free_ring_buffer.h" -#include "libarkbase/mem/weighted_adaptive_tlab_average.h" #include "libarkbase/os/mutex.h" #include "libarkbase/os/thread.h" #include "libarkbase/utils/arch.h" #include "libarkbase/utils/list.h" #include "libarkbase/utils/logger.h" #include "libarkbase/utils/tsan_interface.h" -#include "runtime/include/mem/panda_containers.h" -#include "runtime/include/mem/panda_smart_pointers.h" -#include "runtime/include/object_header-inl.h" -#include "runtime/include/stack_walker.h" -#include "runtime/include/language_context.h" + #include "runtime/include/thread_proxy.h" #include "runtime/include/locks.h" #include "runtime/include/thread_status.h" diff --git a/static_core/runtime/include/tooling/debug_interface.h b/static_core/runtime/include/tooling/debug_interface.h index d4830a33a4..a7ba70da67 100644 --- a/static_core/runtime/include/tooling/debug_interface.h +++ b/static_core/runtime/include/tooling/debug_interface.h @@ -27,7 +27,7 @@ #include "libarkfile/file.h" #include "runtime/include/console_call_type.h" #include "runtime/include/coretypes/tagged_value.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/include/thread.h" #include "runtime/include/tooling/pt_location.h" #include "runtime/include/tooling/pt_macros.h" diff --git a/static_core/runtime/include/vtable_builder_base-inl.h b/static_core/runtime/include/vtable_builder_base-inl.h index 06f9c71777..3c71e6965a 100644 --- a/static_core/runtime/include/vtable_builder_base-inl.h +++ b/static_core/runtime/include/vtable_builder_base-inl.h @@ -16,6 +16,7 @@ #define PANDA_RUNTIME_VTABLE_BUILDER_BASE_INL_H #include "runtime/include/vtable_builder_base.h" +#include "libarkbase/utils/arena_forward_list.h" namespace ark { diff --git a/static_core/runtime/include/vtable_builder_base.h b/static_core/runtime/include/vtable_builder_base.h index bb4b70a2b9..ec1f54daaf 100644 --- a/static_core/runtime/include/vtable_builder_base.h +++ b/static_core/runtime/include/vtable_builder_base.h @@ -18,6 +18,7 @@ #include "libarkbase/macros.h" #include "libarkbase/utils/hash.h" #include "libarkbase/utils/utf.h" +#include "libarkbase/utils/arena_vector.h" #include "libarkfile/class_data_accessor-inl.h" #include "libarkfile/file-inl.h" #include "libarkfile/file_items.h" @@ -25,7 +26,7 @@ #include "runtime/class_linker_context.h" #include "runtime/include/class-inl.h" #include "runtime/include/class_linker.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/include/mem/panda_smart_pointers.h" #include "runtime/include/vtable_builder_interface.h" diff --git a/static_core/runtime/interpreter/frame.h b/static_core/runtime/interpreter/frame.h index 0778ce4818..9645c794fa 100644 --- a/static_core/runtime/interpreter/frame.h +++ b/static_core/runtime/interpreter/frame.h @@ -24,7 +24,7 @@ #include "libarkbase/utils/logger.h" #include "runtime/interpreter/acc_vregister.h" #include "runtime/mem/frame_allocator-inl.h" -#include "libarkfile/bytecode_instruction-inl.h" +#include "libarkfile/bytecode_instruction.h" namespace ark { diff --git a/static_core/runtime/interpreter/interpreter.cpp b/static_core/runtime/interpreter/interpreter.cpp index dcdc0aec6d..ceb78a0bb2 100644 --- a/static_core/runtime/interpreter/interpreter.cpp +++ b/static_core/runtime/interpreter/interpreter.cpp @@ -33,6 +33,12 @@ void Execute(ManagedThread *thread, const uint8_t *pc, Frame *frame, bool jumpTo } // namespace ark::interpreter namespace ark { + +const uint8_t *GetInstrOffset(Frame *frame) +{ + return frame->GetInstrOffset(); +} + ALWAYS_INLINE inline const uint8_t *Frame::GetInstrOffset() { return (method_->GetInstructions()); diff --git a/static_core/runtime/interpreter/runtime_interface.h b/static_core/runtime/interpreter/runtime_interface.h index d5ec11d944..37ac8ee79a 100644 --- a/static_core/runtime/interpreter/runtime_interface.h +++ b/static_core/runtime/interpreter/runtime_interface.h @@ -22,6 +22,7 @@ #include "runtime/entrypoints/entrypoints.h" #include "runtime/include/class_linker-inl.h" #include "runtime/include/coretypes/array.h" +#include "runtime/include/coretypes/string.h" #include "runtime/include/coretypes/line_string.h" #include "runtime/include/exceptions.h" #include "runtime/include/field.h" diff --git a/static_core/runtime/jit/libprofile/aot_profiling_data.h b/static_core/runtime/jit/libprofile/aot_profiling_data.h index 94b584e636..161eea8d53 100644 --- a/static_core/runtime/jit/libprofile/aot_profiling_data.h +++ b/static_core/runtime/jit/libprofile/aot_profiling_data.h @@ -18,7 +18,7 @@ #include "libarkbase/utils/span.h" #include "runtime/include/mem/panda_string.h" -#include "runtime/include/mem/panda_containers.h" +#include "runtime/include/mem/panda_map.h" #include "runtime/jit/profiling_data.h" #include diff --git a/static_core/runtime/jit/libprofile/pgo_file_builder.h b/static_core/runtime/jit/libprofile/pgo_file_builder.h index 07ab6f9dd4..35cd4a6e07 100644 --- a/static_core/runtime/jit/libprofile/pgo_file_builder.h +++ b/static_core/runtime/jit/libprofile/pgo_file_builder.h @@ -20,7 +20,7 @@ #include "aot_profiling_data.h" #include "libarkbase/utils/span.h" #include "runtime/include/mem/panda_string.h" -#include "runtime/include/mem/panda_containers.h" + namespace ark::pgo { diff --git a/static_core/runtime/jit/profiling_data.h b/static_core/runtime/jit/profiling_data.h index 804ea45806..2f1a839d0a 100644 --- a/static_core/runtime/jit/profiling_data.h +++ b/static_core/runtime/jit/profiling_data.h @@ -23,7 +23,7 @@ #include -#include "runtime/include/mem/panda_containers.h" +#include "runtime/include/mem/panda_vector.h" namespace ark { diff --git a/static_core/runtime/jit/profiling_saver.h b/static_core/runtime/jit/profiling_saver.h index 9b02c5b7eb..03ee30f02b 100644 --- a/static_core/runtime/jit/profiling_saver.h +++ b/static_core/runtime/jit/profiling_saver.h @@ -20,7 +20,7 @@ #include #include #include "libprofile/aot_profiling_data.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/jit/profiling_data.h" #include "runtime/include/class.h" #include "runtime/include/class_linker.h" diff --git a/static_core/runtime/language_context.cpp b/static_core/runtime/language_context.cpp index d71ea6e37f..02fe8a6244 100644 --- a/static_core/runtime/language_context.cpp +++ b/static_core/runtime/language_context.cpp @@ -19,6 +19,7 @@ #include "runtime/core/core_vm.h" #include "runtime/core/core_vtable_builder.h" #include "runtime/handle_scope-inl.h" +#include "runtime/include/object_header-inl.h" #include "runtime/include/class_linker.h" #include "runtime/include/language_config.h" #include "runtime/include/method.h" diff --git a/static_core/runtime/lock_order_graph.h b/static_core/runtime/lock_order_graph.h index 551a953488..b169b7a23e 100644 --- a/static_core/runtime/lock_order_graph.h +++ b/static_core/runtime/lock_order_graph.h @@ -18,7 +18,7 @@ #include #include "libarkbase/os/mutex.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/include/thread.h" #include "runtime/include/thread_status.h" diff --git a/static_core/runtime/mem/allocator.cpp b/static_core/runtime/mem/allocator.cpp index 440de4ba70..cca382053f 100644 --- a/static_core/runtime/mem/allocator.cpp +++ b/static_core/runtime/mem/allocator.cpp @@ -20,6 +20,7 @@ #include "libarkbase/mem/mem_pool.h" #include "libarkbase/mem/mem_config.h" #include "libarkbase/mem/mem.h" +#include "libarkbase/mem/weighted_adaptive_tlab_average.h" #include "runtime/include/runtime.h" #include "runtime/include/panda_vm.h" #include "runtime/include/object_header.h" diff --git a/static_core/runtime/mem/bump-allocator.h b/static_core/runtime/mem/bump-allocator.h index 41a53e2e53..39fb861a7c 100644 --- a/static_core/runtime/mem/bump-allocator.h +++ b/static_core/runtime/mem/bump-allocator.h @@ -20,7 +20,7 @@ #include "libarkbase/mem/mem_pool.h" #include "libarkbase/macros.h" -#include "libarkbase/mem/arena-inl.h" +#include "libarkbase/mem/arena.h" #include "libarkbase/mem/mem.h" #include "libarkbase/mem/mem_range.h" #include "runtime/mem/tlab.h" diff --git a/static_core/runtime/mem/gc/card_table-inl.h b/static_core/runtime/mem/gc/card_table-inl.h index 6dbf65572e..a9d631da7e 100644 --- a/static_core/runtime/mem/gc/card_table-inl.h +++ b/static_core/runtime/mem/gc/card_table-inl.h @@ -17,7 +17,7 @@ #define RUNTIME_MEM_GC_CARD_TABLE_INL_H #include "runtime/mem/gc/card_table.h" -#include "runtime/include/mem/panda_containers.h" + #include diff --git a/static_core/runtime/mem/gc/card_table.h b/static_core/runtime/mem/gc/card_table.h index fccba623cd..f62e58475c 100644 --- a/static_core/runtime/mem/gc/card_table.h +++ b/static_core/runtime/mem/gc/card_table.h @@ -21,7 +21,8 @@ #include #include -#include "runtime/include/mem/panda_containers.h" +#include "runtime/include/mem/panda_vector.h" +#include "libarkbase/macros.h" namespace ark::mem { diff --git a/static_core/runtime/mem/gc/dynamic/gc_dynamic_data.h b/static_core/runtime/mem/gc/dynamic/gc_dynamic_data.h index 0cf5921775..92c598ce6f 100644 --- a/static_core/runtime/mem/gc/dynamic/gc_dynamic_data.h +++ b/static_core/runtime/mem/gc/dynamic/gc_dynamic_data.h @@ -15,7 +15,7 @@ #ifndef PANDA_RUNTIME_MEM_GC_GC_DYNAMIC_DATA_H #define PANDA_RUNTIME_MEM_GC_GC_DYNAMIC_DATA_H -#include "runtime/include/mem/panda_containers.h" + #include "runtime/include/coretypes/tagged_value.h" #include "runtime/mem/gc/gc_extension_data.h" diff --git a/static_core/runtime/mem/gc/g1/collection_set.h b/static_core/runtime/mem/gc/g1/collection_set.h index 829bce79a0..76f80fad09 100644 --- a/static_core/runtime/mem/gc/g1/collection_set.h +++ b/static_core/runtime/mem/gc/g1/collection_set.h @@ -18,7 +18,7 @@ #include "libarkbase/macros.h" #include "libarkbase/utils/range.h" #include "runtime/mem/region_space.h" -#include "runtime/include/mem/panda_containers.h" + namespace ark::mem { diff --git a/static_core/runtime/mem/gc/g1/g1-allocator.cpp b/static_core/runtime/mem/gc/g1/g1-allocator.cpp index 00bf9dcdcc..fd3db40e80 100644 --- a/static_core/runtime/mem/gc/g1/g1-allocator.cpp +++ b/static_core/runtime/mem/gc/g1/g1-allocator.cpp @@ -21,6 +21,8 @@ #include "runtime/mem/rem_set-inl.h" #include "runtime/include/panda_vm.h" +#include "libarkbase/mem/weighted_adaptive_tlab_average.h" + namespace ark::mem { template diff --git a/static_core/runtime/mem/gc/g1/g1-evacuate-regions-worker-state.h b/static_core/runtime/mem/gc/g1/g1-evacuate-regions-worker-state.h index 2af9d6969a..1597cac16a 100644 --- a/static_core/runtime/mem/gc/g1/g1-evacuate-regions-worker-state.h +++ b/static_core/runtime/mem/gc/g1/g1-evacuate-regions-worker-state.h @@ -18,7 +18,7 @@ #include "runtime/mem/lock_config_helper.h" #include "runtime/include/coretypes/tagged_value.h" #include "runtime/mark_word.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/mem/gc/g1/g1-object-pointer-handlers.h" #include "runtime/mem/gc/g1/gc_evacuate_regions_task_stack.h" diff --git a/static_core/runtime/mem/gc/g1/g1-gc.cpp b/static_core/runtime/mem/gc/g1/g1-gc.cpp index 457686a693..8271388bdf 100644 --- a/static_core/runtime/mem/gc/g1/g1-gc.cpp +++ b/static_core/runtime/mem/gc/g1/g1-gc.cpp @@ -34,6 +34,7 @@ #include "runtime/mem/rem_set-inl.h" #include "runtime/include/thread-inl.h" #include "runtime/include/managed_thread.h" +#include "runtime/include/object_accessor-inl.h" #include "runtime/mem/gc/g1/ref_updater.h" #include "runtime/mem/region_space.h" #include "runtime/include/stack_walker-inl.h" @@ -41,6 +42,7 @@ #include "runtime/mem/gc/g1/g1-evacuate-regions-worker-state-inl.h" #include "runtime/mem/gc/g1/xgc-extension-data.h" + namespace ark::mem { void Unreachable([[maybe_unused]] ObjectHeader *obj) diff --git a/static_core/runtime/mem/gc/g1/hot_cards.h b/static_core/runtime/mem/gc/g1/hot_cards.h index 412242c739..c4a8f7982b 100644 --- a/static_core/runtime/mem/gc/g1/hot_cards.h +++ b/static_core/runtime/mem/gc/g1/hot_cards.h @@ -16,7 +16,7 @@ #ifndef PANDA_RUNTIME_MEM_GC_G1_HOT_CARDS_H #define PANDA_RUNTIME_MEM_GC_G1_HOT_CARDS_H -#include "runtime/include/mem/panda_containers.h" +#include "runtime/include/mem/panda_unordered_set.h" #include "runtime/mem/gc/card_table-inl.h" #include "runtime/arch/memory_helpers.h" diff --git a/static_core/runtime/mem/gc/g1/update_remset_thread.h b/static_core/runtime/mem/gc/g1/update_remset_thread.h index 027012f159..d35a5c8fbb 100644 --- a/static_core/runtime/mem/gc/g1/update_remset_thread.h +++ b/static_core/runtime/mem/gc/g1/update_remset_thread.h @@ -20,7 +20,7 @@ #include "libarkbase/macros.h" #include "libarkbase/os/mutex.h" -#include "runtime/include/mem/panda_containers.h" + namespace ark::mem { diff --git a/static_core/runtime/mem/gc/gc.cpp b/static_core/runtime/mem/gc/gc.cpp index aa6f932af0..4791c016da 100644 --- a/static_core/runtime/mem/gc/gc.cpp +++ b/static_core/runtime/mem/gc/gc.cpp @@ -22,6 +22,7 @@ #include "libarkbase/taskmanager/task_manager.h" #include "runtime/assert_gc_scope.h" #include "runtime/include/class.h" +#include "runtime/include/object_header-inl.h" #include "runtime/include/coretypes/dyn_objects.h" #include "runtime/include/locks.h" #include "runtime/include/runtime.h" diff --git a/static_core/runtime/mem/gc/gc.h b/static_core/runtime/mem/gc/gc.h index dee42157e2..0b14b13517 100644 --- a/static_core/runtime/mem/gc/gc.h +++ b/static_core/runtime/mem/gc/gc.h @@ -30,7 +30,7 @@ #include "runtime/include/object_header.h" #include "runtime/include/language_config.h" #include "runtime/include/locks.h" -#include "runtime/include/mem/panda_containers.h" +#include "runtime/include/mem/panda_list.h" #include "runtime/include/mem/panda_smart_pointers.h" #include "runtime/include/mem/panda_string.h" #include "runtime/mem/allocator_adapter.h" diff --git a/static_core/runtime/mem/gc/gc_adaptive_marking_stack.h b/static_core/runtime/mem/gc/gc_adaptive_marking_stack.h index 37135d7ee4..6e98773964 100644 --- a/static_core/runtime/mem/gc/gc_adaptive_marking_stack.h +++ b/static_core/runtime/mem/gc/gc_adaptive_marking_stack.h @@ -17,7 +17,7 @@ #include "runtime/mem/gc/gc_root_type.h" #include "runtime/mem/gc/workers/gc_workers_tasks.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/mem/gc/gc_adaptive_stack.h" namespace ark::mem { diff --git a/static_core/runtime/mem/gc/gc_adaptive_stack.h b/static_core/runtime/mem/gc/gc_adaptive_stack.h index 0302d80ee2..435f291944 100644 --- a/static_core/runtime/mem/gc/gc_adaptive_stack.h +++ b/static_core/runtime/mem/gc/gc_adaptive_stack.h @@ -17,7 +17,7 @@ #include "runtime/mem/gc/gc_root_type.h" #include "runtime/mem/gc/workers/gc_workers_tasks.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/mem/gc/g1/object_ref.h" namespace ark::mem { diff --git a/static_core/runtime/mem/gc/gc_barrier_set.h b/static_core/runtime/mem/gc/gc_barrier_set.h index 3c0a0927bf..fea6400cce 100644 --- a/static_core/runtime/mem/gc/gc_barrier_set.h +++ b/static_core/runtime/mem/gc/gc_barrier_set.h @@ -17,7 +17,8 @@ #include "libarkbase/mem/gc_barrier.h" #include "libarkbase/mem/ringbuf/lock_free_ring_buffer.h" -#include "runtime/include/mem/panda_containers.h" +#include "runtime/include/mem/panda_map.h" +#include "runtime/include/mem/panda_vector.h" #include "runtime/include/mem/panda_string.h" #include "runtime/mem/gc/card_table.h" diff --git a/static_core/runtime/mem/gc/gc_queue.h b/static_core/runtime/mem/gc/gc_queue.h index 89cd597099..20f3ac0aaf 100644 --- a/static_core/runtime/mem/gc/gc_queue.h +++ b/static_core/runtime/mem/gc/gc_queue.h @@ -19,8 +19,8 @@ #include #include "runtime/include/gc_task.h" -#include "runtime/include/mem/panda_containers.h" #include "runtime/include/mem/panda_smart_pointers.h" +#include "runtime/include/mem/panda_queue.h" namespace ark::mem { diff --git a/static_core/runtime/mem/gc/gc_root.h b/static_core/runtime/mem/gc/gc_root.h index 6058cebd46..2de1c9844c 100644 --- a/static_core/runtime/mem/gc/gc_root.h +++ b/static_core/runtime/mem/gc/gc_root.h @@ -21,9 +21,8 @@ #include "libarkbase/mem/mem.h" #include "libarkbase/mem/mem_range.h" -#include "runtime/include/class.h" #include "runtime/include/language_config.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/interpreter/frame.h" #include "runtime/mem/gc/card_table.h" #include "runtime/mem/gc/gc_root_type.h" diff --git a/static_core/runtime/mem/gc/gc_stats.h b/static_core/runtime/mem/gc/gc_stats.h index 26abf1ee75..3513d75a2e 100644 --- a/static_core/runtime/mem/gc/gc_stats.h +++ b/static_core/runtime/mem/gc/gc_stats.h @@ -17,7 +17,7 @@ #include "libarkbase/os/mutex.h" #include "runtime/include/histogram-inl.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/include/mem/panda_string.h" #include "runtime/include/time_utils.h" #include "runtime/mem/gc/gc_types.h" diff --git a/static_core/runtime/mem/gc/reference-processor/reference_processor.h b/static_core/runtime/mem/gc/reference-processor/reference_processor.h index fd6fb91934..53293475ef 100644 --- a/static_core/runtime/mem/gc/reference-processor/reference_processor.h +++ b/static_core/runtime/mem/gc/reference-processor/reference_processor.h @@ -18,7 +18,7 @@ #include "libarkbase/macros.h" #include "runtime/include/coretypes/tagged_value.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/mem/gc/gc_root.h" #include "runtime/mem/gc/gc.h" diff --git a/static_core/runtime/mem/gc/static/gc_marker_static-inl.h b/static_core/runtime/mem/gc/static/gc_marker_static-inl.h index 6087804cef..744d53fcd8 100644 --- a/static_core/runtime/mem/gc/static/gc_marker_static-inl.h +++ b/static_core/runtime/mem/gc/static/gc_marker_static-inl.h @@ -18,6 +18,7 @@ #include "runtime/mem/gc/gc_marker.h" #include "runtime/mem/gc/workers/gc_workers_task_pool.h" +#include "runtime/include/object_header-inl.h" namespace ark::mem { diff --git a/static_core/runtime/mem/gc/workers/gc_workers_tasks.h b/static_core/runtime/mem/gc/workers/gc_workers_tasks.h index 8846d7b843..f661b87b40 100644 --- a/static_core/runtime/mem/gc/workers/gc_workers_tasks.h +++ b/static_core/runtime/mem/gc/workers/gc_workers_tasks.h @@ -19,6 +19,7 @@ #include "runtime/mem/gc/g1/ref_updater.h" #include "runtime/mem/gc/gc_root.h" #include "runtime/thread_pool_queue.h" +#include "runtime/include/mem/panda_deque.h" #include "libarkbase/utils/range.h" namespace ark::mem { diff --git a/static_core/runtime/mem/heap_manager.cpp b/static_core/runtime/mem/heap_manager.cpp index e523e07970..805d5f06f0 100644 --- a/static_core/runtime/mem/heap_manager.cpp +++ b/static_core/runtime/mem/heap_manager.cpp @@ -21,7 +21,9 @@ #include "libarkbase/mem/mmap_mem_pool-inl.h" #include "libarkbase/mem/pool_manager.h" +#include "libarkbase/mem/weighted_adaptive_tlab_average.h" #include "runtime/handle_base-inl.h" +#include "runtime/include/object_header-inl.h" #include "runtime/include/locks.h" #include "runtime/include/runtime_notification.h" #include "runtime/include/thread_scopes.h" diff --git a/static_core/runtime/mem/heap_manager.h b/static_core/runtime/mem/heap_manager.h index 94ea03db48..656d65ef03 100644 --- a/static_core/runtime/mem/heap_manager.h +++ b/static_core/runtime/mem/heap_manager.h @@ -20,9 +20,8 @@ #include "libarkbase/utils/logger.h" #include "libarkbase/macros.h" -#include "runtime/include/class.h" #include "runtime/include/mem/allocator.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/include/object_header.h" #include "runtime/include/thread.h" #include "runtime/mem/frame_allocator-inl.h" @@ -33,6 +32,7 @@ namespace ark { // Forward declaration +class Class; class Runtime; class PandaVM; class RuntimeNotificationManager; diff --git a/static_core/runtime/mem/heap_verifier.cpp b/static_core/runtime/mem/heap_verifier.cpp index f14bd00f5e..d0e99b1131 100644 --- a/static_core/runtime/mem/heap_verifier.cpp +++ b/static_core/runtime/mem/heap_verifier.cpp @@ -15,6 +15,7 @@ #include "runtime/include/runtime.h" #include "runtime/include/panda_vm.h" +#include "runtime/include/class-inl.h" #include "runtime/mem/gc/gc_root.h" #include "runtime/mem/heap_verifier.h" diff --git a/static_core/runtime/mem/humongous_obj_allocator.h b/static_core/runtime/mem/humongous_obj_allocator.h index 4289305fbf..1df640a418 100644 --- a/static_core/runtime/mem/humongous_obj_allocator.h +++ b/static_core/runtime/mem/humongous_obj_allocator.h @@ -19,7 +19,6 @@ #include "libarkbase/macros.h" #include "libarkbase/mem/mem.h" -#include "libarkbase/mem/pool_manager.h" #include "libarkbase/mem/space.h" #include "libarkbase/utils/logger.h" #include "runtime/mem/runslots.h" diff --git a/static_core/runtime/mem/internal_allocator.h b/static_core/runtime/mem/internal_allocator.h index f3e4e92c5d..dbc98f6e51 100644 --- a/static_core/runtime/mem/internal_allocator.h +++ b/static_core/runtime/mem/internal_allocator.h @@ -18,7 +18,7 @@ #include #include "libarkbase/concepts.h" -#include "libarkbase/mem/mmap_mem_pool-inl.h" +//#include "libarkbase/mem/mmap_mem_pool-inl.h" #include "libarkbase/mem/pool_manager.h" #include "libarkbase/os/mutex.h" #include "runtime/mem/freelist_allocator.h" diff --git a/static_core/runtime/mem/lock_config_helper.h b/static_core/runtime/mem/lock_config_helper.h index a0cae60b5d..bbbff435b5 100644 --- a/static_core/runtime/mem/lock_config_helper.h +++ b/static_core/runtime/mem/lock_config_helper.h @@ -19,7 +19,7 @@ namespace ark { enum LangTypeT : bool { LANG_TYPE_STATIC, LANG_TYPE_DYNAMIC }; -enum MTModeT { MT_MODE_SINGLE, MT_MODE_MULTI, MT_MODE_TASK }; +enum MTModeT : uint8_t { MT_MODE_SINGLE, MT_MODE_MULTI, MT_MODE_TASK }; namespace mem { diff --git a/static_core/runtime/mem/mem_stats_additional_info.h b/static_core/runtime/mem/mem_stats_additional_info.h index 79cad50d8e..8e8a3a0d77 100644 --- a/static_core/runtime/mem/mem_stats_additional_info.h +++ b/static_core/runtime/mem/mem_stats_additional_info.h @@ -17,7 +17,7 @@ #include -#include "runtime/include/mem/panda_containers.h" + #include "runtime/mem/mem_stats.h" namespace ark::mem { diff --git a/static_core/runtime/mem/memory_manager.h b/static_core/runtime/mem/memory_manager.h index cc89df60b6..27f1aa2127 100644 --- a/static_core/runtime/mem/memory_manager.h +++ b/static_core/runtime/mem/memory_manager.h @@ -23,6 +23,7 @@ #include "runtime/mem/lock_config_helper.h" namespace ark { +class LanguageContext; class RuntimeOptions; } // namespace ark namespace ark::mem { diff --git a/static_core/runtime/mem/object_helpers-inl.h b/static_core/runtime/mem/object_helpers-inl.h index 9a96ba3128..3f5ad3cda5 100644 --- a/static_core/runtime/mem/object_helpers-inl.h +++ b/static_core/runtime/mem/object_helpers-inl.h @@ -18,6 +18,7 @@ #include "runtime/mem/object_helpers.h" #include "runtime/include/class.h" +#include "runtime/include/object_header-inl.h" #include "runtime/include/coretypes/array-inl.h" #include "runtime/include/coretypes/dyn_objects.h" #include "runtime/include/coretypes/line_string.h" diff --git a/static_core/runtime/mem/object_helpers.cpp b/static_core/runtime/mem/object_helpers.cpp index 25caf5c6b9..15b162728d 100644 --- a/static_core/runtime/mem/object_helpers.cpp +++ b/static_core/runtime/mem/object_helpers.cpp @@ -20,6 +20,7 @@ #include "runtime/mem/object_helpers-inl.h" #include "libarkbase/utils/utf.h" +#include "runtime/include/object_header-inl.h" #include "runtime/include/thread.h" #include "runtime/include/panda_vm.h" #include "runtime/include/coretypes/string.h" diff --git a/static_core/runtime/mem/refstorage/global_object_storage.cpp b/static_core/runtime/mem/refstorage/global_object_storage.cpp index 002edc5997..0fb70960f3 100644 --- a/static_core/runtime/mem/refstorage/global_object_storage.cpp +++ b/static_core/runtime/mem/refstorage/global_object_storage.cpp @@ -16,7 +16,7 @@ #include #include "runtime/include/runtime.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/include/object_header.h" #include "runtime/mem/object_helpers.h" #include "runtime/mem/gc/gc.h" diff --git a/static_core/runtime/mem/refstorage/global_object_storage.h b/static_core/runtime/mem/refstorage/global_object_storage.h index 2b35fef2af..dedb059816 100644 --- a/static_core/runtime/mem/refstorage/global_object_storage.h +++ b/static_core/runtime/mem/refstorage/global_object_storage.h @@ -18,7 +18,7 @@ #include #include "runtime/include/runtime.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/include/object_header.h" #include "runtime/mem/object_helpers.h" #include "runtime/mem/gc/gc.h" diff --git a/static_core/runtime/mem/refstorage/reference_storage.cpp b/static_core/runtime/mem/refstorage/reference_storage.cpp index f51413b46f..2b8fa80002 100644 --- a/static_core/runtime/mem/refstorage/reference_storage.cpp +++ b/static_core/runtime/mem/refstorage/reference_storage.cpp @@ -18,6 +18,7 @@ #include "libarkbase/mem/mem.h" #include "libarkbase/utils/dfx.h" #include "runtime/include/thread.h" +#include "runtime/include/class-inl.h" #include "runtime/mem/object_helpers.h" #include "runtime/mem/refstorage/global_object_storage.h" #include "runtime/mem/gc/gc_root.h" diff --git a/static_core/runtime/mem/region_allocator.h b/static_core/runtime/mem/region_allocator.h index 81500f5abb..60d7ca9bcb 100644 --- a/static_core/runtime/mem/region_allocator.h +++ b/static_core/runtime/mem/region_allocator.h @@ -18,6 +18,8 @@ #include #include +#include "runtime/include/mem/panda_vector.h" +#include "runtime/include/mem/panda_map.h" #include "runtime/mem/region_space.h" namespace ark { diff --git a/static_core/runtime/mem/region_space.h b/static_core/runtime/mem/region_space.h index b6d3f394c2..5c46ca828c 100644 --- a/static_core/runtime/mem/region_space.h +++ b/static_core/runtime/mem/region_space.h @@ -19,7 +19,7 @@ #include #include "libarkbase/utils/list.h" -#include "runtime/include/mem/panda_containers.h" +#include "runtime/include/mem/panda_vector.h" #include "runtime/mem/object_helpers.h" #include "runtime/mem/tlab.h" #include "runtime/mem/rem_set.h" diff --git a/static_core/runtime/mem/rem_set.h b/static_core/runtime/mem/rem_set.h index 287677babd..8f0f4becf6 100644 --- a/static_core/runtime/mem/rem_set.h +++ b/static_core/runtime/mem/rem_set.h @@ -17,7 +17,8 @@ #define PANDA_MEM_GC_G1_REM_SET_H #include -#include +#include "runtime/include/mem/panda_unordered_set.h" +#include "runtime/include/mem/panda_unordered_map.h" namespace ark::mem { diff --git a/static_core/runtime/method.cpp b/static_core/runtime/method.cpp index cd399085e6..69cda02782 100644 --- a/static_core/runtime/method.cpp +++ b/static_core/runtime/method.cpp @@ -18,6 +18,7 @@ #include "runtime/entrypoints/entrypoints.h" #include "runtime/jit/profiling_data.h" #include "runtime/include/class_linker-inl.h" +#include "runtime/include/class-inl.h" #include "runtime/include/exceptions.h" #include "runtime/include/locks.h" #include "runtime/include/mem/panda_smart_pointers.h" diff --git a/static_core/runtime/methodtrace/trace.cpp b/static_core/runtime/methodtrace/trace.cpp index 7d952bee4e..e84cc2737a 100644 --- a/static_core/runtime/methodtrace/trace.cpp +++ b/static_core/runtime/methodtrace/trace.cpp @@ -36,7 +36,7 @@ static uint64_t SystemMicroSecond() { timespec current {}; clock_gettime(CLOCK_MONOTONIC, ¤t); - // NOTE(ht): Deleting OS-specific code, move to libpandabase, issue #3210 + // NOTE(ht): Deleting OS-specific code, move to libarkbase, issue #3210 return static_cast(current.tv_sec) * UINT64_C(1000000) + // 1000000 - time static_cast(current.tv_nsec) / UINT64_C(1000); // 1000 - time } @@ -45,7 +45,7 @@ static uint64_t RealTimeSecond() { timespec current {}; clock_gettime(CLOCK_REALTIME, ¤t); - // NOTE(ht): Deleting OS-specific code, move to libpandabase, issue #3210 + // NOTE(ht): Deleting OS-specific code, move to libarkbase, issue #3210 return static_cast(current.tv_sec); } @@ -60,7 +60,7 @@ static uint64_t GetCpuMicroSecond() ThreadCpuClock(threadSelf, &clockId); timespec current {}; clock_gettime(clockId, ¤t); - // NOTE(ht): Deleting OS-specific code, move to libpandabase, issue #3210 + // NOTE(ht): Deleting OS-specific code, move to libarkbase, issue #3210 return static_cast(current.tv_sec) * UINT64_C(1000000) + // 1000000 - time static_cast(current.tv_nsec) / UINT64_C(1000); // 1000 - time } diff --git a/static_core/runtime/methodtrace/trace.h b/static_core/runtime/methodtrace/trace.h index 0fb35b0485..2f856b8e4d 100644 --- a/static_core/runtime/methodtrace/trace.h +++ b/static_core/runtime/methodtrace/trace.h @@ -17,7 +17,7 @@ #define PANDA_RUNTIME_DPROFILER_TRACE_H_ #include "libarkbase/macros.h" -#include "include/mem/panda_containers.h" + #include "include/mem/panda_string.h" #include "include/mem/panda_smart_pointers.h" #include "include/runtime.h" diff --git a/static_core/runtime/monitor_pool.h b/static_core/runtime/monitor_pool.h index d4c7e7444e..7e1d082331 100644 --- a/static_core/runtime/monitor_pool.h +++ b/static_core/runtime/monitor_pool.h @@ -16,12 +16,13 @@ #define PANDA_RUNTIME_MONITOR_POOL_H_ #include "libarkbase/os/mutex.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/include/object_header.h" #include "runtime/mark_word.h" #include "runtime/mem/heap_manager.h" #include "runtime/mem/internal_allocator.h" #include "runtime/monitor.h" +#include "runtime/include/mem/panda_set.h" namespace ark { diff --git a/static_core/runtime/object_header.cpp b/static_core/runtime/object_header.cpp index 4167d203f1..cf8607374b 100644 --- a/static_core/runtime/object_header.cpp +++ b/static_core/runtime/object_header.cpp @@ -17,6 +17,7 @@ #include "libarkbase/mem/mem.h" #include "runtime/include/class.h" +#include "runtime/include/class-inl.h" #include "runtime/include/coretypes/array.h" #include "runtime/include/coretypes/class.h" #include "runtime/include/coretypes/string.h" diff --git a/static_core/runtime/osr.h b/static_core/runtime/osr.h index 88c8f522f2..9305df9ed6 100644 --- a/static_core/runtime/osr.h +++ b/static_core/runtime/osr.h @@ -17,6 +17,7 @@ #include "libarkbase/macros.h" #include "runtime/include/cframe.h" +#include "runtime/include/mem/panda_map.h" #include "runtime/interpreter/frame.h" #include "libarkbase/os/mutex.h" #include "include/method.h" diff --git a/static_core/runtime/panda_vm.cpp b/static_core/runtime/panda_vm.cpp index e814271335..79fa7843ba 100644 --- a/static_core/runtime/panda_vm.cpp +++ b/static_core/runtime/panda_vm.cpp @@ -17,6 +17,7 @@ #include "mem/lock_config_helper.h" #include "runtime/default_debugger_agent.h" +#include "runtime/include/coretypes/string.h" #include "runtime/include/runtime.h" #include "runtime/include/runtime_options.h" #include "runtime/include/runtime_notification.h" diff --git a/static_core/runtime/profilesaver/profile_dump_info.h b/static_core/runtime/profilesaver/profile_dump_info.h index 87f444c309..bba5c3df40 100644 --- a/static_core/runtime/profilesaver/profile_dump_info.h +++ b/static_core/runtime/profilesaver/profile_dump_info.h @@ -23,7 +23,10 @@ #include "libarkbase/utils/logger.h" #include "libarkfile/file.h" -#include "runtime/include/mem/panda_containers.h" +#include "runtime/include/mem/panda_vector.h" +#include "runtime/include/mem/panda_unordered_set.h" +#include "runtime/include/mem/panda_set.h" +#include "runtime/include/mem/panda_map.h" #include "runtime/include/mem/panda_smart_pointers.h" #include "runtime/include/mem/panda_string.h" diff --git a/static_core/runtime/profilesaver/profile_saver.h b/static_core/runtime/profilesaver/profile_saver.h index 143d430941..39fd36ba54 100644 --- a/static_core/runtime/profilesaver/profile_saver.h +++ b/static_core/runtime/profilesaver/profile_saver.h @@ -26,7 +26,7 @@ #include "libarkbase/macros.h" #include "libarkbase/os/mutex.h" #include "libarkbase/utils/logger.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/include/mem/panda_string.h" #include "runtime/profilesaver/profile_dump_info.h" diff --git a/static_core/runtime/profiling/profiling.h b/static_core/runtime/profiling/profiling.h index ca92a9a4c1..eb01d8209a 100644 --- a/static_core/runtime/profiling/profiling.h +++ b/static_core/runtime/profiling/profiling.h @@ -16,10 +16,9 @@ #ifndef PANDA_PROFILING_H #define PANDA_PROFILING_H -#include "libarkfile/bytecode_instruction.h" -#include +#include "libarkfile/include/source_lang_enum.h" #include "libarkbase/utils/expected.h" -#include "runtime/include/profiling_gen.h" + #include #include diff --git a/static_core/runtime/runtime.cpp b/static_core/runtime/runtime.cpp index b70ce03d4d..19933a03cf 100644 --- a/static_core/runtime/runtime.cpp +++ b/static_core/runtime/runtime.cpp @@ -34,7 +34,6 @@ #include "libarkbase/os/mem_hooks.h" #include "libarkbase/os/native_stack.h" #include "libarkbase/os/thread.h" -#include "libarkbase/utils/arena_containers.h" #include "libarkbase/utils/logger.h" #include "libarkbase/utils/dfx.h" #include "libarkbase/utils/utf.h" @@ -48,6 +47,7 @@ #include "runtime/dprofiler/dprofiler.h" #include "runtime/entrypoints/entrypoints.h" #include "runtime/include/class_linker_extension.h" +#include "runtime/include/class-inl.h" #include "runtime/include/coretypes/array-inl.h" #include "runtime/include/coretypes/string.h" #include "runtime/include/language_context.h" diff --git a/static_core/runtime/runtime_controller.cpp b/static_core/runtime/runtime_controller.cpp index 4af90aa2d9..53d443bae3 100644 --- a/static_core/runtime/runtime_controller.cpp +++ b/static_core/runtime/runtime_controller.cpp @@ -22,7 +22,7 @@ #include #include "libarkbase/utils/logger.h" -#include "runtime/include/mem/panda_containers.h" +#include "runtime/include/mem/panda_vector.h" namespace ark { diff --git a/static_core/runtime/signal_handler.h b/static_core/runtime/signal_handler.h index 4482028681..90eb510f68 100644 --- a/static_core/runtime/signal_handler.h +++ b/static_core/runtime/signal_handler.h @@ -21,7 +21,7 @@ #include #include #include -#include "runtime/include/mem/panda_containers.h" +#include "runtime/include/mem/panda_vector.h" #include "libarkbase/os/sighook.h" namespace ark { diff --git a/static_core/runtime/string_table.h b/static_core/runtime/string_table.h index 48ff5c7fab..90b994c6a7 100644 --- a/static_core/runtime/string_table.h +++ b/static_core/runtime/string_table.h @@ -19,9 +19,8 @@ #include "libarkbase/mem/mem.h" #include "libarkbase/os/mutex.h" -#include "runtime/include/coretypes/string.h" #include "runtime/include/language_context.h" -#include "runtime/include/mem/panda_containers.h" + namespace ark { diff --git a/static_core/runtime/tests/c2i_bridge_test.cpp b/static_core/runtime/tests/c2i_bridge_test.cpp index 2c7c743292..7d22700d0e 100644 --- a/static_core/runtime/tests/c2i_bridge_test.cpp +++ b/static_core/runtime/tests/c2i_bridge_test.cpp @@ -31,6 +31,7 @@ #include "runtime/include/method.h" #include "runtime/include/runtime.h" #include "runtime/include/thread.h" +#include "runtime/include/class-inl.h" #include "runtime/tests/interpreter/test_runtime_interface.h" #include "invokation_helper.h" diff --git a/static_core/runtime/tests/compilation_status_test.cpp b/static_core/runtime/tests/compilation_status_test.cpp index 89bcc80f61..382ff8de30 100644 --- a/static_core/runtime/tests/compilation_status_test.cpp +++ b/static_core/runtime/tests/compilation_status_test.cpp @@ -20,6 +20,7 @@ #include "assembly-parser.h" #include "runtime/include/method.h" #include "runtime/include/runtime.h" +#include "runtime/include/class-inl.h" #include "runtime/compiler.h" diff --git a/static_core/runtime/tests/compiler_thread_pool.cpp b/static_core/runtime/tests/compiler_thread_pool.cpp index da3e126d0f..efd69d026b 100644 --- a/static_core/runtime/tests/compiler_thread_pool.cpp +++ b/static_core/runtime/tests/compiler_thread_pool.cpp @@ -20,6 +20,7 @@ #include "assembly-parser.h" #include "runtime/include/method.h" #include "runtime/include/runtime.h" +#include "runtime/include/class-inl.h" #include "runtime/compiler.h" diff --git a/static_core/runtime/tests/exception_test.cpp b/static_core/runtime/tests/exception_test.cpp index 67b5274a18..8c6480b9ff 100644 --- a/static_core/runtime/tests/exception_test.cpp +++ b/static_core/runtime/tests/exception_test.cpp @@ -22,6 +22,7 @@ #include "runtime/entrypoints/entrypoints.h" #include "runtime/include/method.h" #include "runtime/include/runtime.h" +#include "runtime/include/class-inl.h" namespace ark::test { diff --git a/static_core/runtime/tests/interpreter_test_resolve_ctor_class.cpp b/static_core/runtime/tests/interpreter_test_resolve_ctor_class.cpp index 5d0b1ead6b..2276913dfb 100644 --- a/static_core/runtime/tests/interpreter_test_resolve_ctor_class.cpp +++ b/static_core/runtime/tests/interpreter_test_resolve_ctor_class.cpp @@ -35,6 +35,7 @@ #include "libarkfile/value.h" #include "runtime/bridge/bridge.h" #include "runtime/include/class_linker.h" +#include "runtime/include/class-inl.h" #include "runtime/include/compiler_interface.h" #include "runtime/include/mem/allocator.h" #include "runtime/include/method.h" diff --git a/static_core/runtime/tests/interpreter_test_resolve_field.cpp b/static_core/runtime/tests/interpreter_test_resolve_field.cpp index 643affad22..31e68cec42 100644 --- a/static_core/runtime/tests/interpreter_test_resolve_field.cpp +++ b/static_core/runtime/tests/interpreter_test_resolve_field.cpp @@ -36,6 +36,7 @@ #include "libarkfile/value.h" #include "runtime/bridge/bridge.h" #include "runtime/include/class_linker.h" +#include "runtime/include/class-inl.h" #include "runtime/include/compiler_interface.h" #include "runtime/include/mem/allocator.h" #include "runtime/include/method.h" diff --git a/static_core/runtime/tests/interpreter_test_switch.cpp b/static_core/runtime/tests/interpreter_test_switch.cpp index ff26483379..a72c9206ba 100644 --- a/static_core/runtime/tests/interpreter_test_switch.cpp +++ b/static_core/runtime/tests/interpreter_test_switch.cpp @@ -20,6 +20,7 @@ #include "libarkfile/bytecode_instruction.h" #include "include/thread_scopes.h" #include "libarkfile/bytecode_instruction-inl.h" +#include "runtime/include/class-inl.h" #include "runtime/include/managed_thread.h" #include "runtime/include/runtime.h" #include "runtime/include/runtime_notification.h" diff --git a/static_core/runtime/tests/method_test.cpp b/static_core/runtime/tests/method_test.cpp index 15835efada..353936794a 100644 --- a/static_core/runtime/tests/method_test.cpp +++ b/static_core/runtime/tests/method_test.cpp @@ -24,6 +24,7 @@ #include "runtime/entrypoints/entrypoints.h" #include "runtime/include/compiler_interface.h" #include "runtime/include/method-inl.h" +#include "runtime/include/class-inl.h" #include "runtime/include/runtime.h" namespace ark::test { diff --git a/static_core/runtime/tests/object_helpers_test.cpp b/static_core/runtime/tests/object_helpers_test.cpp index 7b1a8459d0..9c88ddb955 100644 --- a/static_core/runtime/tests/object_helpers_test.cpp +++ b/static_core/runtime/tests/object_helpers_test.cpp @@ -20,6 +20,7 @@ #include "runtime/include/panda_vm.h" #include "runtime/include/class_linker.h" #include "runtime/include/thread_scopes.h" +#include "runtime/include/object_accessor-inl.h" #include "runtime/mem/vm_handle.h" #include "runtime/handle_scope-inl.h" #include "runtime/include/coretypes/array.h" diff --git a/static_core/runtime/tests/osr_code_test.cpp b/static_core/runtime/tests/osr_code_test.cpp index 6b4e848ea6..57b64d2800 100644 --- a/static_core/runtime/tests/osr_code_test.cpp +++ b/static_core/runtime/tests/osr_code_test.cpp @@ -20,6 +20,7 @@ #include "assembly-parser.h" #include "runtime/include/method.h" #include "runtime/include/runtime.h" +#include "runtime/include/class-inl.h" #include "runtime/compiler.h" diff --git a/static_core/runtime/tests/panda_tl_containers_test.cpp b/static_core/runtime/tests/panda_tl_containers_test.cpp index e2753d5c60..7867369f96 100644 --- a/static_core/runtime/tests/panda_tl_containers_test.cpp +++ b/static_core/runtime/tests/panda_tl_containers_test.cpp @@ -15,7 +15,7 @@ #include "gtest/gtest.h" #include "runtime/include/runtime.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/mem/runslots_allocator-inl.h" namespace ark::mem::test { diff --git a/static_core/runtime/tests/stack_walker_test.cpp b/static_core/runtime/tests/stack_walker_test.cpp index 4d97c70200..6f59a14533 100644 --- a/static_core/runtime/tests/stack_walker_test.cpp +++ b/static_core/runtime/tests/stack_walker_test.cpp @@ -27,6 +27,7 @@ #include "runtime/bridge/bridge.h" #include "runtime/include/runtime.h" #include "runtime/include/stack_walker-inl.h" +#include "runtime/include/class-inl.h" #include "runtime/include/thread_scopes.h" #include "runtime/mem/refstorage/global_object_storage.h" #include "runtime/tests/test_utils.h" diff --git a/static_core/runtime/tests/static_analyzer_test.cpp b/static_core/runtime/tests/static_analyzer_test.cpp index c9bebeba09..a867c8ecac 100644 --- a/static_core/runtime/tests/static_analyzer_test.cpp +++ b/static_core/runtime/tests/static_analyzer_test.cpp @@ -24,6 +24,7 @@ #include "runtime/handle_scope-inl.h" #include "runtime/include/coretypes/array.h" #include "runtime/include/coretypes/line_string.h" +#include "runtime/include/object_accessor-inl.h" #include "runtime/mem/object_helpers-inl.h" namespace ark::mem { diff --git a/static_core/runtime/thread.cpp b/static_core/runtime/thread.cpp index 36ececf10f..d989e9d605 100644 --- a/static_core/runtime/thread.cpp +++ b/static_core/runtime/thread.cpp @@ -19,6 +19,7 @@ #include "runtime/include/thread-inl.h" #include "libarkbase/os/stacktrace.h" +#include "libarkbase/mem/weighted_adaptive_tlab_average.h" #include "runtime/handle_base-inl.h" #include "runtime/include/locks.h" #include "runtime/include/object_header-inl.h" @@ -31,6 +32,7 @@ #include "runtime/handle_scope-inl.h" #include "runtime/mem/object_helpers.h" #include "tooling/pt_thread_info.h" + #include "runtime/mem/runslots_allocator-inl.h" #include diff --git a/static_core/runtime/thread_manager.h b/static_core/runtime/thread_manager.h index 144f764378..4f131b932e 100644 --- a/static_core/runtime/thread_manager.h +++ b/static_core/runtime/thread_manager.h @@ -21,7 +21,7 @@ #include "libarkbase/utils/time.h" #include "libarkbase/os/time.h" #include "runtime/include/coretypes/array-inl.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/include/mem/panda_smart_pointers.h" #include "runtime/include/mtmanaged_thread.h" #include "runtime/include/thread_status.h" diff --git a/static_core/runtime/thread_pool.h b/static_core/runtime/thread_pool.h index e624d79d61..1c1155e70c 100644 --- a/static_core/runtime/thread_pool.h +++ b/static_core/runtime/thread_pool.h @@ -20,7 +20,7 @@ #include "libarkbase/os/mutex.h" #include "libarkbase/os/thread.h" #include "runtime/include/mem/allocator.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/thread_pool_queue.h" static constexpr uint64_t TASK_WAIT_TIMEOUT = 500U; diff --git a/static_core/runtime/timing.cpp b/static_core/runtime/timing.cpp index efedfcfb55..de6a77cf2a 100644 --- a/static_core/runtime/timing.cpp +++ b/static_core/runtime/timing.cpp @@ -14,6 +14,8 @@ */ #include "runtime/timing.h" +#include "runtime/include/mem/panda_stack.h" +#include "runtime/include/mem/panda_vector.h" #include diff --git a/static_core/runtime/timing.h b/static_core/runtime/timing.h index 211fe8e66a..6208d83f06 100644 --- a/static_core/runtime/timing.h +++ b/static_core/runtime/timing.h @@ -22,7 +22,7 @@ #include "libarkbase/os/time.h" #include "libarkbase/utils/time.h" -#include "runtime/include/mem/panda_containers.h" +#include "runtime/include/mem/panda_vector.h" #include "runtime/include/mem/panda_string.h" namespace ark { diff --git a/static_core/runtime/tooling/debugger.h b/static_core/runtime/tooling/debugger.h index e1ddf43eef..dbd0e62633 100644 --- a/static_core/runtime/tooling/debugger.h +++ b/static_core/runtime/tooling/debugger.h @@ -21,7 +21,7 @@ #include #include -#include "include/mem/panda_containers.h" + #include "include/mem/panda_smart_pointers.h" #include "include/method.h" #include "include/panda_vm.h" diff --git a/static_core/runtime/tooling/evaluation/expression_loader.cpp b/static_core/runtime/tooling/evaluation/expression_loader.cpp index f2e4d56b4a..480691b4bf 100644 --- a/static_core/runtime/tooling/evaluation/expression_loader.cpp +++ b/static_core/runtime/tooling/evaluation/expression_loader.cpp @@ -18,6 +18,7 @@ #include "libarkbase/utils/span.h" #include "libarkfile/class_data_accessor.h" #include "runtime/include/runtime.h" +#include "runtime/include/class-inl.h" namespace ark::tooling { diff --git a/static_core/runtime/tooling/memory_allocation_dumper.h b/static_core/runtime/tooling/memory_allocation_dumper.h index af577cdafa..91c59f9b75 100644 --- a/static_core/runtime/tooling/memory_allocation_dumper.h +++ b/static_core/runtime/tooling/memory_allocation_dumper.h @@ -21,12 +21,12 @@ #include "pt_hooks_wrapper.h" #include "include/mem/panda_smart_pointers.h" -#include "include/mem/panda_containers.h" + #include "include/runtime_notification.h" #include "include/tooling/debug_interface.h" #include "libarkbase/os/mutex.h" #include "libarkbase/utils/span.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/include/method.h" #include "runtime/include/runtime.h" #include "runtime/include/panda_vm.h" diff --git a/static_core/runtime/tooling/pt_default_lang_extension.cpp b/static_core/runtime/tooling/pt_default_lang_extension.cpp index 0f09fd832b..6cf4bbac22 100644 --- a/static_core/runtime/tooling/pt_default_lang_extension.cpp +++ b/static_core/runtime/tooling/pt_default_lang_extension.cpp @@ -21,6 +21,7 @@ #include "include/object_header.h" #include "include/hclass.h" #include "runtime/mem/object_helpers-inl.h" +#include "runtime/include/object_header-inl.h" #include "runtime/include/coretypes/string.h" #include "runtime/include/runtime.h" diff --git a/static_core/runtime/tooling/sampler/sampling_profiler.h b/static_core/runtime/tooling/sampler/sampling_profiler.h index ffc1163b1c..9647cd7062 100644 --- a/static_core/runtime/tooling/sampler/sampling_profiler.h +++ b/static_core/runtime/tooling/sampler/sampling_profiler.h @@ -23,7 +23,7 @@ #include "libarkbase/os/pipe.h" #include "runtime/include/panda_vm.h" #include "runtime/include/runtime_notification.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/tooling/sampler/sample_info.h" #include "runtime/tooling/sampler/sample_writer.h" diff --git a/static_core/runtime/vtable_builder_base.cpp b/static_core/runtime/vtable_builder_base.cpp index 1fd4e3de02..2f72876454 100644 --- a/static_core/runtime/vtable_builder_base.cpp +++ b/static_core/runtime/vtable_builder_base.cpp @@ -14,6 +14,7 @@ */ #include "runtime/include/vtable_builder_base-inl.h" +#include "runtime/include/class-inl.h" namespace ark { diff --git a/static_core/scripts/sdk/headers.txt b/static_core/scripts/sdk/headers.txt index c4a358560d..8b30f29285 100644 --- a/static_core/scripts/sdk/headers.txt +++ b/static_core/scripts/sdk/headers.txt @@ -8,4 +8,5 @@ plugins/ets runtime third_party/utils_native/base/include verification/public.h +tools/es2panda/public/contextState.h tools/es2panda/public/es2panda_lib.h diff --git a/static_core/tools/ark_js_napi_cli/ark_hz/ark_js_runtime.cpp b/static_core/tools/ark_js_napi_cli/ark_hz/ark_js_runtime.cpp index 7c4182863f..947ed7a14e 100644 --- a/static_core/tools/ark_js_napi_cli/ark_hz/ark_js_runtime.cpp +++ b/static_core/tools/ark_js_napi_cli/ark_hz/ark_js_runtime.cpp @@ -16,7 +16,7 @@ #include "ark_hz/ark_js_runtime.h" #include #include "ark_js_runtime.h" -#include "utils/utils.h" +#include "libarkbase/utils/utils.h" #include "ecmascript/base/string_helper.h" #include "ecmascript/napi/include/jsnapi.h" diff --git a/static_core/tools/ark_js_napi_cli/js_runtime.cpp b/static_core/tools/ark_js_napi_cli/js_runtime.cpp index 818e3199b3..3f57311b4a 100755 --- a/static_core/tools/ark_js_napi_cli/js_runtime.cpp +++ b/static_core/tools/ark_js_napi_cli/js_runtime.cpp @@ -16,7 +16,7 @@ #include "js_runtime.h" #include "ark_hz/ark_js_runtime.h" -#include "utils/utils.h" +#include "libarkbase/utils/utils.h" #include diff --git a/static_core/tools/ark_js_napi_cli/js_runtime.h b/static_core/tools/ark_js_napi_cli/js_runtime.h index 8b29d448fc..1018ff53ff 100755 --- a/static_core/tools/ark_js_napi_cli/js_runtime.h +++ b/static_core/tools/ark_js_napi_cli/js_runtime.h @@ -21,7 +21,7 @@ #include #include -#include "libpandabase/utils/pandargs.h" +#include "libarkbase/utils/pandargs.h" #include "native_engine/native_engine.h" namespace panda { diff --git a/static_core/tools/ark_js_napi_cli/utils/utils.cpp b/static_core/tools/ark_js_napi_cli/utils/utils.cpp index 2878db2fc5..9366dc9b4a 100644 --- a/static_core/tools/ark_js_napi_cli/utils/utils.cpp +++ b/static_core/tools/ark_js_napi_cli/utils/utils.cpp @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "utils/utils.h" +#include "libarkbase/utils/utils.h" #include #include diff --git a/static_core/verification/absint/abs_int_inl.h b/static_core/verification/absint/abs_int_inl.h index 6d35ed2525..5ecc32e7c5 100644 --- a/static_core/verification/absint/abs_int_inl.h +++ b/static_core/verification/absint/abs_int_inl.h @@ -18,7 +18,7 @@ #include "abs_int_inl_compat_checks.h" #include "libarkfile/file_items.h" -#include "include/mem/panda_containers.h" + #include "include/method.h" #include "include/runtime.h" #include "libarkfile/type_helper.h" diff --git a/static_core/verification/absint/exec_context.h b/static_core/verification/absint/exec_context.h index 0ed762d0c5..8c05a59454 100644 --- a/static_core/verification/absint/exec_context.h +++ b/static_core/verification/absint/exec_context.h @@ -21,7 +21,7 @@ #include "util/addr_map.h" #include "util/hash.h" -#include "include/mem/panda_containers.h" + namespace ark::verifier { diff --git a/static_core/verification/cache/file_entity_cache.h b/static_core/verification/cache/file_entity_cache.h index e3cd8101b9..1fac21c05c 100644 --- a/static_core/verification/cache/file_entity_cache.h +++ b/static_core/verification/cache/file_entity_cache.h @@ -23,7 +23,7 @@ #include "libarkfile/file.h" -#include "runtime/include/mem/panda_containers.h" + #include #include diff --git a/static_core/verification/cache/results_cache.cpp b/static_core/verification/cache/results_cache.cpp index 7c68ce0664..7de029bce2 100644 --- a/static_core/verification/cache/results_cache.cpp +++ b/static_core/verification/cache/results_cache.cpp @@ -18,7 +18,7 @@ #include "runtime/include/runtime.h" #include "runtime/include/mem/allocator.h" -#include "runtime/include/mem/panda_containers.h" + #include "libarkbase/os/file.h" #include "libarkbase/utils/logger.h" diff --git a/static_core/verification/cflow/cflow_info.h b/static_core/verification/cflow/cflow_info.h index 249aa7b502..f2c9327ce2 100644 --- a/static_core/verification/cflow/cflow_info.h +++ b/static_core/verification/cflow/cflow_info.h @@ -20,7 +20,7 @@ #include "verification/verification_status.h" #include "runtime/include/class.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/include/mem/panda_smart_pointers.h" #include diff --git a/static_core/verification/config/context/context.h b/static_core/verification/config/context/context.h index 36154ef38c..3313a520fd 100644 --- a/static_core/verification/config/context/context.h +++ b/static_core/verification/config/context/context.h @@ -22,7 +22,7 @@ #include "verification/util/callable.h" #include "verification/util/synchronized.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/include/mem/panda_string.h" #include diff --git a/static_core/verification/config/handlers/config_handler_method_options.cpp b/static_core/verification/config/handlers/config_handler_method_options.cpp index cc7cdcea70..fe296a2a1a 100644 --- a/static_core/verification/config/handlers/config_handler_method_options.cpp +++ b/static_core/verification/config/handlers/config_handler_method_options.cpp @@ -27,7 +27,7 @@ #include "literal_parser.h" #include "runtime/include/mem/panda_string.h" -#include "runtime/include/mem/panda_containers.h" + #include "libarkbase/utils/logger.h" diff --git a/static_core/verification/config/handlers/config_handler_options.cpp b/static_core/verification/config/handlers/config_handler_options.cpp index a9e201534c..10724c3ad2 100644 --- a/static_core/verification/config/handlers/config_handler_options.cpp +++ b/static_core/verification/config/handlers/config_handler_options.cpp @@ -25,7 +25,7 @@ #include "runtime/include/method.h" #include "runtime/include/runtime.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/include/mem/panda_string.h" #include "libarkbase/utils/logger.h" diff --git a/static_core/verification/config/handlers/literal_parser.h b/static_core/verification/config/handlers/literal_parser.h index d193156f68..8e9346eff8 100644 --- a/static_core/verification/config/handlers/literal_parser.h +++ b/static_core/verification/config/handlers/literal_parser.h @@ -16,7 +16,7 @@ #ifndef PANDA_VERIFIER_DEBUG_LITERAL_PARSER_H_ #define PANDA_VERIFIER_DEBUG_LITERAL_PARSER_H_ -#include "runtime/include/mem/panda_containers.h" + #include "runtime/include/mem/panda_string.h" #include "verification/util/parser/parser.h" diff --git a/static_core/verification/config/options/method_options.h b/static_core/verification/config/options/method_options.h index 58d96833fc..1b875fc67e 100644 --- a/static_core/verification/config/options/method_options.h +++ b/static_core/verification/config/options/method_options.h @@ -16,7 +16,8 @@ #ifndef PANDA_VERIFIER_DEBUG_OPTIONS_METHOD_OPTIONS_H_ #define PANDA_VERIFIER_DEBUG_OPTIONS_METHOD_OPTIONS_H_ -#include "runtime/include/mem/panda_containers.h" +#include "runtime/include/mem/panda_vector.h" +#include "runtime/include/mem/panda_unordered_map.h" #include "runtime/include/mem/panda_string.h" #include "verification/util/flags.h" #include "verification/util/saturated_enum.h" diff --git a/static_core/verification/config/options/msg_set_parser.h b/static_core/verification/config/options/msg_set_parser.h index 6b2a325ea4..5d02c9a8fd 100644 --- a/static_core/verification/config/options/msg_set_parser.h +++ b/static_core/verification/config/options/msg_set_parser.h @@ -16,7 +16,7 @@ #ifndef PANDA_VERIFIER_DEBUG_MSG_SET_PARSER_H_ #define PANDA_VERIFIER_DEBUG_MSG_SET_PARSER_H_ -#include "runtime/include/mem/panda_containers.h" + #include "verification/util/parser/parser.h" #include "verifier_messages.h" diff --git a/static_core/verification/jobs/service.h b/static_core/verification/jobs/service.h index dac6974e0f..b51401cdd1 100644 --- a/static_core/verification/jobs/service.h +++ b/static_core/verification/jobs/service.h @@ -17,7 +17,7 @@ #define PANDA_VERIFIER_JOBS_SERVICE_H #include "libarkfile/include/source_lang_enum.h" -#include "runtime/include/mem/panda_containers.h" + #include "verification/type/type_system.h" diff --git a/static_core/verification/type/type_system.h b/static_core/verification/type/type_system.h index d9ab2f63a3..189c4d5688 100644 --- a/static_core/verification/type/type_system.h +++ b/static_core/verification/type/type_system.h @@ -20,7 +20,7 @@ #include "runtime/include/class.h" #include "runtime/include/language_context.h" #include "runtime/include/method.h" -#include "runtime/include/mem/panda_containers.h" + #include "verification/type/type_type.h" #include "verification/value/variables.h" diff --git a/static_core/verification/type/type_type.cpp b/static_core/verification/type/type_type.cpp index 59c9b3ab4f..f5d3520735 100644 --- a/static_core/verification/type/type_type.cpp +++ b/static_core/verification/type/type_type.cpp @@ -17,6 +17,8 @@ #include "verification/type/type_system.h" #include "verification/util/mem.h" +#include "runtime/include/class-inl.h" + namespace ark::verifier { using Builtin = Type::Builtin; diff --git a/static_core/verification/util/panda_or_std.h b/static_core/verification/util/panda_or_std.h index 7d3e8a5409..a704815329 100644 --- a/static_core/verification/util/panda_or_std.h +++ b/static_core/verification/util/panda_or_std.h @@ -19,7 +19,7 @@ #ifdef PANDA_RAPIDCHECK #include #else -#include "runtime/include/mem/panda_containers.h" + #include "runtime/include/mem/panda_smart_pointers.h" #endif diff --git a/static_core/verification/util/shifted_vector.h b/static_core/verification/util/shifted_vector.h index 68b047fe44..bfcb62db2a 100644 --- a/static_core/verification/util/shifted_vector.h +++ b/static_core/verification/util/shifted_vector.h @@ -16,7 +16,7 @@ #ifndef PANDA_VERIFIER_UTIL_SHIFTED_VECTOR_H_ #define PANDA_VERIFIER_UTIL_SHIFTED_VECTOR_H_ -#include "runtime/include/mem/panda_containers.h" + namespace ark::verifier { diff --git a/static_core/verification/value/variables.h b/static_core/verification/value/variables.h index 463fe4f04c..e6461f271f 100644 --- a/static_core/verification/value/variables.h +++ b/static_core/verification/value/variables.h @@ -18,7 +18,7 @@ #include "verification/util/lazy.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/include/mem/panda_string.h" #include "util/str.h" diff --git a/static_core/verification/verification_options.h b/static_core/verification/verification_options.h index 245d004447..74b2c970c4 100644 --- a/static_core/verification/verification_options.h +++ b/static_core/verification/verification_options.h @@ -17,7 +17,7 @@ #define PANDA_VERIFICATION_OPTIONS_H_ #include "verification/public.h" -#include "runtime/include/mem/panda_containers.h" + #include "runtime/include/mem/panda_string.h" #include "verification/config/options/method_options_config.h" -- Gitee