Skip to content

Commit

Permalink
Incremented NuGet version, new target for .NET 4.5
Browse files Browse the repository at this point in the history
Created special target for .NET 4.5 so that
`MethodImplOptions.AggressiveInlining` can be used (it is not supported
on earlier versions).
  • Loading branch information
Knagis committed Sep 13, 2014
1 parent 2a3757d commit 87fc281
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 6 deletions.
6 changes: 3 additions & 3 deletions CommonMark.Console/CommonMark.Console.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CommonMark\CommonMark.Base.csproj">
<Project>{0fd4b1dd-45a8-4f02-beb0-5881cd512573}</Project>
<Name>CommonMark.Base</Name>
<ProjectReference Include="..\CommonMark\CommonMark.NET45.csproj">
<Project>{40ab0d9c-9464-45b2-ac79-72a566fa1371}</Project>
<Name>CommonMark.NET45</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down
5 changes: 3 additions & 2 deletions CommonMark.NET.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd">
<metadata>
<id>CommonMark.NET</id>
<version>0.1.1</version>
<version>0.1.2</version>
<title>CommonMark.NET</title>
<authors>Knagis</authors>
<licenseUrl>https://raw.githubusercontent.com/Knagis/CommonMark.NET/master/LICENSE.md</licenseUrl>
Expand All @@ -11,7 +11,7 @@
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Library for converting Markdown documents to HTML according to the CommonMark specification.</description>
<releaseNotes>
Performance improvements (~50% improvement for the sample data).
Performance improvements (~75% improvement for the sample data since 0.1.0).
</releaseNotes>
<copyright>Copyright © Kārlis Gaņģis 2014</copyright>
<tags>CommonMark Markdown</tags>
Expand All @@ -21,6 +21,7 @@
<file src="CommonMark\bin\v2.0\Release\CommonMark.*" target="lib\net20\" />
<file src="CommonMark\bin\v3.5\Release\CommonMark.*" target="lib\net35-client\" />
<file src="CommonMark\bin\v4.0\Release\CommonMark.*" target="lib\net40-client\" />
<file src="CommonMark\bin\v4.5\Release\CommonMark.*" target="lib\net45\" />
<file src="CommonMark\bin\portable\Release\CommonMark.*" target="lib\portable-net40+sl50+wp80+win+wpa81+MonoAndroid10+MonoTouch10\" />
</files>
</package>
6 changes: 6 additions & 0 deletions CommonMark.sln
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommonMark.NET35", "CommonM
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommonMark.NET40", "CommonMark\CommonMark.NET40.csproj", "{0176CB03-177C-464A-A155-089595E77520}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommonMark.NET45", "CommonMark\CommonMark.NET45.csproj", "{40AB0D9C-9464-45B2-AC79-72A566FA1371}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -48,6 +50,10 @@ Global
{0176CB03-177C-464A-A155-089595E77520}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0176CB03-177C-464A-A155-089595E77520}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0176CB03-177C-464A-A155-089595E77520}.Release|Any CPU.Build.0 = Release|Any CPU
{40AB0D9C-9464-45B2-AC79-72A566FA1371}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{40AB0D9C-9464-45B2-AC79-72A566FA1371}.Debug|Any CPU.Build.0 = Debug|Any CPU
{40AB0D9C-9464-45B2-AC79-72A566FA1371}.Release|Any CPU.ActiveCfg = Release|Any CPU
{40AB0D9C-9464-45B2-AC79-72A566FA1371}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
2 changes: 1 addition & 1 deletion CommonMark/CommonMark.Base.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;1</DefineConstants>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Release\CommonMark.XML</DocumentationFile>
Expand Down
13 changes: 13 additions & 0 deletions CommonMark/CommonMark.NET45.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BuildMode>v4.5</BuildMode>
<TargetFrameworkVersionEx>v4.5</TargetFrameworkVersionEx>
<ProjectGuid>{40AB0D9C-9464-45B2-AC79-72A566FA1371}</ProjectGuid>
<DefineConstantsEx>OptimizeFor45</DefineConstantsEx>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
</ItemGroup>
<Import Project="CommonMark.Base.csproj" />
</Project>
1 change: 1 addition & 0 deletions CommonMark/CommonMark.Targets.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<TargetFrameworkProfile Condition=" '$(BuildMode)' != 'portable' "></TargetFrameworkProfile>
<TargetFrameworkProfile Condition=" '$(TargetFrameworkProfileEx)' != '' ">$(TargetFrameworkProfileEx)</TargetFrameworkProfile>
<DocumentationFile Condition=" '$(DocumentationFile)' != ''">$(OutputPath)\CommonMark.xml</DocumentationFile>
<DefineConstants>$(DefineConstants);$(BuildMode.Replace('.', '_'));$(DefineConstantsEx)</DefineConstants>
</PropertyGroup>

<Import Condition=" '$(BuildMode)' == 'portable' " Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
Expand Down
24 changes: 24 additions & 0 deletions CommonMark/Parser/ScannerCharacterMatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ internal static class ScannerCharacterMatcher
/// <summary>
/// Moves along the given string as long as the current character is a whitespace.
/// </summary>
#if OptimizeFor45
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
#endif
internal static bool MatchWhitespaces(string data, ref char currentCharacter, ref int currentPosition, int lastPosition)
{
var matched = false;
Expand All @@ -26,6 +29,9 @@ internal static bool MatchWhitespaces(string data, ref char currentCharacter, re
/// <summary>
/// Moves along the given string as long as the current character is a ASCII letter.
/// </summary>
#if OptimizeFor45
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
#endif
internal static bool MatchAsciiLetter(string data, ref char currentCharacter, ref int currentPosition, int lastPosition)
{
var matched = false;
Expand All @@ -42,6 +48,9 @@ internal static bool MatchAsciiLetter(string data, ref char currentCharacter, re
/// <summary>
/// Moves along the given string as long as the current character is a ASCII letter or digit.
/// </summary>
#if OptimizeFor45
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
#endif
internal static bool MatchAsciiLetterOrDigit(string data, ref char currentCharacter, ref int currentPosition, int lastPosition)
{
var matched = false;
Expand All @@ -59,6 +68,9 @@ internal static bool MatchAsciiLetterOrDigit(string data, ref char currentCharac
/// <summary>
/// Moves along the given string as long as the current character is a ASCII letter or digit or one of the given additional characters.
/// </summary>
#if OptimizeFor45
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
#endif
internal static bool MatchAsciiLetterOrDigit(string data, ref char currentCharacter, ref int currentPosition, int lastPosition, char valid1, char valid2, char valid3, char valid4)
{
var matched = false;
Expand All @@ -80,6 +92,9 @@ internal static bool MatchAsciiLetterOrDigit(string data, ref char currentCharac
/// <summary>
/// Moves along the given string as long as the current character is a ASCII letter or one of the given additional characters.
/// </summary>
#if OptimizeFor45
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
#endif
internal static bool MatchAsciiLetter(string data, ref char currentCharacter, ref int currentPosition, int lastPosition, char valid1, char valid2)
{
var matched = false;
Expand All @@ -96,6 +111,9 @@ internal static bool MatchAsciiLetter(string data, ref char currentCharacter, re
return matched;
}

#if OptimizeFor45
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
#endif
internal static bool MatchAnythingExcept(string data, ref char currentCharacter, ref int currentPosition, int lastPosition, char invalid1)
{
var matched = false;
Expand All @@ -107,6 +125,9 @@ internal static bool MatchAnythingExcept(string data, ref char currentCharacter,
return matched;
}

#if OptimizeFor45
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
#endif
internal static bool MatchAnythingExcept(string data, ref char currentCharacter, ref int currentPosition, int lastPosition, char invalid1, char invalid2)
{
var matched = false;
Expand All @@ -119,6 +140,9 @@ internal static bool MatchAnythingExcept(string data, ref char currentCharacter,
return matched;
}

#if OptimizeFor45
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
#endif
internal static bool MatchAnythingExceptWhitespaces(string data, ref char currentCharacter, ref int currentPosition, int lastPosition,
char invalid1, char invalid2, char invalid3, char invalid4, char invalid5, char invalid6)
{
Expand Down

0 comments on commit 87fc281

Please sign in to comment.