Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Implement rewrite for @throw. | Steve Naroff | 2007-11-07 | 1 | -10/+28 | |
| | | | | llvm-svn: 43820 | |||||
* | Rewrite ObjC @try/@catch/@finally. Some minor tweaks to the AST nodes... | Steve Naroff | 2007-11-07 | 1 | -2/+138 | |
| | | | | | | Still need to rewrite @throw (and do more testing)... llvm-svn: 43803 | |||||
* | Rewrite for properties. | Fariborz Jahanian | 2007-11-07 | 1 | -1/+15 | |
| | | | | llvm-svn: 43791 | |||||
* | Misc. fixes. 1) Resurrect meta-data generation turned off by a previous patch. | Fariborz Jahanian | 2007-11-05 | 1 | -2/+34 | |
| | | | | | | | 2) Fixed a regression in meta-data generation caused by removal of '_interface' prefix from synthesize class name. 3) Added stubs for @try/@catch/@finally statements. llvm-svn: 43716 | |||||
* | Declare objc_selector outside the prototype for objc_msgSend(), removing a ↵ | Steve Naroff | 2007-11-05 | 1 | -1/+4 | |
| | | | | | | silly warning. llvm-svn: 43706 | |||||
* | Rewrite @selector(sel). | Steve Naroff | 2007-11-05 | 1 | -0/+20 | |
| | | | | llvm-svn: 43705 | |||||
* | - change the synthesized typedef (for classes) to be of type "objc_object". | Steve Naroff | 2007-11-05 | 1 | -15/+11 | |
| | | | | | | | - fix a couple bugs in RewriteObjCStringLiteral. - convert "Class" -> "id" in RewriteMessageExpr. llvm-svn: 43704 | |||||
* | Remove HandleObjcMetaDataEmission(), I inadvertantly resurrected it. | Steve Naroff | 2007-11-05 | 1 | -11/+0 | |
| | | | | llvm-svn: 43690 | |||||
* | Two additions... | Steve Naroff | 2007-11-04 | 1 | -5/+52 | |
| | | | | | | | | | | | | | | | - Synthesize the funky cast for objc_msgSend(). For the basic case, it looks like... ((id (*)(id, SEL))(void *)objc_msgSend)(obj, sel); The "void *" cast is needed to workaround a GCC "bandaid" (Chris says it has something to do with the inliner). Without the extra "void *" cast, we get spurious warnings/notes that look like... xx.m:17: warning: function called through a non-compatible type xx.m:17: note: if this code is reached, the program will abort - Add prototypes for the ObjC functions we call, objc_msgSend/objc_getClass for now (don't depend on them being included). llvm-svn: 43685 | |||||
* | Implement rewrite rules for ObjC string constants. | Steve Naroff | 2007-11-03 | 1 | -10/+75 | |
| | | | | llvm-svn: 43665 | |||||
* | Fix ownership model of ParseAST to allow the dtor of | Chris Lattner | 2007-11-03 | 1 | -11/+6 | |
| | | | | | | | ASTConsumer to process the AST before it is destroyed. This allows elimination of HandleObjcMetaDataEmission. llvm-svn: 43659 | |||||
* | - Remove _interface_ prefix for the synthesized tag names. | Steve Naroff | 2007-11-01 | 1 | -9/+8 | |
| | | | | | | - Also removed a tab from the generated struct (minor). llvm-svn: 43616 | |||||
* | Implement rewrite rule for commenting out protocol references. For example: | Steve Naroff | 2007-11-01 | 1 | -24/+68 | |
| | | | | | | | | | | extern id /*<NSObject>*/ NSAllocateObject(Class aClass, unsigned extraBytes, NSZone *zone); extern void NSDeallocateObject(id /*<NSObject>*/object); extern id /*<NSObject>*/ NSCopyObject(id /*<NSObject>*/object, unsigned extraBytes, NSZone *zone); llvm-svn: 43612 | |||||
* | Tweak RewriteInterfaceDecl() to generate a typedef (if one hasn't already ↵ | Steve Naroff | 2007-11-01 | 1 | -0/+11 | |
| | | | | | | been generated). llvm-svn: 43600 | |||||
* | 1) More additions for objective-c's qualifier type. | Fariborz Jahanian | 2007-10-31 | 1 | -2/+1 | |
| | | | | | | 2) Fixed a test failure (which should have failed all along!). llvm-svn: 43589 | |||||
* | Fixed a bug exposed by fixing the assert in previous patch (one of the tests ↵ | Fariborz Jahanian | 2007-10-31 | 1 | -0/+3 | |
| | | | | | | asserted). llvm-svn: 43586 | |||||
* | Changed direction of assert. Added more comments. | Fariborz Jahanian | 2007-10-31 | 1 | -2/+5 | |
| | | | | llvm-svn: 43585 | |||||
* | Fix two rewriter bugs: | Steve Naroff | 2007-10-31 | 1 | -2/+9 | |
| | | | | | | | | | | | | | | | | | | - For @class, don't generate multiple typedefs. - Handle the following edge case interface... @interface NSMiddleSpecifier : NSObject {} @end ...which was incorrectly being rewritten to... struct _interface_NSMiddleSpecifier { struct _interface_NSObject _NSObject; }; {} llvm-svn: 43582 | |||||
* | Rewriteing of ivars changed to just copy directly from the source. | Fariborz Jahanian | 2007-10-31 | 1 | -9/+34 | |
| | | | | llvm-svn: 43560 | |||||
* | Checking in some code that is still under construction. | Steve Naroff | 2007-10-31 | 1 | -5/+12 | |
| | | | | | | I need to (finally) change the way Class/id/SEL/IMP are built-in...the current approach of doing it in the preprocessor is "broken". The other problem is Sema::GetObjcIdType/GetObjcSelType/GetObjcClassType, the hooks that initialize ASTContext lazily. These built-in types need to be done up front... llvm-svn: 43557 | |||||
* | Add some plumbing to help cope with rewriting "id<p>", "Class<p>*". | Steve Naroff | 2007-10-31 | 1 | -3/+34 | |
| | | | | llvm-svn: 43543 | |||||
* | Stop pre-defining objc_msgSend/objc_getClass in the preprocessor. Instead, I ↵ | Steve Naroff | 2007-10-30 | 1 | -8/+49 | |
| | | | | | | generate these declaration on the fly when rewriting a message expression. llvm-svn: 43529 | |||||
* | Rewrite protocols. | Steve Naroff | 2007-10-30 | 1 | -1/+18 | |
| | | | | llvm-svn: 43503 | |||||
* | - Add location info to category/protocol AST's | Steve Naroff | 2007-10-30 | 1 | -21/+33 | |
| | | | | | | - Rewrite categories. llvm-svn: 43501 | |||||
* | Remove a couple FIXME's for rewriting ObjC interfaces (which are now being ↵ | Steve Naroff | 2007-10-30 | 1 | -8/+5 | |
| | | | | | | rewritten properly). llvm-svn: 43494 | |||||
* | More support for rewriting ObjC intefaces. Still some edge cases to handle... | Steve Naroff | 2007-10-30 | 1 | -0/+21 | |
| | | | | llvm-svn: 43493 | |||||
* | Encoding for objectiive-c methods. | Fariborz Jahanian | 2007-10-29 | 1 | -14/+21 | |
| | | | | llvm-svn: 43481 | |||||
* | Do the encoding of ivar types in the ivar metadata. | Fariborz Jahanian | 2007-10-29 | 1 | -4/+10 | |
| | | | | llvm-svn: 43454 | |||||
* | Add (partial) support for @encode. | Anders Carlsson | 2007-10-29 | 1 | -1/+4 | |
| | | | | llvm-svn: 43439 | |||||
* | Path to synthesize 'instance' size field of _objc_class metadata. | Fariborz Jahanian | 2007-10-26 | 1 | -6/+11 | |
| | | | | llvm-svn: 43409 | |||||
* | Start rewriting ObjC interfaces. As a start, we comment out all the methods. ↵ | Steve Naroff | 2007-10-26 | 1 | -3/+30 | |
| | | | | | | This involved refining how the parser/AST passes/manages SourceLocations for ObjcMethodDecl's. llvm-svn: 43404 | |||||
* | Patch to synthesize computation of Ivar offset in rewritten c file. | Fariborz Jahanian | 2007-10-26 | 1 | -6/+83 | |
| | | | | | | Thanks to Steve N. to point out using of offsetof for this. llvm-svn: 43391 | |||||
* | Refactored several meta data for reusability. | Fariborz Jahanian | 2007-10-25 | 1 | -245/+346 | |
| | | | | | | | Changed the entire rewrite of metadata to write to std::string object instead of stdout. llvm-svn: 43360 | |||||
* | Convert one type of metadata to use std::string instead of | Chris Lattner | 2007-10-25 | 1 | -26/+46 | |
| | | | | | | printf as an example. llvm-svn: 43346 | |||||
* | Refactored RewriteObjcMethodsMetaData to better rewrite | Fariborz Jahanian | 2007-10-25 | 1 | -9/+14 | |
| | | | | | | instance/class methods metadata. llvm-svn: 43320 | |||||
* | More work on translating message expressions. | Steve Naroff | 2007-10-24 | 1 | -36/+93 | |
| | | | | | | | | | | | | | | | | | | Still to do: - Chris will fix a bug in the rewriting engine for nested stmts. For example, the following: NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; tranlates to: NSAutoreleasePool * pool = objc_msgSend(objc_msgSend(objc_getClass("NSAutoreleasePool"), sel_getUid("alloc")), sel_getUid("init"))utoreleasePool"), sel_getUid("alloc")) init]; ...which is correct, except there is garbage after sel_getUid("init"). This is because the rewriter isn't updating the extent of the containing message expression. - Do the crazy cast thang. llvm-svn: 43316 | |||||
* | Remove explicit use of size of known structs in metadata generation. | Fariborz Jahanian | 2007-10-24 | 1 | -5/+3 | |
| | | | | llvm-svn: 43313 | |||||
* | Couple of minor changes. 1) Metaclass metadata also has a reference to | Fariborz Jahanian | 2007-10-24 | 1 | -1/+9 | |
| | | | | | | | protocol meta-data (unlike what documentation says). 2) Include objc.h so, we can compile the generated metadata with both gcc and clang. llvm-svn: 43311 | |||||
* | Refactord instance and class metadata emission. Refactored protocols ↵ | Fariborz Jahanian | 2007-10-24 | 1 | -112/+208 | |
| | | | | | | | | metadata emission. Implemented emission of category metadata, llvm-svn: 43308 | |||||
* | Fix some long lines, move code around into logical groups. | Chris Lattner | 2007-10-24 | 1 | -94/+123 | |
| | | | | llvm-svn: 43299 | |||||
* | Use Ted's new mutable child iterators to update the tree as we rewrite it. | Chris Lattner | 2007-10-24 | 1 | -9/+17 | |
| | | | | | | This will make nested subexprs work. llvm-svn: 43296 | |||||
* | Incorporate some feedback from Chris... | Steve Naroff | 2007-10-24 | 1 | -4/+4 | |
| | | | | llvm-svn: 43285 | |||||
* | Add some plumbing to rewrite message expressions (still under construction). | Steve Naroff | 2007-10-23 | 1 | -4/+49 | |
| | | | | llvm-svn: 43274 | |||||
* | - Add rewrite rule for @class. | Steve Naroff | 2007-10-23 | 1 | -1/+35 | |
| | | | | | | | - Add setter/getter to ObjcClassDecl. - Predefined key runtime functions. llvm-svn: 43257 | |||||
* | Patch to complete metadata generation for each implemented class. | Fariborz Jahanian | 2007-10-23 | 1 | -28/+55 | |
| | | | | llvm-svn: 43255 | |||||
* | Patch for initialization of class's Meta-class metadata. | Fariborz Jahanian | 2007-10-23 | 1 | -1/+65 | |
| | | | | llvm-svn: 43235 | |||||
* | This patch generates protocol metadata and all its sub-metadata. | Fariborz Jahanian | 2007-10-22 | 1 | -12/+165 | |
| | | | | llvm-svn: 43233 | |||||
* | rewrite of metadata for implemented instance methods. | Fariborz Jahanian | 2007-10-19 | 1 | -0/+43 | |
| | | | | llvm-svn: 43159 | |||||
* | Patch to rewrite ivar tables metadata for classes defined. | Fariborz Jahanian | 2007-10-18 | 1 | -1/+57 | |
| | | | | llvm-svn: 43151 | |||||
* | First patch toward rewriting of objective-c's meta data. | Fariborz Jahanian | 2007-10-18 | 1 | -0/+72 | |
| | | | | llvm-svn: 43143 |