From: Markus H. <ma...@ti...> - 2009-10-17 06:56:52
|
Hi Sascha, I was trying to build the typical "Hello World"-application these days: a twitter client :) I'm using the twitter4j API http://yusuke.homeip.net/twitter4j/en/index.html and was trying to convert that. It supports some asynchronous stuff and uses threads and synchronized for that. I don't really need the asynchronous part right now, but I found it interesting to just put the whole library in and see how good XMLVM could convert it. There were lots of mappings missing, but I can do those myself. (They can be found in my git repository http://github.com/tisoft/xmlvm ) But the synchronized stuff is too low for me level right now. Since I don't need it right now, I just have commented it out in the xsl, so that I can continue without it, but would of course be great if it actually works. Markus Am 17.10.2009 um 00:28 schrieb Sascha Haeberling: > Hi Markus > > I am not familiar with the synchronized part of the stylesheet. > Thank you for pointing out the typo! We will try to take a look at > this. I don't think we are supporting Threads properly yet, though. > Can you let us know what you are trying to do? > > Thanks > // Sascha > > On Fri, Oct 16, 2009 at 9:45 PM, Markus Heberling <ma...@ti...> > wrote: > Hi, > > I have a problem with the synchronized keyword. The generated ObjC- > code does not compile. First error is a simple spelling error: http://github.com/tisoft/xmlvm/commit/2d75e56167dd41eee2705dd110895308ac256a80 > > But fixing that doesn't help since the generated code is still wrong. > > Just try to convert a simple class like: > > public class X{ > public void test(){ > synchronized(this){ > } > } > } > > This creates some uncompilable stuff in ObjC: > > - (void) test > { > XMLVMElem _stack[2]; > XMLVMElem _locals[3]; > > int _sp = 0; > XMLVMElem _op1, _op2, _op3; > NSAutoreleasePool* _pool = [[NSAutoreleasePool alloc] init]; > _locals[0].o = self; > label1:; > _stack[_sp++].o = _locals[0].o; > _op1 = _stack[_sp - 1]; > _stack[_sp++] = _op1; > _op1.o = _stack[--_sp].o; > _locals[1].o = _op1.o; > _op1.o = _stack[--_sp].o; > @synchronized(_op1.o) { > @try { > _stack[_sp++].o = _locals[1].o; > } > } @catch (java_lang_Exception* _ex) { > _stack[_sp++].o = _ex; > goto label3; > } > goto label0; > @try { > label3:; > _op1.o = _stack[--_sp].o; > _locals[2].o = _op1.o; > _stack[_sp++].o = _locals[1].o; > } > } @catch (java_lang_Exception* _ex) { > _stack[_sp++].o = _ex; > goto label3; > } > _stack[_sp++].o = _locals[2].o; > _op1.o = _stack[--_sp].o; > @throw _op1.o; > label0:; > [_pool release]; > return; > } > > I'm not able to fix it myself, since I don't understand the > converting stuff yet, so it would be great if someone of you could > look into this. > > Greetings, > Markus > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart > your > developing skills, take BlackBerry mobile applications to market and > stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > xmlvm-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmlvm-users > > |