diff options
author | Jb Evain <jb@evain.net> | 2015-04-25 14:52:23 +0300 |
---|---|---|
committer | Jb Evain <jb@evain.net> | 2015-04-25 14:52:23 +0300 |
commit | 73bd4f2fc18d332ee13f895bcc6f5c792f253527 (patch) | |
tree | e8aaf4b1d58b7a97a48ff81f5bb7d9ed0e6227af /Mono.Cecil.Cil/CodeReader.cs | |
parent | 1472815cc068c4264a75a8667da784783a989c0e (diff) | |
parent | 7159774d52f0f28d5bd4731bba1ee65e44167dfc (diff) |
Merge branch 'master' into lowermemuse
Conflicts:
Mono.Cecil.PE/Image.cs
Mono.Cecil/DefaultAssemblyResolver.cs
Mono.Cecil/ModuleDefinition.cs
Test/Mono.Cecil.Tests/Addin.cs
Test/Mono.Cecil.Tests/ImageReadTests.cs
Test/Mono.Cecil.Tests/ImportCecilTests.cs
Test/Mono.Cecil.Tests/ImportReflectionTests.cs
Diffstat (limited to 'Mono.Cecil.Cil/CodeReader.cs')
-rw-r--r-- | Mono.Cecil.Cil/CodeReader.cs | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/Mono.Cecil.Cil/CodeReader.cs b/Mono.Cecil.Cil/CodeReader.cs index 7165ed0..487b7b8 100644 --- a/Mono.Cecil.Cil/CodeReader.cs +++ b/Mono.Cecil.Cil/CodeReader.cs @@ -1,29 +1,11 @@ // -// CodeReader.cs -// // Author: // Jb Evain (jbevain@gmail.com) // -// Copyright (c) 2008 - 2011 Jb Evain -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. +// Copyright (c) 2008 - 2015 Jb Evain +// Copyright (c) 2008 - 2011 Novell, Inc. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// Licensed under the MIT/X11 license. // using System; @@ -82,7 +64,7 @@ namespace Mono.Cecil.Cil { throw new InvalidOperationException (); } - var symbol_reader = reader.module.SymbolReader; + var symbol_reader = reader.module.symbol_reader; if (symbol_reader != null) { var instructions = body.Instructions; @@ -125,7 +107,7 @@ namespace Mono.Cecil.Cil { code_size = 0; var end = start + code_size; - var instructions = body.instructions = new InstructionCollection (code_size / 3); + var instructions = body.instructions = new InstructionCollection ((code_size + 1) / 2); while (Position < end) { var offset = Position - start; @@ -384,7 +366,7 @@ namespace Mono.Cecil.Cil { throw new NotSupportedException (); } - var symbol_reader = reader.module.SymbolReader; + var symbol_reader = reader.module.symbol_reader; if (symbol_reader != null && writer.metadata.write_symbols) { symbols.method_token = GetOriginalToken (writer.metadata, method); symbols.local_var_token = local_var_token; |