[cfe-dev] Fast enumeration
Fariborz Jahanian
fjahanian at apple.com
Tue Feb 3 13:52:55 PST 2009
Patch applied and checked in.
- fariborz
On Feb 3, 2009, at 1:16 PM, David Chisnall wrote:
> Hi Everyone,
>
> I've got this patch in my local branch for fast enumeration on the GNU
> runtime, and I've tested it with GNUstep. The GNU Objective-C runtime
> doesn't provide this function, but other libraries do. Since it is
> exactly the same as the Apple runtime implementation, I wonder if it
> would be better for CGObjC.cpp to just call this directly. It's
> technically runtime-specific, but I doubt anyone is going to want to
> implement exactly the same function and give it a different name just
> to be different, and if they do then they can add this in their
> runtime and everyone's happy:
>
> void (*objc_enumerationMutation)(id) = my_really_stupid_function_name;
>
> David
>
> ===================================================================
> --- lib/CodeGen/CGObjCGNU.cpp (revision 63634)
> +++ lib/CodeGen/CGObjCGNU.cpp (working copy)
> @@ -994,7 +989,8 @@
> }
>
> llvm::Function *CGObjCGNU::EnumerationMutationFunction() {
> - return 0;
> + return
> (llvm
> ::Function*)TheModule.getOrInsertFunction("objc_enumerationMutation",
> + llvm::Type::VoidTy, IdTy, NULL);
> }
>
> void CGObjCGNU::EmitTryOrSynchronizedStmt(CodeGen::CodeGenFunction
> &CGF,
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
More information about the cfe-dev
mailing list