Build binary compatible hello.red in R2 and R3 for Elf #421
This is incomplete work but my original goal was not to get all the regression tests running, but just get a byte-for-byte compatible hello.red executable. Now, as per Kaj's suggestion it's not necessary to hold it up when there are people who are in a good (and likely better) position to help. It should not be actually pulled into master until the test regressions are fixed. But pushing it seemed like the right thing to do at this point.
One important thing is that there is an esoteric bug in R3 which I isolated, and which BrianH is working on a "real fix" for. I just poked in a workaround temporarily. Here is the modification I made to c-word.c around line 238... I just wrapped the while loop in an IF:
You'll need that or the real fix for Compare_UTF8, for binary compatibility of the R2/R3 build of hello.red.
Performance-wise it suffers because I did not try to tackle a map! rewrite, since defining
I threw most of my miscellaneous routines for R2/R3 support into the r2-forward.r file just because it was included already and I didn't want to add new files if I could avoid it. But what we actually want is going to be a mixture of R2/Forward enhancements and the creation of R3/Backward.
These StackOverflow questions pertain to the documentation of issues of R2/R3 compatibility, sorted in rough order of importance:
If possible I'd like to have discussions/feedback about those questions and techniques on StackOverflow, at least as much of the discussion as we can.
Viva la Redolution...! :-)
I'm going to close this pull request and assume no one is doing derivative work on it. Hence if this is important, then rebasing the changes against a current master would be the best strategy.
In my opinion this was important. It gave me a fairly broad view of Red and how it works, the thinking behind it, and assisted in forming my opinions of the direction of the Rebol and Red projects.
It also formed the basis of what an "R3/Backward" would need to look like, found a couple of mean bugs in Rebol, and was my first "real" Rebol programming project.
However, we basically cannot move forward on this without getting the indexing compromise finished. With that and R3/Backward, Red should "just work" on Rebol3 with only minor changes at most.