Commit Graph

5 Commits

Author SHA1 Message Date
Doug Gregor
3782db5ce1 Small fixes for typed throws in withUnsafeTemporaryAllocation 2025-08-26 17:09:07 -07:00
Doug Gregor
e96e1746bb Adopt typed throws in withUnsafeTemporaryAllocation
The interior wrapping in Result<T, U> is a little unfortunate, but is
currently necessary because we end up with extra stack allocations
along the error-handling path in a do..catch that aren't there when
using untyped throws. We can simplify the implementation if we can
eliminate the extraneous stack allocation.

Fixes rdar://134973620.
2025-08-26 13:06:48 -07:00
Max Desiatov
ed7043cc0a test/stdlib/TemporaryAllocation.swift: disable crashing tests on WASI 2023-07-22 14:42:48 +01:00
Erik Eckstein
b2512ab5cb stdlib: add an underscored _withUnprotectedUnsafeTemporaryAllocation
This function is similar to `withUnsafeTemporaryAllocation`, except that it doesn't trigger stack protection for the stack allocated memory.
2023-02-15 08:20:48 +01:00
Jonathan Grynspan
f1bf7badba [SE-0322] Temporary uninitialized buffers
Adds two new IRGen-level builtins (one for allocating, the other for deallocating), a stdlib shim function for enhanced stack-promotion heuristics, and the proposed public stdlib functions.
2021-10-25 11:20:10 -04:00