Skip to content

Commit

Permalink
Update README.markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
troubleNadiagirl authored Aug 7, 2017
1 parent 054d860 commit b08a146
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ GrEmit is a library containing different helpers for generating code using Refle

## Usage

GroboIL is a replacement for ILGenerator. Instead of calling ILGenerator.Emit(OpCode, ..), one calls GroboIL.OpCode(..).
GroboIL is a replacement for ILGenerator. Instead of calling ILGenerator.Emit(OpCode, ..), one may call GroboIL.OpCode(..).

### Example

Expand All @@ -31,9 +31,9 @@ using(var il = new GroboIL(method))
```

## Advantages
Besides more beautiful interface GroboIL has some more assets over ILGenerator:
- GroboIL has one method for all instructions from the same family, for instance, instead of 11 instructions OpCodes.Ldelem_* there is one method GroboIL.Ldelem(Type type).
- During code generation GroboIL builds the content of the evaluation stack and validates instructions arguments, and if something went wrong, immediately throws an Exception.
Besides more beautiful interface GroboIL has some more advantages over ILGenerator:
- GroboIL has a single method for all instructions from the same family, for instance, instead of 11 instructions OpCodes.Ldelem_* there is one method GroboIL.Ldelem(Type type).
- During code generation GroboIL builds the content of the evaluation stack and validates instructions arguments, and if something is not OK, immediately throws an Exception.
- There is a debug ouput of the code being generated.
- Full generics support.
- It is possible to debug MethodBuilders (use constructor of GroboIL with parameter [ISymbolDocumentWriter](http://msdn.microsoft.com/en-us/library/system.diagnostics.symbolstore.isymboldocumentwriter.aspx)).
Expand Down

0 comments on commit b08a146

Please sign in to comment.