1. 21 6月, 2022 1 次提交
  2. 14 6月, 2022 2 次提交
  3. 06 6月, 2022 2 次提交
  4. 03 6月, 2022 2 次提交
  5. 30 5月, 2022 1 次提交
  6. 09 5月, 2022 1 次提交
  7. 03 5月, 2022 1 次提交
  8. 02 5月, 2022 4 次提交
  9. 29 4月, 2022 4 次提交
  10. 26 4月, 2022 1 次提交
  11. 25 4月, 2022 1 次提交
    • J
      std: directly use pthread in UNIX parker implementation · 54daf496
      joboet 提交于
      Mutex and Condvar are being replaced by more efficient implementations, which need thread parking themselves (see #93740). Therefore use the pthread synchronization primitives directly. Also, avoid allocating because the Parker struct is being placed in an Arc anyways.
      54daf496
  12. 16 4月, 2022 1 次提交
  13. 14 4月, 2022 1 次提交
  14. 12 4月, 2022 3 次提交
  15. 06 4月, 2022 1 次提交
  16. 30 3月, 2022 1 次提交
  17. 21 3月, 2022 1 次提交
  18. 10 3月, 2022 1 次提交
    • T
      Use implicit capture syntax in format_args · 72a25d05
      T-O-R-U-S 提交于
      This updates the standard library's documentation to use the new syntax. The
      documentation is worthwhile to update as it should be more idiomatic
      (particularly for features like this, which are nice for users to get acquainted
      with). The general codebase is likely more hassle than benefit to update: it'll
      hurt git blame, and generally updates can be done by folks updating the code if
      (and when) that makes things more readable with the new format.
      
      A few places in the compiler and library code are updated (mostly just due to
      already having been done when this commit was first authored).
      72a25d05
  19. 21 2月, 2022 2 次提交
    • C
      Remove assertion on output length for `getsockopt`. · f2ebd0a1
      Chris Copeland 提交于
      POSIX allows `getsockopt` to set `*option_len` to a smaller value if
      necessary. Windows will set `*option_len` to 1 for boolean options even
      when the caller passes a `BOOL` (`int`) with `*option_len` as 4.
      f2ebd0a1
    • C
      Fix `setsockopt` and `getsockopt` parameter names. · 3eb983ed
      Chris Copeland 提交于
      Previously `level` was named `opt` and `option_name` was named `val`,
      then extra names of `payload` or `slot` were used for the option value.
      This change aligns the wrapper parameters with their names in POSIX.
      Winsock uses similar but more abbreviated names: `level`, `optname`,
      `optval`, `optlen`.
      3eb983ed
  20. 05 2月, 2022 1 次提交
  21. 03 2月, 2022 1 次提交
  22. 25 1月, 2022 1 次提交
  23. 17 1月, 2022 1 次提交
  24. 29 12月, 2021 2 次提交
  25. 28 12月, 2021 1 次提交
  26. 14 12月, 2021 1 次提交
  27. 22 11月, 2021 1 次提交
    • E
      libcore: assume the input of `next_code_point` and `next_code_point_reverse` is UTF-8-like · 23637e20
      Eduardo Sánchez Muñoz 提交于
      The functions are now `unsafe` and they use `Option::unwrap_unchecked` instead of `unwrap_or_0`
      
      `unwrap_or_0` was added in 42357d77. I guess `unwrap_unchecked` was not available back then.
      
      Given this example:
      
      ```rust
      pub fn first_char(s: &str) -> Option<char> {
          s.chars().next()
      }
      ```
      
      Previously, the following assembly was produced:
      
      ```asm
      _ZN7example10first_char17ha056ddea6bafad1cE:
      	.cfi_startproc
      	test	rsi, rsi
      	je	.LBB0_1
      	movzx	edx, byte ptr [rdi]
      	test	dl, dl
      	js	.LBB0_3
      	mov	eax, edx
      	ret
      .LBB0_1:
      	mov	eax, 1114112
      	ret
      .LBB0_3:
      	lea	r8, [rdi + rsi]
      	xor	eax, eax
      	mov	r9, r8
      	cmp	rsi, 1
      	je	.LBB0_5
      	movzx	eax, byte ptr [rdi + 1]
      	add	rdi, 2
      	and	eax, 63
      	mov	r9, rdi
      .LBB0_5:
      	mov	ecx, edx
      	and	ecx, 31
      	cmp	dl, -33
      	jbe	.LBB0_6
      	cmp	r9, r8
      	je	.LBB0_9
      	movzx	esi, byte ptr [r9]
      	add	r9, 1
      	and	esi, 63
      	shl	eax, 6
      	or	eax, esi
      	cmp	dl, -16
      	jb	.LBB0_12
      .LBB0_13:
      	cmp	r9, r8
      	je	.LBB0_14
      	movzx	edx, byte ptr [r9]
      	and	edx, 63
      	jmp	.LBB0_16
      .LBB0_6:
      	shl	ecx, 6
      	or	eax, ecx
      	ret
      .LBB0_9:
      	xor	esi, esi
      	mov	r9, r8
      	shl	eax, 6
      	or	eax, esi
      	cmp	dl, -16
      	jae	.LBB0_13
      .LBB0_12:
      	shl	ecx, 12
      	or	eax, ecx
      	ret
      .LBB0_14:
      	xor	edx, edx
      .LBB0_16:
      	and	ecx, 7
      	shl	ecx, 18
      	shl	eax, 6
      	or	eax, ecx
      	or	eax, edx
      	ret
      ```
      
      After this change, the assembly is reduced to:
      
      ```asm
      _ZN7example10first_char17h4318683472f884ccE:
      	.cfi_startproc
      	test	rsi, rsi
      	je	.LBB0_1
      	movzx	ecx, byte ptr [rdi]
      	test	cl, cl
      	js	.LBB0_3
      	mov	eax, ecx
      	ret
      .LBB0_1:
      	mov	eax, 1114112
      	ret
      .LBB0_3:
      	mov	eax, ecx
      	and	eax, 31
      	movzx	esi, byte ptr [rdi + 1]
      	and	esi, 63
      	cmp	cl, -33
      	jbe	.LBB0_4
      	movzx	edx, byte ptr [rdi + 2]
      	shl	esi, 6
      	and	edx, 63
      	or	edx, esi
      	cmp	cl, -16
      	jb	.LBB0_7
      	movzx	ecx, byte ptr [rdi + 3]
      	and	eax, 7
      	shl	eax, 18
      	shl	edx, 6
      	and	ecx, 63
      	or	ecx, edx
      	or	eax, ecx
      	ret
      .LBB0_4:
      	shl	eax, 6
      	or	eax, esi
      	ret
      .LBB0_7:
      	shl	eax, 12
      	or	eax, edx
      	ret
      ```
      23637e20