From: Panayotis K. <pan...@pa...> - 2010-12-19 16:13:14
|
On Dec 19, 2010, at 5:12 PM, Panayotis Katsaloulis wrote: > > On Dec 19, 2010, at 3:06 PM, Panayotis Katsaloulis wrote: > >> I think I found another problem with arrays. >> >> When using >> XMLVMArray createSingleDimensionWithType:size:andData > ... > > I think I found a solution: this method is only called from > <xsl:template match="dex:filled-new-array|dex:filled-new-array-range"> > which always passes data as XMLVMElem[] > > I believe there should be a special selector just for this case, something like > XMLVMArray createSingleDimensionWithType:size:andXMLVMElem > which will hint the runtime that this is not raw data of the given type, but of XMLVMElem. > So it will ignore the size of the given type and use size of XMLVMElem instead. > I am hoping I am not bombing this list with this issue :) After some thoughts and tests, I think I found the optimum solution: since this is a special case of table creation, which contains items of different data than usual, I believe the most elegant solution is to create a new "type" of XMLVMArray which holds XMLVMElem items, so that we can be safe & fast at the same time. The patch is (among with a couple of other smaller fixes) here: http://xmlvm-reviews.appspot.com/103001 Please have a look! |