Integrated the code as part of NativeCodeGenerator.d.
Converted the comments to DDoc.