函数逻辑报告 |
Source Code:lib\assoc_array.c |
Create Date:2022-07-27 07:51:08 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Navigate through the internal tree looking for the closest node to the key.
函数原型:static enum assoc_array_walk_status assoc_array_walk(const struct assoc_array *array, const struct assoc_array_ops *ops, const void *index_key, struct assoc_array_walk_result *result)
返回类型:enum assoc_array_walk_status
参数:
类型 | 参数 | 名称 |
---|---|---|
const struct assoc_array * | array | |
const struct assoc_array_ops * | ops | |
const void * | index_key | |
struct assoc_array_walk_result * | result |
186 | 如果非cursor则返回:assoc_array_walk_tree_empty |
189 | level等于0 |
198 | jumped : |
199 | segments等于get_key_chunk(index_key, level) |
202 | 如果assoc_array_ptr_is_shortcut(cursor)则转到:follow_shortcut |
205 | consider_node : |
207 | slot等于segments右移level按位与ASSOC_ARRAY_KEY_CHUNK_MASK的值位 |
208 | slot与等于ASSOC_ARRAY_FAN_MASK |
214 | 如果非assoc_array_ptr_is_meta(ptr)则 |
225 | 如果assoc_array_ptr_is_node(ptr)则 |
230 | level加等于ASSOC_ARRAY_LEVEL_STEP |
231 | 如果level按位与ASSOC_ARRAY_KEY_CHUNK_MASK的值不等于0则转到:consider_node |
233 | 转到:jumped |
241 | follow_shortcut : |
243 | 打印调试信息("shortcut to %d\n", skip_to_level) |
245 | BUG_ON(sc_level > skip_to_level) |
247 | 循环 |
252 | 如果sc_level按位与ASSOC_ARRAY_KEY_CHUNK_MASK的值恒等于0则segments等于get_key_chunk(index_key, sc_level) |
256 | dissimilarity等于segments按位异或sc_segments |
261 | dissimilarity与等于ULONG_MAX左移shift位的值的反 |
263 | 否则 |
268 | 如果dissimilarity不等于0则 |
273 | sc_segments等于sc_segments |
278 | sc_level等于next_sc_level |
279 | 当sc_level小于skip_to_level循环 |
283 | 如果level按位异或sc_level的值按位与ASSOC_ARRAY_KEY_CHUNK_MASK的反的值不等于0则 |
286 | 否则 |
288 | 转到:consider_node |
名称 | 描述 |
---|---|
assoc_array_find | assoc_array_find - Find an object by index key*@array: The associative array to search |
assoc_array_insert | assoc_array_insert - Script insertion of an object into an associative array*@array: The array to insert into |
assoc_array_delete | assoc_array_delete - Script deletion of an object from an associative array*@array: The array to search.*@ops: The operations to use.*@index_key: The key to the object.* Precalculate and preallocate a script for the deletion of an object from an |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |