RPNXCortado
C++23 JVM class-file, bytecode, validation, and JAR toolkit
Loading...
Searching...
No Matches
builders.hpp File Reference

Deterministic constant-pool and symbolic class-file builders. More...

#include <cstddef>
#include <cstdint>
#include <limits>
#include <map>
#include <optional>
#include <rpnx/cortado/class_file.hpp>
#include <rpnx/cortado/descriptors.hpp>
#include <string>
#include <string_view>
#include <variant>
#include <vector>

Go to the source code of this file.

Classes

struct  rpnx::cortado::label_owner
 Unique ownership token for labels created by one code_builder lineage. More...
 
struct  rpnx::cortado::label
 A symbolic bytecode position owned by one code_builder. More...
 
struct  rpnx::cortado::label_binding
 A label binding in symbolic code. More...
 
struct  rpnx::cortado::labeled_branch_instruction< Operation >
 A branch whose target is a symbolic label. More...
 
struct  rpnx::cortado::labeled_lookup_switch_pair
 One symbolic lookupswitch match and target. More...
 
struct  rpnx::cortado::labeled_tableswitch_instruction
 A symbolic tableswitch. More...
 
struct  rpnx::cortado::labeled_lookupswitch_instruction
 A symbolic lookupswitch. More...
 
struct  rpnx::cortado::labeled_exception_handler
 A symbolic exception-table range. More...
 
struct  rpnx::cortado::labeled_line_number
 A symbolic source line binding. More...
 
struct  rpnx::cortado::labeled_local_variable
 A symbolic local-variable scope. More...
 
struct  rpnx::cortado::labeled_local_variable_type
 A symbolic generic local-variable signature scope. More...
 
struct  rpnx::cortado::symbolic_field_instruction< Operation >
 A symbolic field-access instruction. More...
 
struct  rpnx::cortado::symbolic_method_instruction< Operation >
 A symbolic class or interface method invocation instruction. More...
 
struct  rpnx::cortado::symbolic_invokeinterface_instruction
 A symbolic interface-method invocation instruction. More...
 
struct  rpnx::cortado::symbolic_class_instruction< Operation >
 A symbolic class-reference instruction. More...
 
struct  rpnx::cortado::symbolic_string_instruction
 A symbolic string ldc instruction. More...
 
class  rpnx::cortado::constant_pool_builder
 Interns constant-pool entries while retaining deterministic first-insertion order. More...
 
class  rpnx::cortado::class_hierarchy_resolver_ref
 Non-owning type-erased class-hierarchy resolver used for reference merges. More...
 
struct  rpnx::cortado::code_build_options
 Controls automatic Code metadata generation. More...
 
struct  rpnx::cortado::code_build_context
 Method context needed to finalize symbolic code. More...
 
class  rpnx::cortado::code_builder
 An owning symbolic JVM code builder. More...
 
class  rpnx::cortado::class_file_builder
 An owning symbolic class-file builder with a shared constant-pool interner. More...
 

Namespaces

namespace  rpnx::cortado
 JVM class-file, bytecode, validation, generation, and JAR APIs.
 

Typedefs

using rpnx::cortado::assembly_element = std::variant< instruction, label_binding, labeled_branch_instruction< opcode::ifeq >, labeled_branch_instruction< opcode::ifne >, labeled_branch_instruction< opcode::iflt >, labeled_branch_instruction< opcode::ifge >, labeled_branch_instruction< opcode::ifgt >, labeled_branch_instruction< opcode::ifle >, labeled_branch_instruction< opcode::if_icmpeq >, labeled_branch_instruction< opcode::if_icmpne >, labeled_branch_instruction< opcode::if_icmplt >, labeled_branch_instruction< opcode::if_icmpge >, labeled_branch_instruction< opcode::if_icmpgt >, labeled_branch_instruction< opcode::if_icmple >, labeled_branch_instruction< opcode::if_acmpeq >, labeled_branch_instruction< opcode::if_acmpne >, labeled_branch_instruction< opcode::goto_ >, labeled_branch_instruction< opcode::jsr >, labeled_branch_instruction< opcode::ifnull >, labeled_branch_instruction< opcode::ifnonnull >, labeled_tableswitch_instruction, labeled_lookupswitch_instruction, symbolic_field_instruction< opcode::getstatic >, symbolic_field_instruction< opcode::putstatic >, symbolic_field_instruction< opcode::getfield >, symbolic_field_instruction< opcode::putfield >, symbolic_method_instruction< opcode::invokevirtual >, symbolic_method_instruction< opcode::invokespecial >, symbolic_method_instruction< opcode::invokestatic >, symbolic_invokeinterface_instruction, symbolic_class_instruction< opcode::new_ >, symbolic_class_instruction< opcode::anewarray >, symbolic_class_instruction< opcode::checkcast >, symbolic_class_instruction< opcode::instanceof_ >, symbolic_string_instruction >
 Every element accepted by code_builder before lowering.
 

Enumerations

enum class  rpnx::cortado::method_owner_kind : std::uint8_t { class_ , interface }
 Selects the constant-pool owner kind for a symbolic method reference. More...
 

Detailed Description

Deterministic constant-pool and symbolic class-file builders.

Definition in file builders.hpp.