Skip to content

Commit ab99cac

Browse files
committed
AST: Promote BuiltinUnprotectedStackAlloc feature to baseline.
1 parent 53451ca commit ab99cac

File tree

3 files changed

+1
-10
lines changed

3 files changed

+1
-10
lines changed

include/swift/Basic/Features.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ BASELINE_LANGUAGE_FEATURE(BuiltinCreateAsyncDiscardingTaskInGroup, 0, "Task crea
157157
BASELINE_LANGUAGE_FEATURE(BuiltinCreateAsyncTaskWithExecutor, 0, "Task create builtin with extra executor preference")
158158
BASELINE_LANGUAGE_FEATURE(BuiltinCreateAsyncDiscardingTaskInGroupWithExecutor, 0, "Task create in discarding task group with extra executor preference")
159159
BASELINE_LANGUAGE_FEATURE(BuiltinStackAlloc, 0, "Builtin.stackAlloc")
160-
LANGUAGE_FEATURE(BuiltinUnprotectedStackAlloc, 0, "Builtin.unprotectedStackAlloc")
160+
BASELINE_LANGUAGE_FEATURE(BuiltinUnprotectedStackAlloc, 0, "Builtin.unprotectedStackAlloc")
161161
LANGUAGE_FEATURE(BuiltinAllocVector, 0, "Builtin.allocVector")
162162
BASELINE_LANGUAGE_FEATURE(BuiltinTaskRunInline, 0, "Builtin.taskRunInline")
163163
BASELINE_LANGUAGE_FEATURE(BuiltinUnprotectedAddressOf, 0, "Builtin.unprotectedAddressOf")

lib/AST/FeatureSet.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ static bool usesFeatureRethrowsProtocol(Decl *decl) {
124124
return usesFeatureRethrowsProtocol(decl, checked);
125125
}
126126

127-
UNINTERESTING_FEATURE(BuiltinUnprotectedStackAlloc)
128127
UNINTERESTING_FEATURE(BuiltinAllocVector)
129128

130129
static bool usesFeatureNewCxxMethodSafetyHeuristics(Decl *decl) {

stdlib/public/core/TemporaryAllocation.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -189,19 +189,11 @@ internal func _withUnprotectedUnsafeTemporaryAllocation<
189189
// notice and complain.)
190190
let result: R
191191

192-
#if $BuiltinUnprotectedStackAlloc
193192
let stackAddress = Builtin.unprotectedStackAlloc(
194193
capacity._builtinWordValue,
195194
MemoryLayout<T>.stride._builtinWordValue,
196195
alignment._builtinWordValue
197196
)
198-
#else
199-
let stackAddress = Builtin.stackAlloc(
200-
capacity._builtinWordValue,
201-
MemoryLayout<T>.stride._builtinWordValue,
202-
alignment._builtinWordValue
203-
)
204-
#endif
205197

206198
// The multiple calls to Builtin.stackDealloc() are because defer { } produces
207199
// a child function at the SIL layer and that conflicts with the verifier's

0 commit comments

Comments
 (0)