Commit Graph

21 Commits

Author SHA1 Message Date
Kuba (Brecka) Mracek
9ead8d57fa Add a single-threaded stdlib mode, use it for the 'minimal' stdlib (#33437) 2020-08-25 06:03:14 -07:00
Max Desiatov
ec264a81b9 Implement SWIFT_ONCE_F for WebAssembly/WASI 2020-05-10 10:36:45 +01:00
Max Desiatov
67297904ac [WebAssembly] Add ifdefs for the WASI target 2020-02-08 07:37:10 +00:00
Doug Gregor
39481149a3 [Runtime] Compute generic metadata cache info once per type.
Rather than scanning through the generic parameters and generic requirements
each time we form a key for the generic metadata cache, compute these
values once, when the cache itself is first initialized.
2018-11-26 10:46:42 -08:00
Joe Groff
e2bcd784f1 Lazy: Put an initializer expression on Lazy::OnceToken.
Recent builds of clang give C++ globals of a type global constructors if they have a mix of explicitly initialized and default-initialized fields, apparently.
2018-05-16 15:16:47 -07:00
David Zarzycki
e878fcafbd [Basic] NFC: Quiet global ctor warnings with Lazy<T> 2018-05-07 19:43:32 -04:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
practicalswift
797b80765f [gardening] Use the correct base URL (https://swift.org) in references to the Swift website
Remove all references to the old non-TLS enabled base URL (http://swift.org)
2016-11-20 17:36:03 +01:00
Joe Groff
ba11a1c121 StdlibStubs: Favor swift::Lazy over static local initialization.
To minimize code size and VM live set, we try to funnel all one-time initialization through swift_once instead of mixing it with the C++ runtime's support for lazy static initialization.
2016-07-07 10:33:59 -07:00
Dan Raviv
29d76f3b68 Canonize swift header files headers and footers
- Added missing ifdef guard in PointerIntEnum header
- Consistent naming convention for ifdef guards
- Consistent 'end namespace swift'
- Consistent single EOL at end of header files
2016-03-23 09:04:12 +02:00
Han Sangjin
e06c7136cb Porting to Cygwin. rebased and squashed 2016-02-22 13:20:21 +09:00
practicalswift
a3f857ca7b [gardening] Add "-*- C++ -*-" to header files currently missing it 2016-01-23 11:53:05 +01:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Joe Groff
09fdd4cfaa Runtime: Suppress some bad GNUs.
Being standards-compliant is more important than golfing -O0 code. A context-free lambda can be trivially inlined by the optimizer.
2015-12-04 16:06:04 -08:00
Joe Groff
bac64f3a11 More macro namespace qualification hygiene
NFC
2015-11-30 15:16:43 -08:00
Joe Groff
6605b596f3 Absolute-qualify name refs in macro expansion 2015-11-30 12:23:41 -08:00
Joe Groff
5e5cdc6be3 Runtime: Use 'once' instead of static local variable initialization.
The C++ ABI for static locals is a bit heavy compared to dispatch_once; doing this saves more than 1KB in runtime code size. Dispatch_once/call_once is also more likely to be hot because it's also used by Swift and ObjC code.

Alas, llvm::get_execution_seed() from llvm/ADT/Hashing.h still inflicts one static local initialization on us we can't override (without forking Hashing.h, anyway).
2015-11-30 12:08:12 -08:00
Joe Groff
9ea30d00fe Runtime: Remove custom operator new(InPlace).
C++ no longer imposes a null check requirement on placement 'new', and clang no longer emits the null check. This hack is no longer needed.
2015-11-18 12:31:24 -08:00
Joe Groff
a3b6bef4e5 Runtime: Use new(InPlace) in more places to avoid unwanted null checks. 2015-11-17 14:13:48 -08:00
Joe Groff
dc26310f34 Runtime: Avoid instantiating call_once on Darwin by using cross-platform Lazy definitions. 2015-11-16 13:05:19 -08:00
Michael Gottesman
654ca4e0c5 Move Lazy.h from stdlib/public/runtime => include/swift/Basic
I am going to use this in a unittest for BlotMapVector.
2015-11-02 09:22:30 -08:00