Commit Graph

521 Commits

Author SHA1 Message Date
Joe Groff
e75c0198cd SIL.rst: Add descriptions for newly-added insns.
Also repaint the "existential" bikeshed since there's a loud preference for talking about existentials as existentials within the implementation.

Swift SVN r3523
2012-12-17 19:24:13 +00:00
Joe Groff
387ef69809 SIL.rst: ref_element_addr and generalize insns
Describe a `ref_element_addr` instruction for extracting elements from reference types and a `generalize` instruction for representation conversion of generic values.

Swift SVN r3432
2012-12-11 00:05:39 +00:00
Joe Groff
6a67ad7e12 SIL: Add ElementAddrInst.
Derives the address of a member from the address of a fragile value type. SIL extract : SIL element_addr :: LLVM extractvalue : LLVM getelementptr. Also add SILVerifier checks for ExtractInst and ElementAddrInst that they deal only in values and addresses, respectively.

Swift SVN r3391
2012-12-07 00:37:29 +00:00
Joe Groff
beaed00bea SIL.rst: Note insns that are unimplemented.
Also clarify the language for `string_literal`.

Swift SVN r3379
2012-12-06 17:24:23 +00:00
Joe Groff
9d4806a8f0 SIL.rst: More precisely list address-only types.
Instead of speaking vaguely about "concrete representation", list the categories of type that are loadable and that are address-only.

Swift SVN r3378
2012-12-06 17:12:33 +00:00
Joe Groff
b949713c89 SIL.rst: "existential" -> "protocol"
Swift SVN r3349
2012-12-04 19:06:31 +00:00
Joe Groff
70482aa51d SIL.rst: Describe instructions for existentials.
We'll need some additional instructions to describe initialization of existentials and existential method calls: `alloc_existential` to initialize an existential's witness and substitution table(s) and provide access to its storage, and `existential_method_ref`/`project_existential` to obtain a method handle from an existential and the opaque reference to hand down to the method.

Swift SVN r3348
2012-12-04 18:45:46 +00:00
Joe Groff
0453f5dbb2 SIL.rst: "dealloc_ref" shouldn't clean up values.
After discussion with John, we decided that we need to be able to deallocate a partially-initialized box during initializer execution, in case an initializer expression ends up unwinding before a value is fully initialized. When optimizing reference type allocations, it would also better to expose the destructor call and release operations directly instead of hiding them inside an instruction.

Swift SVN r3291
2012-11-29 19:29:43 +00:00
Joe Groff
e9849d725b SIL.rst: remove "destroy" instruction
Value types should not require destruction beyond `release`-ing their reference type members. `release` for reference types and `destroy_addr` for address-only types should cover all cleanup needs.

Swift SVN r3264
2012-11-27 22:20:45 +00:00
Chris Lattner
f59185141c Change integer_literal and friends to take a comma for consistency with other operations. Make a few more tweaks to the printer to match SIL.rst.
Swift SVN r3259
2012-11-27 18:48:30 +00:00
Joe Groff
ce3dc11614 SIL.rst: proofread
Swift SVN r3241
2012-11-26 17:48:35 +00:00
Chris Lattner
0e02c3cd12 80 columns
Swift SVN r3225
2012-11-17 01:16:49 +00:00
Joe Groff
ade9e3395a SIL.rst: Update per discussion with Chris and John
- Tighten up terminology, for instance, define what a "box" actually is
- Describe how operands can have zero, one, or many values
- Describe that only %operands are valid operands and loading constants, ints, and other literals requires distinct insns
- Make releasing a reftype and destroying a value distinct
- Describe how stack allocation of boxes and reftypes work
- Name address-only type operations `destroy_addr` and `copy_addr` to avoid confusion with rvalue operations
- Describe the full set of aggregate manipulation functions
- Clean up instruction notation to avoid ambiguities
- Throw in notes about things we need to design at some point

Swift SVN r3211
2012-11-16 22:38:37 +00:00
Joe Groff
19c1fddfcc SIL.rst: list convert insn's supported conversions
Swift SVN r3191
2012-11-15 01:41:27 +00:00
Joe Groff
312bd65dfe SIL.rst: resilient type example
Swift SVN r3190
2012-11-15 01:26:39 +00:00
Joe Groff
52e163fa00 SIL.rst: a couple examples
Swift SVN r3188
2012-11-15 00:04:25 +00:00
Joe Groff
85c6508122 SIL.rst: clean up notation
Swift SVN r3185
2012-11-14 19:19:57 +00:00
Joe Groff
a8f18017e1 SIL.rst: 80 columns
Swift SVN r3184
2012-11-14 19:19:55 +00:00
Joe Groff
048b50f3b9 SIL.rst: Describe the rest of the instructions
Also give some initial description of how functions and basic blocks work.

Swift SVN r3174
2012-11-14 05:12:28 +00:00
Joe Groff
8639a5d14b SIL.rst: Describe more instructions
Swift SVN r3166
2012-11-13 18:21:47 +00:00
Joe Groff
0c4ab942d4 Sketch out a SIL.rst
Describe type categorizations and memory management operations first because those were the hot topics of discussion today.

Swift SVN r3164
2012-11-13 01:35:35 +00:00