IIRC, it's because in Pharo the method included in MiscPrimitivePlugin, String>>#findSubstring..., is no longer the primitive, it's been moved to findSubstringViaPrimitive... findSubstring... now checks whether the primitive will work for the parameters (WideStrings vs ByteStrings), before it actually calls the primitive. To "fix" this for Pharo, change the method included in MiscPrimitivePlugin's "this is where my code should be located"-method.
Cheers, Henry
PS. Most of these issues have been discussed here before, do a search of the list and you are likely to find answers to speedbumps encountered along the way. Most notably, there's a MonticelloConfiguration which, as part of loading VMMaker, will modify it/the image in the ways needed for it to work on Pharo.
On 07.11.2010 04:57, David T. Lewis wrote:
No of course it is not normal, and as Eliot said you are probably stuck in a recursion for some reason or another. Use<alt>-period to interrupt and get a debugger to find out what went wrong.
Your original message suggests that there was something not quite right in your image. You were getting a DNU for a message that should have existed but that was marked as deprecated. Now you apparently have a runaway recursion. Something is wrong and you are going to have to break out to a debugger to figure out what it is.
I don't normally use a pharo image so it's quite likely that I'm missing something here. But if you can open a debugger on the runaway process then I'm sure you will be able to spot the problem.
Dave
On Sat, Nov 06, 2010 at 09:41:40PM -0300, Mariano Martinez Peck wrote:
it should finish in less that 5 minutes.
On Sat, Nov 6, 2010 at 8:21 PM, Esteban Lorenzanoestebanlm@gmail.comwrote:
I mean... 2hs and still not finished :(
On 2010-11-06 20:18:59 -0300, Esteban Lorenzanoestebanlm@gmail.com said:
mmm... now the "inlining step X" is taking for years... is that normal?
Cheers, Esteban
On 2010-11-06 18:08:59 -0300, "David T. Lewis"lewis@mail.msen.com said:
On Sat, Nov 06, 2010 at 07:33:37PM +0100, Levente Uzonyi wrote:
On Sat, 6 Nov 2010, Esteban Lorenzano wrote:
> Hi, > I'm trying to generate a vm... loading ConfigurationOfVMMaker version > 1.4, > then updating WMMaker package to latest version (200), but the > generator, > it is sending a DNU: > > while calling: > > 'From Pharo-1.1.1-- of 12 September 2010 [Latest update: #11414] on 6 > November 2010 at 3:00:14 pm'! > > !String methodsFor: '*VMMaker-Translation to C' stamp: 'dtl 10/25/2009 > 14:31'! > replaceLastOccurrence: oldSubstring with: newSubstring "Answer a > copy with the last occurrence of oldSubstring replaced by > newSubstring." > > " 'int i' replaceLastOccurrence: 'i' with: 'i2' " > " 'void *v' replaceLastOccurrence: 'v' with: 'v2' " > " 'int intxintxintx' replaceLastOccurrence: 'i' with: 'I2' " > " 'int intxintxintx' replaceLastOccurrence: 'FOO' with: 'BAR' " > " 'int intxintxintx' replaceLastOccurrence: '' with: 'BAZ' " > > ^ self class streamContents: [:ws | | pos rs | > rs > := ReadStream on: self. > pos := self findLastOccuranceOfString: > oldSubstring > startingAt: 1. > pos> 0 ifTrue: [ws nextPutAll: (rs next: pos - > 1); > nextPutAll: newSubstring. > rs next: oldSubstring > size]. > ws nextPutAll: rs upToEnd]! ! > > > the DNU is with: > findLastOccuranceOfString: oldSubstring startingAt: 1 > It's a typo that should be fixed in VMMaker. The correct method name is findLastOccurr_e_nceOfString:startingAt: without the underscores.
Fixed in VMMaker-dtl.201.
This was a left over reference to the deprecated #findLastOccuranceOfString:startingAt: which is still present in the VMMaker package but should no longer have been in use. Thanks for finding it.
Dave