J
John Lam
------=_Part_949_1409715.1133543816267
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
In my rewrite of my Ruby <=3D> CLR bridge, I've been thinking about pushing
most of the logic into Ruby, and leaving as little as possible in Managed
C++. I was just hacking around this morning in emacs thinking about what th=
e
syntax for an IL generator should look like, and this was what I came up
with:
d =3D DynamicMethod.new("Int32, UInt32*, UInt32")
g =3D d.get_generator
g.begin_exception_block do
g.call "static Throws.ThrowException()"
g.br_s "EndOfMethod"
g.catch("Exception") do
g.call "ToString()"
g.call "static Console.WriteLine(String)"
end
g.label "EndOfMethod"
g.ldc_i4 Qnil
g.ret
end
I'd love it if folks could comment on how this syntax might be improved in
Ruby before I crank out the underlying MC++ / Ruby code ...
Thanks!
-John
http://www.iunknown.com
------=_Part_949_1409715.1133543816267--
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
In my rewrite of my Ruby <=3D> CLR bridge, I've been thinking about pushing
most of the logic into Ruby, and leaving as little as possible in Managed
C++. I was just hacking around this morning in emacs thinking about what th=
e
syntax for an IL generator should look like, and this was what I came up
with:
d =3D DynamicMethod.new("Int32, UInt32*, UInt32")
g =3D d.get_generator
g.begin_exception_block do
g.call "static Throws.ThrowException()"
g.br_s "EndOfMethod"
g.catch("Exception") do
g.call "ToString()"
g.call "static Console.WriteLine(String)"
end
g.label "EndOfMethod"
g.ldc_i4 Qnil
g.ret
end
I'd love it if folks could comment on how this syntax might be improved in
Ruby before I crank out the underlying MC++ / Ruby code ...
Thanks!
-John
http://www.iunknown.com
------=_Part_949_1409715.1133543816267--