[Mono-bugs] [Bug 48428][Nor] New - classes without an explicit static constructor should be marked BeforeFieldInit

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 12 Sep 2003 08:11:55 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by vargaz@freemail.hu.

http://bugzilla.ximian.com/show_bug.cgi?id=48428

--- shadow/48428	2003-09-12 08:11:54.000000000 -0400
+++ shadow/48428.tmp.32303	2003-09-12 08:11:55.000000000 -0400
@@ -0,0 +1,25 @@
+Bug#: 48428
+Product: Mono/MCS
+Version: unspecified
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: vargaz@freemail.hu               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: classes without an explicit static constructor should be marked BeforeFieldInit
+
+The MS compiler marks classes without an explicit static constructor as
+BeforeFieldInit, while mcs does not. This is a problem since performance
+sensitive classes like String and HashTable are not marked as 
+beforefieldinit. JITted code does not suffer because of this, but
+Ahead of Time compiled code does, since the AOT compiler must then insert
+calls to mono_runtime_class_init () before _every_ static field access in
+these classes.