Bartek Iwańczuk
585ec1218f
Revert "feat(ops): Fast zero copy string arguments ( #16777 )" ( #17063 )
...
This reverts commit 9b2b8df927
.
Closes https://github.com/dsherret/ts-morph/issues/1372
Closes https://github.com/denoland/deno/issues/16979
2022-12-15 15:26:10 +00:00
Divy Srivastava
9b2b8df927
feat(ops): Fast zero copy string arguments ( #16777 )
...
Uses SeqOneByteString optimization to do zero-copy `&str` arguments in
fast calls.
- [x] Depends on https://github.com/denoland/rusty_v8/pull/1129
- [x] Depends on
https://chromium-review.googlesource.com/c/v8/v8/+/4036884
- [x] Disable in async ops
- [x] Make it work with owned `String` with an extra alloc in fast path.
- [x] Support `Cow<'_, str>`. Owned for slow case, Borrowed for fast
case
```rust
#[op]
fn op_string_len(s: &str) -> u32 {
str.len() as u32
}
```
2022-12-02 05:29:15 +00:00
Bartek Iwańczuk
7f0546a6b7
fix(npm): remove forgotten unstable check ( #16598 )
2022-11-11 17:04:57 +01:00
Colin Ihrig
c36496b3bb
feat: stabilize Deno.uid() and Deno.gid() ( #16424 )
...
Closes https://github.com/denoland/deno_std/issues/2791
2022-11-09 09:46:50 -05:00
Colin Ihrig
0500aa1f71
feat: stabilize Deno.systemMemoryInfo() ( #16445 )
2022-11-09 14:14:25 +01:00
Colin Ihrig
f946806868
feat: stabilize Deno.networkInterfaces() ( #16451 )
2022-11-09 13:29:24 +01:00
Divy Srivastava
ab7e80bde4
chore(runtime): remove dependency on sys-info crate ( #16441 )
...
Fixes #9862
`loadavg`
| Target family | Syscall | Description |
| ------------- | ------- | ----------- |
| Linux | `sysinfo` | - |
| Windows | - | Returns `DEFAULT_LOADAVG`. There is no concept of
loadavg on Windows |
| macOS, BSD | `getloadavg` |
https://www.freebsd.org/cgi/man.cgi?query=getloadavg |
`os_release`
| Target family | Syscall | Description |
| ------------- | ------- | ----------- |
| Linux | `/proc/sys/kernel/osrelease` | - |
| Windows |
[`RtlGetVersion`](https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-rtlgetversion )
| dwMajorVersion . dwMinorVersion . dwBuildNumber |
| macOS | `sysctl([CTL_KERN, KERN_OSRELEASE])` | - |
`hostname`
| Target family | Syscall | Description |
| ------------- | ------- | ----------- |
| Unix | `gethostname(sysconf(_SC_HOST_NAME_MAX))` | - |
| Windows | `GetHostNameW` | - |
`mem_info`
| Target family | Syscall | Description |
| ------------- | ------- | ----------- |
| Linux | sysinfo | - |
| Windows | `sysinfoapi::GlobalMemoryStatusEx` | - |
| macOS | <br> <pre> sysctl([CTL_HW, HW_MEMSIZE]); <br> sysctl([CTL_VM,
VM_SWAPUSAGE]); <br> host_statistics64(mach_host_self(), HOST_VM_INFO64)
</pre> | - |
2022-11-02 12:47:00 +05:30