Commit Graph

133 Commits

Author SHA1 Message Date
Joe Groff
67ca7ce1e9 SIL: Rename 'protocol_metatype' to 'existential_metatype'.
It's not forming the metatype for the protocol type (exists t: P. t).metatype, it's forming the existential of a metatype of a conforming type, exists t: P. (t.metatype).

Swift SVN r14520
2014-02-28 16:14:00 +00:00
Joe Groff
9424de6787 SIL: Rename 'archetype_metatype' to 'value_metatype'.
Since it can grab a metatype from any value now.

Swift SVN r14500
2014-02-28 06:33:05 +00:00
Joe Groff
545f173507 SIL: Fold 'archetype_metatype' and 'class_metatype'.
Having one instruction to get the dynamic metatype of a (non-existential) value makes more sense from a generic specialization standpoint and should stave off inevitable crashers when archetype_metatypes get specialized. protocol_metatype remains separate because metatype existentials are more interesting.

Swift SVN r14499
2014-02-28 06:32:58 +00:00
Joe Groff
59d2a169f6 SIL: Rename 'archetype_method' to 'witness_method'.
It has been generalized to get a witness out of an arbitrary protocol conformance, not just for archetypes.

Swift SVN r14497
2014-02-28 05:09:11 +00:00
Joe Groff
855ea99063 SIL: Combine 'archetype_ref_to_super' and 'upcast'.
We were wantonly applying 'upcast' to archetypes in some cases, and really, that's OK, since these instructions do the same thing (and generic specialization could turn archetype_ref_to_super into upcast). Make everyone's life easier by folding archetype_to_super into upcast. Fixes <rdar://problem/16192324>.

Swift SVN r14496
2014-02-28 04:33:18 +00:00
Doug Gregor
981f8f6509 Rename "destructor" -> "deinit" (as a keyword) and -> "deinitializer" (in diagnostics).
Swift SVN r14380
2014-02-26 05:51:45 +00:00
Michael Gottesman
e775a1b745 [sil-mode] Add the LLVM header.
Swift SVN r13326
2014-02-03 00:16:08 +00:00
Michael Gottesman
9946080888 [sil-mode] Add highlighting for sil_witness_table.
Swift SVN r13004
2014-01-27 21:01:10 +00:00
Michael Gottesman
fc55eef0de [sil-mode] Add highlighting for "private".
Swift SVN r12391
2014-01-16 05:10:38 +00:00
Adrian Prantl
b2f60a38ed sil-mode: add debug_value_addr
Swift SVN r12290
2014-01-14 18:21:44 +00:00
Adrian Prantl
de5e9389f2 sil-mode.el: add debug_value
Swift SVN r12200
2014-01-11 06:21:30 +00:00
Joe Groff
8f6a58b998 SIL: Split address-only enum dispatch from destructive projection.
Split 'destructive_switch_enum_addr' into separate 'switch_enum_addr' and 'take_enum_data_addr' instructions. This should unblock some optimization work we would like to do with enums.

Swift SVN r12015
2014-01-07 22:58:21 +00:00
Joe Groff
530e948cb2 SIL: Rename 'enum_data_addr' to 'init_enum_data_addr'.
Emphasize the fact that this address is only intended for initialization. When we split destructive_switch_enum_addr, there will be another similar instruction for destructively taking the payload out of an already-initialized enum.

Swift SVN r12000
2014-01-07 18:40:00 +00:00
Michael Gottesman
e34282e143 [sil-mode] Add sil_global_addr highlighting.
Swift SVN r11472
2013-12-19 10:06:51 +00:00
Michael Gottesman
14a05b0ae3 [sil-mode] Updated the word highlighting given the current SIL Instructions.
Swift SVN r11344
2013-12-16 09:58:35 +00:00
Joe Groff
02a0e996c4 SIL: Kill initialize_var instruction.
Remove the initialize_var instruction now that DI fully diagnoses initialization problems. Change String-to-NSString bridging to explicitly invoke String's default constructor; it was the last remaining user of initialize_var. Remove dead code to emit an implicit default constructor without a body.

Swift SVN r11066
2013-12-10 03:36:59 +00:00
Michael Gottesman
1ca699e8ea [sil-mode] Make sil tab stops vary by 2 and standardize tab width to 2.
Swift SVN r10918
2013-12-06 05:33:39 +00:00
Michael Gottesman
29c8172cd4 [sil-mode] Remove trailing whitespace.
Swift SVN r10916
2013-12-06 05:33:37 +00:00
Michael Gottesman
ca0d9fb953 [sil-mode] Change two (if (not ...) ...) -> unless and fix a capitalization error.
Swift SVN r10915
2013-12-06 05:33:36 +00:00
Michael Gottesman
1e795f2390 Add sil_vtable highlighting to sil-mode.
Swift SVN r10914
2013-12-06 05:18:19 +00:00
Michael Gottesman
4b882d8843 [sil-mode] Teach sil-mode how to highlight "mark_uninitialized" and "mark_function_escape".
Swift SVN r10622
2013-11-21 02:29:07 +00:00
Dmitri Hrybenko
81dc5deee8 Change 'def' keyword back to 'func'
Swift SVN r10522
2013-11-17 07:45:28 +00:00
Dmitri Hrybenko
4bc7549eee Update syntax highlighting scripts for 'func' -> 'def' change
Swift SVN r9891
2013-11-02 01:13:27 +00:00
Joe Groff
6424e99da2 SIL: Rename 'condbranch' to the more idiomatic 'cond_br'.
For consistency with the other '*_br' instructions.

Swift SVN r8957
2013-10-07 16:16:35 +00:00
Adrian Prantl
9556692e2d addd copy_value
Swift SVN r8860
2013-10-02 22:46:04 +00:00
Michael Gottesman
c0efcf1766 Add {destroy,copy}_value syntax highlighting for sil.
Swift SVN r8683
2013-09-26 00:52:01 +00:00
Joe Groff
e109124186 Replace 'union' keyword with 'enum'.
This only touches the compiler and tests. Doc updates to follow.

Swift SVN r8478
2013-09-20 01:33:14 +00:00
Dmitri Hrybenko
ed7f95189e Update syntax highlighting for constructor -> init change
Swift SVN r8419
2013-09-18 21:16:31 +00:00
Joe Groff
705102b544 SIL: Rename 'ClangThunk' specifier to 'Thunk'.
Lazily-generated currying thunks will require the same IR-level linkonce_odr linkage as clang thunks currently do, so generalize the name of the existing SIL-level linkage specifier 'clang_thunk'.

Swift SVN r8122
2013-09-11 23:47:15 +00:00
Michael Gottesman
e67f33bef4 [sil-mode.el] Add keyword highlighting "to", "sil_sage".
Swift SVN r8029
2013-09-08 19:57:49 +00:00
Michael Gottesman
510ad273c1 Remove retain/retain_autoreleased/release/retain_unowned from sil-mode.
Swift SVN r7610
2013-08-26 23:52:00 +00:00
Michael Gottesman
d41b871b3a At Joe's suggestion added the prefix strong to instructions Retain,Release,RetainAutoreleased,RetainUnowned to prevent confusion in between RetainUnowned and UnownedRetain.
This is was a very mechanical patch where I basically first renamed SILNodes.def
and then just kept fixing things until everything compiled, so even though it is
large patch I feel ok(ish) with committing it.

If anyone has any concerns/etc, please email me and I will revert in 1 second.

Swift SVN r7604
2013-08-26 23:32:16 +00:00
Michael Gottesman
793716729e [sil-mode] Added initial sil mode based off of swift-mode.
The main additions are some renames, sil instructions, and sil values/etc.

Swift SVN r7424
2013-08-21 20:38:07 +00:00