Order of operations, when to throw or silently do nothing?

Đang mở
#16 2 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
20/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ệ
javascript
Lĩnh vực
backend-api-design

Hướng nghiên cứu

Xem xét các thao tác được liệt kê—sliceToImmutable, TypedArray write methods, SetViewValue, ArrayBufferCopyAndDetach và Atomics—và so sánh thứ tự validation hiện tại của chúng. Issue chỉ hoàn tất sau khi proposal giải quyết được thời điểm các lỗi về buffer bất biến sẽ xảy ra so với các bước kiểm tra đối số, giới hạn, detachment và độ dài bằng không.

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

Mô tả

  • Should sliceToImmutable with reversed start and end throw an exception even though slice with the same arguments would not?

  • Should trying to write data in an immutable ArrayBuffer via a TypedArray element set throw, even though trying to write out-of-bounds or to a detached ArrayBuffer does not?

  • Should TypedArray write methods (copyWithin, fill, reverse, set, etc.) throw when their backing ArrayBuffer is immutable but the targeted range is zero-length? If so, how early or late in the algorithm? The methods currently inspect arguments after ValidateTypedArray.

Similarly,

  • How early or late in SetViewValue against an immutable ArrayBuffer should an exception be thrown? It currently inspects arguments before IsViewOutOfBounds.

  • Likewise for abstract operations such as ArrayBufferCopyAndDetach (which currently checks IsSharedArrayBuffer, then newLength, then IsDetachedBuffer).

  • And also for Atomics functions.

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

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 tc39/proposal-immutable-arraybuffer

Tất cả issue của tc39/proposal-immutable-arraybuffer

Issue tương tự

Thêm issue về JavaScript

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.