bool VMInterface::setVmAdapter()

in vm/jitrino/src/vm/VMInterface.cpp [244:430]


    bool VMInterface::setVmAdapter(vm_adaptor_t a) {
        vm = a;
        allocation_handle_get_class = GET_INTERFACE(vm, allocation_handle_get_class);

        //Class
        class_get_array_element_class = GET_INTERFACE(vm, class_get_array_element_class);
        class_get_array_element_size = GET_INTERFACE(vm, class_get_array_element_size); 
        class_get_array_of_class = GET_INTERFACE(vm, class_get_array_of_class);
        class_is_non_ref_array = GET_INTERFACE(vm, class_is_non_ref_array);
        class_get_name = GET_INTERFACE(vm, class_get_name);
        class_get_super_class = GET_INTERFACE(vm, class_get_super_class);
        class_get_depth = GET_INTERFACE(vm, class_get_depth);
        class_get_vtable = GET_INTERFACE(vm, class_get_vtable);
        class_get_allocation_handle = GET_INTERFACE(vm, class_get_allocation_handle);
        class_get_object_size = GET_INTERFACE(vm, class_get_object_size);
        class_cp_get_num_array_dimensions = GET_INTERFACE(vm, class_cp_get_num_array_dimensions);
        class_get_class_of_primitive_type = GET_INTERFACE(vm, class_get_class_of_primitive_type);
        class_get_const_string_intern_addr = GET_INTERFACE(vm, class_get_const_string_intern_addr);
        class_cp_get_const_type = GET_INTERFACE(vm, class_cp_get_const_type);
        class_cp_get_const_addr = GET_INTERFACE(vm, class_cp_get_const_addr);
        class_get_method_by_name = GET_INTERFACE(vm, class_get_method_by_name);
        class_get_field_by_name = GET_INTERFACE(vm, class_get_field_by_name);
        class_get_class_loader = GET_INTERFACE(vm, class_get_class_loader);

        class_is_array = GET_INTERFACE(vm, class_is_array);
        class_is_enum = GET_INTERFACE(vm, class_is_enum);
        class_is_final = GET_INTERFACE(vm, class_is_final);
        class_is_throwable = GET_INTERFACE(vm, class_is_throwable);
        class_is_interface = GET_INTERFACE(vm, class_is_interface);
        class_is_abstract = GET_INTERFACE(vm, class_is_abstract);
        class_is_initialized = GET_INTERFACE(vm, class_is_initialized);
        class_is_finalizable = GET_INTERFACE(vm, class_is_finalizable);
        class_is_instanceof = GET_INTERFACE(vm, class_is_instanceof);
        class_is_support_fast_instanceof = GET_INTERFACE(vm, class_is_support_fast_instanceof);
        class_is_primitive = GET_INTERFACE(vm, class_is_primitive);

        vm_lookup_class_with_bootstrap = GET_INTERFACE(vm, vm_lookup_class_with_bootstrap);
        class_lookup_method_recursively = GET_INTERFACE(vm, class_lookup_method_recursively);

        // Const Pool
        class_cp_get_field_type = GET_INTERFACE(vm, class_cp_get_field_type);
        class_cp_get_entry_class_name = GET_INTERFACE(vm, class_cp_get_entry_class_name);
        class_cp_get_entry_name = GET_INTERFACE(vm, class_cp_get_entry_name);
        class_cp_get_entry_descriptor = GET_INTERFACE(vm, class_cp_get_entry_descriptor);
        class_cp_is_entry_resolved = GET_INTERFACE(vm, class_cp_is_entry_resolved);
        class_cp_get_class_name = GET_INTERFACE(vm, class_cp_get_class_name);


        //Field

        field_get_address = GET_INTERFACE(vm, field_get_address);
        field_get_class = GET_INTERFACE(vm, field_get_class);
        field_get_descriptor = GET_INTERFACE(vm, field_get_descriptor);
        field_get_name = GET_INTERFACE(vm, field_get_name);
        field_get_offset = GET_INTERFACE(vm, field_get_offset);
        field_get_type_info = GET_INTERFACE(vm, field_get_type_info);
        field_is_final = GET_INTERFACE(vm, field_is_final);
        field_is_magic = GET_INTERFACE(vm, field_is_magic);
        field_is_private = GET_INTERFACE(vm, field_is_private);
        field_is_static = GET_INTERFACE(vm, field_is_static);
        field_is_volatile = GET_INTERFACE(vm, field_is_volatile);

        //Method

        method_get_overriding_method = GET_INTERFACE(vm, method_get_overriding_method);
        method_get_info_block_jit = GET_INTERFACE(vm, method_get_info_block_jit);
        method_get_info_block_size_jit = GET_INTERFACE(vm, method_get_info_block_size_jit);
        method_get_name = GET_INTERFACE(vm, method_get_name);
        method_get_descriptor = GET_INTERFACE(vm, method_get_descriptor);
        method_get_bytecode = GET_INTERFACE(vm, method_get_bytecode);
        method_get_bytecode_length = GET_INTERFACE(vm, method_get_bytecode_length);
        method_get_max_stack = GET_INTERFACE(vm, method_get_max_stack);
        method_get_exc_handler_number = GET_INTERFACE(vm, method_get_exc_handler_number);
        method_get_vtable_offset = GET_INTERFACE(vm, method_get_vtable_offset);
        method_get_indirect_address = GET_INTERFACE(vm, method_get_indirect_address);
        method_get_native_func_addr = GET_INTERFACE(vm, method_get_native_func_addr);
        method_get_max_locals = GET_INTERFACE(vm, method_get_max_locals);
        method_args_get_number = GET_INTERFACE(vm, method_args_get_number);
        method_args_get_type_info = GET_INTERFACE(vm, method_args_get_type_info);
        method_ret_type_get_type_info = GET_INTERFACE(vm, method_ret_type_get_type_info);
        method_get_signature = GET_INTERFACE(vm, method_get_signature);
        method_get_class = GET_INTERFACE(vm, method_get_class);
        method_get_exc_handler_info = GET_INTERFACE(vm, method_get_exc_handler_info);
        method_get_code_block_addr_jit_new = GET_INTERFACE(vm, method_get_code_block_addr_jit_new);
        method_get_code_block_size_jit_new = GET_INTERFACE(vm, method_get_code_block_size_jit_new);
        method_get_side_effects = GET_INTERFACE(vm, method_get_side_effects);

        method_has_annotation = GET_INTERFACE(vm, method_has_annotation);
        method_is_private = GET_INTERFACE(vm, method_is_private);
        method_is_static = GET_INTERFACE(vm, method_is_static);
        method_is_native = GET_INTERFACE(vm, method_is_native);
        method_is_synchronized = GET_INTERFACE(vm, method_is_synchronized);
        method_is_final = GET_INTERFACE(vm, method_is_final);
        method_is_abstract = GET_INTERFACE(vm, method_is_abstract);
        method_is_strict = GET_INTERFACE(vm, method_is_strict);
        method_is_no_inlining = GET_INTERFACE(vm, method_is_no_inlining);


        method_set_side_effects = GET_INTERFACE(vm, method_set_side_effects);
        method_set_num_target_handlers = GET_INTERFACE(vm, method_set_num_target_handlers);
        method_set_target_handler_info = GET_INTERFACE(vm, method_set_target_handler_info);

        method_lock = GET_INTERFACE(vm, method_lock);
        method_unlock = GET_INTERFACE(vm, method_unlock);

        method_allocate_code_block = GET_INTERFACE(vm, method_allocate_code_block);
        method_allocate_data_block = GET_INTERFACE(vm, method_allocate_data_block);
        method_allocate_info_block = GET_INTERFACE(vm, method_allocate_info_block);
        method_allocate_jit_data_block = GET_INTERFACE(vm, method_allocate_jit_data_block);


        //Object
        object_get_vtable_offset = GET_INTERFACE(vm, object_get_vtable_offset);


        //Resolve
        resolve_class = GET_INTERFACE(vm, resolve_class);
        resolve_class_new = GET_INTERFACE(vm, resolve_class_new);
        resolve_special_method = GET_INTERFACE(vm, resolve_special_method);
        resolve_interface_method = GET_INTERFACE(vm, resolve_interface_method);
        resolve_static_method = GET_INTERFACE(vm, resolve_static_method);
        resolve_virtual_method = GET_INTERFACE(vm, resolve_virtual_method);
        resolve_nonstatic_field = GET_INTERFACE(vm, resolve_nonstatic_field);
        resolve_static_field = GET_INTERFACE(vm, resolve_static_field);

        //Type Info

        type_info_create_from_java_descriptor = GET_INTERFACE(vm, type_info_create_from_java_descriptor);
        type_info_get_type_name = GET_INTERFACE(vm, type_info_get_type_name);
        type_info_get_class = GET_INTERFACE(vm, type_info_get_class);
        type_info_get_class_no_exn = GET_INTERFACE(vm, type_info_get_class_no_exn);
        type_info_get_num_array_dimensions = GET_INTERFACE(vm, type_info_get_num_array_dimensions);
        type_info_get_type_info = GET_INTERFACE(vm, type_info_get_type_info);

        type_info_is_void = GET_INTERFACE(vm, type_info_is_void);
        type_info_is_reference = GET_INTERFACE(vm, type_info_is_reference);
        type_info_is_resolved = GET_INTERFACE(vm, type_info_is_resolved);
        type_info_is_primitive = GET_INTERFACE(vm, type_info_is_primitive);
        type_info_is_vector = GET_INTERFACE(vm, type_info_is_vector);

        //Vector
        vector_get_first_element_offset = GET_INTERFACE(vm, vector_get_first_element_offset);
        vector_get_length_offset = GET_INTERFACE(vm, vector_get_length_offset);

        //Vm
        vm_tls_alloc = GET_INTERFACE(vm, vm_tls_alloc);
        vm_tls_get_offset = GET_INTERFACE(vm, vm_tls_get_offset);
        vm_tls_get_request_offset = GET_INTERFACE(vm, vm_tls_get_request_offset);
        vm_tls_is_fast = GET_INTERFACE(vm, vm_tls_is_fast);
        vm_get_tls_offset_in_segment = GET_INTERFACE(vm, vm_get_tls_offset_in_segment);

        vm_properties_destroy_keys = GET_INTERFACE(vm, vm_properties_destroy_keys);
        vm_properties_destroy_value = GET_INTERFACE(vm, vm_properties_destroy_value);
        vm_properties_get_keys = GET_INTERFACE(vm, vm_properties_get_keys);
        vm_properties_get_keys_starting_with = GET_INTERFACE(vm, vm_properties_get_keys_starting_with);
        vm_properties_get_value = GET_INTERFACE(vm, vm_properties_get_value);


        vm_get_system_object_class = GET_INTERFACE(vm, vm_get_system_object_class);
        vm_get_system_class_class = GET_INTERFACE(vm, vm_get_system_class_class);
        vm_get_system_string_class = GET_INTERFACE(vm, vm_get_system_string_class);
        vm_get_vtable_base_address = GET_INTERFACE(vm, vm_get_vtable_base_address);
        vm_get_heap_base_address = GET_INTERFACE(vm, vm_get_heap_base_address);
        vm_get_heap_ceiling_address = GET_INTERFACE(vm, vm_get_heap_ceiling_address);
        vm_is_heap_compressed = GET_INTERFACE(vm, vm_is_heap_compressed);
        vm_is_vtable_compressed = GET_INTERFACE(vm, vm_is_vtable_compressed);
        vm_patch_code_block = GET_INTERFACE(vm, vm_patch_code_block);
        vm_compile_method = GET_INTERFACE(vm, vm_compile_method);
        vm_register_jit_recompiled_method_callback = GET_INTERFACE(vm, vm_register_jit_recompiled_method_callback);
        vm_compiled_method_load = GET_INTERFACE(vm, vm_compiled_method_load);
        vm_helper_get_addr = GET_INTERFACE(vm, vm_helper_get_addr);
        vm_helper_get_addr_optimized = GET_INTERFACE(vm, vm_helper_get_addr_optimized);
        vm_helper_get_by_name = GET_INTERFACE(vm, vm_helper_get_by_name);
        vm_helper_get_calling_convention = GET_INTERFACE(vm, vm_helper_get_calling_convention);
        vm_helper_get_interruptibility_kind = GET_INTERFACE(vm, vm_helper_get_interruptibility_kind);
        vm_helper_get_magic_helper = GET_INTERFACE(vm, vm_helper_get_magic_helper);
        vm_helper_get_name = GET_INTERFACE(vm, vm_helper_get_name);

        //VTable
        vtable_get_class = GET_INTERFACE(vm, vtable_get_class);

        vm_enumerate_root_reference = GET_INTERFACE(vm, vm_enumerate_root_reference);
        vm_enumerate_compressed_root_reference = GET_INTERFACE(vm, vm_enumerate_compressed_root_reference);
        vm_enumerate_root_interior_pointer = GET_INTERFACE(vm, vm_enumerate_root_interior_pointer);

        return true;
    }