Commit Graph

558 Commits

Author SHA1 Message Date
Adrian Prantl
d83c5525f2 Debug info: Simplification.
Swift SVN r9743
2013-10-28 23:14:42 +00:00
Adrian Prantl
5bbe0afb9f Debug info: Properly handle the function prologue in the line table.
Introduces a new flag in SILLocation: InPrologue to mark instructions
that setup the stack and allocate storage for local variables/arguments.

Fixes rdar://problem/15290023: Breakpoint set on prologue - crash ensues.

Swift SVN r9686
2013-10-26 00:12:20 +00:00
Adrian Prantl
29ae59ee1c Debug info: some refactoring to make emitVariableDeclaration more flexible.
Swift SVN r9608
2013-10-23 00:38:57 +00:00
Adrian Prantl
9ea487e4af Debug info: Emit local variables without storage as local variables constant 0.
Fixes rdar://problem/14802771.

Swift SVN r9575
2013-10-22 01:53:14 +00:00
Adrian Prantl
5cf8999985 Debug info: some more refactoring for rdar://problem/14845534.
Swift SVN r9571
2013-10-21 23:38:18 +00:00
Adrian Prantl
4a9909c2d3 Debug info: emit the runtime language of archetypes as DW_lang_swift.
Swift SVN r9569
2013-10-21 23:27:02 +00:00
Adrian Prantl
3fafb6c7e7 Debug info: Make the ret instruction in the function epilogue a cleanup
location rather than a regular location to avoid the linetable jumping
back to the beginning of the function.
Add a large number of testcases that check the sanity of the return
locations in various scenarios involving implicit/explicit returns,
cleanups, and multiple return locations per function.

rdar://problem/14845534

Swift SVN r9511
2013-10-19 00:20:44 +00:00
Adrian Prantl
37a0827386 Debug info: fix a bug with indirect values by using enums for type-safety.
rdar://problem/15248201

Swift SVN r9463
2013-10-17 21:16:42 +00:00
Adrian Prantl
65dc82d530 Debug info: emit Archetypes and their conforming protocols.
Fixes rdar://problem/15209779 and rdar://problem/15211793.

Swift SVN r9422
2013-10-16 22:14:37 +00:00
Adrian Prantl
d8676b7bbe Debug info: Emit something for local variables without storage.
rdar://problem/14802771.

Swift SVN r9335
2013-10-14 23:38:27 +00:00
Adrian Prantl
5dbf111b15 Debug info: The end-of-prologue location of an explicit closure
now has a line number again.
rdar://problem/15204469 again.

Swift SVN r9330
2013-10-14 22:36:31 +00:00
Adrian Prantl
7f688c806b Debug info: attach more appropriate locations to the phi nodes
at the beginning of each basic block.
rdar://15189057

Swift SVN r9327
2013-10-14 21:23:38 +00:00
Dmitri Hrybenko
6be398df2c Don't cast Size type to unsigned, use .getValue()
Swift SVN r9312
2013-10-14 16:06:44 +00:00
Adrian Prantl
c8b16f720b Debug info: Linetable-wise, treat all closure expressions alike and ignore
them.
rdar://problem/15204469

Swift SVN r9230
2013-10-11 22:39:53 +00:00
Adrian Prantl
adc913b73c Debug info: The end of the prologue should point to the opening brace.
Some refactoring the separate the needs of the line table versus decls.
rdar://problem/15204469

Swift SVN r9224
2013-10-11 22:15:10 +00:00
Adrian Prantl
e173d3ca82 remove stale comment
Swift SVN r9188
2013-10-11 01:00:51 +00:00
Adrian Prantl
c0df8ffecf Bring swift up to sync with ToT LLVM. Please *upgrade both*.
Lookup types using a DITypeIdentifierMap.

Swift SVN r9175
2013-10-10 21:42:55 +00:00
Adrian Prantl
84f439735a Make BumpAllocatedString a member of IRGenDebugInfo.
Swift SVN r9159
2013-10-10 18:47:03 +00:00
Adrian Prantl
3500e82f02 Debug info: Implement the correct lookup for the DeclContext of NameAlias types.
Swift SVN r9146
2013-10-10 17:10:26 +00:00
Adrian Prantl
17560ab4a6 Debug info: use the new getOrCreateDesugaredType() function to create aliased
types, too.

Swift SVN r9141
2013-10-10 16:39:47 +00:00
Adrian Prantl
cb62753a37 Debug info: don't fully desugar types when emitting them, just recursively
peel off the outermost layer of icing.

Swift SVN r9119
2013-10-10 00:47:04 +00:00
Adrian Prantl
41c63e2ebf Debug info: Emit swift.type as a name alias $swift.type so the data
formatters can recognize is easily.

Swift SVN r9118
2013-10-10 00:47:00 +00:00
Adrian Prantl
23ca48185a Debug info: Emit an artificial variable to describe type parameters.
Implements rdar://problem/14978875

Swift SVN r9097
2013-10-09 22:23:09 +00:00
John McCall
b880e60100 Remove SILFunctionTypeInfo in favor of SILFunctionType.
We still don't actually use this as a type, however.

Swift SVN r9091
2013-10-09 20:55:55 +00:00
Adrian Prantl
8808d48578 Debug info: emit captured variables in closures. rdar://problem/15035486
Swift SVN r8859
2013-10-02 22:46:03 +00:00
Adrian Prantl
0bd4357b1f Debug info: Emit shadow copies of boxed value's addresses in an alloca at
-O0 so the register allocator will not elide its DBG_VALUE.

Swift SVN r8798
2013-09-30 23:34:15 +00:00
Dmitri Hrybenko
4a0c050d81 Store the standard library module name as ASTContext::StdlibModuleName
... instead of repeating it everywhere


Swift SVN r8792
2013-09-30 21:07:35 +00:00
Adrian Prantl
61b5d055ef Debug info: allow for boxed arguments. rdar://problem/15035486
Swift SVN r8713
2013-09-27 00:31:20 +00:00
Jordan Rose
e05c03d5bc Standardize terminology for "computed", "stored", "variable", and "property".
These are the terms sent out in the proposal last week and described in
StoredAndComputedVariables.rst.

variable
  anything declared with 'var'
member variable
  a variable inside a nominal type (may be an instance variable or not)
property
  another term for "member variable"
computed variable
  a variable with a custom getter or setter
stored variable
  a variable with backing storage; any non-computed variable

These terms pre-exist in SIL and IRGen, so I only attempted to solidify
their definitions. Other than the use of "field" for "tuple element",
none of these should be exposed to users.

field
  a tuple element, or
  the underlying storage for a stored variable in a struct or class
physical
  describes an entity whose value can be accessed directly
logical
  describes an entity whose value must be accessed through some accessor

Swift SVN r8698
2013-09-26 18:50:44 +00:00
Joe Groff
3d4c1251f1 Rename 'byref' attribute to 'inout'.
Swift SVN r8661
2013-09-25 20:56:52 +00:00
Adrian Prantl
6009987432 Debug info: implement support for shadow-copied [byref] arguments.
This patch has a negative line balance -- those are my favorite!

Swift SVN r8655
2013-09-25 20:17:21 +00:00
Adrian Prantl
31dfc7be93 Debug info: Emit the implicit import of swift.swift in DWARF.
rdar://problem/14821063

Swift SVN r8536
2013-09-21 00:14:21 +00:00
Argyrios Kyrtzidis
eecb56a9ad Move the Mangler from the SIL library to the AST one.
No other functionality change.

Swift SVN r8527
2013-09-20 23:10:58 +00:00
Adrian Prantl
9f84b92aa4 Mangler: Implement hierarchical lookup of generic parameters for the case
where we don't find an ArcheType in the local context.
Fixes rdar://problem/15033772

Swift SVN r8507
2013-09-20 19:00:29 +00:00
Doug Gregor
bc3f655105 s/constructor/init in a few more places.
Swift SVN r8504
2013-09-20 18:37:15 +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
Adrian Prantl
06b76d4614 Put in a temporary hack for rdar://problem/15033772 while I investigate
the issue.

Swift SVN r8474
2013-09-20 00:07:31 +00:00
Adrian Prantl
2155d3d6b7 Debug info: Fix line table entries for implicit return statements.
rdar://problem/14981751

Swift SVN r8462
2013-09-19 20:30:54 +00:00
Adrian Prantl
4b24197392 Reorganize includes.
Swift SVN r8450
2013-09-19 18:04:47 +00:00
Adrian Prantl
021bdd70d0 Debug info: emit the return type for main().
Lldb gets really confused otherwise.

Swift SVN r8430
2013-09-18 23:49:09 +00:00
Adrian Prantl
65bc68bc50 Debug info: Implment bound generic unions. Fixes rdar://problem/15014441.
Swift SVN r8376
2013-09-18 00:37:59 +00:00
Adrian Prantl
17f0ae8404 disable bound generic unions while I investigate rdar://problem/15014441.
Swift SVN r8364
2013-09-17 22:53:33 +00:00
Adrian Prantl
247b925ded Debug info: Implement bound generic unions properly.
Swift SVN r8363
2013-09-17 22:53:31 +00:00
Adrian Prantl
9578dba12f Debug info: extract line and file from the decl.
Swift SVN r8356
2013-09-17 21:48:04 +00:00
Adrian Prantl
cd9c9e903d Debug info: Support [unowned] and [weak].
Swift SVN r8354
2013-09-17 21:28:15 +00:00
Adrian Prantl
cf04c4775c s/assert(false &&/llvm_unreachable(/
Swift SVN r8344
2013-09-17 18:51:29 +00:00
Adrian Prantl
ac23112e88 Debug info: Turn the warning about unsupported types into an error.
If this assertion fires it is because a new type was added, and I should
be implementing it.

Swift SVN r8342
2013-09-17 18:45:41 +00:00
Adrian Prantl
5f9f3b3776 Debug info: Implement initial support for UnboundGenericType,
PolymorphicFunctionType, BoundGenericUnion, BuiltinVector, SubstitutedType,
ParenType, OptionalType.

Swift SVN r8341
2013-09-17 18:45:39 +00:00
Dmitri Hrybenko
f1f189f4e0 Rename PipeClosureExpr -> ClosureExpr
Swift SVN r8321
2013-09-17 01:37:36 +00:00
Dmitri Hrybenko
b18c38a322 Rename ImplicitClosureExpr -> AutoClosureExpr
Swift SVN r8304
2013-09-16 23:03:50 +00:00