Skip to content

[0072] 从 s7.c 拆分基础函数和谓词函数#847

Merged
da-liii merged 53 commits into
mainfrom
da/0072/s7_split
May 31, 2026
Merged

[0072] 从 s7.c 拆分基础函数和谓词函数#847
da-liii merged 53 commits into
mainfrom
da/0072/s7_split

Conversation

@da-liii
Copy link
Copy Markdown
Contributor

@da-liii da-liii commented May 31, 2026

Summary

s7.c 中拆分基础函数和谓词函数到独立的模块文件中,降低单文件复杂度,提升编译速度和代码可维护性。

主要变更

  • 新增 s7_scheme_base.c:迁移基础函数(算术运算、let 操作、列表操作、错误处理等)
  • 新增 s7_scheme_predicate.c:迁移类型谓词和比较函数
  • 新增 s7_scheme_write.c:迁移端口相关函数
  • 新增 s7_scheme_inexact.c:迁移浮点相关函数
  • 新增 s7_liii_vector.c:迁移 complex-vector 相关函数
  • 新增 s7_dtoa.c:迁移 Grisu2 双精度浮点转字符串算法
  • 新增 s7_ctables.c:迁移字符分类表
  • 新增 s7_op_names.c:迁移操作码名称表
  • 新增 s7_internal_helpers.h:内部辅助函数声明
  • 更新 xmake.lua:添加新源文件到构建系统

涉及文件

  • src/s7.c(大量函数迁出,体积显著减小)
  • src/s7_scheme_base.c/h
  • src/s7_scheme_predicate.c/h
  • src/s7_scheme_write.c/h
  • src/s7_scheme_inexact.c/h
  • src/s7_liii_vector.c/h
  • src/s7_dtoa.c/h
  • src/s7_ctables.c/h
  • src/s7_op_names.c/h
  • src/s7_internal_helpers.h
  • tests/scheme/s7-test.scm
  • xmake.lua

🤖 Generated with Claude Code

da-liii and others added 30 commits May 30, 2026 00:17
…port/g_open_output_string 到 s7_scheme_write.c
…yclic_sequences/object_to_let/pair_line_number/reverse/port_line_number/tree_memq/tree_set_memq/format_nr/unlet_disabled/curlet)
…_syms/heap_analyze/show_op_stack/is_op_stack/outlet_unlet/heap_holder/heap_holders)
…/list_1/append_2)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…7pp bridge

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…vide 系列)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…eme_base.c

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…ase.c

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…dicate.c 迁移到 s7_scheme_base.c

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…heme_base.c

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
da-liii and others added 23 commits May 30, 2026 18:41
…me_predicate.c 迁移到 s7_scheme_base.c

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…redicate.c

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
… bridge

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…p bridge

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…s7_scheme_base.c

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@da-liii da-liii merged commit 3c1f097 into main May 31, 2026
4 checks passed
@da-liii da-liii deleted the da/0072/s7_split branch May 31, 2026 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant