Wiki Diff forum-msg-id-135468-edit, revision #4 to tip

Original date:2021-01-13 11:34:30
Original date:2021-01-13 11:06:31
Edited by: petelomax
Subject: Re: wikipedia draft

[quote katsmeow]
I am guessing, but i suspect the labels in OE are in quotes, being strings, to avoid the possibility of them being reserved names of anything.
[/quote]
Maybe, I was not planning on replicating Euphoria's ##label "string"## and ##goto "string"## syntax anyway.\\
(I also have no intention of adding labelled/numbered break, continue or exit statements, or any form of retry. A goto would cover all that nonsense perfectly well enough anyway, and more.)
(I also have no intention of adding labelled/numbered break, continue or exit statements, or any form of retry.)

[quote katsmeow]
However, and you are in a better position than me to test this, this feature prohibits the ability to goto the value of a variable.
{{{
words = {"apple","tree","cow"}
goto words[1]
:tree -- code for trees
:apple -- code for apples
}}}
[/quote]
Oh my, I wasn't planning on //anything// like that.

Why on earth would anyone in their right mind ever want anything //remotely// like that, he asks, //hopefully rhetorically//.

Given that Phix already supports
<eucode>
#ilASM{ jmp :meaningful_label }
...
#ilASM{ ::meaningful_label }
</eucode>
I was merely planning on the following (exact) syntax
I was planning on the following (exact) syntax
<eucode>
goto :meaningful_label
...
::meaningful_label
</eucode>
And simply re-factoring/re-using some of the existing code.

goto should be resolved at compile-time, into a fixed single (possibly short) machine instruction.
goto should be resolved at compile-time.

If you think I was reluctant to add goto, imagine how reluctant I will be to carry forward a string lookup table and the associated address table into the runtime, along with error handling code and an //almost guaranteed// branch misprediction.\\
(Besides, if you really, really, really wanted to, you //could// do that in #ilASM{})
If you think I was reluctant to add goto, imagine how reluctant I will be to carry forward a string lookup table and the associated address table into the runtime, along with error handling code and an //almost guaranteed// branch misprediction.

[quote katsmeow]
doesn't mean i'd prohibit back jumps.
[/quote]
I said recommend, not prohibit.

Search



Quick Links

User menu

Not signed in.

Misc Menu