Displaying 19 results from an estimated 19 matches for "nsautoreleasepool".
2009 Oct 19
3
[LLVMdev] Objective-C code in lli
Hi,
Is it possible to run Objective-C code in lli? lli does not seem to
want to load Foundation.framework.
Please see below.
Thanks,
Eric Brunstad
#import <Foundation/Foundation.h>
int main(int argc, char *argv[])
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSLog(@"test!");
[pool drain];
return EXIT_SUCCESS;
}
cmu-351714:llvm-2.5 ericbrunstad$ /Users/ericbrunstad/Downloads/
llvm-2.5/Release/bin/lli -force-interpreter=true -stats /Users/
ericbrunstad/Desktop/test/test.o -load=/System/Library/Fr...
2016 Oct 18
2
Is it possible to execute Objective-C code via LLVM JIT?
...ing that example with lli produces the following output:
2016-10-18 21:25:58.332 lli[12970:169282] *** NSForwarding: warning: selector (0x10356a38f) for message 'alloc' does not match selector known to Objective C runtime (0x7fff8e93afb5)-- abort
2016-10-18 21:25:58.334 lli[12970:169282] +[NSAutoreleasePool alloc]: unrecognized selector sent to class 0x7fff7a562130
2016-10-18 21:25:58.338 lli[12970:169282] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSAutoreleasePool alloc]: unrecognized selector sent to class 0x7fff7a562130'
See also additio...
2009 Oct 19
0
[LLVMdev] Objective-C code in lli
...e. This is important for things like classes etc. This isn't
conceptually hard, but noone has done it yet.
-Chris
>
> Please see below.
>
> Thanks,
>
> Eric Brunstad
>
> #import <Foundation/Foundation.h>
>
> int main(int argc, char *argv[])
> {
> NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
> NSLog(@"test!");
> [pool drain];
> return EXIT_SUCCESS;
> }
>
> cmu-351714:llvm-2.5 ericbrunstad$ /Users/ericbrunstad/Downloads/
> llvm-2.5/Release/bin/lli -force-interpreter=true -stats /Users/
> ericbrunstad/Deskt...
2012 Feb 25
0
Speex-with-header-byte and Google ASR
...peex_encoder_ctl(encoder_state_, SPEEX_SET_VBR, &vbr);
memset(encoded_frame_data_, 0, sizeof(encoded_frame_data_));
}
SpeexRecorder::~SpeexRecorder()
{
speex_bits_destroy(&bits_);
speex_encoder_destroy(encoder_state_);
}
void SpeexRecorder::WriteToFile(int16 * buf, int count)
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
count -= (count % samples_per_frame_);
for (int i = 0; i < count; i += samples_per_frame_)
{
speex_encode_int(encoder_state_, (spx_int16_t*)buf, &bits_);
int frame_length = speex_bits_write(&bits_, encoded_frame_data_ + 1, kMaxSpeexFrameLe...
2011 Apr 21
1
[LLVMdev] A problem from XCode 4 - help sought tracking it down
...me moving.
If anyone happens to be able to test-rig XCode 4 (in iPhone mode with
LLVM2 as compiler) vs the code below, it reproduces the problem:
template <typename I0,typename I1>
void (^ cc(void (^f)(I0,I1), I0 i0))(I1)
{
^ void (I1 i1) { };
}
int main(int argc, char *argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
cc(^ void (NSString * a, id b) { NSLog(a, b); }, @"%@");
[pool drain];
}
Thanks,
Matt
2012 Feb 25
0
Speex-with-header-byte and Google ASR
...speex_encoder_ctl(encoder_state_, SPEEX_SET_VBR, &vbr);
memset(encoded_frame_data_, 0, sizeof(encoded_frame_data_));
}
SpeexRecorder::~SpeexRecorder()
{
speex_bits_destroy(&bits_);
speex_encoder_destroy(encoder_state_);
}
void SpeexRecorder::WriteToFile(int16 * buf, int count)
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
count -= (count % samples_per_frame_);
for (int i = 0; i < count; i += samples_per_frame_)
{
speex_encode_int(encoder_state_, (spx_int16_t*)buf, &bits_);
int frame_length = speex_bits_write(&bits_, encoded_frame_data_ + 1, kMaxSpeexFrameLe...
2009 Oct 19
1
[LLVMdev] Objective-C code in lli
...> conceptually hard, but noone has done it yet.
>
> -Chris
>
>>
>> Please see below.
>>
>> Thanks,
>>
>> Eric Brunstad
>>
>> #import <Foundation/Foundation.h>
>>
>> int main(int argc, char *argv[])
>> {
>> NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
>> NSLog(@"test!");
>> [pool drain];
>> return EXIT_SUCCESS;
>> }
>>
>> cmu-351714:llvm-2.5 ericbrunstad$ /Users/ericbrunstad/Downloads/
>> llvm-2.5/Release/bin/lli -force-interpreter=true -stats /Use...
2010 Oct 29
6
[LLVMdev] RFC: [Proposal] Module-Level Attributes
...about them. Deleting a module attribute may effect code generation. Each module-
level attribute will have its own documented semantics for how it may be used.
Example:
The Objective-C imageinfo section isn't merged correctly for the following.
t.mm:
#import <Foundation/Foundation.h>
NSAutoreleasePool *foo();
int main() {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSAutoreleasePool *pond = foo();
return 0;
}
f.mm:
#import <Foundation/Foundation.h>
NSAutoreleasePool *foo() {
return [[NSAutoreleasePool alloc] init];
}
$ llvm-g++ -fobjc-gc t.mm -c -flto
$ llvm-g++...
2007 Jul 19
2
[LLVMdev] Trouble Resolving Objective-C Symbols in lli
...9;m trying to run trivial Objective-C code that uses the
Foundation framework under MacOS X in lli. It seems that the code will
compile and
run using llc, however fails to work in lli.
SimpleFoundation.m:
----
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
// insert code here...
NSLog(@"Hello, World!");
[pool release];
return 0;
}
----
$ llvm-gcc -c -emit-llvm SimpleFoundation.m -o SimpleFoundation.bc
$ llc SimpleFoundation.bc -o SimpleFoundation.s
$ gcc /System/Library/Framework...
2016 Oct 18
2
Is it possible to execute Objective-C code via LLVM JIT?
...e with lli produces the following output:
>
> 2016-10-18 21:25:58.332 lli[12970:169282] *** NSForwarding: warning: selector (0x10356a38f) for message 'alloc' does not match selector known to Objective C runtime (0x7fff8e93afb5)-- abort
> 2016-10-18 21:25:58.334 lli[12970:169282] +[NSAutoreleasePool alloc]: unrecognized selector sent to class 0x7fff7a562130
> 2016-10-18 21:25:58.338 lli[12970:169282] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSAutoreleasePool alloc]: unrecognized selector sent to class 0x7fff7a562130'
>
> S...
2016 Oct 19
3
Is it possible to execute Objective-C code via LLVM JIT?
...roduces the following output:
>>
>> 2016-10-18 21:25:58.332 lli[12970:169282] *** NSForwarding: warning: selector (0x10356a38f) for message 'alloc' does not match selector known to Objective C runtime (0x7fff8e93afb5)-- abort
>> 2016-10-18 21:25:58.334 lli[12970:169282] +[NSAutoreleasePool alloc]: unrecognized selector sent to class 0x7fff7a562130
>> 2016-10-18 21:25:58.338 lli[12970:169282] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSAutoreleasePool alloc]: unrecognized selector sent to class 0x7fff7a562130'
>>...
2016 Oct 22
3
Is it possible to execute Objective-C code via LLVM JIT?
...;>
>>> 2016-10-18 21:25:58.332 lli[12970:169282] *** NSForwarding: warning:
>>> selector (0x10356a38f) for message 'alloc' does not match selector known to
>>> Objective C runtime (0x7fff8e93afb5)-- abort
>>> 2016-10-18 21:25:58.334 lli[12970:169282] +[NSAutoreleasePool alloc]:
>>> unrecognized selector sent to class 0x7fff7a562130
>>> 2016-10-18 21:25:58.338 lli[12970:169282] *** Terminating app due to
>>> uncaught exception 'NSInvalidArgumentException', reason:
>>> '+[NSAutoreleasePool alloc]: unrecognized selector...
2010 Aug 12
3
[LLVMdev] LLVM-C: Calling functions contained in other libraries
...uot;);
LLVMPositionBuilderAtEnd(builder, block);
LLVMValueRef returnVal = LLVMBuildCall(builder, fullUsername, NULL, 0, "myCall");
LLVMBuildRet(builder, returnVal);
LLVMDisposeBuilder(builder);
return result;
}
int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
char * error = NULL;
LLVMExecutionEngineRef engine;
LLVMModuleRef module = LLVMModuleCreateWithName("MyModule");
LLVMValueRef toCall = d(module);
LLVMDumpModule(module);
LLVMLinkInInterpreter();
LLV...
2016 Nov 11
2
Is it possible to execute Objective-C code via LLVM JIT?
...t;>>>
>>>>> 2016-10-18 21:25:58.332 lli[12970:169282] *** NSForwarding: warning: selector (0x10356a38f) for message 'alloc' does not match selector known to Objective C runtime (0x7fff8e93afb5)-- abort
>>>>> 2016-10-18 21:25:58.334 lli[12970:169282] +[NSAutoreleasePool alloc]: unrecognized selector sent to class 0x7fff7a562130
>>>>> 2016-10-18 21:25:58.338 lli[12970:169282] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSAutoreleasePool alloc]: unrecognized selector sent to class 0x7fff7a562130...
2007 Jul 19
0
[LLVMdev] Trouble Resolving Objective-C Symbols in lli
...ly, there are some issues here
:)
I'm CC'ing Marcel, as he has some experience with dynamic generation of
code with the objc runtime library.
> SimpleFoundation.m:
> ----
>
> #import <Foundation/Foundation.h>
>
> int main (int argc, const char * argv[]) {
> NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
>
> // insert code here...
> NSLog(@"Hello, World!");
> [pool release];
> return 0;
> }
>
> ----
>
> $ llvm-gcc -c -emit-llvm SimpleFoundation.m -o SimpleFoundation.bc
> $ llc SimpleFoundation.bc -o Si...
2010 Dec 02
0
[LLVMdev] Alternative exception handling proposal
...std::exception();
} catch (std::exception *e) {
throw e;
}
}
And this code needs to give a sensible backtrace (on Darwin at least). It will crash libunwind because it was doing horrible things:
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
@try {
@throw [NSException exceptionWithName:@"TestException" reason:@"Test" userInfo:nil];
}
@catch (NSException *e) {
@throw e;
}
[pool drain];
return 0;
}
-bw
-------------- next part...
2010 Dec 03
1
[LLVMdev] Alternative exception handling proposal
...looks good to me, do you see anything wrong with it?
> And this code needs to give a sensible backtrace (on Darwin at least). It will crash libunwind because it was doing horrible things:
>
> #import <Foundation/Foundation.h>
>
> int main (int argc, const char * argv[]) {
> NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
>
> @try {
> @throw [NSException exceptionWithName:@"TestException" reason:@"Test" userInfo:nil];
> }
> @catch (NSException *e) {
> @throw e;
> }
>
>
> [pool drain];
> return 0;
> }
I was unable to c...
2016 Nov 11
2
Is it possible to execute Objective-C code via LLVM JIT?
...>>>>>>> 2016-10-18 21:25:58.332 lli[12970:169282] *** NSForwarding: warning: selector (0x10356a38f) for message 'alloc' does not match selector known to Objective C runtime (0x7fff8e93afb5)-- abort
>>>>>>> 2016-10-18 21:25:58.334 lli[12970:169282] +[NSAutoreleasePool alloc]: unrecognized selector sent to class 0x7fff7a562130
>>>>>>> 2016-10-18 21:25:58.338 lli[12970:169282] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSAutoreleasePool alloc]: unrecognized selector sent to class 0x7fff7a...
2010 Dec 02
3
[LLVMdev] Alternative exception handling proposal
Hi Bill,
> This is similar to my first proposal.
yup, I still consider your first proposal to have been basically sound.
But it also suffers from a major problem,
> which stopped that proposal dead in its tracks. Namely, you have information in
> one place which needs to be shared in two different, but possibly disjoint,
> places: the type, filters, and personality information. In