Skip to content
This repository was archived by the owner on Nov 13, 2026. It is now read-only.

Rewrite native metadata generator in C# - #1416

Merged
jkotas merged 3 commits into
dotnet:masterfrom
jkotas:Generator
Jun 22, 2016
Merged

jkotas merged 3 commits into
dotnet:masterfrom
jkotas:Generator

Conversation

@jkotas

@jkotas jkotas commented Jun 22, 2016

Copy link
Copy Markdown
Member

No description provided.

@jkotas

jkotas commented Jun 22, 2016 •

Copy link
Copy Markdown
Member Author

cc @MichalStrehovsky

So far, it is generating NativeFormatReaderCommonGen.cs and NativeFormatReaderGen.cs that are identical except whitespaces and ordering to ones generated by the python script. The python scripts enumerate hashtables in some case, and so some of the ordering is essentially random...

SchemaDef.cs is almost direct rewrite.

The actual emitters are writing the stuff directly using WriteLines. C# string interpolation makes it look pretty nice. The python scripts used a codedom like machinery that seemed like an overkill.

Early feedback is welcomed.

@MichalStrehovsky

Copy link
Copy Markdown
Member

Looks great so far. Thanks!

@jkotas jkotas changed the title WIP: Rewrite native metadata generator in C# Rewrite native metadata generator in C# Jun 22, 2016
@jkotas

jkotas commented Jun 22, 2016

Copy link
Copy Markdown
Member Author

Removed the WIP tag

@MichalStrehovsky

Copy link
Copy Markdown
Member

MdBinaryWriterGen.cs is missing the licensing header, but LGTM otherwise. Big thanks!

jkotas added 3 commits June 22, 2016 14:59
- SchemaDef.cs is almost direct rewrite of the Python script.
- The actual emitters are writing the stuff directly using WriteLines. C# string interpolation makes it look pretty nice. The Python scripts used a codedom like machinery that seemed like overkill.
…matGen.sln

The new autogenerated files have whitespace and ordering differences only compared to the old ones.
@jkotas
jkotas merged commit 01a7c1b into dotnet:master Jun 22, 2016
@jkotas
jkotas deleted the Generator branch June 23, 2016 04:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants