RFC: بنية متوافقة مع C-ABI للربط الخارجيّ (FFI) — الحاجز ٣/F2 للاستضافة الذاتيّة#53
Open
SalehKadah wants to merge 2 commits into
Open
RFC: بنية متوافقة مع C-ABI للربط الخارجيّ (FFI) — الحاجز ٣/F2 للاستضافة الذاتيّة#53SalehKadah wants to merge 2 commits into
SalehKadah wants to merge 2 commits into
Conversation
…فة الذاتيّة يعزل الحاجز الحقيقيّ في FFI البنيويّ بعد فحص تجريبيّ بدليل LLVM-IR: تمرير المؤشّر يعمل ميكانيكيًّا، لكنّ بنى ص مُعلَّبة بترويسة صنف مخفيّة عند الإزاحة صفر فلا تطابق تخطيط C. يقترح سمة @تمثيل_سي لبنية بلا-ترويسة بتخطيط قيمة C-متوافق، متدرّجةً: قبول المفسّر ← تخطيط+مؤشّر ← بالقيمة. إضافة غير كاسرة؛ نظير Rust #[repr(C)]. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ملخّص
RFC فرعيّ للحاجز ٣ (FFI بنيويّ) من خارطة الاستضافة الذاتيّة — يعزل الحاجز الحقيقيّ بعد فحص تجريبيّ مباشر بدليل LLVM-IR.
التشخيص التجريبيّ (٢٠٢٦-٠٧-٢٥)
صفّر(ن، 0، 24)(memset خارجيّة) يُصفّر ذاكرة كومة ص فعلًا — البرنامج المترجَم يطبع111ثمّ0. المؤشّر يعبر الحدّ.{ ptr ترويسة، i64 س، i64 ص }، فحقلُسعند الإزاحة ٨ لا ٠ ⇒صفّر(ن، 0، 8)يُصفّر الترويسة لاس. بنى ص ليست متوافقة تخطيط-ABI مع C.المقترَح
سمة
@تمثيل_سيتُعلِّمبنيةبتخطيط قيمة C-متوافق (بلا ترويسة) — نظير Rust#[repr(C)]. إضافة غير كاسرة (البنى القائمة لا تتغيّر). تنفيذٌ متدرّج: قبول المفسّر ← تخطيط+تمرير بالمؤشّر ← تمرير بالقيمة (تصنيف ABI).السياق
RFC خارطة الطريق يصنّف الحاجز ٣ «مؤجَّل لا حاجز» لمسار IR النصّيّ؛ هذا المقترح يُفعَّل عند قرار المضيّ في FFI البنيويّ. مكمّل لـ
rfc/f3-raw-pointer-load-store(مؤشّر خامّ) ومتمايز عنه (تخطيط بنية مؤنمَط).🤖 Generated with Claude Code