コンテンツへスキップ
ものがたり
戻る

2006-05-24

Generational GC hitting svn

generational GCのコードの大半がsvnにcheckinされたみたい。configure.inとかcorlib辺りはまだ入っていないし、ビルドしても有効にならない。はず。それと、現状ではpthreadに依存しているので、mono on Windowsでは動作しない(ほとんどwin32threadで書けるらしいので、そのうち実装されるだろう)。

pthread on win32とか使わないの?と訊いてみたら、win32->pthread->win32なんてバカバカしいし、どうせpthreadのまともな実装なんて出来るわけ無いから、使わないよ、とのたもうていた。

ちなみにmono 1.2に間に合ったとしても、コレはデフォルトではonにならない。

特許が無効になった場合のライセンス料の扱い

enumからIntPtrに変換できるのはECMA違反

mcsは正しく処理しますが、Microsoftの実装にはバグがあって、エラーとして処理してくれません。そうすると、mono環境ではビルドできないコードが出来てしまうので、気をつけましょう。

NUnitForms/MessageBoxTester.cs(120,68): error CS0030: Cannot convert type NUnit.Extensions.Forms.MessageBoxTester.Command' to System.UIntPtr’

基底型指定の無いenumは、ECMA-334 (3rd.)の13.2.2によれば

An explicit enumeration conversion between two types is processed by treating any participating enum-type as the underlying type of that enum-type, and then performing an implicit or explicit numeric conversion between the resulting types. [Example: Given an enum-type E with and underlying type of int, a conversion from E to byte is processed as an explicit numeric conversion (§13.2.1) from int to byte, and a conversion from byte to E is processed as an implicit numeric conversion (§13.1.2) from byte to int. end example]

intに変換されてからUIntPtrに変換することになるので、いったんuintにキャストしてからUIntPtrにキャストすればOK。


この記事を共有:

前の記事
特許が無効になった場合のライセンス料の扱い
次の記事
Generational GC hitting svn