Commit Graph

10 Commits

Author SHA1 Message Date
Slava Pestov
b9951ade1b SIL: Rename some identifiers, NFC
"VTableLookupTable" just doesn't look right to me.
2016-02-04 17:34:55 -08:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
John McCall
a7a4f67f1b Bump the reference count of a function as long as it's sitting
around in the deserializer's .
1,2d
1i
Bump the reference count of a SILFunction as long as it's sitting
around in the deserializer's cache.

If we deserialize a function, then delete it, then deserialize
another reference to it, we'll end up pointing to a deleted
function.  This was causing the bug where IRGen would assert
with "no order number for SIL function definition?"; I can't
seem to find a radar for that, though.

Also, deserialization test cases are hard to write and probably
inherently unstable.

Swift SVN r15908
2014-04-04 00:53:55 +00:00
Michael Gottesman
a571cd83f9 [deserialization] Add ClassDecl -> VTable map to SILModule.
Swift SVN r15545
2014-03-27 03:52:00 +00:00
Doug Gregor
bb833773f5 Add some newlines at the end of files
Swift SVN r11922
2014-01-06 16:34:12 +00:00
Joe Groff
c76548916e SIL: Have VTables and WitnessTables bump the reference counts of SILFunctions.
Fixes <rdar://problem/15725600>.

Swift SVN r11666
2013-12-27 05:59:19 +00:00
Dmitri Hrybenko
19cb9a3582 Correctly compute memory block size
Swift SVN r11308
2013-12-14 09:48:24 +00:00
Chris Lattner
14c858b69a Fix a nasty memory smasher in SILVTable that was causing one of my innocent (!)
tests to fail.  Basically, in the case of an empty vtable, SILVTable::create
was allocating space for 0 entries (sensible!) but then the default ctor fires
for the 1 element declared in the class, which would write off the end of the
memory block, leading to unpleasantness in random places later.


Swift SVN r11306
2013-12-14 07:24:34 +00:00
Joe Groff
aca3bd52ac SILGen: Build SILVTables while visiting classes.
When we walk a ClassDecl, generate its vtable, first pulling in decls from its ancestor classes, then overlaying overridden or new decls as we discover them.

Swift SVN r8947
2013-10-06 01:02:14 +00:00
Joe Groff
b4f85653e6 SIL: Introduce SILVTables.
These will provide a SIL-level representation of class_method dispatch, mapping from dynamically-dispatched SILDeclRefs to SILFunctions so that devirtualization passes will be able to promote a class_method for a statically-known type to a function_ref without going all the way back to the AST.

Swift SVN r8943
2013-10-05 21:58:58 +00:00