Commit Graph

9 Commits

Author SHA1 Message Date
Michael Gottesman
fe257d58a7 [semantics] Add support for annotating VarDecls with @_semantics.
This is just for prototyping purposes. I also had to loosen a small restriction
where semantics functions were not allowed in local contexts. There really is no
reason to enforce this and I think since it came in the first commit that
introduced semanitcs it was most likely NadavR just being conservative and
careful.
2019-11-05 17:31:58 -08:00
Michael Gottesman
454dd00e43 [sil] Add support for adding _semantics attributes to nominal types.
This will make it easier to prototype diagnostics on specifically marked nominal
types. My intended usage would be to have a way to emit diagnostics if specific
instances of the nominal type are ever not on the stack.
2019-10-17 22:25:22 -07:00
David Farler
b7d17b25ba Rename -parse flag to -typecheck
A parse-only option is needed for parse performance tracking and the
current option also includes semantic analysis.
2016-11-28 10:50:55 -08:00
Manav Gabhawala
7928140f79 [SE-0046] Implements consistent function parameter labels by discarding extraneous parameter names and adding _ where necessary 2016-04-06 20:21:58 -04:00
Michael Gottesman
76031c7d9d Add support to the AST for multiple @semantic @attributes.
This is not wired up to SIL yet so whichever is the first value will
take precedence. We already support multiple values at the SIL level, but at the
SIL level the last value takes precedence.

Per Doug's request I added an optional transform range templated on the
attribute. This will make it easy to get all attributes from the AST of a
specific kind.
2016-01-02 01:57:34 -06:00
Nadav Rotem
32211041d2 Rename @semantics -> @_semantics.
Swift SVN r27533
2015-04-21 17:10:06 +00:00
Dmitri Hrybenko
3b04d1b013 tests: reorganize tests so that they actually use the target platform
Most tests were using %swift or similar substitutions, which did not
include the target triple and SDK.  The driver was defaulting to the
host OS.  Thus, we could not run the tests when the standard library was
not built for OS X.

Swift SVN r24504
2015-01-19 06:52:49 +00:00
Chris Lattner
f21bcae0bc remove support for attribute inversion (i.e. @!foo). This doesn't work with
decl modifiers and our direction has been established to use "nonfoo" or 
foo(not_for_you) style of attributes.


Swift SVN r20007
2014-07-16 05:40:23 +00:00
Nadav Rotem
92d8688983 Add the @semantics attribute.
The @semantics attribute allows the stdlib to mark some functions as
having a specific semantics. The optimizer can use this information
to optimize the code.



Swift SVN r19328
2014-06-30 05:52:46 +00:00