This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo using System.IO;class pdb2xml{static void Main(string[]a){using(Stream f=File.OpenRead(a[0]),p=File.OpenRead(a[1]))^ | |
System.Console.WriteLine(Roslyn.Test.PdbUtilities.PdbToXmlConverter.ToXml(p,f));}}>pdb2xml.cs | |
@csc /nologo /r:System.IO.dll,System.Runtime.dll,Roslyn.Test.PdbUtilities.dll pdb2xml.cs&&del pdb2xml.cs&&pdb2xml %* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal EnableDelayedExpansion | |
:: user settings | |
set VERBOSE=0 | |
set ERRORS=0 | |
:: arg parsing settings | |
set ARGS=verbose debug-mode |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Reflection; | |
using System.Reflection.Emit; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Linq.Expressions; | |
public class App | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
enum Foo { Bar, Baz } | |
public class P | |
{ | |
static void Foo(Foo foo = Foo.Baz) {} | |
static void Main() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// why masking is a good habit | |
// the following fails are runtime | |
static byte[] ToByteArray(int i) | |
{ | |
checked | |
{ | |
var b = new byte[4]; | |
b[0] = (byte)(i); | |
b[1] = (byte)((i >> 8)); | |
b[2] = (byte)((i >> 16)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
@setlocal | |
rem arg can be blank to test all or one of Emit, Symbol, Semantic, Syntax (or WinRT, CommandLine, these untested) | |
set Area=%1 | |
if "%Area%" == "" set Area=* | |
msbuild /v:m /m BuildAndTest.proj /p:IncludePattern=Roslyn.Compilers.CSharp.%Area%.UnitTests.dll |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c:\Users\lpritcha\Downloads\IronScheme-115404\IronScheme>IronScheme.Console32-v2.exe | |
IronScheme TFS:115404 ironscheme.codeplex.com © 2007,2008,2009,2010,2011,2012,2013,2014,2015 Llewellyn Pritchard (.NET 2.0 32-bit) | |
> (import (tc))(test) | |
Unhandled exception during evaluation: | |
&assertion | |
&message: "moo" | |
&irritants: () | |
&stacktrace | |
[1] "ironscheme.exceptions::raise(obj)" | |
[2] "tc.test##even?$3(n)" |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Name Count Inc Time Ex Time Avg Inc Time Avg Ex Time | |
IronScheme.Runtime.Program::Main(String[]):int32 1 0.00 0.00 0.0000 0.0000 | |
IronScheme.Runtime.Program::Args(String[]+String+<UNKNOWN>):String[] 2 0.04 0.04 0.0223 0.0216 | |
IronScheme.Runtime.Program::EnableMulticoreJIT():void 1 0.14 0.05 0.1401 0.0531 | |
System.Object::.ctor():void 19759984 835.79 835.79 0.0000 0.0000 | |
System.Object::Equals(Object):bool 296873 13.01 13.01 0.0000 0.0000 | |
System.Object::Equals(Object+Object):bool 872273 341.05 286.73 0.0004 0.0003 | |
System.Object::ReferenceEquals(Object+Object):bool 2113662 113.03 113.03 0.0001 0.0001 | |
System.Object::GetHashCode():int32 856605 69.71 69.71 0.0001 0.0001 | |
System.Object::Finalize():void 97 0.01 0.01 0.0001 0.0001 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define d | |
'((1 2 3 4) | |
(4 5 6 7) | |
(7 8 9 10) | |
(8 9 10 11) | |
(1 2 3 4))) | |
(apply map + d) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void EmitMetadataArray(uint[] p) | |
{ | |
var size = p.Length * 4; | |
byte[] data = new byte[size]; | |
Buffer.BlockCopy(p, 0, data, 0, size); | |
var fb = this._typeGen.TypeBuilder.DefineInitializedData(Guid.NewGuid().ToString(), data, FieldAttributes.Static); | |
EmitInt(p.Length); | |
Emit(OpCodes.Newarr, typeof(uint)); | |
Emit(OpCodes.Dup); | |
Emit(OpCodes.Ldtoken, fb); |