ClassicHasClass wrote:
Well, the NSPR part was the easy bit for us; it already worked with 10.4 in 3.6, so I just had to keep it that way. For WebGL, I just disabled it at the GfxInfo level since 10.4 doesn't support OpenGL 2 nor NPOT texture sizes.
Are you working off diegel's basis for 3.0.19, or did you do the NSPR bits yourself? The PRThread stuff sounds like it should be done to xpcom as well.
Are you working off diegel's basis for 3.0.19, or did you do the NSPR bits yourself? The PRThread stuff sounds like it should be done to xpcom as well.
Well, SGI/Mozilla did the original NSPR port. That NSPR port is an absolute mess though, as it tries to use IRIX's own thread library vs. pthreads. I rewrote parts of NSPR to tie in the unix_pthreads layer, and then added additional functionality. Specifically, spidermonkey's garbage collector walks through the stacks of running threads looking for things to run. Because of this, SpiderMonkey needs to be able to know where a stack's address space and location is. I fixed this by having SpiderMonkey use NSThread's library, which in my port where pthreads with a special struct attached to them. When the thread is created, it manually sets the address space and stack size of the thread, and stores them in the struct, so I can retrieve it later.
It's a pretty elegant hack IMHO. Spidermonkey (mostly) passed its test suite with additional patching.
XPCom was a stub in my version, since I needed libxul.so to exist so I can run test suite to figure out how far I could get. XPCom needs to know the C and C++ ABI of a given architecture/operating system. There was a version of XPCom for MIPSpro, but GCC has a different C++ ABI, so I knew that would fail. To fix it would require reverse engineering the proper function prologs and epilogues. Generally if you can XPCom+spidermonkey to pass its test suite, there is a pretty decent chance the damn thing might actually run.
Looking at my old messages, diegel got a dump of the hard drive from the box I did the porting, though I don't know how much code he reused. From the earlier discussions, the issues was with Firefox was that it linked, but fell over mysteriously. I think this was the issue I ran into the pthreads library I hit in Spidermonkey; specifically IRIX is extremely sensitive to the linking idea, and re-writing the linking order via _RLD32 magic variables was able to get it to work.