Commit Graph

12 Commits

Author SHA1 Message Date
David Farler
cd65a8e0b0 Template metadata structures
- Add RuntimeTarget template This will allow for converting between
  metadata structures for native host and remote target architectures.

- Create InProcess and External templates for stored pointers

Add a few more types to abstract pointer access in the runtime
structures but keep native in-process pointer access the same as that
with a plain old pointer type.

There is now a notion of a "stored pointer", which is just the raw value
of the pointer, and the actual pointer type, which is used for loads.
Decoupling these allows us to fork the behavior when looking at metadata
in an external process, but keep things the same for the in-process
case.

There are two basic "runtime targets" that you can use to work with
metadata:

InProcess: Defines the pointer to be trivially a T* and stored as a
uintptr_t. A Metadata * is exactly as it was before, but defined via
AbstractMetadata<InProcess>.

External: A template that requires a target to specify its pointer size.

ExternalPointer: An opaque pointer in another address space that can't
(and shouldn't) be indirected with operator* or operator->.  The memory
reader will fetch the data explicitly.
2016-03-02 21:25:04 -08:00
Joe Groff
f7291b21ec Runtime: Build with -fvisibility=hidden.
...and explicitly mark symbols we export, either for use by executables or for runtime-stdlib interaction. Until the stdlib supports resilience we have to allow programs to link to these SPI symbols.
2016-02-08 08:06:02 -08:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Joe Groff
d366089df7 Runtime: Change getInstancePositiveExtents methods to return both extents.
A bit of future-proofing, since we plan to be able to grow class instances in both directions relative to their object header.
2015-12-23 15:39:53 -08:00
Joe Groff
583f5bdb6f Runtime: Rename class property lookup functions with consistent naming scheme.
Getting a superclass, instance extents, and whether a class is native-refcounted are all useful type API. De-underscore these functions and give them a consistent `swift[_objc]_class*` naming scheme.
2015-12-23 15:04:27 -08:00
Joe Groff
359e18f54f Runtime: Internalize 'usesNativeSwiftReferenceCounting_nonnull' check.
It's used as a helper by some other entry points, but isn't used outside the runtime.
2015-12-23 09:17:09 -08:00
GauravDS
ed59a58872 fix typos
constistently => consistently
2015-12-12 13:43:41 +05:30
Andrew Trick
23b1186467 Removed _swift_isUniquelyReferenced shims. Don't call these from swift.
Swift SVN r28270
2015-05-07 16:39:28 +00:00
Dave Abrahams
6f4e1bb309 [stdlib] Fixes for _getSuperclass
This internal function is used by mirrors and thus must work correctly

Swift SVN r28154
2015-05-05 05:40:20 +00:00
Dave Abrahams
7cd1429f59 [stdlib] Add _getSuperclass(AnyClass)
We'll need this to handle class mirrors properly

Swift SVN r27500
2015-04-20 21:58:24 +00:00
Dmitri Hrybenko
29b15adff1 stdlib: make println() output atomic within one call
rdar://17016326

Swift SVN r27248
2015-04-13 05:51:47 +00:00
Dmitri Hrybenko
350248dae5 Reorganize the directory structure under 'stdlib'
The standard library has grown significantly, and we need a new
directory structure that clearly reflects the role of the APIs, and
allows future growth.

See stdlib/{public,internal,private}/README.txt for more information.

Swift SVN r25876
2015-03-09 05:26:05 +00:00