RE: Value class initialization rules
- From: George <George@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 5 Apr 2005 00:15:04 -0700
Diana, thank you for the message.
> Value types do not have "this" pointer.
In ECMA, I found many paragraphs where the value types have a "this" pointer
and I have no doubt about it.
Here is a paragraph from Partition I, chapter 8.9.7 "Value Type Definition":
"When a non-static method (i.e. an instance or virtual method) is called on
the value type its this pointer is a managed reference to the instance"
More exactly, the type of the "this" pointer for a value class "vc" is the
managed pointer "vc&".
My question was referring to the exact time when the "this" pointer in a
..ctor is considered initialized.
For example, "this" is not considered initialized upon exiting an object
class ".ctor" that didn't call the base ".ctor". This is one verification
rule.
My question relative to value classes was triggered after looking at the
error messages that a verifier can throw. They can be found in the file
"mscorrc.rc" in Rotor.
It's about this error message: VER_E_THIS_UNINIT_V_RET "Return from ctor
before all fields are initialized".
When exactly is thrown this error?
Thank you.
Cheers,
George
.
- Follow-Ups:
- RE: Value class initialization rules
- From: Diana Milirud [MSFT]
- RE: Value class initialization rules
- References:
- Value class initialization rules
- From: George
- RE: Value class initialization rules
- From: Diana Milirud [MSFT]
- Value class initialization rules
- Prev by Date: RE: Value class initialization rules
- Next by Date: best debug / perfmon options to drilldown to find error
- Previous by thread: RE: Value class initialization rules
- Next by thread: RE: Value class initialization rules
- Index(es):
Relevant Pages
|