Better integration of FFI number types

Đang mở
#17 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
8/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
c, lua
Lĩnh vực
compilers

Hướng nghiên cứu

This is an open design question, not a ready task. The issue names the builtins math.min() and math.max() and the FFI types int64_t and uint64_t, and it asks that the numeric for loop be split into its own issue. Before any code, a newcomer would need to read how the compiler frontend and backend handle these number types. There is no clear definition of done, and the thread has been silent for years.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

difficult enhancement FFI low priority

Plenty of builtins cannot deal with FFI number types, in particular int64_t/uint64_t. But this would be quite useful; good examples are math.min() and math.max().

A general solution isn't easy, because most of the builtins need to invoke code that's specialized to the number type to do their job. And the compiler frontend/backend needs to support these, too.

IMHO there's no easy solution for 3rd party code in general or the classic Lua/C API in particular. Auto-coercions can be quite dangerous for unsuspecting code.

Whenever this is tackled, one should think of the implications for other core functionality, like the numeric for i=start,stop,step do loop. Better split this off to a different issue.

Ngôn ngữ chính
C
Star
5.8k
Fork
1.2k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của LuaJIT/LuaJIT

Tất cả issue của LuaJIT/LuaJIT

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.