Full Code of csyonghe/Spire for AI

master 727250ed0568 cached
171 files
1.4 MB
420.6k tokens
1616 symbols
1 requests
Download .txt
Showing preview only (1,544K chars total). Download the full file or copy to clipboard to get everything.
Repository: csyonghe/Spire
Branch: master
Commit: 727250ed0568
Files: 171
Total size: 1.4 MB

Directory structure:
gitextract_nsdljbup/

├── .editorconfig
├── .gitignore
├── Examples/
│   └── hello/
│       ├── README.md
│       ├── hello.cpp
│       ├── hello.sln
│       ├── hello.spire
│       ├── hello.vcxproj
│       └── hello.vcxproj.filters
├── LICENSE.txt
├── README.md
├── Source/
│   ├── CoreLib/
│   │   ├── Allocator.h
│   │   ├── Array.h
│   │   ├── ArrayView.h
│   │   ├── Basic.h
│   │   ├── CMakeLists.txt
│   │   ├── CommandLineParser.cpp
│   │   ├── CommandLineParser.h
│   │   ├── Common.h
│   │   ├── CoreLibBasic.vcxproj
│   │   ├── Dictionary.h
│   │   ├── Exception.h
│   │   ├── Func.h
│   │   ├── Hash.h
│   │   ├── IntSet.h
│   │   ├── LibIO.cpp
│   │   ├── LibIO.h
│   │   ├── LibMath.cpp
│   │   ├── LibMath.h
│   │   ├── LibString.cpp
│   │   ├── LibString.h
│   │   ├── Link.h
│   │   ├── Linq.h
│   │   ├── List.h
│   │   ├── MemoryPool.cpp
│   │   ├── MemoryPool.h
│   │   ├── SecureCRT.h
│   │   ├── SmartPointer.h
│   │   ├── Stream.cpp
│   │   ├── Stream.h
│   │   ├── TextIO.cpp
│   │   ├── TextIO.h
│   │   ├── Tokenizer.cpp
│   │   ├── Tokenizer.h
│   │   ├── TypeTraits.h
│   │   ├── VectorMath.cpp
│   │   ├── VectorMath.h
│   │   └── corelib.natvis
│   ├── Spire.sln
│   ├── SpireCompiler/
│   │   ├── D3DCompiler.cpp
│   │   ├── D3DCompiler.h
│   │   ├── ShaderCompilerShell.cpp
│   │   ├── SpireCompiler.vcxproj
│   │   └── SpireCompiler.vcxproj.filters
│   ├── SpireCore/
│   │   ├── CLikeCodeGen.cpp
│   │   ├── CLikeCodeGen.h
│   │   ├── Closure.cpp
│   │   ├── Closure.h
│   │   ├── CodeGenBackend.h
│   │   ├── CodeGenerator.cpp
│   │   ├── CodeWriter.h
│   │   ├── CompiledProgram.cpp
│   │   ├── CompiledProgram.h
│   │   ├── ConstantPool.cpp
│   │   ├── DiagnosticDefs.h
│   │   ├── Diagnostics.cpp
│   │   ├── Diagnostics.h
│   │   ├── GLSLCodeGen.cpp
│   │   ├── GetDependencyVisitor.cpp
│   │   ├── GetDependencyVisitor.h
│   │   ├── HLSLCodeGen.cpp
│   │   ├── IL.cpp
│   │   ├── IL.h
│   │   ├── InsertImplicitImportOperator.cpp
│   │   ├── KeyHoleMatching.cpp
│   │   ├── Lexer.cpp
│   │   ├── Lexer.h
│   │   ├── Naming.cpp
│   │   ├── Naming.h
│   │   ├── NatvisFile.natvis
│   │   ├── NewSpirVCodeGen.cpp
│   │   ├── Parser.cpp
│   │   ├── Parser.h
│   │   ├── Preprocessor.cpp
│   │   ├── Preprocessor.h
│   │   ├── SamplerUsageAnalysis.cpp
│   │   ├── SamplerUsageAnalysis.h
│   │   ├── Schedule.cpp
│   │   ├── Schedule.h
│   │   ├── ScopeDictionary.h
│   │   ├── SemanticsVisitor.cpp
│   │   ├── ShaderCompiler.cpp
│   │   ├── ShaderCompiler.h
│   │   ├── SpirVCodeGen.cpp
│   │   ├── SpireCore.vcxproj
│   │   ├── SpireCore.vcxproj.filters
│   │   ├── StdInclude.cpp
│   │   ├── StdInclude.h
│   │   ├── StringObject.h
│   │   ├── SymbolTable.cpp
│   │   ├── SymbolTable.h
│   │   ├── Syntax.cpp
│   │   ├── Syntax.h
│   │   ├── SyntaxVisitors.h
│   │   ├── TypeLayout.cpp
│   │   ├── TypeLayout.h
│   │   ├── TypeTranslation.cpp
│   │   ├── TypeTranslation.h
│   │   ├── VariantIR.cpp
│   │   └── VariantIR.h
│   └── SpireLib/
│       ├── SpireLib.cpp
│       ├── SpireLib.h
│       ├── SpireLib.vcxproj
│       └── SpireLib.vcxproj.filters
├── Spire.h
├── SpireAllSource.h
├── Tests/
│   ├── Diagnostics/
│   │   ├── break-outside-loop.spire
│   │   ├── break-outside-loop.spire.expected
│   │   ├── call-argument-type.spire
│   │   ├── call-argument-type.spire.expected
│   │   ├── continue-outside-loop.spire
│   │   ├── continue-outside-loop.spire.expected
│   │   ├── expected-token-eof.spire
│   │   ├── expected-token-eof.spire.expected
│   │   ├── expected-token.spire
│   │   ├── expected-token.spire.expected
│   │   ├── function-redefinition.spire
│   │   ├── function-redefinition.spire.expected
│   │   ├── hull-shader-invalid-domain.spire
│   │   ├── hull-shader-invalid-domain.spire.expected
│   │   ├── hull-shader-no-domain.spire
│   │   ├── hull-shader-no-domain.spire.expected
│   │   ├── illegal-character.spire
│   │   ├── illegal-character.spire.expected
│   │   ├── missing-file.spire
│   │   ├── missing-file.spire.expected
│   │   ├── parameter-already-defined.spire
│   │   ├── parameter-already-defined.spire.expected
│   │   ├── undefined-identifier.spire
│   │   ├── undefined-identifier.spire.expected
│   │   ├── variable-void-type.spire
│   │   ├── variable-void-type.spire.expected
│   │   ├── while-predicate-type.spire
│   │   └── while-predicate-type.spire.expected
│   ├── FrontEnd/
│   │   ├── lexer-comments.spire
│   │   ├── parser-decls.spire
│   │   ├── parser-empty.spire
│   │   ├── parser-error-unclosed-curly.spire
│   │   ├── parser-error-unclosed-curly.spire.expected
│   │   ├── parser-using-file-a.spireh
│   │   ├── parser-using-file.spire
│   │   ├── pipeline-simple.spireh
│   │   ├── struct.spire
│   │   └── typedef.spire
│   ├── HLSLCodeGen/
│   │   ├── DeferredLighting.fs.hlsl
│   │   ├── DeferredLighting.vs.hlsl
│   │   ├── StandardPipeline.spire
│   │   ├── Utils.spire
│   │   └── shader1.spire
│   ├── Preprocessor/
│   │   ├── define-function-like.spire
│   │   ├── define-function-like.spire.expected
│   │   ├── define-simple.spire
│   │   ├── if.spire
│   │   ├── ifdef.spire
│   │   ├── include-a.spireh
│   │   └── include.spire
│   └── SpireTestTool/
│       ├── SpireTestTool.vcxproj
│       ├── SpireTestTool.vcxproj.filters
│       ├── main.cpp
│       ├── os.cpp
│       └── os.h
└── test.bat

================================================
FILE CONTENTS
================================================

================================================
FILE: .editorconfig
================================================
[*]
indent_style = tab
indent_size = 4


================================================
FILE: .gitignore
================================================
DebugClang/
*.user
autotuneLog.txt
LibraryRelease/CodePack.exe
*.exe
*.exe.config
*.exe.manifest
*.pdb
.vs
*.VC.opendb
*.VC.db
*.spire.actual
LibraryRelease/Spire.cpp
*.sdf
Debug/
Release/
x64/
*.TMP
*.cse


================================================
FILE: Examples/hello/README.md
================================================
Spire "Hello World" Example
===========================

The goal of this example is to demonstrate an almost minimal application that uses Spire for shading, and D3D11 for rendering.

The `hello.spire` file contains a simple declaration of a Spire *shader module*, along with a *pipeline declaration* that will be used for mapping shader code to the capabilities of the "engine" (in this case, just vertex and fragment shaders).
The `hello.cpp` file contains the C++ application code, showing how to use the Spire C API to load and compile the shader code, and construct a (trivial) executable shader from Spire modules.

Note that this example is not intended to demonstrate good practices for integrating Spire into a production engine; the goal is merely to use the minimum amount of code possible to demonstrate a complete applicaiton that uses Spire.


================================================
FILE: Examples/hello/hello.cpp
================================================
// hello.cpp

// In order to use the Spire API, we need to include its header

#include <Spire.h>

// We will be rendering with Direct3D 11, so we need to include
// the Windows and D3D11 headers

#define WIN32_LEAN_AND_MEAN
#define NOMINMAX
#include <Windows.h>
#undef WIN32_LEAN_AND_MEAN
#undef NOMINMAX

#include <d3d11_2.h>
#include <d3dcompiler.h>

// We will use the C standard library just for printing error messages.
#include <stdio.h>

#ifdef _MSC_VER
#include <stddef.h>
#if (_MSC_VER < 1900)
#define snprintf sprintf_s
#endif
#endif
//

static int gWindowWidth = 1024;
static int gWindowHeight = 768;

//

//
// For the purposes of a small example, we will define the vertex data for a
// single triangle directly in the source file. It should be easy to extend
// this example to load data from an external source, if desired.
//

struct Vertex
{
    float position[3];
    float color[3];
};

static const int kVertexCount = 3;
static const Vertex kVertexData[kVertexCount] = {
    { { 0,  0, 0.5 }, {1, 0, 0} },
    { { 0,  1, 0.5 }, {0, 0, 1} },
    { { 1,  0, 0.5 }, {0, 1, 0} },
};

//

// Global variabels for the various D3D11 API objects to be used for rendering
ID3D11Buffer*       dxConstantBuffer;
ID3D11InputLayout*  dxInputLayout;
ID3D11Buffer*       dxVertexBuffer;
ID3D11VertexShader* dxVertexShader;
ID3D11PixelShader*  dxPixelShader;

// The Spire compiler currently generates HLSL source, so we'll need a utility
// routine (defined later) to translate that into D3D11 shader bytecode.
ID3DBlob* compileHLSLShader(
    char const* source,
    char const* dxProfileName);

// We use a utility routine to print out any diagnostic (error/warning) output
// from the Spire compiler.
void emitSpireDiagnostics(
    SpireDiagnosticSink* sink);

//
// At initialization time, we are going to load and compile our Spire shader
// code, and then create the D3D11 API objects we need for rendering.
//
HRESULT initialize( ID3D11Device* dxDevice )
{
    //
    // First, we will load and compile our Spire source code.
    //

    // The argument here is an optional directory where the Spire compiler
    // can cache files to speed up compilation of many kernels.
    SpireCompilationContext* spireContext = spCreateCompilationContext(NULL);

    // A diagnostic sink is used to collect output messages from the Spire
    // compiler, so that we can easily iterate over them if an operation
    // fails.
    SpireDiagnosticSink* spireSink = spCreateDiagnosticSink(spireContext);

    // Instruct Spire to generate code as HLSL
    spSetCodeGenTarget(spireContext, SPIRE_HLSL);

    // Load a file of Spire source code, which defines our modules
    spLoadModuleLibrary(spireContext, "hello.spire", spireSink);

    // Inspect any error messages that got reported...
    emitSpireDiagnostics(spireSink);

    //
    // Once the source Spire has been loaded, we can assemble the modules
    // there to make one or more shaders. In our case, we really only
    // have one shader that we will use, so this step is kind of redundant.
    //

    // Create a shader, which will initially be empty
    char const* shaderName = "HelloShader";
	SpireShader* spireShader = spCreateShaderFromSource(spireContext, R"(
		template shader HelloShader(module0) targets StandardPipeline
		{
			using module0;
		}
	)", spireSink);

	SpireModule * helloModule = spFindModule(spireContext, "HelloModule");

    // Compile the constructed shader
    SpireCompilationResult* spireResult = spCompileShader(spireContext, spireShader, &helloModule, 1, nullptr, spireSink);

    // Inspect any error messages that got reported...
    emitSpireDiagnostics(spireSink);

    //
    // Once we've compiled things successfully, we can extract the HLSL kernel
    // code for our shader, and pass it on to the D3D API.
    //

    // TODO(tfoley): The implementation should allow `NULL` for the length
    // output parameter.
    int sourceCodeLength;

    char const* vertexShaderCode = spGetShaderStageSource(spireResult, nullptr, "vs", &sourceCodeLength);
    char const* fragmentShaderCode = spGetShaderStageSource(spireResult, nullptr, "fs", &sourceCodeLength);

    // TODO(tfoley): Query the required constant-buffer size
    int constantBufferSize = 16 * sizeof(float);

    // Compile the generated HLSL code
    ID3DBlob* dxVertexShaderBlob = compileHLSLShader(vertexShaderCode, "vs_4_0");
    if(!dxVertexShaderBlob) return E_FAIL;

    ID3DBlob* dxPixelShaderBlob = compileHLSLShader(fragmentShaderCode, "ps_4_0");
    if(!dxPixelShaderBlob) return E_FAIL;

    HRESULT hr = S_OK;


    D3D11_BUFFER_DESC dxConstantBufferDesc = { 0 };
    dxConstantBufferDesc.ByteWidth = constantBufferSize;
    dxConstantBufferDesc.Usage = D3D11_USAGE_DYNAMIC;
    dxConstantBufferDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
    dxConstantBufferDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;

    hr = dxDevice->CreateBuffer(
        &dxConstantBufferDesc,
        NULL,
        &dxConstantBuffer);
    if(FAILED(hr)) return hr;

    // We clean up the Spire compilation context and result *after*
    // we have done the HLSL-to-bytecode compilation, because Spire
    // owns the memory allocation for the generated HLSL, and will
    // free it when we destroy the compilation result.
    spDestroyCompilationResult(spireResult);
    spDestroyCompilationContext(spireContext);

    // Input Assembler (IA)

    // In Spire-generated HLSL, all vertex shader inputs have a semantic
    // like: `A0`, `A1`, `A2`, etc., rather than trying to do by-name
    // matching. The user is thus responsibile for ensuring that the
    // order of their "input element descs" here matches the order
    // in which inputs are declared in the shader code.
    D3D11_INPUT_ELEMENT_DESC dxInputElements[] = {
        {"A", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, offsetof(Vertex, position), D3D11_INPUT_PER_VERTEX_DATA, 0 },
        {"A", 1, DXGI_FORMAT_R32G32B32_FLOAT, 0, offsetof(Vertex, color), D3D11_INPUT_PER_VERTEX_DATA, 0 },
    };
    hr = dxDevice->CreateInputLayout(
        &dxInputElements[0],
        2,
        dxVertexShaderBlob->GetBufferPointer(),
        dxVertexShaderBlob->GetBufferSize(),
        &dxInputLayout);
    if(FAILED(hr)) return hr;

    D3D11_BUFFER_DESC dxVertexBufferDesc = { 0 };
    dxVertexBufferDesc.ByteWidth = kVertexCount * sizeof(Vertex);
    dxVertexBufferDesc.Usage = D3D11_USAGE_IMMUTABLE;
    dxVertexBufferDesc.BindFlags = D3D11_BIND_VERTEX_BUFFER;

    D3D11_SUBRESOURCE_DATA dxVertexBufferInitData = { 0 };
    dxVertexBufferInitData.pSysMem = &kVertexData[0];

    hr = dxDevice->CreateBuffer(
        &dxVertexBufferDesc,
        &dxVertexBufferInitData,
        &dxVertexBuffer);
    if(FAILED(hr)) return hr;

    // Vertex Shader (VS)

    hr = dxDevice->CreateVertexShader(
        dxVertexShaderBlob->GetBufferPointer(),
        dxVertexShaderBlob->GetBufferSize(),
        NULL,
        &dxVertexShader);
    dxVertexShaderBlob->Release();
    if(FAILED(hr)) return hr;

    // Pixel Shader (PS)

    hr = dxDevice->CreatePixelShader(
        dxPixelShaderBlob->GetBufferPointer(),
        dxPixelShaderBlob->GetBufferSize(),
        NULL,
        &dxPixelShader);
    dxPixelShaderBlob->Release();
    if(FAILED(hr)) return hr;

    return S_OK;
}

void emitSpireDiagnostics(
    SpireDiagnosticSink* spireSink)
{
    int diagnosticCount = spGetDiagnosticCount(spireSink);
    for(int jj = 0; jj < diagnosticCount; ++jj)
    {
        SpireDiagnostic diagnostic;
        spGetDiagnosticByIndex(spireSink, jj, &diagnostic);

        static const char* kSeverityNames[] =
        {
            "note",
            "warning",
            "error",
            "fatal error",
            "internal error",
        };

        static const int kBufferSize = 1024;
        char buffer[kBufferSize];
        snprintf(buffer, kBufferSize, "%s(%d:%d): %s %d: %s\n",
            diagnostic.FileName,
            diagnostic.Line,
            diagnostic.Col,
            kSeverityNames[diagnostic.severity],
            diagnostic.ErrorId,
            diagnostic.Message);

        OutputDebugStringA(buffer);
    }

}

void renderFrame(ID3D11DeviceContext* dxContext)
{
    // We update our constant buffer per-frame, just for the purposes
    // of the example, but we don't actually load different data
    // per-frame (we always use an identity projection).
    D3D11_MAPPED_SUBRESOURCE mapped;
    HRESULT hr = dxContext->Map(dxConstantBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mapped);
    if(!FAILED(hr))
    {
        float* data = (float*) mapped.pData;

        static const float kIdentity[] =
        { 1, 0, 0, 0,
          0, 1, 0, 0,
          0, 0, 1, 0,
          0, 0, 0, 1 };
        memcpy(data, kIdentity, sizeof(kIdentity));

        dxContext->Unmap(dxConstantBuffer, 0);
    }

    // Input Assembler (IA)

    dxContext->IASetInputLayout(dxInputLayout);
    dxContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST);

    UINT dxVertexStride = sizeof(Vertex);
    UINT dxVertexBufferOffset = 0;
    dxContext->IASetVertexBuffers(0, 1, &dxVertexBuffer, &dxVertexStride, &dxVertexBufferOffset);

    // Vertex Shader (VS)

    dxContext->VSSetShader(dxVertexShader, NULL, 0);
    dxContext->VSSetConstantBuffers(0, 1, &dxConstantBuffer);

    // Pixel Shader (PS)

    dxContext->PSSetShader(dxPixelShader, NULL, 0);
    dxContext->VSSetConstantBuffers(0, 1, &dxConstantBuffer);

    //

    dxContext->Draw(3, 0);
}

void finalize()
{
}

//
// Definition of the HLSL-to-bytecode compilation logic.
//
ID3DBlob* compileHLSLShader(
    char const* source,
    char const* dxProfileName )
{
    // Rather than statically link against the `d3dcompile` library, we
    // dynamically load it.
    //
    // Note: A more realistic application would compile from HLSL text to D3D
    // shader bytecode as part of an offline process, rather than doing it
    // on-the-fly like this
    //
    static pD3DCompile D3DCompile_ = nullptr;
    if( !D3DCompile_ )
    {
        // TODO(tfoley): maybe want to search for one of a few versions of the DLL
        HMODULE d3dcompiler = LoadLibraryA("d3dcompiler_47.dll");
        if(!d3dcompiler)
        {
            fprintf(stderr, "error: failed load 'd3dcompiler_47.dll'\n");
            exit(1);
        }

        D3DCompile_ = (pD3DCompile)GetProcAddress(d3dcompiler, "D3DCompile");
        if( !D3DCompile_ )
        {
            fprintf(stderr, "error: failed load symbol 'D3DCompile'\n");
            exit(1);
        }
    }

    // For this example, we turn on debug output, and turn off all
    // optimization. A real application would only use these flags
    // when shader debugging is needed.
    UINT flags = 0;
    flags |= D3DCOMPILE_DEBUG;
    flags |= D3DCOMPILE_OPTIMIZATION_LEVEL0 | D3DCOMPILE_SKIP_OPTIMIZATION;

    // The `D3DCompile` entry point takes a bunch of parameters, but we
    // don't really need most of them for Spire-generated code.
    ID3DBlob* dxShaderBlob = nullptr;
    ID3DBlob* dxErrorBlob = nullptr;
    HRESULT hr = D3DCompile_(
        source,
        strlen(source),
        "spireGeneratedCode", // TODO: proper path for error messages
        nullptr,
        nullptr,
        "main",
        dxProfileName,
        flags,
        0,
        &dxShaderBlob,
        &dxErrorBlob);

    // If the HLSL-to-bytecode compilation produced any diagnostic messages
    // then we will print them out (whether or not the compilation failed).
    if( dxErrorBlob )
    {
        OutputDebugStringA(
            (char const*)dxErrorBlob->GetBufferPointer());
        dxErrorBlob->Release();
    }

    if( FAILED(hr) )
    {
        return nullptr;
    }

    return dxShaderBlob;
}


//
// We use a bare-minimum window procedure to get things up and running.
//

static LRESULT CALLBACK windowProc(
    HWND    windowHandle,
    UINT    message,
    WPARAM  wParam,
    LPARAM  lParam)
{
    switch (message)
    {
    case WM_CLOSE:
        PostQuitMessage(0);
        return 0;
    }

    return DefWindowProcW(windowHandle, message, wParam, lParam);
}

//
// Our `WinMain` handles the basic task of getting a window and rendering
// context up and running. There should be nothing suprising or interesting
// here.
//

int WINAPI WinMain(
    HINSTANCE instance,
    HINSTANCE /* prevInstance */,
    LPSTR     /* commandLine */,
    int       showCommand)
{
    // First we register a window class.

    WNDCLASSEXW windowClassDesc;
    windowClassDesc.cbSize = sizeof(windowClassDesc);
    windowClassDesc.style = CS_OWNDC | CS_HREDRAW | CS_VREDRAW;
    windowClassDesc.lpfnWndProc = &windowProc;
    windowClassDesc.cbClsExtra = 0;
    windowClassDesc.cbWndExtra = 0;
    windowClassDesc.hInstance = instance;
    windowClassDesc.hIcon = 0;
    windowClassDesc.hCursor = 0;
    windowClassDesc.hbrBackground = 0;
    windowClassDesc.lpszMenuName = 0;
    windowClassDesc.lpszClassName = L"HelloWorld";
    windowClassDesc.hIconSm = 0;
    ATOM windowClassAtom = RegisterClassExW(&windowClassDesc);
    if(!windowClassAtom)
    {
        fprintf(stderr, "error: failed to register window class\n");
        return 1;
    }

    // Next, we create a window using that window class.

    DWORD windowExtendedStyle = 0;
    DWORD windowStyle = 0;
    LPWSTR windowName = L"Spire Hello World";
    HWND windowHandle = CreateWindowExW(
        windowExtendedStyle,
        (LPWSTR)windowClassAtom,
        windowName,
        windowStyle,
        0, 0, // x, y
        gWindowWidth, gWindowHeight,
        NULL, // parent
        NULL, // menu
        instance,
        NULL);
    if(!windowHandle)
    {
        fprintf(stderr, "error: failed to create window\n");
        return 1;
    }


    // Rather than statically link against D3D, we load it dynamically.

    HMODULE d3d11 = LoadLibraryA("d3d11.dll");
    if(!d3d11)
    {
        fprintf(stderr, "error: failed load 'd3d11.dll'\n");
        return 1;
    }

    PFN_D3D11_CREATE_DEVICE_AND_SWAP_CHAIN D3D11CreateDeviceAndSwapChain_ =
        (PFN_D3D11_CREATE_DEVICE_AND_SWAP_CHAIN)GetProcAddress(
            d3d11,
            "D3D11CreateDeviceAndSwapChain");
    if(!D3D11CreateDeviceAndSwapChain_)
    {
        fprintf(stderr,
            "error: failed load symbol 'D3D11CreateDeviceAndSwapChain'\n");
        return 1;
    }

    // We create our device in debug mode, just so that we can check that the
    // example doesn't trigger warnings.
    UINT deviceFlags = 0;
    deviceFlags |= D3D11_CREATE_DEVICE_DEBUG;

    // We will ask for the highest feature level that can be supported.

    D3D_FEATURE_LEVEL featureLevels[] = {
        D3D_FEATURE_LEVEL_11_1,
        D3D_FEATURE_LEVEL_11_0,
        D3D_FEATURE_LEVEL_10_1,
        D3D_FEATURE_LEVEL_10_0,
        D3D_FEATURE_LEVEL_9_3,
        D3D_FEATURE_LEVEL_9_2,
        D3D_FEATURE_LEVEL_9_1,
    };
    D3D_FEATURE_LEVEL dxFeatureLevel = D3D_FEATURE_LEVEL_9_1;

    // Our swap chain uses RGBA8 with sRGB, with double buffering.

    DXGI_SWAP_CHAIN_DESC dxSwapChainDesc = { 0 };
    dxSwapChainDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
    dxSwapChainDesc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM_SRGB;
    dxSwapChainDesc.SampleDesc.Count = 1;
    dxSwapChainDesc.SampleDesc.Quality = 0;
    dxSwapChainDesc.BufferCount = 2;
    dxSwapChainDesc.OutputWindow = windowHandle;
    dxSwapChainDesc.Windowed = TRUE;
    dxSwapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
    dxSwapChainDesc.Flags = 0;

    // On a machine that does not have an up-to-date version of D3D installed,
    // the `D3D11CreateDeviceAndSwapChain` call will fail with `E_INVALIDARG`
    // if you ask for featuer level 11_1. The workaround is to call
    // `D3D11CreateDeviceAndSwapChain` up to twice: the first time with 11_1
    // at the start of the list of requested feature levels, and the second
    // time without it.

    IDXGISwapChain* dxSwapChain = NULL;
    ID3D11Device* dxDevice = NULL;
    ID3D11DeviceContext* dxImmediateContext = NULL;
    HRESULT hr = S_OK;
    for( int ii = 0; ii < 2; ++ii )
    {
        hr = D3D11CreateDeviceAndSwapChain_(
            NULL,                    // adapter (use default)
            D3D_DRIVER_TYPE_HARDWARE,
            NULL,                    // software
            deviceFlags,
            &featureLevels[ii],
            (sizeof(featureLevels) / sizeof(featureLevels[0])) - 1,
            D3D11_SDK_VERSION,
            &dxSwapChainDesc,
            &dxSwapChain,
            &dxDevice,
            &dxFeatureLevel,
            &dxImmediateContext);

        // Failures with `E_INVALIDARG` might be due to feature level 11_1
        // not being supported. Other failures are real, though.
        if( hr != E_INVALIDARG )
            break;
    }
    if( FAILED(hr) )
    {
        return 1;
    }

    // After we've created the swap chain, we can request a pointer to the
    // back buffer as a D3D11 texture, and create a render-target view from it.

    ID3D11Texture2D* dxBackBufferTexture = NULL;
    static const IID kIID_ID3D11Texture2D = {
        0x6f15aaf2, 0xd208, 0x4e89, 0x9a, 0xb4, 0x48,
        0x95, 0x35, 0xd3, 0x4f, 0x9c };
    dxSwapChain->GetBuffer(
        0,
        kIID_ID3D11Texture2D,
        (void**)&dxBackBufferTexture);

    ID3D11RenderTargetView* dxBackBufferRTV = NULL;
    dxDevice->CreateRenderTargetView(
        dxBackBufferTexture,
        NULL,
        &dxBackBufferRTV);

    // We immediately bind the back-buffer render target view, and we aren't
    // going to switch. We don't bother with a depth buffer.
    dxImmediateContext->OMSetRenderTargets(
        1,
        &dxBackBufferRTV,
        NULL);

    // Similarly, we are going to set up a viewport once, and then never
    // switch, since this is a simple test app.
    D3D11_VIEWPORT dxViewport;
    dxViewport.TopLeftX = 0;
    dxViewport.TopLeftY = 0;
    dxViewport.Width = (float) gWindowWidth;
    dxViewport.Height = (float) gWindowHeight;
    dxViewport.MaxDepth = 1; // TODO(tfoley): use reversed depth
    dxViewport.MinDepth = 0;
    dxImmediateContext->RSSetViewports(1, &dxViewport);

    // Once we've done the general-purpose initialization, we
    // initialize anything specific to the "hello world" application
    initialize( dxDevice );

    // Once initialization is all complete, we show the window...
    ShowWindow(windowHandle, showCommand);

    // ... and enter the event loop:
    for(;;)
    {
        MSG message;

        int result = PeekMessageW(&message, NULL, 0, 0, PM_REMOVE);
        if (result != 0)
        {
            if (message.message == WM_QUIT)
            {
                return (int)message.wParam;
            }

            TranslateMessage(&message);
            DispatchMessageW(&message);
        }
        else
        {
            // Whenver we don't have Windows events to process,
            // we render a frame.

            static const float kClearColor[] = { 0.25, 0.25, 0.25, 1.0 };
            dxImmediateContext->ClearRenderTargetView(
                dxBackBufferRTV,
                kClearColor);

            renderFrame( dxImmediateContext );

            dxSwapChain->Present(0, 0);
        }
    }

    return 0;
}


//
// In order to actually use Spire in our application, we need to link in its
// implementation. The easiest way to accomplish this is by directly inlcuding
// the (concatenated) Spire source code into our app.
//

#include <SpireAllSource.h>


================================================
FILE: Examples/hello/hello.sln
================================================

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hello", "hello.vcxproj", "{E6385042-1649-4803-9EBD-168F8B7EF131}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|x64 = Debug|x64
		Debug|x86 = Debug|x86
		Release|x64 = Release|x64
		Release|x86 = Release|x86
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{E6385042-1649-4803-9EBD-168F8B7EF131}.Debug|x64.ActiveCfg = Debug|x64
		{E6385042-1649-4803-9EBD-168F8B7EF131}.Debug|x64.Build.0 = Debug|x64
		{E6385042-1649-4803-9EBD-168F8B7EF131}.Debug|x86.ActiveCfg = Debug|Win32
		{E6385042-1649-4803-9EBD-168F8B7EF131}.Debug|x86.Build.0 = Debug|Win32
		{E6385042-1649-4803-9EBD-168F8B7EF131}.Release|x64.ActiveCfg = Release|x64
		{E6385042-1649-4803-9EBD-168F8B7EF131}.Release|x64.Build.0 = Release|x64
		{E6385042-1649-4803-9EBD-168F8B7EF131}.Release|x86.ActiveCfg = Release|Win32
		{E6385042-1649-4803-9EBD-168F8B7EF131}.Release|x86.Build.0 = Release|Win32
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal


================================================
FILE: Examples/hello/hello.spire
================================================
// shaders.spire

// TODO(tfoley): strip this down to a minimal pipeline

pipeline StandardPipeline
{
    [Pinned]
    input world MeshVertex;

    world CoarseVertex;// : "glsl(vertex:projCoord)" using projCoord export standardExport;
    world Fragment;// : "glsl" export fragmentExport;
    
    require @CoarseVertex vec4 projCoord; 
  
    [VertexInput]
    extern @CoarseVertex MeshVertex vertAttribIn;
    import(MeshVertex->CoarseVertex) vertexImport()
    {
        return project(vertAttribIn);
    }
    
    extern @Fragment CoarseVertex CoarseVertexIn;
    import(CoarseVertex->Fragment) standardImport()
// TODO(tfoley): this trait doesn't seem to be implemented on `vec3`
//        require trait IsTriviallyPassable(CoarseVertex)
    {
        return project(CoarseVertexIn);
    }
    
    stage vs : VertexShader
    {
        World: CoarseVertex;
        Position: projCoord;
    }
    
    stage fs : FragmentShader
    {
        World: Fragment;
    }
}

module HelloModule
{
    @MeshVertex vec3 position;
    @MeshVertex vec3 color;

    param mat4 modelViewProjection;

    public vec4 projCoord = modelViewProjection * vec4(position, 1.0);

    out @Fragment vec4 colorTarget = vec4(color,1);
}


================================================
FILE: Examples/hello/hello.vcxproj
================================================
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup Label="ProjectConfigurations">
    <ProjectConfiguration Include="Debug_VS2013|Win32">
      <Configuration>Debug_VS2013</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Debug_VS2013|x64">
      <Configuration>Debug_VS2013</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Debug|Win32">
      <Configuration>Debug</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release_VS2013|Win32">
      <Configuration>Release_VS2013</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release_VS2013|x64">
      <Configuration>Release_VS2013</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|Win32">
      <Configuration>Release</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Debug|x64">
      <Configuration>Debug</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|x64">
      <Configuration>Release</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
  </ItemGroup>
  <PropertyGroup Label="Globals">
    <ProjectGuid>{E6385042-1649-4803-9EBD-168F8B7EF131}</ProjectGuid>
    <Keyword>Win32Proj</Keyword>
    <RootNamespace>hello</RootNamespace>
    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_VS2013|Win32'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_VS2013|Win32'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_VS2013|x64'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v120</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_VS2013|x64'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v120</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  <ImportGroup Label="ExtensionSettings">
  </ImportGroup>
  <ImportGroup Label="Shared">
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_VS2013|Win32'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_VS2013|Win32'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_VS2013|x64'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_VS2013|x64'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <PropertyGroup Label="UserMacros" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <LinkIncremental>true</LinkIncremental>
    <IncludePath>$(ProjectDir)../../;$(IncludePath)</IncludePath>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_VS2013|Win32'">
    <LinkIncremental>true</LinkIncremental>
    <IncludePath>$(ProjectDir)../../;$(IncludePath)</IncludePath>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <LinkIncremental>true</LinkIncremental>
    <IncludePath>$(ProjectDir)../../;$(IncludePath)</IncludePath>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_VS2013|x64'">
    <LinkIncremental>true</LinkIncremental>
    <IncludePath>$(ProjectDir)../../;$(IncludePath)</IncludePath>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <LinkIncremental>false</LinkIncremental>
    <IncludePath>$(ProjectDir)../../;$(IncludePath)</IncludePath>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_VS2013|Win32'">
    <LinkIncremental>false</LinkIncremental>
    <IncludePath>$(ProjectDir)../../;$(IncludePath)</IncludePath>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <LinkIncremental>false</LinkIncremental>
    <IncludePath>$(ProjectDir)../../;$(IncludePath)</IncludePath>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_VS2013|x64'">
    <LinkIncremental>false</LinkIncremental>
    <IncludePath>$(ProjectDir)../../;$(IncludePath)</IncludePath>
  </PropertyGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <ClCompile>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <WarningLevel>Level3</WarningLevel>
      <Optimization>Disabled</Optimization>
      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_VS2013|Win32'">
    <ClCompile>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <WarningLevel>Level3</WarningLevel>
      <Optimization>Disabled</Optimization>
      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <ClCompile>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <WarningLevel>Level3</WarningLevel>
      <Optimization>Disabled</Optimization>
      <PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_VS2013|x64'">
    <ClCompile>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <WarningLevel>Level3</WarningLevel>
      <Optimization>Disabled</Optimization>
      <PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <Optimization>MaxSpeed</Optimization>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_VS2013|Win32'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <Optimization>MaxSpeed</Optimization>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <Optimization>MaxSpeed</Optimization>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_VS2013|x64'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <Optimization>MaxSpeed</Optimization>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
  </ItemDefinitionGroup>
  <ItemGroup>
    <ClCompile Include="hello.cpp" />
  </ItemGroup>
  <ItemGroup>
    <None Include="hello.spire" />
  </ItemGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  <ImportGroup Label="ExtensionTargets">
  </ImportGroup>
</Project>

================================================
FILE: Examples/hello/hello.vcxproj.filters
================================================
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup>
    <ClCompile Include="hello.cpp" />
  </ItemGroup>
  <ItemGroup>
    <None Include="hello.spire" />
  </ItemGroup>
</Project>

================================================
FILE: LICENSE.txt
================================================

Spire - The MIT License (MIT)
Copyright (c) 2016, Carnegie Mellon University

Developers: Yong He, Haomin Long, Teguh Hofstee

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.

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.


================================================
FILE: README.md
================================================
# Spire
Spire is a shading language and compiler framework that facilitates modular shader authoring and rapid exploration of shader optimization choices (such as frequency reduction and algorithmic approximation) afforded by modern real-time graphics engines. The current implementation of the Spire compiler can generate either GLSL or SPIR-V output for use with OpenGL and Vulkan based engines.

For an example of intergrating Spire into a game engine, head to this repository:
https://github.com/csyonghe/GameEngine

Note: This repository is no longer being updated. Code here is used to produce the work of our SIGGRAPH 2017 publication. Please check out our latest development of the Spire shading language at https://github.com/shader-slang/slang.

# Publications

[Shader Components: Modular and High Performance Shader Development](http://graphics.cs.cmu.edu/projects/shadercomp/) SIGGRAPH 2017

[A System for Rapid Exploration of Shader Optimization Choices](http://graphics.cs.cmu.edu/projects/spire/) SIGGRAPH 2016


================================================
FILE: Source/CoreLib/Allocator.h
================================================
#ifndef CORE_LIB_ALLOCATOR_H
#define CORE_LIB_ALLOCATOR_H

#include <stdlib.h>

namespace CoreLib
{
	namespace Basic
	{
		inline void * AlignedAlloc(size_t size, size_t alignment)
		{
#ifdef _MSC_VER
			return _aligned_malloc(size, alignment);
#else
			void * rs = 0;
			int succ = posix_memalign(&rs, alignment, size);
			if (succ!=0)
				rs = 0;
			return rs;
#endif
		}

		inline void AlignedFree(void * ptr)
		{
#ifdef _MSC_VER
			_aligned_free(ptr);
#else
			free(ptr);
#endif
		}

		class StandardAllocator
		{
		public:
			// not really called
			void * Alloc(size_t size)
			{
				return malloc(size);
			}
			void Free(void * ptr)
			{
				return free(ptr);
			}
		};

		template<int alignment>
		class AlignedAllocator
		{
		public:
			void * Alloc(size_t size)
			{
				return AlignedAlloc(size, alignment);
			}
			void Free(void * ptr)
			{
				return AlignedFree(ptr);
			}
		};
	}
}

#endif

================================================
FILE: Source/CoreLib/Array.h
================================================
#ifndef CORE_LIB_ARRAY_H
#define CORE_LIB_ARRAY_H

#include "Exception.h"
#include "ArrayView.h"

namespace CoreLib
{
	namespace Basic
	{
		template<typename T, int size>
		class Array
		{
		private:
			T _buffer[size];
			int _count = 0;
		public:
			T* begin() const
			{
				return (T*)_buffer;
			}
			T* end() const
			{
				return (T*)_buffer + _count;
			}
		public:
			inline int GetCapacity() const
			{
				return size;
			}
			inline int Count() const
			{
				return _count;
			}
			inline T & First() const
			{
				return const_cast<T&>(_buffer[0]);
			}
			inline T & Last() const
			{
				return const_cast<T&>(_buffer[_count - 1]);
			}
			inline void SetSize(int newSize)
			{
#ifdef _DEBUG
				if (newSize > size)
					throw IndexOutofRangeException("size too large.");
#endif
				_count = newSize;
			}
			inline void Add(const T & item)
			{
#ifdef _DEBUG
				if (_count == size)
					throw IndexOutofRangeException("out of range access to static array.");
#endif
				_buffer[_count++] = item;
			}
			inline void Add(T && item)
			{
#ifdef _DEBUG
				if (_count == size)
					throw IndexOutofRangeException("out of range access to static array.");
#endif
				_buffer[_count++] = _Move(item);
			}

			inline T & operator [](int id) const
			{
#if _DEBUG
				if (id >= _count || id < 0)
					throw IndexOutofRangeException("Operator[]: Index out of Range.");
#endif
				return ((T*)_buffer)[id];
			}

			inline T* Buffer() const
			{
				return (T*)_buffer;
			}

			inline void Clear()
			{
				_count = 0;
			}

			template<typename T2>
			int IndexOf(const T2 & val) const
			{
				for (int i = 0; i < _count; i++)
				{
					if (_buffer[i] == val)
						return i;
				}
				return -1;
			}

			template<typename T2>
			int LastIndexOf(const T2 & val) const
			{
				for (int i = _count - 1; i >= 0; i--)
				{
					if (_buffer[i] == val)
						return i;
				}
				return -1;
			}

			inline ArrayView<T> GetArrayView() const
			{
				return ArrayView<T>((T*)_buffer, _count);
			}
			inline ArrayView<T> GetArrayView(int start, int count) const
			{
				return ArrayView<T>((T*)_buffer + start, count);
			}
		};

		template<typename T, typename ...TArgs>
		struct FirstType
		{
			typedef T type;
		};


		template<typename T, int size>
		void InsertArray(Array<T, size> &) {}

		template<typename T, typename ...TArgs, int size>
		void InsertArray(Array<T, size> & arr, const T & val, TArgs... args)
		{
			arr.Add(val);
			InsertArray(arr, args...);
		}

		template<typename ...TArgs>
		auto MakeArray(TArgs ...args)
		{
			Array<typename FirstType<TArgs...>::type, sizeof...(args)> rs;
			InsertArray(rs, args...);
			return rs;
		}
	}
}

#endif

================================================
FILE: Source/CoreLib/ArrayView.h
================================================
#ifndef CORE_LIB_ARRAY_VIEW_H
#define CORE_LIB_ARRAY_VIEW_H

#include "Exception.h"

namespace CoreLib
{
	namespace Basic
	{
		template<typename T>
		class ArrayView
		{
		private:
			T * _buffer;
			int _count;
			int stride;
		public:
			T* begin() const
			{
				return _buffer;
			}
			T* end() const
			{
				return (T*)((char*)_buffer + _count*stride);
			}
		public:
			ArrayView()
			{
				_buffer = 0;
				_count = 0;
			}
			ArrayView(const T & singleObj)
			{
				SetData((T*)&singleObj, 1, sizeof(T));
			}
			ArrayView(T * buffer, int count)
			{
				SetData(buffer, count, sizeof(T));
			}
			ArrayView(void * buffer, int count, int _stride)
			{
				SetData(buffer, count, _stride);
			}
			void SetData(void * buffer, int count, int _stride)
			{
				this->_buffer = (T*)buffer;
				this->_count = count;
				this->stride = _stride;
			}
			inline int GetCapacity() const
			{
				return _count;
			}
			inline int Count() const
			{
				return _count;
			}

			inline T & operator [](int id) const
			{
#if _DEBUG
				if (id >= _count || id < 0)
					throw IndexOutofRangeException("Operator[]: Index out of Range.");
#endif
				return *(T*)((char*)_buffer+id*stride);
			}

			inline T* Buffer() const
			{
				return _buffer;
			}

			template<typename T2>
			int IndexOf(const T2 & val) const
			{
				for (int i = 0; i < _count; i++)
				{
					if (*(T*)((char*)_buffer + i*stride) == val)
						return i;
				}
				return -1;
			}

			template<typename T2>
			int LastIndexOf(const T2 & val) const
			{
				for (int i = _count - 1; i >= 0; i--)
				{
					if (*(T*)((char*)_buffer + i*stride) == val)
						return i;
				}
				return -1;
			}

			template<typename Func>
			int FindFirst(const Func & predicate) const
			{
				for (int i = 0; i < _count; i++)
				{
					if (predicate(_buffer[i]))
						return i;
				}
				return -1;
			}

			template<typename Func>
			int FindLast(const Func & predicate) const
			{
				for (int i = _count - 1; i >= 0; i--)
				{
					if (predicate(_buffer[i]))
						return i;
				}
				return -1;
			}
		};

		template<typename T>
		ArrayView<T> MakeArrayView(const T & obj)
		{
			return ArrayView<T>(obj);
		}
		
		template<typename T>
		ArrayView<T> MakeArrayView(T * buffer, int count)
		{
			return ArrayView<T>(buffer, count);
		}
	}
}
#endif

================================================
FILE: Source/CoreLib/Basic.h
================================================
#ifndef CORE_LIB_BASIC_H
#define CORE_LIB_BASIC_H

#include "Common.h"
#include "LibMath.h"
#include "LibString.h"
#include "Array.h"
#include "List.h"
#include "Link.h"
#include "SmartPointer.h"
#include "Exception.h"
#include "Dictionary.h"
#include "Func.h"
#include "Linq.h"

namespace CoreLib
{
	using namespace Basic;
}

#endif

================================================
FILE: Source/CoreLib/CMakeLists.txt
================================================
cmake_minimum_required (VERSION 2.6) 
project (CoreLib) 

add_library(CoreLib_Basic STATIC
 Basic.h
 Common.h
 Dictionary.h
 Exception.h
 IntSet.h
 LibIO.cpp
 LibIO.h
 LibMath.cpp
 LibMath.h
 LibString.cpp
 LibString.h
 Link.h
 List.h
 Parser.cpp
 Parser.h
 PerformanceCounter.cpp
 PerformanceCounter.h
 SmartPointer.h
 Stream.cpp
 Stream.h
 TextIO.cpp
 TextIO.h
 Threading.h
 VectorMath.cpp
 VectorMath.h
 WideChar.cpp
 WideChar.h
 SecureCRT.h
)
add_subdirectory (Graphics) 
add_subdirectory (Imaging)
add_subdirectory (Regex)


================================================
FILE: Source/CoreLib/CommandLineParser.cpp
================================================
#include "CommandLineParser.h"

namespace CoreLib
{
	namespace Text
	{
		CommandLineParser::CommandLineParser(const String & cmdLine)
		{
			stream = Split(cmdLine, L' ');
		}

		String CommandLineParser::GetFileName()
		{
			if (stream.Count())
				return stream.First();
			else
				return "";
		}

		bool CommandLineParser::OptionExists(const String & opt)
		{
			for (auto & token : stream)
			{
				if (token.Equals(opt, false))
				{
					return true;
				}
			}
			return false;
		}

		String CommandLineParser::GetOptionValue(const String & opt)
		{
			for (int i = 0; i < stream.Count(); i++)
			{
				if (stream[i].Equals(opt, false))
				{
					if (i < stream.Count() - 1)
						return stream[i+1];
					return "";
				}
			}
			return "";
		}

		String CommandLineParser::GetToken(int id)
		{
			return stream[id];
		}

		int CommandLineParser::GetTokenCount()
		{
			return stream.Count();
		}
	}
}

================================================
FILE: Source/CoreLib/CommandLineParser.h
================================================
#ifndef CORE_LIB_COMMANDLINE_PARSER
#define CORE_LIB_COMMANDLINE_PARSER

#include "Tokenizer.h"

namespace CoreLib
{
	namespace Text
	{
		class CommandLineParser : public Object
		{
		private:
			List<String> stream;
		public:
			CommandLineParser(const String & cmdLine);
			String GetFileName();
			bool OptionExists(const String & opt);
			String GetOptionValue(const String & opt);
			String GetToken(int id);
			int GetTokenCount();
		};
	}
}

#endif

================================================
FILE: Source/CoreLib/Common.h
================================================
#ifndef CORE_LIB_COMMON_H
#define CORE_LIB_COMMON_H

#include <cstdint>

#ifdef __GNUC__
#define CORE_LIB_ALIGN_16(x) x __attribute__((aligned(16)))
#else
#define CORE_LIB_ALIGN_16(x) __declspec(align(16)) x
#endif

#define VARIADIC_TEMPLATE

namespace CoreLib
{
	typedef int64_t Int64;
	typedef unsigned short Word;
#ifdef _M_X64
	typedef int64_t PtrInt;
#else
	typedef int PtrInt;
#endif
	namespace Basic
	{
		class Object
		{
		public:
			virtual ~Object()
			{}
		};

		template <typename T>
		inline T&& _Move(T & obj)
		{
			return static_cast<T&&>(obj);
		}

		template <typename T>
		inline void Swap(T & v0, T & v1)
		{
			T tmp = _Move(v0);
			v0 = _Move(v1);
			v1 = _Move(tmp);
		}
	}
}

#endif


================================================
FILE: Source/CoreLib/CoreLibBasic.vcxproj
================================================
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup Label="ProjectConfigurations">
    <ProjectConfiguration Include="DebugClang|ARM">
      <Configuration>DebugClang</Configuration>
      <Platform>ARM</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="DebugClang|Win32">
      <Configuration>DebugClang</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="DebugClang|x64">
      <Configuration>DebugClang</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Debug_VS2013|ARM">
      <Configuration>Debug_VS2013</Configuration>
      <Platform>ARM</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Debug_VS2013|Win32">
      <Configuration>Debug_VS2013</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Debug_VS2013|x64">
      <Configuration>Debug_VS2013</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Debug|ARM">
      <Configuration>Debug</Configuration>
      <Platform>ARM</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Debug|Win32">
      <Configuration>Debug</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Debug|x64">
      <Configuration>Debug</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release_VS2013|ARM">
      <Configuration>Release_VS2013</Configuration>
      <Platform>ARM</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release_VS2013|Win32">
      <Configuration>Release_VS2013</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release_VS2013|x64">
      <Configuration>Release_VS2013</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|ARM">
      <Configuration>Release</Configuration>
      <Platform>ARM</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|Win32">
      <Configuration>Release</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|x64">
      <Configuration>Release</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="TracingDebug|ARM">
      <Configuration>TracingDebug</Configuration>
      <Platform>ARM</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="TracingDebug|Win32">
      <Configuration>TracingDebug</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="TracingDebug|x64">
      <Configuration>TracingDebug</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="TracingRelease|ARM">
      <Configuration>TracingRelease</Configuration>
      <Platform>ARM</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="TracingRelease|Win32">
      <Configuration>TracingRelease</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="TracingRelease|x64">
      <Configuration>TracingRelease</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
  </ItemGroup>
  <PropertyGroup Label="Globals" />
  <PropertyGroup Label="Globals">
  </PropertyGroup>
  <PropertyGroup Label="Globals">
  </PropertyGroup>
  <PropertyGroup Label="Globals">
  </PropertyGroup>
  <PropertyGroup Label="Globals">
    <Keyword>Win32Proj</Keyword>
    <RootNamespace>CoreLib</RootNamespace>
    <ProjectGuid>{F9BE7957-8399-899E-0C49-E714FDDD4B65}</ProjectGuid>
    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    <ConfigurationType>StaticLibrary</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_VS2013|Win32'" Label="Configuration">
    <ConfigurationType>StaticLibrary</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v120</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugClang|Win32'" Label="Configuration">
    <ConfigurationType>StaticLibrary</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v140_clang_3_7</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='TracingDebug|Win32'" Label="Configuration">
    <ConfigurationType>StaticLibrary</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
    <ConfigurationType>StaticLibrary</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_VS2013|x64'" Label="Configuration">
    <ConfigurationType>StaticLibrary</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v120</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugClang|x64'" Label="Configuration">
    <ConfigurationType>StaticLibrary</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v140_Clang_3_7</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='TracingDebug|x64'" Label="Configuration">
    <ConfigurationType>StaticLibrary</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
    <ConfigurationType>StaticLibrary</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_VS2013|ARM'" Label="Configuration">
    <ConfigurationType>StaticLibrary</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v120</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugClang|ARM'" Label="Configuration">
    <ConfigurationType>StaticLibrary</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v140_clang_3_7</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='TracingDebug|ARM'" Label="Configuration">
    <ConfigurationType>StaticLibrary</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    <ConfigurationType>StaticLibrary</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_VS2013|Win32'" Label="Configuration">
    <ConfigurationType>StaticLibrary</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v120</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='TracingRelease|Win32'" Label="Configuration">
    <ConfigurationType>StaticLibrary</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
    <ConfigurationType>StaticLibrary</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_VS2013|x64'" Label="Configuration">
    <ConfigurationType>StaticLibrary</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v120</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='TracingRelease|x64'" Label="Configuration">
    <ConfigurationType>StaticLibrary</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
    <ConfigurationType>StaticLibrary</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_VS2013|ARM'" Label="Configuration">
    <ConfigurationType>StaticLibrary</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v120</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='TracingRelease|ARM'" Label="Configuration">
    <ConfigurationType>StaticLibrary</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v140</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  <ImportGroup Label="ExtensionSettings">
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_VS2013|Win32'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugClang|Win32'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='TracingDebug|Win32'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_VS2013|x64'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugClang|x64'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='TracingDebug|x64'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_VS2013|ARM'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugClang|ARM'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='TracingDebug|ARM'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_VS2013|Win32'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='TracingRelease|Win32'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_VS2013|x64'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='TracingRelease|x64'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_VS2013|ARM'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='TracingRelease|ARM'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <PropertyGroup Label="UserMacros" />
  <PropertyGroup />
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <ClCompile>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <WarningLevel>Level4</WarningLevel>
      <Optimization>Disabled</Optimization>
      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;WINDOWS_PLATFORM;%(PreprocessorDefinitions);GLEW_STATIC</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
      <MultiProcessorCompilation>false</MultiProcessorCompilation>
      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
    <Lib>
      <AdditionalDependencies>Shlwapi.lib</AdditionalDependencies>
    </Lib>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_VS2013|Win32'">
    <ClCompile>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <WarningLevel>Level4</WarningLevel>
      <Optimization>Disabled</Optimization>
      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;WINDOWS_PLATFORM;%(PreprocessorDefinitions);GLEW_STATIC</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
      <MultiProcessorCompilation>false</MultiProcessorCompilation>
      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
    <Lib>
      <AdditionalDependencies>Shlwapi.lib</AdditionalDependencies>
    </Lib>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugClang|Win32'">
    <ClCompile>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <WarningLevel>EnableAllWarnings</WarningLevel>
      <Optimization>Disabled</Optimization>
      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;WINDOWS_PLATFORM;%(PreprocessorDefinitions);GLEW_STATIC</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
      <MultiProcessorCompilation>false</MultiProcessorCompilation>
      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
      <RuntimeTypeInfo>true</RuntimeTypeInfo>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
    <Lib>
      <AdditionalDependencies>Shlwapi.lib</AdditionalDependencies>
    </Lib>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='TracingDebug|Win32'">
    <ClCompile>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <WarningLevel>Level4</WarningLevel>
      <Optimization>Disabled</Optimization>
      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;WINDOWS_PLATFORM;%(PreprocessorDefinitions);GLEW_STATIC</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
      <MultiProcessorCompilation>false</MultiProcessorCompilation>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
    <Lib>
      <AdditionalDependencies>Shlwapi.lib</AdditionalDependencies>
    </Lib>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <ClCompile>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <WarningLevel>Level4</WarningLevel>
      <Optimization>Disabled</Optimization>
      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;WINDOWS_PLATFORM;%(PreprocessorDefinitions);GLEW_STATIC</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
      <BrowseInformation>true</BrowseInformation>
      <MultiProcessorCompilation>false</MultiProcessorCompilation>
      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
    <Lib>
      <AdditionalDependencies>Shlwapi.lib</AdditionalDependencies>
    </Lib>
    <Bscmake>
      <PreserveSbr>true</PreserveSbr>
    </Bscmake>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_VS2013|x64'">
    <ClCompile>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <WarningLevel>Level4</WarningLevel>
      <Optimization>Disabled</Optimization>
      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;WINDOWS_PLATFORM;%(PreprocessorDefinitions);GLEW_STATIC</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
      <BrowseInformation>true</BrowseInformation>
      <MultiProcessorCompilation>false</MultiProcessorCompilation>
      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
    <Lib>
      <AdditionalDependencies>Shlwapi.lib</AdditionalDependencies>
    </Lib>
    <Bscmake>
      <PreserveSbr>true</PreserveSbr>
    </Bscmake>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugClang|x64'">
    <ClCompile>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <WarningLevel>Level4</WarningLevel>
      <Optimization>Disabled</Optimization>
      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;WINDOWS_PLATFORM;%(PreprocessorDefinitions);GLEW_STATIC</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
      <BrowseInformation>true</BrowseInformation>
      <MultiProcessorCompilation>false</MultiProcessorCompilation>
      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
    <Lib>
      <AdditionalDependencies>Shlwapi.lib</AdditionalDependencies>
    </Lib>
    <Bscmake>
      <PreserveSbr>true</PreserveSbr>
    </Bscmake>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='TracingDebug|x64'">
    <ClCompile>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <WarningLevel>Level4</WarningLevel>
      <Optimization>Disabled</Optimization>
      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;WINDOWS_PLATFORM;%(PreprocessorDefinitions);GLEW_STATIC</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
      <MultiProcessorCompilation>false</MultiProcessorCompilation>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
    <Lib>
      <AdditionalDependencies>Shlwapi.lib</AdditionalDependencies>
    </Lib>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
    <ClCompile>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <WarningLevel>Level4</WarningLevel>
      <Optimization>Disabled</Optimization>
      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;WINDOWS_PLATFORM;%(PreprocessorDefinitions);GLEW_STATIC</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
      <MultiProcessorCompilation>false</MultiProcessorCompilation>
      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
    <Lib>
      <AdditionalDependencies>Shlwapi.lib</AdditionalDependencies>
    </Lib>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_VS2013|ARM'">
    <ClCompile>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <WarningLevel>Level4</WarningLevel>
      <Optimization>Disabled</Optimization>
      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;WINDOWS_PLATFORM;%(PreprocessorDefinitions);GLEW_STATIC</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
      <MultiProcessorCompilation>false</MultiProcessorCompilation>
      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
    <Lib>
      <AdditionalDependencies>Shlwapi.lib</AdditionalDependencies>
    </Lib>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugClang|ARM'">
    <ClCompile>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <WarningLevel>Level4</WarningLevel>
      <Optimization>Disabled</Optimization>
      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;WINDOWS_PLATFORM;%(PreprocessorDefinitions);GLEW_STATIC</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
      <MultiProcessorCompilation>false</MultiProcessorCompilation>
      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
    <Lib>
      <AdditionalDependencies>Shlwapi.lib</AdditionalDependencies>
    </Lib>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='TracingDebug|ARM'">
    <ClCompile>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <WarningLevel>Level4</WarningLevel>
      <Optimization>Disabled</Optimization>
      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;WINDOWS_PLATFORM;%(PreprocessorDefinitions);GLEW_STATIC</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
      <MultiProcessorCompilation>false</MultiProcessorCompilation>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
    <Lib>
      <AdditionalDependencies>Shlwapi.lib</AdditionalDependencies>
    </Lib>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <ClCompile>
      <WarningLevel>Level4</WarningLevel>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <Optimization>MaxSpeed</Optimization>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;WINDOWS_PLATFORM;%(PreprocessorDefinitions);GLEW_STATIC</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
      <MultiProcessorCompilation>false</MultiProcessorCompilation>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
    </Link>
    <Lib>
      <AdditionalDependencies>Shlwapi.lib</AdditionalDependencies>
    </Lib>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_VS2013|Win32'">
    <ClCompile>
      <WarningLevel>Level4</WarningLevel>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <Optimization>MaxSpeed</Optimization>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;WINDOWS_PLATFORM;%(PreprocessorDefinitions);GLEW_STATIC</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
      <MultiProcessorCompilation>false</MultiProcessorCompilation>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
    </Link>
    <Lib>
      <AdditionalDependencies>Shlwapi.lib</AdditionalDependencies>
    </Lib>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='TracingRelease|Win32'">
    <ClCompile>
      <WarningLevel>Level4</WarningLevel>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <Optimization>MaxSpeed</Optimization>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;WINDOWS_PLATFORM;%(PreprocessorDefinitions);GLEW_STATIC</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
      <MultiProcessorCompilation>false</MultiProcessorCompilation>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
    </Link>
    <Lib>
      <AdditionalDependencies>Shlwapi.lib</AdditionalDependencies>
    </Lib>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <ClCompile>
      <WarningLevel>Level4</WarningLevel>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <Optimization>MaxSpeed</Optimization>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;WINDOWS_PLATFORM;%(PreprocessorDefinitions);GLEW_STATIC</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
      <MultiProcessorCompilation>false</MultiProcessorCompilation>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
    </Link>
    <Lib>
      <AdditionalDependencies>Shlwapi.lib</AdditionalDependencies>
    </Lib>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_VS2013|x64'">
    <ClCompile>
      <WarningLevel>Level4</WarningLevel>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <Optimization>MaxSpeed</Optimization>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;WINDOWS_PLATFORM;%(PreprocessorDefinitions);GLEW_STATIC</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
      <MultiProcessorCompilation>false</MultiProcessorCompilation>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
    </Link>
    <Lib>
      <AdditionalDependencies>Shlwapi.lib</AdditionalDependencies>
    </Lib>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='TracingRelease|x64'">
    <ClCompile>
      <WarningLevel>Level4</WarningLevel>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <Optimization>MaxSpeed</Optimization>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;WINDOWS_PLATFORM;%(PreprocessorDefinitions);GLEW_STATIC</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
      <FloatingPointExceptions>false</FloatingPointExceptions>
      <MultiProcessorCompilation>false</MultiProcessorCompilation>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
    </Link>
    <Lib>
      <AdditionalDependencies>Shlwapi.lib</AdditionalDependencies>
    </Lib>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
    <ClCompile>
      <WarningLevel>Level4</WarningLevel>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <Optimization>MaxSpeed</Optimization>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;WINDOWS_PLATFORM;%(PreprocessorDefinitions);GLEW_STATIC</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
      <MultiProcessorCompilation>false</MultiProcessorCompilation>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
    </Link>
    <Lib>
      <AdditionalDependencies>Shlwapi.lib</AdditionalDependencies>
    </Lib>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_VS2013|ARM'">
    <ClCompile>
      <WarningLevel>Level4</WarningLevel>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <Optimization>MaxSpeed</Optimization>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;WINDOWS_PLATFORM;%(PreprocessorDefinitions);GLEW_STATIC</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
      <MultiProcessorCompilation>false</MultiProcessorCompilation>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
    </Link>
    <Lib>
      <AdditionalDependencies>Shlwapi.lib</AdditionalDependencies>
    </Lib>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='TracingRelease|ARM'">
    <ClCompile>
      <WarningLevel>Level4</WarningLevel>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <Optimization>MaxSpeed</Optimization>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;WINDOWS_PLATFORM;%(PreprocessorDefinitions);GLEW_STATIC</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
      <MultiProcessorCompilation>false</MultiProcessorCompilation>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
    </Link>
    <Lib>
      <AdditionalDependencies>Shlwapi.lib</AdditionalDependencies>
    </Lib>
  </ItemDefinitionGroup>
  <ItemGroup>
    <ClInclude Include="Allocator.h" />
    <ClInclude Include="Array.h" />
    <ClInclude Include="ArrayView.h" />
    <ClInclude Include="Basic.h" />
    <ClInclude Include="Common.h" />
    <ClInclude Include="Dictionary.h" />
    <ClInclude Include="Exception.h" />
    <ClInclude Include="Func.h" />
    <ClInclude Include="Hash.h" />
    <ClInclude Include="IntSet.h" />
    <ClInclude Include="LibIO.h" />
    <ClInclude Include="LibString.h" />
    <ClInclude Include="Link.h" />
    <ClInclude Include="Linq.h" />
    <ClInclude Include="List.h" />
    <ClInclude Include="LibMath.h" />
    <ClInclude Include="Tokenizer.h" />
    <ClInclude Include="SecureCRT.h" />
    <ClInclude Include="SmartPointer.h" />
    <ClInclude Include="Stream.h" />
    <ClInclude Include="TextIO.h" />
    <ClInclude Include="TypeTraits.h" />
  </ItemGroup>
  <ItemGroup>
    <ClCompile Include="LibIO.cpp" />
    <ClCompile Include="LibMath.cpp" />
    <ClCompile Include="LibString.cpp" />
    <ClCompile Include="Tokenizer.cpp" />
    <ClCompile Include="Stream.cpp" />
    <ClCompile Include="TextIO.cpp" />
  </ItemGroup>
  <ItemGroup>
    <None Include="corelib.natvis" />
  </ItemGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  <ImportGroup Label="ExtensionTargets">
  </ImportGroup>
</Project>


================================================
FILE: Source/CoreLib/Dictionary.h
================================================
#ifndef CORE_LIB_DICTIONARY_H
#define CORE_LIB_DICTIONARY_H
#include "List.h"
#include "Common.h"
#include "IntSet.h"
#include "Exception.h"
#include "LibMath.h"
#include "Hash.h"

namespace CoreLib
{
	namespace Basic
	{
		template<typename TKey, typename TValue>
		class KeyValuePair
		{
		public:
			TKey Key;
			TValue Value;
			KeyValuePair()
			{}
			KeyValuePair(const TKey & key, const TValue & value)
			{
				Key = key;
				Value = value;
			}
			KeyValuePair(TKey && key, TValue && value)
			{
				Key = _Move(key);
				Value = _Move(value);
			}
			KeyValuePair(TKey && key, const TValue & value)
			{
				Key = _Move(key);
				Value = value;
			}
			KeyValuePair(const KeyValuePair<TKey, TValue> & _that)
			{
				Key = _that.Key;
				Value = _that.Value;
			}
			KeyValuePair(KeyValuePair<TKey, TValue> && _that)
			{
				operator=(_Move(_that));
			}
			KeyValuePair & operator=(KeyValuePair<TKey, TValue> && that)
			{
				Key = _Move(that.Key);
				Value = _Move(that.Value);
				return *this;
			}
			KeyValuePair & operator=(const KeyValuePair<TKey, TValue> & that)
			{
				Key = that.Key;
				Value = that.Value;
				return *this;
			}
			int GetHashCode()
			{
				return GetHashCode(Key);
			}
		};

		template<typename TKey, typename TValue>
		inline KeyValuePair<TKey, TValue> KVPair(const TKey & k, const TValue & v)
		{
			return KeyValuePair<TKey, TValue>(k, v);
		}

		const float MaxLoadFactor = 0.7f;

		template<typename TKey, typename TValue>
		class Dictionary
		{
			friend class Iterator;
			friend class ItemProxy;
		private:
			inline int GetProbeOffset(int /*probeId*/) const
			{
				// quadratic probing
				return 1;
			}
		private:
			int bucketSizeMinusOne, shiftBits;
			int _count;
			IntSet marks;
			KeyValuePair<TKey, TValue>* hashMap;
			void Free()
			{
				if (hashMap)
					delete[] hashMap;
				hashMap = 0;
			}
			inline bool IsDeleted(int pos) const
			{
				return marks.Contains((pos << 1) + 1);
			}
			inline bool IsEmpty(int pos) const
			{
				return !marks.Contains((pos << 1));
			}
			inline void SetDeleted(int pos, bool val)
			{
				if (val)
					marks.Add((pos << 1) + 1);
				else
					marks.Remove((pos << 1) + 1);
			}
			inline void SetEmpty(int pos, bool val)
			{
				if (val)
					marks.Remove((pos << 1));
				else
					marks.Add((pos << 1));
			}
			struct FindPositionResult
			{
				int ObjectPosition;
				int InsertionPosition;
				FindPositionResult()
				{
					ObjectPosition = -1;
					InsertionPosition = -1;
				}
				FindPositionResult(int objPos, int insertPos)
				{
					ObjectPosition = objPos;
					InsertionPosition = insertPos;
				}

			};
			template<typename T>
			inline int GetHashPos(T & key) const
			{
				return ((unsigned int)(GetHashCode(key) * 2654435761)) >> shiftBits;
			}
			template<typename T>
			FindPositionResult FindPosition(const T & key) const
			{
				int hashPos = GetHashPos((T&)key);
				int insertPos = -1;
				int numProbes = 0;
				while (numProbes <= bucketSizeMinusOne)
				{
					if (IsEmpty(hashPos))
					{
						if (insertPos == -1)
							return FindPositionResult(-1, hashPos);
						else
							return FindPositionResult(-1, insertPos);
					}
					else if (IsDeleted(hashPos))
					{
						if (insertPos == -1)
							insertPos = hashPos;
					}
					else if (hashMap[hashPos].Key == key)
					{
						return FindPositionResult(hashPos, -1);
					}
					numProbes++;
					hashPos = (hashPos + GetProbeOffset(numProbes)) & bucketSizeMinusOne;
				}
				if (insertPos != -1)
					return FindPositionResult(-1, insertPos);
				throw InvalidOperationException("Hash map is full. This indicates an error in Key::Equal or Key::GetHashCode.");
			}
			TValue & _Insert(KeyValuePair<TKey, TValue> && kvPair, int pos)
			{
				hashMap[pos] = _Move(kvPair);
				SetEmpty(pos, false);
				SetDeleted(pos, false);
				return hashMap[pos].Value;
			}
			void Rehash()
			{
				if (bucketSizeMinusOne == -1 || _count / (float)bucketSizeMinusOne >= MaxLoadFactor)
				{
					int newSize = (bucketSizeMinusOne + 1) * 2;
					int newShiftBits = shiftBits - 1;
					if (newSize == 0)
					{
						newSize = 16;
						newShiftBits = 28;
					}
					Dictionary<TKey, TValue> newDict;
					newDict.shiftBits = newShiftBits;
					newDict.bucketSizeMinusOne = newSize - 1;
					newDict.hashMap = new KeyValuePair<TKey, TValue>[newSize];
					newDict.marks.SetMax(newSize * 2);
					if (hashMap)
					{
						for (auto & kvPair : *this)
						{
							newDict.Add(_Move(kvPair));
						}
					}
					*this = _Move(newDict);
				}
			}

			bool AddIfNotExists(KeyValuePair<TKey, TValue> && kvPair)
			{
				Rehash();
				auto pos = FindPosition(kvPair.Key);
				if (pos.ObjectPosition != -1)
					return false;
				else if (pos.InsertionPosition != -1)
				{
					_count++;
					_Insert(_Move(kvPair), pos.InsertionPosition);
					return true;
				}
				else
					throw InvalidOperationException("Inconsistent find result returned. This is a bug in Dictionary implementation.");
			}
			void Add(KeyValuePair<TKey, TValue> && kvPair)
			{
				if (!AddIfNotExists(_Move(kvPair)))
					throw KeyExistsException("The key already exists in Dictionary.");
			}
			TValue & Set(KeyValuePair<TKey, TValue> && kvPair)
			{
				Rehash();
				auto pos = FindPosition(kvPair.Key);
				if (pos.ObjectPosition != -1)
					return _Insert(_Move(kvPair), pos.ObjectPosition);
				else if (pos.InsertionPosition != -1)
				{
					_count++;
					return _Insert(_Move(kvPair), pos.InsertionPosition);
				}
				else
					throw InvalidOperationException("Inconsistent find result returned. This is a bug in Dictionary implementation.");
			}
		public:
			class Iterator
			{
			private:
				const Dictionary<TKey, TValue> * dict;
				int pos;
			public:
				KeyValuePair<TKey, TValue> & operator *() const
				{
					return dict->hashMap[pos];
				}
				KeyValuePair<TKey, TValue> * operator ->() const
				{
					return dict->hashMap + pos;
				}
				Iterator & operator ++()
				{
					if (pos > dict->bucketSizeMinusOne)
						return *this;
					pos++;
					while (pos <= dict->bucketSizeMinusOne && (dict->IsDeleted(pos) || dict->IsEmpty(pos)))
					{
						pos++;
					}
					return *this;
				}
				Iterator operator ++(int)
				{
					Iterator rs = *this;
					operator++();
					return rs;
				}
				bool operator != (const Iterator & _that) const
				{
					return pos != _that.pos || dict != _that.dict;
				}
				bool operator == (const Iterator & _that) const
				{
					return pos == _that.pos && dict == _that.dict;
				}
				Iterator(const Dictionary<TKey, TValue> * _dict, int _pos)
				{
					this->dict = _dict;
					this->pos = _pos;
				}
				Iterator()
				{
					this->dict = 0;
					this->pos = 0;
				}
			};

			Iterator begin() const
			{
				int pos = 0;
				while (pos < bucketSizeMinusOne + 1)
				{
					if (IsEmpty(pos) || IsDeleted(pos))
						pos++;
					else
						break;
				}
				return Iterator(this, pos);
			}
			Iterator end() const
			{
				return Iterator(this, bucketSizeMinusOne + 1);
			}
		public:
			void Add(const TKey & key, const TValue & value)
			{
				Add(KeyValuePair<TKey, TValue>(key, value));
			}
			void Add(TKey && key, TValue && value)
			{
				Add(KeyValuePair<TKey, TValue>(_Move(key), _Move(value)));
			}
			bool AddIfNotExists(const TKey & key, const TValue & value)
			{
				return AddIfNotExists(KeyValuePair<TKey, TValue>(key, value));
			}
			bool AddIfNotExists(TKey && key, TValue && value)
			{
				return AddIfNotExists(KeyValuePair<TKey, TValue>(_Move(key), _Move(value)));
			}
			void Remove(const TKey & key)
			{
				if (_count == 0)
					return;
				auto pos = FindPosition(key);
				if (pos.ObjectPosition != -1)
				{
					SetDeleted(pos.ObjectPosition, true);
					_count--;
				}
			}
			void Clear()
			{
				_count = 0;

				marks.Clear();
			}

			template<typename T>
			bool ContainsKey(const T & key) const
			{
				if (bucketSizeMinusOne == -1)
					return false;
				auto pos = FindPosition(key);
				return pos.ObjectPosition != -1;
			}
			template<typename T>
			bool TryGetValue(const T & key, TValue & value) const
			{
				if (bucketSizeMinusOne == -1)
					return false;
				auto pos = FindPosition(key);
				if (pos.ObjectPosition != -1)
				{
					value = hashMap[pos.ObjectPosition].Value;
					return true;
				}
				return false;
			}
			template<typename T>
			TValue * TryGetValue(const T & key) const
			{
				if (bucketSizeMinusOne == -1)
					return nullptr;
				auto pos = FindPosition(key);
				if (pos.ObjectPosition != -1)
				{
					return &hashMap[pos.ObjectPosition].Value;
				}
				return nullptr;
			}
			class ItemProxy
			{
			private:
				const Dictionary<TKey, TValue> * dict;
				TKey key;
			public:
				ItemProxy(const TKey & _key, const Dictionary<TKey, TValue> * _dict)
				{
					this->dict = _dict;
					this->key = _key;
				}
				ItemProxy(TKey && _key, const Dictionary<TKey, TValue> * _dict)
				{
					this->dict = _dict;
					this->key = _Move(_key);
				}
				TValue & GetValue() const
				{
					auto pos = dict->FindPosition(key);
					if (pos.ObjectPosition != -1)
					{
						return dict->hashMap[pos.ObjectPosition].Value;
					}
					else
						throw KeyNotFoundException("The key does not exists in dictionary.");
				}
				inline TValue & operator()() const
				{
					return GetValue();
				}
				operator TValue&() const
				{
					return GetValue();
				}
				TValue & operator = (const TValue & val) const
				{
					return ((Dictionary<TKey, TValue>*)dict)->Set(KeyValuePair<TKey, TValue>(_Move(key), val));
				}
				TValue & operator = (TValue && val) const
				{
					return ((Dictionary<TKey, TValue>*)dict)->Set(KeyValuePair<TKey, TValue>(_Move(key), _Move(val)));
				}
			};
			ItemProxy operator [](const TKey & key) const
			{
				return ItemProxy(key, this);
			}
			ItemProxy operator [](TKey && key) const
			{
				return ItemProxy(_Move(key), this);
			}
			int Count() const
			{
				return _count;
			}
		private:
			template<typename... Args>
			void Init(const KeyValuePair<TKey, TValue> & kvPair, Args... args)
			{
				Add(kvPair);
				Init(args...);
			}
		public:
			Dictionary()
			{
				bucketSizeMinusOne = -1;
				shiftBits = 32;
				_count = 0;
				hashMap = 0;
			}
			template<typename Arg, typename... Args>
			Dictionary(Arg arg, Args... args)
			{
				Init(arg, args...);
			}
			Dictionary(const Dictionary<TKey, TValue> & other)
				: bucketSizeMinusOne(-1), _count(0), hashMap(0)
			{
				*this = other;
			}
			Dictionary(Dictionary<TKey, TValue> && other)
				: bucketSizeMinusOne(-1), _count(0), hashMap(0)
			{
				*this = (_Move(other));
			}
			Dictionary<TKey, TValue> & operator = (const Dictionary<TKey, TValue> & other)
			{
				if (this == &other)
					return *this;
				Free();
				bucketSizeMinusOne = other.bucketSizeMinusOne;
				_count = other._count;
				shiftBits = other.shiftBits;
				hashMap = new KeyValuePair<TKey, TValue>[other.bucketSizeMinusOne + 1];
				marks = other.marks;
				for (int i = 0; i <= bucketSizeMinusOne; i++)
					hashMap[i] = other.hashMap[i];
				return *this;
			}
			Dictionary<TKey, TValue> & operator = (Dictionary<TKey, TValue> && other)
			{
				if (this == &other)
					return *this;
				Free();
				bucketSizeMinusOne = other.bucketSizeMinusOne;
				_count = other._count;
				hashMap = other.hashMap;
				shiftBits = other.shiftBits;
				marks = _Move(other.marks);
				other.hashMap = 0;
				other._count = 0;
				other.bucketSizeMinusOne = -1;
				return *this;
			}
			~Dictionary()
			{
				Free();
			}
		};

		template<typename TKey, typename TValue>
		class EnumerableDictionary
		{
			friend class Iterator;
			friend class ItemProxy;
		private:
			inline int GetProbeOffset(int /*probeIdx*/) const
			{
				// quadratic probing
				return 1;
			}
		private:
			int bucketSizeMinusOne, shiftBits;
			int _count;
			IntSet marks;

			// debug op
			struct Op
			{
				TKey key;
				int opType;
				Op()
				{}
				Op(const TKey & key, int t)
				{
					this->key = key;
					opType = t;
				}
			};
			LinkedList<KeyValuePair<TKey, TValue>> kvPairs;
			LinkedNode<KeyValuePair<TKey, TValue>>** hashMap;
			void Free()
			{
				if (hashMap)
					delete[] hashMap;
				hashMap = 0;
				kvPairs.Clear();
			}
			inline bool IsDeleted(int pos) const
			{
				return marks.Contains((pos << 1) + 1);
			}
			inline bool IsEmpty(int pos) const
			{
				return !marks.Contains((pos << 1));
			}
			inline void SetDeleted(int pos, bool val)
			{
				if (val)
					marks.Add((pos << 1) + 1);
				else
					marks.Remove((pos << 1) + 1);
			}
			inline void SetEmpty(int pos, bool val)
			{
				if (val)
					marks.Remove((pos << 1));
				else
					marks.Add((pos << 1));
			}
			struct FindPositionResult
			{
				int ObjectPosition;
				int InsertionPosition;
				FindPositionResult()
				{
					ObjectPosition = -1;
					InsertionPosition = -1;
				}
				FindPositionResult(int objPos, int insertPos)
				{
					ObjectPosition = objPos;
					InsertionPosition = insertPos;
				}

			};
			template<typename T>
			inline int GetHashPos(T & key) const
			{
				return ((unsigned int)(GetHashCode(key) * 2654435761)) >> shiftBits;
			}
			template<typename T>
			FindPositionResult FindPosition(const T & key) const
			{
				int hashPos = GetHashPos((T&)key);
				int insertPos = -1;
				int numProbes = 0;
				while (numProbes <= bucketSizeMinusOne)
				{
					if (IsEmpty(hashPos))
					{
						if (insertPos == -1)
							return FindPositionResult(-1, hashPos);
						else
							return FindPositionResult(-1, insertPos);
					}
					else if (IsDeleted(hashPos))
					{
						if (insertPos == -1)
							insertPos = hashPos;
					}
					else if (hashMap[hashPos]->Value.Key == key)
					{
						return FindPositionResult(hashPos, -1);
					}
					numProbes++;
					hashPos = (hashPos + GetProbeOffset(numProbes)) & bucketSizeMinusOne;
				}
				if (insertPos != -1)
					return FindPositionResult(-1, insertPos);
				throw InvalidOperationException("Hash map is full. This indicates an error in Key::Equal or Key::GetHashCode.");
			}
			TValue & _Insert(KeyValuePair<TKey, TValue> && kvPair, int pos)
			{
				auto node = kvPairs.AddLast();
				node->Value = _Move(kvPair);
				hashMap[pos] = node;
				SetEmpty(pos, false);
				SetDeleted(pos, false);
				return node->Value.Value;
			}
			void Rehash()
			{
				if (bucketSizeMinusOne == -1 || _count / (float)bucketSizeMinusOne >= MaxLoadFactor)
				{
					int newSize = (bucketSizeMinusOne + 1) * 2;
					int newShiftBits = shiftBits - 1;
					if (newSize == 0)
					{
						newSize = 16;
						newShiftBits = 28;
					}
					EnumerableDictionary<TKey, TValue> newDict;
					newDict.shiftBits = newShiftBits;
					newDict.bucketSizeMinusOne = newSize - 1;
					newDict.hashMap = new LinkedNode<KeyValuePair<TKey, TValue>>*[newSize];
					newDict.marks.SetMax(newSize * 2);
					if (hashMap)
					{
						for (auto & kvPair : *this)
						{
							newDict.Add(_Move(kvPair));
						}
					}
					*this = _Move(newDict);
				}
			}

			bool AddIfNotExists(KeyValuePair<TKey, TValue> && kvPair)
			{
				Rehash();
				auto pos = FindPosition(kvPair.Key);
				if (pos.ObjectPosition != -1)
					return false;
				else if (pos.InsertionPosition != -1)
				{
					_count++;
					_Insert(_Move(kvPair), pos.InsertionPosition);
					return true;
				}
				else
					throw InvalidOperationException("Inconsistent find result returned. This is a bug in Dictionary implementation.");
			}
			void Add(KeyValuePair<TKey, TValue> && kvPair)
			{
				if (!AddIfNotExists(_Move(kvPair)))
					throw KeyExistsException("The key already exists in Dictionary.");
			}
			TValue & Set(KeyValuePair<TKey, TValue> && kvPair)
			{
				Rehash();
				auto pos = FindPosition(kvPair.Key);
				if (pos.ObjectPosition != -1)
				{
					hashMap[pos.ObjectPosition]->Delete();
					return _Insert(_Move(kvPair), pos.ObjectPosition);
				}
				else if (pos.InsertionPosition != -1)
				{
					_count++;
					return _Insert(_Move(kvPair), pos.InsertionPosition);
				}
				else
					throw InvalidOperationException("Inconsistent find result returned. This is a bug in Dictionary implementation.");
			}
		public:
			typedef typename LinkedList<KeyValuePair<TKey, TValue>>::Iterator Iterator;

			typename LinkedList<KeyValuePair<TKey, TValue>>::Iterator begin() const
			{
				return kvPairs.begin();
			}
			typename LinkedList<KeyValuePair<TKey, TValue>>::Iterator end() const
			{
				return kvPairs.end();
			}
		public:
			void Add(const TKey & key, const TValue & value)
			{
				Add(KeyValuePair<TKey, TValue>(key, value));
			}
			void Add(TKey && key, TValue && value)
			{
				Add(KeyValuePair<TKey, TValue>(_Move(key), _Move(value)));
			}
			bool AddIfNotExists(const TKey & key, const TValue & value)
			{
				return AddIfNotExists(KeyValuePair<TKey, TValue>(key, value));
			}
			bool AddIfNotExists(TKey && key, TValue && value)
			{
				return AddIfNotExists(KeyValuePair<TKey, TValue>(_Move(key), _Move(value)));
			}
			void Remove(const TKey & key)
			{
				if (_count > 0)
				{
					auto pos = FindPosition(key);
					if (pos.ObjectPosition != -1)
					{
						kvPairs.Delete(hashMap[pos.ObjectPosition]);
						hashMap[pos.ObjectPosition] = 0;
						SetDeleted(pos.ObjectPosition, true);
						_count--;
					}
				}
			}
			void Clear()
			{
				_count = 0;
				kvPairs.Clear();
				marks.Clear();
			}
			template<typename T>
			bool ContainsKey(const T & key) const
			{
				if (bucketSizeMinusOne == -1)
					return false;
				auto pos = FindPosition(key);
				return pos.ObjectPosition != -1;
			}
			template<typename T>
			TValue * TryGetValue(const T & key) const
			{
				if (bucketSizeMinusOne == -1)
					return nullptr;
				auto pos = FindPosition(key);
				if (pos.ObjectPosition != -1)
				{
					return &(hashMap[pos.ObjectPosition]->Value.Value);
				}
				return nullptr;
			}
			template<typename T>
			bool TryGetValue(const T & key, TValue & value) const
			{
				if (bucketSizeMinusOne == -1)
					return false;
				auto pos = FindPosition(key);
				if (pos.ObjectPosition != -1)
				{
					value = hashMap[pos.ObjectPosition]->Value.Value;
					return true;
				}
				return false;
			}
			class ItemProxy
			{
			private:
				const EnumerableDictionary<TKey, TValue> * dict;
				TKey key;
			public:
				ItemProxy(const TKey & _key, const EnumerableDictionary<TKey, TValue> * _dict)
				{
					this->dict = _dict;
					this->key = _key;
				}
				ItemProxy(TKey && _key, const EnumerableDictionary<TKey, TValue> * _dict)
				{
					this->dict = _dict;
					this->key = _Move(_key);
				}
				TValue & GetValue() const
				{
					auto pos = dict->FindPosition(key);
					if (pos.ObjectPosition != -1)
					{
						return dict->hashMap[pos.ObjectPosition]->Value.Value;
					}
					else
					{
						throw KeyNotFoundException("The key does not exists in dictionary.");
					}
				}
				inline TValue & operator()() const
				{
					return GetValue();
				}
				operator TValue&() const
				{
					return GetValue();
				}
				TValue & operator = (const TValue & val)
				{
					return ((EnumerableDictionary<TKey, TValue>*)dict)->Set(KeyValuePair<TKey, TValue>(_Move(key), val));
				}
				TValue & operator = (TValue && val)
				{
					return ((EnumerableDictionary<TKey, TValue>*)dict)->Set(KeyValuePair<TKey, TValue>(_Move(key), _Move(val)));
				}
			};
			ItemProxy operator [](const TKey & key) const
			{
				return ItemProxy(key, this);
			}
			ItemProxy operator [](TKey && key) const
			{
				return ItemProxy(_Move(key), this);
			}
			int Count() const
			{
				return _count;
			}
			KeyValuePair<TKey, TValue> & First() const
			{
				return kvPairs.First();
			}
			KeyValuePair<TKey, TValue> & Last() const
			{
				return kvPairs.Last();
			}
		private:
			template<typename... Args>
			void Init(const KeyValuePair<TKey, TValue> & kvPair, Args... args)
			{
				Add(kvPair);
				Init(args...);
			}
		public:
			EnumerableDictionary()
			{
				bucketSizeMinusOne = -1;
				shiftBits = 32;
				_count = 0;
				hashMap = 0;
			}
			template<typename Arg, typename... Args>
			EnumerableDictionary(Arg arg, Args... args)
			{
				Init(arg, args...);
			}
			EnumerableDictionary(const EnumerableDictionary<TKey, TValue> & other)
				: bucketSizeMinusOne(-1), _count(0), hashMap(0)
			{
				*this = other;
			}
			EnumerableDictionary(EnumerableDictionary<TKey, TValue> && other)
				: bucketSizeMinusOne(-1), _count(0), hashMap(0)
			{
				*this = (_Move(other));
			}
			EnumerableDictionary<TKey, TValue> & operator = (const EnumerableDictionary<TKey, TValue> & other)
			{
				if (this == &other)
					return *this;
				Clear();
				for (auto & item : other)
					Add(item.Key, item.Value);
				return *this;
			}
			EnumerableDictionary<TKey, TValue> & operator = (EnumerableDictionary<TKey, TValue> && other)
			{
				if (this == &other)
					return *this;
				Free();
				bucketSizeMinusOne = other.bucketSizeMinusOne;
				_count = other._count;
				hashMap = other.hashMap;
				shiftBits = other.shiftBits;
				marks = _Move(other.marks);
				other.hashMap = 0;
				other._count = 0;
				other.bucketSizeMinusOne = -1;
				kvPairs = _Move(other.kvPairs);
				return *this;
			}
			~EnumerableDictionary()
			{
				Free();
			}
		};

		class _DummyClass
		{};

		template<typename T, typename DictionaryType>
		class HashSetBase
		{
		protected:
			DictionaryType dict;
		private:
			template<typename... Args>
			void Init(const T & v, Args... args)
			{
				Add(v);
				Init(args...);
			}
		public:
			HashSetBase()
			{}
			template<typename Arg, typename... Args>
			HashSetBase(Arg arg, Args... args)
			{
				Init(arg, args...);
			}
			HashSetBase(const HashSetBase & set)
			{
				operator=(set);
			}
			HashSetBase(HashSetBase && set)
			{
				operator=(_Move(set));
			}
			HashSetBase & operator = (const HashSetBase & set)
			{
				dict = set.dict;
				return *this;
			}
			HashSetBase & operator = (HashSetBase && set)
			{
				dict = _Move(set.dict);
				return *this;
			}
		public:
			class Iterator
			{
			private:
				typename DictionaryType::Iterator iter;
			public:
				Iterator() = default;
				T & operator *() const
				{
					return (*iter).Key;
				}
				T * operator ->() const
				{
					return &(*iter).Key;
				}
				Iterator & operator ++()
				{
					++iter;
					return *this;
				}
				Iterator operator ++(int)
				{
					Iterator rs = *this;
					operator++();
					return rs;
				}
				bool operator != (const Iterator & _that) const
				{
					return iter != _that.iter;
				}
				bool operator == (const Iterator & _that) const
				{
					return iter == _that.iter;
				}
				Iterator(const typename DictionaryType::Iterator & _iter)
				{
					this->iter = _iter;
				}
			};
			Iterator begin() const
			{
				return Iterator(dict.begin());
			}
			Iterator end() const
			{
				return Iterator(dict.end());
			}
		public:
			int Count() const
			{
				return dict.Count();
			}
			void Clear()
			{
				dict.Clear();
			}
			bool Add(const T& obj)
			{
				return dict.AddIfNotExists(obj, _DummyClass());
			}
			bool Add(T && obj)
			{
				return dict.AddIfNotExists(_Move(obj), _DummyClass());
			}
			void Remove(const T & obj)
			{
				dict.Remove(obj);
			}
			bool Contains(const T & obj) const
			{
				return dict.ContainsKey(obj);
			}
		};
		template <typename T>
		class HashSet : public HashSetBase<T, Dictionary<T, _DummyClass>>
		{};

		template <typename T>
		class EnumerableHashSet : public HashSetBase<T, EnumerableDictionary<T, _DummyClass>>
		{
		public:
			T & First() const
			{
				return this->dict.First().Key;
			}
			T & Last() const
			{
				return this->dict.Last().Key;
			}
		};
	}
}

#endif


================================================
FILE: Source/CoreLib/Exception.h
================================================
#ifndef CORE_LIB_EXCEPTION_H
#define CORE_LIB_EXCEPTION_H

#include "Common.h"
#include "LibString.h"

namespace CoreLib
{
	namespace Basic
	{
		class Exception : public Object
		{
		public:
			String Message;
			Exception()
			{}
			Exception(const String & message)
				: Message(message)
			{
			}
		};

		class IndexOutofRangeException : public Exception
		{
		public:
			IndexOutofRangeException()
			{}
			IndexOutofRangeException(const String & message)
				: Exception(message)
			{
			}

		};

		class InvalidOperationException : public Exception
		{
		public:
			InvalidOperationException()
			{}
			InvalidOperationException(const String & message)
				: Exception(message)
			{
			}

		};
		
		class ArgumentException : public Exception
		{
		public:
			ArgumentException()
			{}
			ArgumentException(const String & message)
				: Exception(message)
			{
			}

		};

		class KeyNotFoundException : public Exception
		{
		public:
			KeyNotFoundException()
			{}
			KeyNotFoundException(const String & message)
				: Exception(message)
			{
			}
		};
		class KeyExistsException : public Exception
		{
		public:
			KeyExistsException()
			{}
			KeyExistsException(const String & message)
				: Exception(message)
			{
			}
		};

		class NotSupportedException : public Exception
		{
		public:
			NotSupportedException()
			{}
			NotSupportedException(const String & message)
				: Exception(message)
			{
			}
		};

		class NotImplementedException : public Exception
		{
		public:
			NotImplementedException()
			{}
			NotImplementedException(const String & message)
				: Exception(message)
			{
			}
		};

		class InvalidProgramException : public Exception
		{
		public:
			InvalidProgramException()
			{}
			InvalidProgramException(const String & message)
				: Exception(message)
			{
			}
		};
	}
}

#endif

================================================
FILE: Source/CoreLib/Func.h
================================================
#ifndef CORELIB_FUNC_H
#define CORELIB_FUNC_H

#include "SmartPointer.h"

namespace CoreLib
{
	namespace Basic
	{
		template<typename TResult, typename... Arguments>
		class FuncPtr
		{
		public:
			virtual TResult operator()(Arguments...) = 0;
			virtual bool operator == (const FuncPtr<TResult, Arguments...> *)
			{
				return false;
			}
			virtual ~FuncPtr() {}
		};

		template<typename TResult, typename... Arguments>
		class CdeclFuncPtr : public FuncPtr<TResult, Arguments...>
		{
		public:
			typedef TResult (*FuncType)(Arguments...);
		private:
			FuncType funcPtr;
		public:
			CdeclFuncPtr(FuncType func)
				:funcPtr(func)
			{
			}

			virtual TResult operator()(Arguments... params) override
			{
				return funcPtr(params...);
			}

			virtual bool operator == (const FuncPtr<TResult, Arguments...> * ptr) override
			{
				auto cptr = dynamic_cast<const CdeclFuncPtr<TResult, Arguments...>*>(ptr);
				if (cptr)
					return funcPtr == cptr->funcPtr;
				else
					return false;
			}
		};

		template<typename Class, typename TResult, typename... Arguments>
		class MemberFuncPtr : public FuncPtr<TResult, Arguments...>
		{
		public:
			typedef TResult (Class::*FuncType)(Arguments...);
		private:
			FuncType funcPtr;
			Class * object;
		public:
			MemberFuncPtr(Class * obj, FuncType func)
				: funcPtr(func), object(obj)
			{
			}

			virtual TResult operator()(Arguments... params) override
			{
				return (object->*funcPtr)(params...);
			}

			virtual bool operator == (const FuncPtr<TResult, Arguments...> * ptr) override
			{
				auto cptr = dynamic_cast<const MemberFuncPtr<Class, TResult, Arguments...>*>(ptr);
				if (cptr)
					return funcPtr == cptr->funcPtr && object == cptr->object;
				else
					return false;
			}
		};

		template<typename F, typename TResult, typename... Arguments>
		class LambdaFuncPtr : public FuncPtr<TResult, Arguments...>
		{
		private:
			F func;
		public:
			LambdaFuncPtr(const F & _func)
				: func(_func)
			{}
			virtual TResult operator()(Arguments... params) override
			{
				return func(params...);
			}
			virtual bool operator == (const FuncPtr<TResult, Arguments...> * /*ptr*/) override
			{
				return false;
			}
		};

		template<typename TResult, typename... Arguments>
		class Func
		{
		private:
			RefPtr<FuncPtr<TResult, Arguments...>> funcPtr;
		public:
			Func(){}
			Func(typename CdeclFuncPtr<TResult, Arguments...>::FuncType func)
			{
				funcPtr = new CdeclFuncPtr<TResult, Arguments...>(func);
			}
			template<typename Class>
			Func(Class * object, typename MemberFuncPtr<Class, TResult, Arguments...>::FuncType func)
			{
				funcPtr = new MemberFuncPtr<Class, TResult, Arguments...>(object, func);
			}
			template<typename TFuncObj>
			Func(const TFuncObj & func)
			{
				funcPtr = new LambdaFuncPtr<TFuncObj, TResult, Arguments...>(func);
			}
			Func & operator = (typename CdeclFuncPtr<TResult, Arguments...>::FuncType func)
			{
				funcPtr = new CdeclFuncPtr<TResult, Arguments...>(func);
				return *this;
			}
			template<typename Class>
			Func & operator = (const MemberFuncPtr<Class, TResult, Arguments...> & func)
			{
				funcPtr = new MemberFuncPtr<Class, TResult, Arguments...>(func);
				return *this;
			}
			template<typename TFuncObj>
			Func & operator = (const TFuncObj & func)
			{
				funcPtr = new LambdaFuncPtr<TFuncObj, TResult, Arguments...>(func);
				return *this;
			}
			bool operator == (const Func & f)
			{
				return *funcPtr == f.funcPtr.Ptr();
			}
			bool operator != (const Func & f)
			{
				return !(*this == f);
			}
			TResult operator()(Arguments... params)
			{
				return (*funcPtr)(params...);
			}
		};

		// template<typename... Arguments>
		// using Procedure = Func<void, Arguments...>;

		template<typename... Arguments>
		class Procedure : public Func<void, Arguments...>
		{
		private:
			RefPtr<FuncPtr<void, Arguments...>> funcPtr;
		public:
			Procedure(){}
			Procedure(const Procedure & proc)
			{
				funcPtr = proc.funcPtr;
			}
			Procedure(typename CdeclFuncPtr<void, Arguments...>::FuncType func)
			{
				funcPtr = new CdeclFuncPtr<void, Arguments...>(func);
			}
			template<typename Class>
			Procedure(Class * object, typename MemberFuncPtr<Class, void, Arguments...>::FuncType func)
			{
				funcPtr = new MemberFuncPtr<Class, void, Arguments...>(object, func);
			}
			template<typename TFuncObj>
			Procedure(const TFuncObj & func)
			{
				funcPtr = new LambdaFuncPtr<TFuncObj, void, Arguments...>(func);
			}
			Procedure & operator = (typename CdeclFuncPtr<void, Arguments...>::FuncType func)
			{
				funcPtr = new CdeclFuncPtr<void, Arguments...>(func);
				return *this;
			}
			template<typename Class>
			Procedure & operator = (const MemberFuncPtr<Class, void, Arguments...> & func)
			{
				funcPtr = new MemberFuncPtr<Class, void, Arguments...>(func);
				return *this;
			}
			template<typename TFuncObj>
			Procedure & operator = (const TFuncObj & func)
			{
				funcPtr = new LambdaFuncPtr<TFuncObj, void, Arguments...>(func);
				return *this;
			}
			Procedure & operator = (const Procedure & proc)
			{
				funcPtr = proc.funcPtr;
			}
			void Clear()
			{
				funcPtr = nullptr;
			}
			void operator()(Arguments... params)
			{
				if (funcPtr)
					(*funcPtr)(params...);
			}
		};
	}
}

#endif

================================================
FILE: Source/CoreLib/Hash.h
================================================
#ifndef CORELIB_HASH_H
#define CORELIB_HASH_H

#include "LibMath.h"
#include <string.h>

namespace CoreLib
{
	namespace Basic
	{

		inline int GetHashCode(double key)
		{
			return FloatAsInt((float)key);
		}
		inline int GetHashCode(float key)
		{
			return FloatAsInt(key);
		}
		inline int GetHashCode(const char * buffer)
		{
			if (!buffer)
				return 0;
			int hash = 0;
			int c;
			auto str = buffer;
			c = *str++;
			while (c)
			{
				hash = c + (hash << 6) + (hash << 16) - hash;
				c = *str++;
			}
			return hash;
		}
		inline int GetHashCode(char * buffer)
		{
			return GetHashCode(const_cast<const char *>(buffer));
		}

		template<int IsInt>
		class Hash
		{
		public:
		};
		template<>
		class Hash<1>
		{
		public:
			template<typename TKey>
			static int GetHashCode(TKey & key)
			{
				return (int)key;
			}
		};
		template<>
		class Hash<0>
		{
		public:
			template<typename TKey>
			static int GetHashCode(TKey & key)
			{
				return key.GetHashCode();
			}
		};
		template<int IsPointer>
		class PointerHash
		{};
		template<>
		class PointerHash<1>
		{
		public:
			template<typename TKey>
			static int GetHashCode(TKey & key)
			{
				return (int)((CoreLib::PtrInt)key) / sizeof(typename std::remove_pointer<TKey>::type);
			}
		};
		template<>
		class PointerHash<0>
		{
		public:
			template<typename TKey>
			static int GetHashCode(TKey & key)
			{
				return Hash<std::is_integral<TKey>::value || std::is_enum<TKey>::value>::GetHashCode(key);
			}
		};

		template<typename TKey>
		int GetHashCode(const TKey & key)
		{
			return PointerHash<std::is_pointer<TKey>::value>::GetHashCode(key);
		}

		template<typename TKey>
		int GetHashCode(TKey & key)
		{
			return PointerHash<std::is_pointer<TKey>::value>::GetHashCode(key);
		}

		
	}
}

#endif

================================================
FILE: Source/CoreLib/IntSet.h
================================================
#ifndef BIT_VECTOR_INT_SET_H
#define BIT_VECTOR_INT_SET_H

#include <memory.h>
#include "List.h"
#include "LibMath.h"
#include "Common.h"
#include "Exception.h"

namespace CoreLib
{
	namespace Basic
	{
		class IntSet
		{
		private:
			List<int> buffer;
		public:
			IntSet()
			{}
			IntSet(const IntSet & other)
			{
				buffer = other.buffer;
			}
			IntSet(IntSet && other)
			{
				*this = (_Move(other));
			}
			IntSet & operator = (IntSet && other)
			{
				buffer = _Move(other.buffer);
				return *this;
			}
			IntSet & operator = (const IntSet & other)
			{
				buffer = other.buffer;
				return *this;
			}
			int GetHashCode()
			{
				int rs = 0;
				for (auto val : buffer)
					rs ^= val;
				return rs;
			}
			IntSet(int maxVal)
			{
				SetMax(maxVal);
			}
			int Size() const
			{
				return buffer.Count()*32;
			}
			void SetMax(int val)
			{
				Resize(val);
				Clear();
			}
			void SetAll()
			{
				for (int i = 0; i<buffer.Count(); i++)
					buffer[i] = 0xFFFFFFFF;
			}
			void Resize(int size)
			{
				int oldBufferSize = buffer.Count();
				buffer.SetSize((size+31)>>5);
				if (buffer.Count() > oldBufferSize)
					memset(buffer.Buffer()+oldBufferSize, 0, (buffer.Count()-oldBufferSize) * sizeof(int));
			}
			void Clear()
			{
				for (int i = 0; i<buffer.Count(); i++)
					buffer[i] = 0;
			}
			void Add(int val)
			{
				int id = val>>5;
				if (id < buffer.Count())
					buffer[id] |= (1<<(val&31));
				else
				{
					int oldSize = buffer.Count();
					buffer.SetSize(id+1);
					memset(buffer.Buffer() + oldSize, 0, (buffer.Count()-oldSize)*sizeof(int));
					buffer[id] |= (1<<(val&31));
				}
			}
			void Remove(int val)
			{
				if ((val>>5) < buffer.Count())
					buffer[(val>>5)] &= ~(1<<(val&31));
			}
			bool Contains(int val) const
			{
				if ((val>>5) >= buffer.Count())
					return false;
				return (buffer[(val>>5)] & (1<<(val&31))) != 0;
			}
			void UnionWith(const IntSet & set)
			{
				for (int i = 0; i<Math::Min(set.buffer.Count(), buffer.Count()); i++)
				{
					buffer[i] |= set.buffer[i];
				}
				if (set.buffer.Count() > buffer.Count())
					buffer.AddRange(set.buffer.Buffer()+buffer.Count(), set.buffer.Count()-buffer.Count());
			}
			bool operator == (const IntSet & set)
			{
				if (buffer.Count() != set.buffer.Count())
					return false;
				for (int i = 0; i<buffer.Count(); i++)
					if (buffer[i] != set.buffer[i])
						return false;
				return true;
			}
			bool operator != (const IntSet & set)
			{
				return !(*this == set);
			}
			void IntersectWith(const IntSet & set)
			{
				if (set.buffer.Count() < buffer.Count())
					memset(buffer.Buffer() + set.buffer.Count(), 0, (buffer.Count()-set.buffer.Count())*sizeof(int));
				for (int i = 0; i<Math::Min(set.buffer.Count(), buffer.Count()); i++)
				{
					buffer[i] &= set.buffer[i];
				}
			}
			static void Union(IntSet & rs, const IntSet & set1, const IntSet & set2)
			{
				rs.buffer.SetSize(Math::Max(set1.buffer.Count(), set2.buffer.Count()));
				rs.Clear();
				for (int i = 0; i<set1.buffer.Count(); i++)
					rs.buffer[i] |= set1.buffer[i];
				for (int i = 0; i<set2.buffer.Count(); i++)
					rs.buffer[i] |= set2.buffer[i];
			}
			static void Intersect(IntSet & rs, const IntSet & set1, const IntSet & set2)
			{
				rs.buffer.SetSize(Math::Min(set1.buffer.Count(), set2.buffer.Count()));
				for (int i = 0; i<rs.buffer.Count(); i++)
					rs.buffer[i] = set1.buffer[i] & set2.buffer[i];
			}
			static void Subtract(IntSet & rs, const IntSet & set1, const IntSet & set2)
			{
				rs.buffer.SetSize(set1.buffer.Count());
				for (int i = 0; i<Math::Min(set1.buffer.Count(), set2.buffer.Count()); i++)
					rs.buffer[i] = set1.buffer[i] & (~set2.buffer[i]);
			}
			static bool HasIntersection(const IntSet & set1, const IntSet & set2)
			{
				for (int i = 0; i<Math::Min(set1.buffer.Count(), set2.buffer.Count()); i++)
				{
					if (set1.buffer[i] & set2.buffer[i])
						return true;
				}
				return false;
			}
		};
	}
}

#endif

================================================
FILE: Source/CoreLib/LibIO.cpp
================================================
#include "LibIO.h"
#include "Exception.h"
#ifndef __STDC__
#define __STDC__ 1
#endif
#include <sys/stat.h>
#ifdef _WIN32
#include <direct.h>
#endif
namespace CoreLib
{
	namespace IO
	{
		using namespace CoreLib::Basic;

		CommandLineWriter * currentCommandWriter = nullptr;

		void SetCommandLineWriter(CommandLineWriter * writer)
		{
			currentCommandWriter = writer;
		}

		bool File::Exists(const String & fileName)
		{
#ifdef _WIN32
			struct _stat32 statVar;
			return ::_wstat32(((String)fileName).ToWString(), &statVar) != -1;
#else
			struct stat statVar;
			return ::stat(fileName.Buffer(), &statVar) == 0;
#endif
		}

		String Path::TruncateExt(const String & path)
		{
			int dotPos = path.LastIndexOf('.');
			if (dotPos != -1)
				return path.SubString(0, dotPos);
			else
				return path;
		}
		String Path::ReplaceExt(const String & path, const char * newExt)
		{
			StringBuilder sb(path.Length()+10);
			int dotPos = path.LastIndexOf('.');
			if (dotPos == -1)
				dotPos = path.Length();
			sb.Append(path.Buffer(), dotPos);
			sb.Append('.');
			sb.Append(newExt);
			return sb.ProduceString();
		}
		String Path::GetFileName(const String & path)
		{
			int pos = path.LastIndexOf('/');
			pos = Math::Max(path.LastIndexOf('\\'), pos) + 1;
			return path.SubString(pos, path.Length()-pos);
		}
		String Path::GetFileNameWithoutEXT(const String & path)
		{
			int pos = path.LastIndexOf('/');
			pos = Math::Max(path.LastIndexOf('\\'), pos) + 1;
			int dotPos = path.LastIndexOf('.');
			if (dotPos <= pos)
				dotPos = path.Length();
			return path.SubString(pos, dotPos - pos);
		}
		String Path::GetFileExt(const String & path)
		{
			int dotPos = path.LastIndexOf('.');
			if (dotPos != -1)
				return path.SubString(dotPos+1, path.Length()-dotPos-1);
			else
				return "";
		}
		String Path::GetDirectoryName(const String & path)
		{
			int pos = path.LastIndexOf('/');
			pos = Math::Max(path.LastIndexOf('\\'), pos);
			if (pos != -1)
				return path.SubString(0, pos);
			else
				return "";
		}
		String Path::Combine(const String & path1, const String & path2)
		{
			if (path1.Length() == 0) return path2;
			StringBuilder sb(path1.Length()+path2.Length()+2);
			sb.Append(path1);
			if (!path1.EndsWith('\\') && !path1.EndsWith('/'))
				sb.Append(PathDelimiter);
			sb.Append(path2);
			return sb.ProduceString();
		}
		String Path::Combine(const String & path1, const String & path2, const String & path3)
		{
			StringBuilder sb(path1.Length()+path2.Length()+path3.Length()+3);
			sb.Append(path1);
			if (!path1.EndsWith('\\') && !path1.EndsWith('/'))
				sb.Append(PathDelimiter);
			sb.Append(path2);
			if (!path2.EndsWith('\\') && !path2.EndsWith('/'))
				sb.Append(PathDelimiter);
			sb.Append(path3);
			return sb.ProduceString();
		}

		bool Path::CreateDir(const String & path)
		{
#if defined(_WIN32)
			return _wmkdir(path.ToWString()) == 0;
#else 
			return mkdir(path.Buffer(), 0777) == 0;
#endif
		}

		CoreLib::Basic::String File::ReadAllText(const CoreLib::Basic::String & fileName)
		{
			StreamReader reader(new FileStream(fileName, FileMode::Open, FileAccess::Read, FileShare::ReadWrite));
			return reader.ReadToEnd();
		}

		CoreLib::Basic::List<unsigned char> File::ReadAllBytes(const CoreLib::Basic::String & fileName)
		{
			RefPtr<FileStream> fs = new FileStream(fileName, FileMode::Open, FileAccess::Read, FileShare::ReadWrite);
			List<unsigned char> buffer;
			while (!fs->IsEnd())
			{
				unsigned char ch;
				int read = (int)fs->Read(&ch, 1);
				if (read)
					buffer.Add(ch);
				else
					break;
			}
			return _Move(buffer);
		}

		void File::WriteAllText(const CoreLib::Basic::String & fileName, const CoreLib::Basic::String & text)
		{
			StreamWriter writer(new FileStream(fileName, FileMode::Create));
			writer.Write(text);
		}
	}
}

================================================
FILE: Source/CoreLib/LibIO.h
================================================
#ifndef CORE_LIB_IO_H
#define CORE_LIB_IO_H

#include "LibString.h"
#include "Stream.h"
#include "TextIO.h"
#include "SecureCRT.h"

namespace CoreLib
{
	namespace IO
	{
		class File
		{
		public:
			static bool Exists(const CoreLib::Basic::String & fileName);
			static CoreLib::Basic::String ReadAllText(const CoreLib::Basic::String & fileName);
			static CoreLib::Basic::List<unsigned char> ReadAllBytes(const CoreLib::Basic::String & fileName);
			static void WriteAllText(const CoreLib::Basic::String & fileName, const CoreLib::Basic::String & text);
		};

		class Path
		{
		public:
#ifdef _WIN32
			static const char PathDelimiter = '\\';
#else
			static const char PathDelimiter = '/';
#endif
			static String TruncateExt(const String & path);
			static String ReplaceExt(const String & path, const char * newExt);
			static String GetFileName(const String & path);
			static String GetFileNameWithoutEXT(const String & path);
			static String GetFileExt(const String & path);
			static String GetDirectoryName(const String & path);
			static String Combine(const String & path1, const String & path2);
			static String Combine(const String & path1, const String & path2, const String & path3);
			static bool CreateDir(const String & path);
		};

		class CommandLineWriter : public Object
		{
		public:
			virtual void Write(const String & text) = 0;
		};

		void SetCommandLineWriter(CommandLineWriter * writer);

		extern CommandLineWriter * currentCommandWriter;
		template<typename ...Args>
		void uiprintf(const wchar_t * format, Args... args)
		{
			if (currentCommandWriter)
			{
				char buffer[1024];
				snprintf(buffer, 1024, format, args...);
				currentCommandWriter->Write(buffer);
			}
		}
	}
}

#endif

================================================
FILE: Source/CoreLib/LibMath.cpp
================================================
#include "LibMath.h"

namespace CoreLib
{
	namespace Basic
	{
		const float Math::Pi = 3.141592654f;
	}
}

================================================
FILE: Source/CoreLib/LibMath.h
================================================
#ifndef CORE_LIB_MATH_H
#define CORE_LIB_MATH_H

#include <math.h>

namespace CoreLib
{
	namespace Basic
	{
		class Math
		{
		public:
			static const float Pi;
			template<typename T>
			static T Min(const T& v1, const T&v2)
			{
				return v1<v2?v1:v2;
			}
			template<typename T>
			static T Max(const T& v1, const T&v2)
			{
				return v1>v2?v1:v2;
			}
			template<typename T>
			static T Min(const T& v1, const T&v2, const T&v3)
			{
				return Min(v1, Min(v2, v3));
			}
			template<typename T>
			static T Max(const T& v1, const T&v2, const T&v3)
			{
				return Max(v1, Max(v2, v3));
			}
			template<typename T>
			static T Clamp(const T& val, const T& vmin, const T&vmax)
			{
				if (val < vmin) return vmin;
				else if (val > vmax) return vmax;
				else return val;
			}

			static inline int FastFloor(float x)
			{
				int i = (int)x;
				return i - (i > x);
			}

			static inline int FastFloor(double x)
			{
				int i = (int)x;
				return i - (i > x);
			}

			static inline int IsNaN(float x)
			{
#ifdef _M_X64
				return _isnanf(x);
#else
				return isnan(x);
#endif
			}

			static inline int IsInf(float x)
			{
				return isinf(x);
			}

			static inline unsigned int Ones32(register unsigned int x)
			{
				/* 32-bit recursive reduction using SWAR...
					but first step is mapping 2-bit values
					into sum of 2 1-bit values in sneaky way
				*/
				x -= ((x >> 1) & 0x55555555);
				x = (((x >> 2) & 0x33333333) + (x & 0x33333333));
				x = (((x >> 4) + x) & 0x0f0f0f0f);
				x += (x >> 8);
				x += (x >> 16);
				return(x & 0x0000003f);
			}

			static inline unsigned int Log2Floor(register unsigned int x)
			{
				x |= (x >> 1);
				x |= (x >> 2);
				x |= (x >> 4);
				x |= (x >> 8);
				x |= (x >> 16);
				return(Ones32(x >> 1));
			}

			static inline unsigned int Log2Ceil(register unsigned int x)
			{
				int y = (x & (x - 1));
				y |= -y;
				y >>= (32 - 1);
				x |= (x >> 1);
				x |= (x >> 2);
				x |= (x >> 4);
				x |= (x >> 8);
				x |= (x >> 16);
				return(Ones32(x >> 1) - y);
			}
			/*
			static inline int Log2(float x)
			{
				unsigned int ix = (unsigned int&)x;
				unsigned int exp = (ix >> 23) & 0xFF;
				int log2 = (unsigned int)(exp) - 127;

				return log2;
			}
			*/
		};
		inline int FloatAsInt(float val)
		{
			union InterCast
			{
				float fvalue;
				int ivalue;
			} cast;
			cast.fvalue = val;
			return cast.ivalue;
		}
		inline float IntAsFloat(int val)
		{
			union InterCast
			{
				float fvalue;
				int ivalue;
			} cast;
			cast.ivalue = val;
			return cast.fvalue;
		}

		inline unsigned short FloatToHalf(float val)
		{
			int x = *(int*)&val;
			unsigned short bits = (x >> 16) & 0x8000;
			unsigned short m = (x >> 12) & 0x07ff;
			unsigned int e = (x >> 23) & 0xff;
			if (e < 103)
				return bits;
			if (e > 142)
			{
				bits |= 0x7c00u;
				bits |= e == 255 && (x & 0x007fffffu);
				return bits;
			}
			if (e < 113)
			{
				m |= 0x0800u;
				bits |= (m >> (114 - e)) + ((m >> (113 - e)) & 1);
				return bits;
			}
			bits |= ((e - 112) << 10) | (m >> 1);
			bits += m & 1;
			return bits;
		}

		inline float HalfToFloat(unsigned short input)
		{
			union InterCast
			{
				float fvalue;
				int ivalue;
				InterCast() = default;
				InterCast(int ival)
				{
					ivalue = ival;
				}
			};
			static const InterCast magic = InterCast((127 + (127 - 15)) << 23);
			static const InterCast was_infnan = InterCast((127 + 16) << 23);
			InterCast o;
			o.ivalue = (input & 0x7fff) << 13;     // exponent/mantissa bits
			o.fvalue *= magic.fvalue;                 // exponent adjust
			if (o.fvalue >= was_infnan.fvalue)        // make sure Inf/NaN survive
				o.ivalue |= 255 << 23;
			o.ivalue |= (input & 0x8000) << 16;    // sign bit
			return o.fvalue;
		}

		class Random
		{
		private:
			unsigned int seed;
		public:
			Random(int seed)
			{
				this->seed = seed;
			}
			int Next() // random between 0 and RandMax (currently 0x7fff)
			{
				return (((seed = seed * 214013L + 2531011L) >> 16) & 0x7fff);
			}
			int Next(int min, int max) // inclusive min, exclusive max
			{
				unsigned int a = ((seed = seed * 214013L + 2531011L) & 0xFFFF0000);
				unsigned int b = ((seed = seed * 214013L + 2531011L) >> 16);
				unsigned int r = a + b;
				return min + r % (max - min);
			}
			float NextFloat()
			{
				return ((Next() << 15) + Next()) / ((float)(1 << 30));
			}
			float NextFloat(float valMin, float valMax)
			{
				return valMin + (valMax - valMin) * NextFloat();
			}
			static int RandMax()
			{
				return 0x7fff;
			}
		};
	}
}

#endif 


================================================
FILE: Source/CoreLib/LibString.cpp
================================================
#include "LibString.h"
#include "TextIO.h"

namespace CoreLib
{
	namespace Basic
	{
		_EndLine EndLine;
		String StringConcat(const char * lhs, int leftLen, const char * rhs, int rightLen)
		{
			String res;
			res.length = leftLen + rightLen;
			res.buffer = new char[res.length + 1];
			strcpy_s(res.buffer.Ptr(), res.length + 1, lhs);
			strcpy_s(res.buffer + leftLen, res.length + 1 - leftLen, rhs);
			return res;
		}
		String operator+(const char * op1, const String & op2)
		{
			if(!op2.buffer)		// no string 2 - return first
				return String(op1);

            if (!op1)			// no base string?!  return the second string
                return op2;

			return StringConcat(op1, (int)strlen(op1), op2.buffer.Ptr(), op2.length);
		}

		String operator+(const String & op1, const char * op2)
		{
			if(!op1.buffer)
				return String(op2);

			return StringConcat(op1.buffer.Ptr(), op1.length, op2, (int)strlen(op2));
		}

		String operator+(const String & op1, const String & op2)
		{
			if(!op1.buffer && !op2.buffer)
				return String();
			else if(!op1.buffer)
				return String(op2);
			else if(!op2.buffer)
				return String(op1);

			return StringConcat(op1.buffer.Ptr(), op1.length, op2.buffer.Ptr(), op2.length);
		}

		int StringToInt(const String & str, int radix)
		{
			if (str.StartsWith("0x"))
				return (int)strtoll(str.Buffer(), NULL, 16);
			else
				return (int)strtoll(str.Buffer(), NULL, radix);
		}
		unsigned int StringToUInt(const String & str, int radix)
		{
			if (str.StartsWith("0x"))
				return (unsigned int)strtoull(str.Buffer(), NULL, 16);
			else
				return (unsigned int)strtoull(str.Buffer(), NULL, radix);
		}
		double StringToDouble(const String & str)
		{
			return (double)strtod(str.Buffer(), NULL);
		}
		float StringToFloat(const String & str)
		{
			return strtof(str.Buffer(), NULL);
		}

		String String::ReplaceAll(String src, String dst) const
		{
			String rs = *this;
			int index = 0;
			int srcLen = src.length;
			int len = rs.length;
			while ((index = rs.IndexOf(src, index)) != -1)
			{
				rs = rs.SubString(0, index) + dst + rs.SubString(index + srcLen, len - index - srcLen);
				len = rs.length;
			}
			return rs;
		}

		String String::FromWString(const wchar_t * wstr)
		{
#ifdef _WIN32
			return CoreLib::IO::Encoding::UTF16->ToString((const char*)wstr, (int)(wcslen(wstr) * sizeof(wchar_t)));
#else
			return CoreLib::IO::Encoding::UTF32->ToString((const char*)wstr, (int)(wcslen(wstr) * sizeof(wchar_t)));
#endif
		}

		String String::FromWChar(const wchar_t ch)
		{
#ifdef _WIN32
			return CoreLib::IO::Encoding::UTF16->ToString((const char*)&ch, (int)(sizeof(wchar_t)));
#else
			return CoreLib::IO::Encoding::UTF32->ToString((const char*)&ch, (int)(sizeof(wchar_t)));
#endif
		}

		String String::FromUnicodePoint(unsigned int codePoint)
		{
			char buf[6];
			int len = CoreLib::IO::EncodeUnicodePointToUTF8(buf, (int)codePoint);
			buf[len] = 0;
			return String(buf);
		}

		const wchar_t * String::ToWString(int * len) const
		{
			if (!buffer)
			{
				if (len)
					*len = 0;
				return L"";
			}
			else
			{
				if (wcharBuffer)
				{
					if (len)
						*len = (int)wcslen(wcharBuffer);
					return wcharBuffer;
				}
				List<char> buf;
				CoreLib::IO::Encoding::UTF16->GetBytes(buf, *this);
				if (len)
					*len = buf.Count() / sizeof(wchar_t);
				buf.Add(0);
				buf.Add(0);
				const_cast<String*>(this)->wcharBuffer = (wchar_t*)buf.Buffer();
				buf.ReleaseBuffer();
				return wcharBuffer;
			}
		}

		String String::PadLeft(char ch, int pLen)
		{
			StringBuilder sb;
			for (int i = 0; i < pLen - this->length; i++)
				sb << ch;
			for (int i = 0; i < this->length; i++)
				sb << buffer[i];
			return sb.ProduceString();
		}

		String String::PadRight(char ch, int pLen)
		{
			StringBuilder sb;
			for (int i = 0; i < this->length; i++)
				sb << buffer[i];
			for (int i = 0; i < pLen - this->length; i++)
				sb << ch;
			return sb.ProduceString();
		}
	}
}


================================================
FILE: Source/CoreLib/LibString.h
================================================
#ifndef FUNDAMENTAL_LIB_STRING_H
#define FUNDAMENTAL_LIB_STRING_H
#include <string.h>
#include <cstdlib>
#include <stdio.h>
#include "SmartPointer.h"
#include "Common.h"
#include "Hash.h"
#include "SecureCRT.h"

namespace CoreLib
{
	namespace Basic
	{
		class _EndLine
		{};
		extern _EndLine EndLine;

		// in-place reversion, works only for ascii string
		inline void ReverseInternalAscii(char * buffer, int length)
		{
			int i, j;
			char c;
			for (i = 0, j = length - 1; i<j; i++, j--)
			{
				c = buffer[i];
				buffer[i] = buffer[j];
				buffer[j] = c;
			}
		}
		template<typename IntType>
		inline int IntToAscii(char * buffer, IntType val, int radix)
		{
			int i = 0;
			IntType sign;
			sign = val;
			if (sign < 0)
				val = (IntType)(0 - val);
			do
			{
				int digit = (val % radix);
				if (digit <= 9)
					buffer[i++] = (char)(digit + '0');
				else
					buffer[i++] = (char)(digit - 10 + 'A');
			} while ((val /= radix) > 0);
			if (sign < 0)
				buffer[i++] = '-';
			buffer[i] = '\0';
			return i;
		}

		inline bool IsUtf8LeadingByte(char ch)
		{
			return (((unsigned char)ch) & 0xC0) == 0xC0;
		}

		inline bool IsUtf8ContinuationByte(char ch)
		{
			return (((unsigned char)ch) & 0xC0) == 0x80;
		}

		/*!
		@brief Represents a UTF-8 encoded string.
		*/

		class String
		{
			friend class StringBuilder;
		private:
			RefPtr<char, RefPtrArrayDestructor> buffer;
			wchar_t * wcharBuffer = nullptr;
			int length = 0;
			void Free()
			{
				if (buffer)
					buffer = 0;
				if (wcharBuffer)
					delete[] wcharBuffer;
				buffer = 0;
				wcharBuffer = 0;
				length = 0;
			}
		public:
			static String FromBuffer(RefPtr<char, RefPtrArrayDestructor> buffer, int len)
			{
				String rs;
				rs.buffer = buffer;
				rs.length = len;
				return rs;
			}
			static String FromWString(const wchar_t * wstr);
			static String FromWChar(const wchar_t ch);
			static String FromUnicodePoint(unsigned int codePoint);
			String()
			{
			}
			const char * begin() const
			{
				return buffer.Ptr();
			}
			const char * end() const
			{
				return buffer.Ptr() + length;
			}
			String(int val, int radix = 10)
			{
				buffer = new char[33];
				length = IntToAscii(buffer.Ptr(), val, radix);
				ReverseInternalAscii(buffer.Ptr(), length);
			}
			String(unsigned int val, int radix = 10)
			{
				buffer = new char[33];
				length = IntToAscii(buffer.Ptr(), val, radix);
				ReverseInternalAscii(buffer.Ptr(), length);
			}
			String(long long val, int radix = 10)
			{
				buffer = new char[65];
				length = IntToAscii(buffer.Ptr(), val, radix);
				ReverseInternalAscii(buffer.Ptr(), length);
			}
			String(float val, const char * format = "%g")
			{
				buffer = new char[128];
				sprintf_s(buffer.Ptr(), 128, format, val);
				length = (int)strnlen_s(buffer.Ptr(), 128);
			}
			String(double val, const char * format = "%g")
			{
				buffer = new char[128];
				sprintf_s(buffer.Ptr(), 128, format, val);
				length = (int)strnlen_s(buffer.Ptr(), 128);
			}
			String(const char * str)
			{
				if (str)
				{
					length = (int)strlen(str);
					buffer = new char[length + 1];
					memcpy(buffer.Ptr(), str, length + 1);
				}
			}
			String(char chr)
			{
				if (chr)
				{
					length = 1;
					buffer = new char[2];
					buffer[0] = chr;
					buffer[1] = '\0';
				}
			}
			String(const String & str)
			{
				this->operator=(str);
			}
			String(String&& other)
			{
				this->operator=(static_cast<String&&>(other));
			}
			~String()
			{
				Free();
			}
			String & operator=(const String & str)
			{
				if (str.buffer == buffer)
					return *this;
				Free();
				if (str.buffer)
				{
					length = str.length;
					buffer = str.buffer;
					wcharBuffer = 0;
				}
				return *this;
			}
			String & operator=(String&& other)
			{
				if (this != &other)
				{
					Free();
					buffer = _Move(other.buffer);
					length = other.length;
					wcharBuffer = other.wcharBuffer;
					other.buffer = 0;
					other.length = 0;
					other.wcharBuffer = 0;
				}
				return *this;
			}
			char operator[](int id) const
			{
#if _DEBUG
				if (id < 0 || id >= length)
					throw "Operator[]: index out of range.";
#endif
				return buffer.Ptr()[id];
			}

			friend String StringConcat(const char * lhs, int leftLen, const char * rhs, int rightLen);
			friend String operator+(const char*op1, const String & op2);
			friend String operator+(const String & op1, const char * op2);
			friend String operator+(const String & op1, const String & op2);

			String TrimStart() const
			{
				if (!buffer)
					return *this;
				int startIndex = 0;
				while (startIndex < length &&
					(buffer[startIndex] == ' ' || buffer[startIndex] == '\t' || buffer[startIndex] == '\r' || buffer[startIndex] == '\n'))
					startIndex++;
				return String(buffer + startIndex);
			}

			String TrimEnd() const
			{
				if (!buffer)
					return *this;

				int endIndex = length - 1;
				while (endIndex >= 0 &&
					(buffer[endIndex] == ' ' || buffer[endIndex] == '\t' || buffer[endIndex] == '\r' || buffer[endIndex] == '\n'))
					endIndex--;
				String res;
				res.length = endIndex + 1;
				res.buffer = new char[endIndex + 2];
				strncpy_s(res.buffer.Ptr(), endIndex + 2, buffer.Ptr(), endIndex + 1);
				return res;
			}

			String Trim() const
			{
				if (!buffer)
					return *this;

				int startIndex = 0;
				while (startIndex < length &&
					(buffer[startIndex] == ' ' || buffer[startIndex] == '\t'))
					startIndex++;
				int endIndex = length - 1;
				while (endIndex >= startIndex &&
					(buffer[endIndex] == ' ' || buffer[endIndex] == '\t'))
					endIndex--;

				String res;
				res.length = endIndex - startIndex + 1;
				res.buffer = new char[res.length + 1];
				memcpy(res.buffer.Ptr(), buffer + startIndex, res.length);
				res.buffer[res.length] = '\0';
				return res;
			}

			String SubString(int id, int len) const
			{
				if (len == 0)
					return "";
				if (id + len > length)
					len = length - id;
#if _DEBUG
				if (id < 0 || id >= length || (id + len) > length)
					throw "SubString: index out of range.";
				if (len < 0)
					throw "SubString: length less than zero.";
#endif
				String res;
				res.buffer = new char[len + 1];
				res.length = len;
				strncpy_s(res.buffer.Ptr(), len + 1, buffer + id, len);
				res.buffer[len] = 0;
				return res;
			}

			const char * Buffer() const
			{
				if (buffer)
					return buffer.Ptr();
				else
					return "";
			}

			const wchar_t * ToWString(int * len = 0) const;

			bool Equals(const String & str, bool caseSensitive = true)
			{
				if (!buffer)
					return (str.buffer == 0);
				if (caseSensitive)
					return (strcmp(buffer.Ptr(), str.buffer.Ptr()) == 0);
				else
				{
#ifdef _MSC_VER
					return (_stricmp(buffer.Ptr(), str.buffer.Ptr()) == 0);
#else
					return (strcasecmp(buffer.Ptr(), str.buffer.Ptr()) == 0);
#endif
				}
			}
			bool operator==(const char * strbuffer) const
			{
				if (!buffer)
					return (strbuffer == 0 || strcmp(strbuffer, "") == 0);
				if (!strbuffer)
					return buffer == nullptr || strcmp(buffer.Ptr(), "") == 0;
				return (strcmp(buffer.Ptr(), strbuffer) == 0);
			}

			bool operator==(const String & str) const
			{
				if (!buffer)
					return (str.buffer == 0 || strcmp(str.buffer.Ptr(), "") == 0);
				if (!str.buffer)
					return buffer == nullptr || strcmp(buffer.Ptr(), "") == 0;
				return (strcmp(buffer.Ptr(), str.buffer.Ptr()) == 0);
			}
			bool operator!=(const char * strbuffer) const
			{
				if (!buffer)
					return (strbuffer != 0 && strcmp(strbuffer, "") != 0);
				if (strbuffer == 0)
					return length != 0;
				return (strcmp(buffer.Ptr(), strbuffer) != 0);
			}
			bool operator!=(const String & str) const
			{
				if (!buffer)
					return (str.buffer != 0 && strcmp(str.buffer.Ptr(), "") != 0);
				if (str.buffer.Ptr() == 0)
					return length != 0;
				return (strcmp(buffer.Ptr(), str.buffer.Ptr()) != 0);
			}
			bool operator>(const String & str) const
			{
				if (!buffer)
					return false;
				if (!str.buffer)
					return buffer.Ptr() != nullptr && length != 0;
				return (strcmp(buffer.Ptr(), str.buffer.Ptr()) > 0);
			}
			bool operator<(const String & str) const
			{
				if (!buffer)
					return (str.buffer != 0);
				if (!str.buffer)
					return false;
				return (strcmp(buffer.Ptr(), str.buffer.Ptr()) < 0);
			}
			bool operator>=(const String & str) const
			{
				if (!buffer)
					return (str.buffer == 0);
				if (!str.buffer)
					return length == 0;
				int res = strcmp(buffer.Ptr(), str.buffer.Ptr());
				return (res > 0 || res == 0);
			}
			bool operator<=(const String & str) const
			{
				if (!buffer)
					return true;
				if (!str.buffer)
					return length > 0;
				int res = strcmp(buffer.Ptr(), str.buffer.Ptr());
				return (res < 0 || res == 0);
			}

			String ToUpper() const
			{
				if (!buffer)
					return *this;
				String res;
				res.length = length;
				res.buffer = new char[length + 1];
				for (int i = 0; i <= length; i++)
					res.buffer[i] = (buffer[i] >= 'a' && buffer[i] <= 'z') ?
					(buffer[i] - 'a' + 'A') : buffer[i];
				return res;
			}

			String ToLower() const
			{
				if (!buffer)
					return *this;
				String res;
				res.length = length;
				res.buffer = new char[length + 1];
				for (int i = 0; i <= length; i++)
					res.buffer[i] = (buffer[i] >= 'A' && buffer[i] <= 'Z') ?
					(buffer[i] - 'A' + 'a') : buffer[i];
				return res;
			}

			int Length() const
			{
				return length;
			}

			int IndexOf(const char * str, int id) const // String str
			{
				if (!buffer)
					return -1;
				if (id < 0 || id >= length)
					return -1;
				auto findRs = strstr(buffer + id, str);
				int res = findRs ? (int)(findRs - buffer.Ptr()) : -1;
				if (res >= 0)
					return res;
				else
					return -1;
			}

			int IndexOf(const String & str, int id) const
			{
				return IndexOf(str.buffer.Ptr(), id);
			}

			int IndexOf(const char * str) const
			{
				return IndexOf(str, 0);
			}

			int IndexOf(const String & str) const
			{
				return IndexOf(str.buffer.Ptr(), 0);
			}

			int IndexOf(char ch, int id) const
			{
#if _DEBUG
				if (id < 0 || id >= length)
					throw "SubString: index out of range.";
#endif
				if (!buffer)
					return -1;
				for (int i = id; i < length; i++)
					if (buffer[i] == ch)
						return i;
				return -1;
			}

			int IndexOf(char ch) const
			{
				return IndexOf(ch, 0);
			}

			int LastIndexOf(char ch) const
			{
				for (int i = length - 1; i >= 0; i--)
					if (buffer[i] == ch)
						return i;
				return -1;
			}

			bool StartsWith(const char * str) const // String str
			{
				if (!buffer)
					return false;
				int strLen = (int)strlen(str);
				if (strLen > length)
					return false;
				for (int i = 0; i < strLen; i++)
					if (str[i] != buffer[i])
						return false;
				return true;
			}

			bool StartsWith(const String & str) const
			{
				return StartsWith(str.buffer.Ptr());
			}

			bool EndsWith(char * str)  const // String str
			{
				if (!buffer)
					return false;
				int strLen = (int)strlen(str);
				if (strLen > length)
					return false;
				for (int i = strLen - 1; i >= 0; i--)
					if (str[i] != buffer[length - strLen + i])
						return false;
				return true;
			}

			bool EndsWith(const String & str) const
			{
				return EndsWith(str.buffer.Ptr());
			}

			bool Contains(const char * str) const // String str
			{
				if (!buffer)
					return false;
				return (IndexOf(str) >= 0) ? true : false;
			}

			bool Contains(const String & str) const
			{
				return Contains(str.buffer.Ptr());
			}

			int GetHashCode() const
			{
				return CoreLib::Basic::GetHashCode((const char*)buffer.Ptr());
			}
			String PadLeft(char ch, int length);
			String PadRight(char ch, int length);
			String ReplaceAll(String src, String dst) const;
		};

		class StringBuilder
		{
		private:
			char * buffer;
			int length;
			int bufferSize;
			static const int InitialSize = 512;
		public:
			StringBuilder(int bufferSize = 1024)
				:buffer(0), length(0), bufferSize(0)
			{
				buffer = new char[InitialSize]; // new a larger buffer 
				buffer[0] = '\0';
				length = 0;
				bufferSize = InitialSize;
			}
			~StringBuilder()
			{
				if (buffer)
					delete[] buffer;
			}
			void EnsureCapacity(int size)
			{
				if (bufferSize < size)
				{
					char * newBuffer = new char[size + 1];
					if (buffer)
					{
						strcpy_s(newBuffer, size + 1, buffer);
						delete[] buffer;
					}
					buffer = newBuffer;
					bufferSize = size;
				}
			}
			StringBuilder & operator << (char ch)
			{
				Append(&ch, 1);
				return *this;
			}
			StringBuilder & operator << (int val)
			{
				Append(val);
				return *this;
			}
			StringBuilder & operator << (unsigned int val)
			{
				Append(val);
				return *this;
			}
			StringBuilder & operator << (long long val)
			{
				Append(val);
				return *this;
			}
			StringBuilder & operator << (float val)
			{
				Append(val);
				return *this;
			}
			StringBuilder & operator << (double val)
			{
				Append(val);
				return *this;
			}
			StringBuilder & operator << (const char * str)
			{
				Append(str, (int)strlen(str));
				return *this;
			}
			StringBuilder & operator << (const String & str)
			{
				Append(str);
				return *this;
			}
			StringBuilder & operator << (const _EndLine)
			{
				Append('\n');
				return *this;
			}
			void Append(char ch)
			{
				Append(&ch, 1);
			}
			void Append(float val)
			{
				char buf[128];
				sprintf_s(buf, 128, "%g", val);
				int len = (int)strnlen_s(buf, 128);
				Append(buf, len);
			}
			void Append(double val)
			{
				char buf[128];
				sprintf_s(buf, 128, "%g", val);
				int len = (int)strnlen_s(buf, 128);
				Append(buf, len);
			}
			void Append(unsigned int value, int radix = 10)
			{
				char vBuffer[33];
				int len = IntToAscii(vBuffer, value, radix);
				ReverseInternalAscii(vBuffer, len);
				Append(vBuffer);
			}
			void Append(int value, int radix = 10)
			{
				char vBuffer[33];
				int len = IntToAscii(vBuffer, value, radix);
				ReverseInternalAscii(vBuffer, len);
				Append(vBuffer);
			}
			void Append(long long value, int radix = 10)
			{
				char vBuffer[65];
				int len = IntToAscii(vBuffer, value, radix);
				ReverseInternalAscii(vBuffer, len);
				Append(vBuffer);
			}
			void Append(const String & str)
			{
				Append(str.Buffer(), str.Length());
			}
			void Append(const char * str)
			{
				Append(str, (int)strlen(str));
			}
			void Append(const char * str, int strLen)
			{
				int newLength = length + strLen;
				if (bufferSize < newLength + 1)
				{
					int newBufferSize = InitialSize;
					while (newBufferSize < newLength + 1)
						newBufferSize <<= 1;
					char * newBuffer = new char[newBufferSize];
					if (buffer)
					{
						memcpy(newBuffer, buffer, length);
						delete[] buffer;
					}
					memcpy(newBuffer + length, str, strLen);
					newBuffer[newLength] = '\0';
					buffer = newBuffer;
					bufferSize = newBufferSize;
				}
				else
				{
					memcpy(buffer + length, str, strLen);
					buffer[newLength] = '\0';
				}
				length = newLength;
			}

			int Capacity()
			{
				return bufferSize;
			}

			char * Buffer()
			{
				return buffer;
			}

			int Length()
			{
				return length;
			}

			String ToString()
			{
				return String(buffer);
			}

			String ProduceString()
			{
				String rs;
				rs.buffer = buffer;
				rs.length = length;
				buffer = 0;
				bufferSize = 0;
				length = 0;
				return rs;

			}

			String GetSubString(int start, int count)
			{
				String rs;
				rs.buffer = new char[count + 1];
				rs.length = count;
				strncpy_s(rs.buffer.Ptr(), count + 1, buffer + start, count);
				rs.buffer[count] = 0;
				return rs;
			}

			void Remove(int id, int len)
			{
#if _DEBUG
				if (id >= length || id < 0)
					throw "Remove: Index out of range.";
				if (len < 0)
					throw "Remove: remove length smaller than zero.";
#endif
				int actualDelLength = ((id + len) >= length) ? (length - id) : len;
				for (int i = id + actualDelLength; i <= length; i++)
					buffer[i - actualDelLength] = buffer[i];
				length -= actualDelLength;
			}

			void Clear()
			{
				length = 0;
				if (buffer)
					buffer[0] = 0;
			}
		};

		int StringToInt(const String & str, int radix = 10);
		unsigned int StringToUInt(const String & str, int radix = 10);
		double StringToDouble(const String & str);
		float StringToFloat(const String & str);
	}
}

#endif


================================================
FILE: Source/CoreLib/Link.h
================================================
#ifndef CORE_LIB_LINK_H
#define CORE_LIB_LINK_H

#include "Common.h"
#include "Exception.h"

namespace CoreLib
{
	namespace Basic
	{
		template<typename T>
		class LinkedList;

		template<typename T>
		class LinkedNode
		{
			template<typename T1>
			friend class LinkedList;
		private:
			LinkedNode<T> *pPrev, *pNext;
			LinkedList<T> * FLink;
		public:
			T Value;
			LinkedNode (LinkedList<T> * lnk):FLink(lnk)
			{
				pPrev = pNext = 0;
			};
			LinkedNode<T> * GetPrevious()
			{
				return pPrev;
			};
			LinkedNode<T> * GetNext()
			{
				return pNext;
			};
			LinkedNode<T> * InsertAfter(const T & nData)
			{
				LinkedNode<T> * n = new LinkedNode<T>(FLink);
				n->Value = nData;
				n->pPrev = this;
				n->pNext = this->pNext;
				LinkedNode<T> *npp = n->pNext;
				if (npp)
				{
					npp->pPrev = n;
				}
				pNext = n;
				if (!n->pNext)
					FLink->FTail = n;
				FLink->FCount ++;
				return n;
			};
			LinkedNode<T> * InsertBefore(const T & nData)
			{
				LinkedNode<T> * n = new LinkedNode<T>(FLink);
				n->Value = nData;
				n->pPrev = pPrev;
				n->pNext = this;
				pPrev = n;
				LinkedNode<T> *npp = n->pPrev;
				if (npp)
					npp->pNext = n;
				if (!n->pPrev)
					FLink->FHead = n;
				FLink->FCount ++;
				return n;
			};
			void Delete()
			{
				if (pPrev)
					pPrev->pNext = pNext;
				if (pNext)
					pNext->pPrev = pPrev;
				FLink->FCount --;
				if (FLink->FHead == this)
				{
					FLink->FHead = pNext;
				}
				if (FLink->FTail == this)
				{
					FLink->FTail = pPrev;
				}
				delete this;
			}
		};
		template<typename T>
		class LinkedList
		{
			template<typename T1>
			friend class LinkedNode;
		private:
			LinkedNode<T> * FHead, *FTail;
			int FCount;
		public:
			class Iterator
			{
			public:
				LinkedNode<T> * Current, *Next;
				void SetCurrent(LinkedNode<T> * cur)
				{
					Current = cur;
					if (Current)
						Next = Current->GetNext();
					else
						Next = 0;
				}
				Iterator()
				{
					Current = Next = 0;
				}
				Iterator(LinkedNode<T> * cur)
				{
					SetCurrent(cur);
				}
				T & operator *() const
				{
					return Current->Value;
				}
				Iterator& operator ++()
				{
					SetCurrent(Next);
					return *this;
				}
				Iterator operator ++(int)
				{
					Iterator rs = *this;
					SetCurrent(Next);
					return rs;
				}
				bool operator != (const Iterator & iter) const
				{
					return Current != iter.Current;
				}
				bool operator == (const Iterator & iter) const
				{
					return Current == iter.Current;
				}
			};
			Iterator begin() const
			{
				return Iterator(FHead);
			}
			Iterator end() const
			{
				return Iterator(0);
			}
		public:
			LinkedList() : FHead(0), FTail(0), FCount(0)
			{
			}
			~LinkedList()
			{
				Clear();
			}
			LinkedList(const LinkedList<T> & link) : FHead(0), FTail(0), FCount(0)
			{
				this->operator=(link);
			}
			LinkedList(LinkedList<T> && link) : FHead(0), FTail(0), FCount(0)
			{
				this->operator=(_Move(link));
			}
			LinkedList<T> & operator = (LinkedList<T> && link)
			{
				if (FHead != 0)
					Clear();
				FHead = link.FHead;
				FTail = link.FTail;
				FCount = link.FCount;
				link.FHead = 0;
				link.FTail = 0;
				link.FCount = 0;
				for (auto node = FHead; node; node = node->GetNext())
					node->FLink = this;
				return *this;
			}
			LinkedList<T> & operator = (const LinkedList<T> & link)
			{
				if (FHead != 0)
					Clear();
				auto p = link.FHead;
				while (p)
				{
					AddLast(p->Value);
					p = p->GetNext();
				}
				return *this;
			}
			template<typename IteratorFunc>
			void ForEach(const IteratorFunc & f)
			{
				auto p = FHead;
				while (p)
				{
					f(p->Value);
					p = p->GetNext();
				}
			}
			LinkedNode<T> * GetNode(int x)
			{
				LinkedNode<T> *pCur = FHead;
				for (int i=0;i<x;i++)
				{
					if (pCur)
						pCur = pCur->pNext;
					else
						throw "Index out of range";
				}
				return pCur;
			};
			LinkedNode<T> * Find(const T& fData)
			{
				for (LinkedNode<T> * pCur = FHead; pCur; pCur = pCur->pNext)
				{
					if (pCur->Value == fData)
						return pCur;
				}
				return 0;
			};
			LinkedNode<T> * FirstNode() const
			{
				return FHead;
			};
			T & First() const
			{
				if (!FHead)
					throw IndexOutofRangeException("LinkedList: index out of range.");
				return FHead->Value;
			}
			T & Last() const
			{
				if (!FTail)
					throw IndexOutofRangeException("LinkedList: index out of range.");
				return FTail->Value;
			}
			LinkedNode<T> * LastNode() const
			{
				return FTail;
			};
			LinkedNode<T> * AddLast(const T & nData)
			{
				LinkedNode<T> * n = new LinkedNode<T>(this);
				n->Value = nData;
				n->pPrev = FTail;
				if (FTail)
					FTail->pNext = n;
				n->pNext = 0;
				FTail = n;
				if (!FHead)
					FHead = n;
				FCount ++;
				return n;
			};
			// Insert a blank node
			LinkedNode<T> * AddLast()
			{
				LinkedNode<T> * n = new LinkedNode<T>(this);
				n->pPrev = FTail;
				if (FTail)
					FTail->pNext = n;
				n->pNext = 0;
				FTail = n;
				if (!FHead)
					FHead = n;
				FCount ++;
				return n;
			};
			LinkedNode<T> * AddFirst(const T& nData)
			{
				LinkedNode<T> *n = new LinkedNode<T>(this);
				n->Value = nData;
				n->pPrev = 0;
				n->pNext = FHead;
				if (FHead)
					FHead->pPrev = n;
				FHead = n;
				if (!FTail)
					FTail = n;
				FCount ++;
				return n;
			};
			void Delete(LinkedNode<T>*n, int Count = 1)
			{
				LinkedNode<T> *n1,*n2 = 0, *tn;
				n1 = n->pPrev;
				tn = n;
				int numDeleted = 0;
				for (int i=0; i<Count; i++)
				{
					n2 = tn->pNext;
					delete tn;
					tn = n2;
					numDeleted++;
					if (tn == 0)
						break;
				}
				if (n1)
					n1->pNext = n2;
				else
					FHead = n2;
				if (n2)
					n2->pPrev = n1;
				else
					FTail = n1;
				FCount -= numDeleted;
			}
			void Clear()
			{
				for (LinkedNode<T> *n = FHead; n; )
				{
					LinkedNode<T> * tmp = n->pNext;
					delete n;
					n = tmp;
				}
				FHead = 0;
				FTail = 0;
				FCount = 0;
			}
			List<T> ToList() const
			{
				List<T> rs;
				rs.Reserve(FCount);
				for (auto & item : *this)
				{
					rs.Add(item);
				}
				return rs;
			}
			int Count()
			{
				return FCount;
			}
		};
	}
}
#endif


================================================
FILE: Source/CoreLib/Linq.h
================================================
#ifndef FUNDAMENTAL_LIB_LINQ_H
#define FUNDAMENTAL_LIB_LINQ_H

#include "List.h"

namespace CoreLib
{
	namespace Basic
	{

		template <typename T>
		T ConstructT();

		template <typename T>
		class RemoveReference
		{
		public:
			typedef T Type;
		};

		template <typename T>
		class RemoveReference<T&>
		{
		public:
			typedef T Type;
		};

		template <typename T>
		class RemoveReference<T&&>
		{
		public:
			typedef T Type;
		};

		template<typename T>
		struct RemovePointer
		{
			typedef T Type;
		};

		template<typename T>
		struct RemovePointer<T*>
		{
			typedef T Type;
		};

		template <typename TQueryable1, typename TEnumerator1, typename TQueryable2, typename TEnumerator2, typename T>
		class ConcatQuery
		{
		private:
			TQueryable1 items1;
			TQueryable2 items2;
		public:
			ConcatQuery(const TQueryable1 & queryable1, const TQueryable2 & queryable2)
				: items1(queryable1), items2(queryable2)
			{}
			class Enumerator
			{
			private:
				TEnumerator1 ptr1;
				TEnumerator1 end1;
				TEnumerator2 ptr2;
				TEnumerator2 end2;
			public:
				Enumerator(const Enumerator &) = default;
				Enumerator(TEnumerator1 pptr, TEnumerator1 pend, TEnumerator2 pptr2, TEnumerator2 pend2)
					: ptr1(pptr), end1(pend), ptr2(pptr2), end2(pend2)
				{}
				T operator *() const
				{
					if (ptr1 != end1)
						return *(ptr1);
					else
						return *(ptr2);
				}
				Enumerator& operator ++()
				{
					if (ptr1 != end1)
						++ptr1;
					else
						++ptr2;
					return *this;
				}
				Enumerator operator ++(int)
				{
					Enumerator rs = *this;
					++rs;
					return rs;
				}
				bool operator != (const Enumerator & iter) const
				{
					return ptr1 != iter.ptr1 || ptr2 != iter.ptr2;
				}
				bool operator == (const Enumerator & iter) const
				{
					return ptr1 == iter.ptr1 && ptr2 == iter.ptr2;
				}
			};
			Enumerator begin() const
			{
				return Enumerator(items1.begin(), items1.end(), items2.begin(), items2.end());
			}
			Enumerator end() const
			{
				return Enumerator(items1.end(), items1.end(), items2.end(), items2.end());
			}
		};

		template <typename TQueryable, typename TEnumerator, typename T, typename TFunc>
		class WhereQuery
		{
		private:
			TQueryable items;
			TFunc func;
		public:
			WhereQuery(const TQueryable & queryable, const TFunc & f)
				: items(queryable), func(f)
			{}
			class Enumerator
			{
			private:
				TEnumerator ptr;
				TEnumerator end;
				const TFunc * func;
			public:
				Enumerator(const Enumerator &) = default;
				Enumerator(TEnumerator ptr, TEnumerator end, const TFunc & f)
					: ptr(ptr), end(end), func(&f)
				{}
				T operator *() const
				{
					return *(ptr);
				}
				Enumerator& operator ++()
				{
					++ptr;
					while (ptr != end)
					{
						if ((*func)(*ptr))
							break;
						else
							++ptr;
					}
					return *this;
				}
				Enumerator operator ++(int)
				{
					Enumerator rs = *this;
					while (rs.ptr != end)
					{
						if ((*func)(*rs.ptr))
							break;
						++rs.ptr;
					}
					return rs;
				}
				bool operator != (const Enumerator & iter) const
				{
					return ptr != iter.ptr;
				}
				bool operator == (const Enumerator & iter) const
				{
					return ptr == iter.ptr;
				}
			};
			Enumerator begin() const
			{
				auto ptr = items.begin();
				auto end = items.end();
				while (ptr != end)
				{
					if (func(*ptr))
						break;
					++ptr;
				}
				return Enumerator(ptr, end, func);
			}
			Enumerator end() const
			{
				return Enumerator(items.end(), items.end(), func);
			}
		};

		template <typename TQueryable, typename TEnumerator, typename T>
		class SkipQuery
		{
		private:
			TQueryable items;
			int count = 0;
		public:
			SkipQuery(const TQueryable & queryable, int pCount)
				: items(queryable), count(pCount)
			{}
			class Enumerator
			{
			private:
				TEnumerator ptr;
				TEnumerator end;
			public:
				Enumerator(const Enumerator &) = default;
				Enumerator(TEnumerator pptr, TEnumerator pend)
					: ptr(pptr), end(pend)
				{
				}
				T operator *() const
				{
					return *(ptr);
				}
				Enumerator& operator ++()
				{
					++ptr;
					return *this;
				}
				Enumerator operator ++(int)
				{
					Enumerator rs = *this;
					++ptr;
					return rs;
				}
				bool operator != (const Enumerator & iter) const
				{
					return ptr != iter.ptr;
				}
				bool operator == (const Enumerator & iter) const
				{
					return ptr == iter.ptr;
				}
			};
			Enumerator begin() const
			{
				auto ptr = items.begin();
				auto end = items.end();
				for (int i = 0; i < count; i++)
					if (ptr != end)
						++ptr;
				return Enumerator(ptr, end);
			}
			Enumerator end() const
			{
				return Enumerator(items.end(), items.end());
			}
		};

		template <typename TQueryable, typename TEnumerator, typename T, typename TFunc>
		class SelectQuery
		{
		private:
			TQueryable items;
			TFunc func;
		public:
			SelectQuery(const TQueryable & queryable, const TFunc & f)
				: items(queryable), func(f)
			{}
			class Enumerator
			{
			private:
				TEnumerator ptr;
				TEnumerator end;
				const TFunc * func;
			public:
				Enumerator(const Enumerator &) = default;
				Enumerator(TEnumerator ptr, TEnumerator end, const TFunc & f)
					: ptr(ptr), end(end), func(&f)
				{}
				auto operator *() const -> decltype((*func)(*ptr))
				{
					return (*func)(*ptr);
				}
				Enumerator& operator ++()
				{
					++ptr;
					return *this;
				}
				Enumerator operator ++(int)
				{
					Enumerator rs = *this;
					++rs;
					return rs;
				}
				bool operator != (const Enumerator & iter) const
				{
					return !(ptr == iter.ptr);
				}
				bool operator == (const Enumerator & iter) const
				{
					return ptr == iter.ptr;
				}
			};
			Enumerator begin() const
			{
				return Enumerator(items.begin(), items.end(), func);
			}
			Enumerator end() const
			{
				return Enumerator(items.end(), items.end(), func);
			}
		};

		template <typename TQueryable, typename TEnumerator, typename T, typename TFunc>
		class SelectManyQuery
		{
		private:
			TQueryable items;
			TFunc func;
			SelectManyQuery()
			{}
		public:
			SelectManyQuery(const TQueryable & queryable, const TFunc & f)
				: items(queryable), func(f)
			{}
			template<typename TItems, typename TItemPtr>
			class Enumerator
			{
			private:
				TEnumerator ptr;
				TEnumerator end;
				const TFunc * func;
				TItems items;
				TItemPtr subPtr;
			public:
				Enumerator(const Enumerator &) = default;
				Enumerator(TEnumerator ptr, TEnumerator end, const TFunc & f)
					: ptr(ptr), end(end), func(&f)
				{
					if (ptr != end)
					{
						items = f(*ptr);
						subPtr = items.begin();
					}
				}
				auto operator *() const -> decltype(*subPtr)
				{
					return *subPtr;
				}
				Enumerator& operator ++()
				{
					++subPtr;
					while (subPtr == items.end() && ptr != end)
					{
						++ptr;
						if (ptr != end)
						{
							items = (*func)(*ptr);
							subPtr = items.begin();
						}
						else
							break;
					}

					return *this;
				}
				Enumerator operator ++(int)
				{
					Enumerator rs = *this;
					++rs;
					return rs;
				}
				bool operator != (const Enumerator & iter) const
				{
					return !operator==(iter);
				}
				bool operator == (const Enumerator & iter) const
				{
					if (ptr == iter.ptr)
					{
						if (ptr == end)
							return true;
						else
							return subPtr == iter.subPtr;
					}
					else
						return false;
				}
			};
			auto begin() const ->Enumerator<decltype(func(ConstructT<T>())), decltype(func(ConstructT<T>()).begin())>
			{
				return Enumerator<decltype(func(ConstructT<T>())), decltype(func(ConstructT<T>()).begin())>(items.begin(), items.end(), func);
			}
			auto end() const ->Enumerator<decltype(func(ConstructT<T>())), decltype(func(ConstructT<T>()).begin())>
			{
				return Enumerator<decltype(func(ConstructT<T>())), decltype(func(ConstructT<T>()).begin())>(items.end(), items.end(), func);
			}
		};

		template <typename T>
		struct EnumeratorType
		{
			typedef decltype(ConstructT<T>().begin()) Type;
		};

		template <typename TFunc, typename TArg>
		class ExtractReturnType
		{
		public:
			static TFunc * f;
			static TArg ConstructArg() {};
			typedef decltype((*f)(ConstructArg())) ReturnType;
		};

		template <typename T>
		class ExtractItemType
		{
		public:
			typedef typename RemovePointer<decltype(ConstructT<T>().begin())>::Type Type;
		};

		template <typename TQueryable, typename TEnumerator, typename T>
		class Queryable
		{
		private:
			TQueryable items;
		public:
			auto begin() const -> decltype(items.begin())
			{
				return items.begin();
			}
			auto end() const -> decltype(items.end())
			{
				return items.end();
			}
		public:
			const TQueryable & GetItems() const
			{
				return items;
			}
			Queryable(const TQueryable & items)
				: items(items)
			{}

			Queryable<SkipQuery<TQueryable, TEnumerator, T>, typename SkipQuery<TQueryable, TEnumerator, T>::Enumerator, T> Skip(int count) const
			{
				return Queryable<SkipQuery<TQueryable, TEnumerator, T>, typename SkipQuery<TQueryable, TEnumerator, T>::Enumerator, T>(SkipQuery<TQueryable, TEnumerator, T>(items, count));
			}

			template<typename TQueryable2, typename TEnumerator2>
			Queryable<ConcatQuery<TQueryable, TEnumerator, TQueryable2, TEnumerator2, T>, typename ConcatQuery<TQueryable, TEnumerator, TQueryable2, TEnumerator2, T>::Enumerator, T> Concat(const Queryable<TQueryable2, TEnumerator2, T> & other) const
			{
				return Queryable<ConcatQuery<TQueryable, TEnumerator, TQueryable2, TEnumerator2, T>, typename ConcatQuery<TQueryable, TEnumerator, TQueryable2, TEnumerator2, T>::Enumerator, T>(ConcatQuery<TQueryable, TEnumerator, TQueryable2, TEnumerator2, T>(this->items, other.GetItems()));
			}

			template<typename TFunc>
			Queryable<WhereQuery<TQueryable, TEnumerator, T, TFunc>, typename WhereQuery<TQueryable, TEnumerator, T, TFunc>::Enumerator, T> Where(const TFunc & f) const
			{
				return Queryable<WhereQuery<TQueryable, TEnumerator, T, TFunc>, typename WhereQuery<TQueryable, TEnumerator, T, TFunc>::Enumerator, T>(WhereQuery<TQueryable, TEnumerator, T, TFunc>(items, f));
			}

			template<typename TFunc>
			Queryable<SelectQuery<TQueryable, TEnumerator, T, TFunc>, typename SelectQuery<TQueryable, TEnumerator, T, TFunc>::Enumerator, typename RemoveReference<typename ExtractReturnType<TFunc, T>::ReturnType>::Type> Select(const TFunc & f) const
			{
				return Queryable<SelectQuery<TQueryable, TEnumerator, T, TFunc>, typename SelectQuery<TQueryable, TEnumerator, T, TFunc>::Enumerator, typename RemoveReference<typename ExtractReturnType<TFunc, T>::ReturnType>::Type>(SelectQuery<TQueryable, TEnumerator, T, TFunc>(items, f));
			}

			template<typename TFunc>
			auto SelectMany(const TFunc & f) const ->Queryable<SelectManyQuery<TQueryable, TEnumerator, T, TFunc>, typename EnumeratorType<SelectManyQuery<TQueryable, TEnumerator, T, TFunc>>::Type, typename ExtractItemType<decltype(f(ConstructT<T>()))>::Type>
			{
				return Queryable<SelectManyQuery<TQueryable, TEnumerator, T, TFunc>, typename EnumeratorType<SelectManyQuery<TQueryable, TEnumerator, T, TFunc>>::Type, typename ExtractItemType<decltype(f(ConstructT<T>()))>::Type>(SelectManyQuery<TQueryable, TEnumerator, T, TFunc>(items, f));
			}

			template<typename TAggregateResult, typename TFunc>
			auto Aggregate(const TAggregateResult & initial, const TFunc & f) const -> decltype(f(initial, *items.begin()))
			{
				TAggregateResult rs = initial;
				for (auto && x : items)
					rs = f(rs, x);
				return rs;
			}

			template<typename TFunc>
			bool Any(const TFunc & condition) const
			{
				for (auto && x : items)
					if (condition(x))
						return true;
				return false;
			}

			template<typename TFunc>
			T & First(const TFunc & condition) const
			{
				for (auto && x : items)
					if (condition(x))
						return x;
			}

			template <typename TFunc>
			T Max(const TFunc & selector) const
			{
				return Aggregate(*items.begin(), [&](const T & v0, const T & v1)
				{
					return selector(v0) > selector(v1) ? v0 : v1;
				});
			}

			template <typename TFunc>
			T Min(const TFunc & selector) const
			{
				return Aggregate(*items.begin(), [&](const T & v0, const T & v1)
				{
					return selector(v0) < selector(v1) ? v0 : v1;
				});
			}

			template <typename TFunc>
			auto Sum(const TFunc & selector) const -> decltype(selector(ConstructT<T>()))
			{
				decltype(selector(ConstructT<T>())) rs(0);
				for (auto && x : items)
					rs = rs + selector(x);
				return rs;
			}

			T Max() const
			{
				return Aggregate(*items.begin(), [](const T & v0, const T & v1) {return v0 > v1 ? v0 : v1; });
			}

			T Min() const
			{
				return Aggregate(*items.begin(), [](const T & v0, const T & v1) {return v0 < v1 ? v0 : v1; });
			}

			T Sum() const
			{
				T rs = T(0);
				for (auto && x : items)
					rs = rs + x;
				return rs;
			}

			T Avg() const
			{
				T rs = T(0);
				int count = 0;
				for (auto && x : items)
				{
					rs = rs + x;
					count++;
				}
				return rs / count;
			}

			int Count() const
			{
				int rs = 0;
				for (auto && x : items)
					rs++;
				return rs;
			}

			List<T> ToList() const
			{
				List<T> rs;
				for (auto && val : items)
					rs.Add(val);
				return rs;
			}
		};


		template<typename T, typename TAllocator>
		inline Queryable<ArrayView<T>, T*, T> From(const List<T, TAllocator> & list)
		{
			return Queryable<ArrayView<T>, T*, T>(list.GetArrayView());
		}

		template<typename T, typename TAllocator>
		inline Queryable<List<T, TAllocator>, T*, T> From(List<T, TAllocator> && list)
		{
			return Queryable<List<T, TAllocator>, T*, T>(_Move(list));
		}

		template<typename T>
		inline Queryable<ArrayView<T>, T*, T> From(const ArrayView<T> & list)
		{
			return Queryable<ArrayView<T>, T*, T>(list);
		}

		template<typename T, int count>
		inline Queryable<Array<T, count>, T*, T> From(const Array<T, count> & list)
		{
			return Queryable<Array<T, count>, T*, T>(list);
		}

		template<typename T>
		inline auto From(const T & list) -> Queryable<T, decltype(list.begin()), decltype(*list.begin())>
		{
			return Queryable<T, decltype(list.begin()), decltype(*list.begin())>(list);
		}

		template<typename T>
		inline Queryable<Array<T, 1>, T*, T> FromSingle(const T & obj)
		{
			Array<T, 1> arr;
			arr.Add(obj);
			return From(arr);
		}

		template<typename T>
		struct LinkedListView
		{
			typename LinkedList<T>::Iterator start, last;
			typename LinkedList<T>::Iterator begin() const
			{
				return start;
			}
			typename LinkedList<T>::Iterator end() const
			{
				return last;
			}
		};

		template<typename T>
		inline Queryable<LinkedListView<T>, LinkedNode<T>, T> From(const LinkedList<T> & list)
		{
			LinkedListView<T> view;
			view.start = list.begin();
			view.last = list.end();
			return Queryable<LinkedListView<T>, LinkedNode<T>, T>(view);
		}

		template<typename TKey, typename TValue>
		struct EnumerableDictView
		{
			typename EnumerableDictionary<TKey, TValue>::Iterator start, last;
			typename EnumerableDictionary<TKey, TValue>::Iterator begin() const
			{
				return start;
			}
			typename EnumerableDictionary<TKey, TValue>::Iterator end() const
			{
				return last;
			}
		};

		template<typename TKey, typename TValue>
		inline Queryable<EnumerableDictView<TKey, TValue>, typename EnumerableDictionary<TKey, TValue>::Iterator, KeyValuePair<TKey, TValue>> From(const EnumerableDictionary<TKey, TValue> & dict)
		{
			EnumerableDictView<TKey, TValue> view;
			view.start = dict.begin();
			view.last = dict.end();
			return Queryable<EnumerableDictView<TKey, TValue>, typename EnumerableDictionary<TKey, TValue>::Iterator, KeyValuePair<TKey, TValue>>(view);
		}

		template<typename TKey>
		struct EnumerableHashSetView
		{
			typename HashSetBase<TKey, EnumerableDictionary<TKey, _DummyClass>>::Iterator start, last;
			typename EnumerableHashSet<TKey>::Iterator begin() const
			{
				return start;
			}
			typename EnumerableHashSet<TKey>::Iterator end() const
			{
				return last;
			}
		};

		template<typename TKey>
		inline Queryable<EnumerableHashSetView<TKey>, typename HashSetBase<TKey, EnumerableDictionary<TKey, _DummyClass>>::Iterator, TKey> From(const EnumerableHashSet<TKey> & dict)
		{
			EnumerableHashSetView<TKey> view;
			view.start = dict.begin();
			view.last = dict.end();
			return Queryable<EnumerableHashSetView<TKey>, typename HashSetBase<TKey, EnumerableDictionary<TKey, _DummyClass>>::Iterator, TKey>(view);
		}
	}
}

#endif

================================================
FILE: Source/CoreLib/List.h
================================================
#ifndef FUNDAMENTAL_LIB_LIST_H
#define FUNDAMENTAL_LIB_LIST_H

#include "Allocator.h"
#include <type_traits>
#include "LibMath.h"
#include <new>
#include "ArrayView.h"
#include <algorithm>

const int MIN_QSORT_SIZE = 32;

namespace CoreLib
{
	namespace Basic
	{
		template<typename T, int isPOD>
		class Initializer
		{

		};

		template<typename T>
		class Initializer<T, 0>
		{
		public:
			static void Initialize(T * buffer, int size)
			{
				for (int i = 0; i<size; i++)
					new (buffer + i) T();
			}
		};

		template<typename T, typename TAllocator>
		class AllocateMethod
		{
		public:
			static inline T* Alloc(int size)
			{
				TAllocator allocator;
				T * rs = (T*)allocator.Alloc(size*sizeof(T));
				Initializer<T, std::is_pod<T>::value>::Initialize(rs, size);
				return rs;
			}
			static inline void Free(T * ptr, int bufferSize)
			{
				TAllocator allocator;
				if (!std::is_trivially_destructible<T>::value)
				{
					for (int i = 0; i<bufferSize; i++)
						ptr[i].~T();
				}
				allocator.Free(ptr);
			}
		};

		template<typename T>
		class AllocateMethod<T, StandardAllocator>
		{
		public:
			static inline T* Alloc(int size)
			{
				return new T[size];
			}
			static inline void Free(T* ptr, int /*bufferSize*/)
			{
				delete [] ptr;
			}
		};

		template<typename T>
		class Initializer<T, 1>
		{
		public:
			static void Initialize(T * buffer, int size)
			{
				for (int i = 0; i<size; i++)
					new (buffer + i) T;
			}
		};

		template<typename T, typename TAllocator = StandardAllocator>
		class List
		{
		private:

			inline T * Allocate(int size)
			{
				return AllocateMethod<T, TAllocator>::Alloc(size);
				
			}
		private:
			static const int InitialSize = 16;
			TAllocator allocator;
		private:
			T * buffer;
			int _count;
			int bufferSize;
			void FreeBuffer()
			{
				AllocateMethod<T, TAllocator>::Free(buffer, bufferSize);
				buffer = 0;
			}
			void Free()
			{
				if (buffer)
				{
					FreeBuffer();
				}
				buffer = 0;
				_count = bufferSize = 0;
			}
		public:
			T* begin() const
			{
				return buffer;
			}
			T* end() const
			{
				return buffer+_count;
			}
		private:
			template<typename... Args>
			void Init(const T & val, Args... args)
			{
				Add(val);
				Init(args...);
			}
		public:
			List()
				: buffer(0), _count(0), bufferSize(0)
			{
			}
			template<typename... Args>
			List(const T & val, Args... args)
			{
				Init(val, args...);
			}
			List(const List<T> & list)
				: buffer(0), _count(0), bufferSize(0)
			{
				this->operator=(list);
			}
			List(List<T> && list)
				: buffer(0), _count(0), bufferSize(0)
			{
				this->operator=(static_cast<List<T>&&>(list));
			}
			static List<T> Create(const T & val, int count)
			{
				List<T> rs;
				rs.SetSize(count);
				for (int i = 0; i < count; i++)
					rs[i] = val;
				return rs;
			}
			~List()
			{
				Free();
			}
			List<T> & operator=(const List<T> & list)
			{
				Free();
				AddRange(list);

				return *this;
			}

			List<T> & operator=(List<T> && list)
			{
				Free();
				_count = list._count;
				bufferSize = list.bufferSize;
				buffer = list.buffer;

				list.buffer = 0;
				list._count = 0;
				list.bufferSize = 0;
				return *this;
			}

			T & First() const
			{
#ifdef _DEBUG
				if (_count == 0)
					throw "Index out of range.";
#endif
				return buffer[0];
			}

			T & Last() const
			{
#ifdef _DEBUG
				if (_count == 0)
					throw "Index out of range.";
#endif
				return buffer[_count-1];
			}

			inline void SwapWith(List<T, TAllocator> & other)
			{
				T* tmpBuffer = this->buffer;
				this->buffer = other.buffer;
				other.buffer = tmpBuffer;
				int tmpBufferSize = this->bufferSize;
				this->bufferSize = other.bufferSize;
				other.bufferSize = tmpBufferSize;
				int tmpCount = this->_count;
				this->_count = other._count;
				other._count = tmpCount;
				TAllocator tmpAlloc = _Move(this->allocator);
				this->allocator = _Move(other.allocator);
				other.allocator = _Move(tmpAlloc);
			}

			T* ReleaseBuffer()
			{
				T* rs = buffer;
				buffer = nullptr;
				_count = 0;
				bufferSize = 0;
				return rs;
			}

			inline ArrayView<T> GetArrayView() const
			{
				return ArrayView<T>(buffer, _count);
			}

			inline ArrayView<T> GetArrayView(int start, int count) const
			{
#ifdef _DEBUG
				if (start + count > _count || start < 0 || count < 0)
					throw "Index out of range.";
#endif
				return ArrayView<T>(buffer + start, count);
			}

			void Add(T && obj)
			{
				if (bufferSize < _count + 1)
				{
					int newBufferSize = InitialSize;
					if (bufferSize)
						newBufferSize = (bufferSize << 1);

					Reserve(newBufferSize);
				}
				buffer[_count++] = static_cast<T&&>(obj);
			}

			void Add(const T & obj)
			{
				if (bufferSize < _count + 1)
				{
					int newBufferSize = InitialSize;
					if (bufferSize)
						newBufferSize = (bufferSize << 1);

					Reserve(newBufferSize);
				}
				buffer[_count++] = obj;

			}

			int Count() const
			{
				return _count;
			}

			T * Buffer() const
			{
				return buffer;
			}

			int Capacity() const
			{
				return bufferSize;
			}

			void Insert(int id, const T & val)
			{
				InsertRange(id, &val, 1);
			}

			void InsertRange(int id, const T * vals, int n)
			{
				if (bufferSize < _count + n)
				{
					int newBufferSize = InitialSize;
					while (newBufferSize < _count + n)
						newBufferSize = newBufferSize << 1;

					T * newBuffer = Allocate(newBufferSize);
					if (bufferSize)
					{
						/*if (std::has_trivial_copy_assign<T>::value && std::has_trivial_destructor<T>::value)
						{
							memcpy(newBuffer, buffer, sizeof(T) * id);
							memcpy(newBuffer + id + n, buffer + id, sizeof(T) * (_count - id));
						}
						else*/
						{
							for (int i = 0; i < id; i++)
								newBuffer[i] = buffer[i];
							for (int i = id; i < _count; i++)
								newBuffer[i + n] = T(static_cast<T&&>(buffer[i]));
						}
						FreeBuffer();
					}
					buffer = newBuffer;
					bufferSize = newBufferSize;
				}
				else
				{
					/*if (std::has_trivial_copy_assign<T>::value && std::has_trivial_destructor<T>::value)
						memmove(buffer + id + n, buffer + id, sizeof(T) * (_count - id));
					else*/
					{
						for (int i = _count - 1; i >= id; i--)
							buffer[i + n] = static_cast<T&&>(buffer[i]);
					}
				}
				/*if (std::has_trivial_copy_assign<T>::value && std::has_trivial_destructor<T>::value)
					memcpy(buffer + id, vals, sizeof(T) * n);
				else*/
					for (int i = 0; i < n; i++)
						buffer[id + i] = vals[i];

				_count += n;
			}

			//slower than original edition
			//void Add(const T & val)
			//{
			//	InsertRange(_count, &val, 1);
			//}

			void InsertRange(int id, const List<T> & list)
			{
				InsertRange(id, list.buffer, list._count);
			}

			void AddRange(ArrayView<T> list)
			{
				InsertRange(_count, list.Buffer(), list.Count());
			}

			void AddRange(const T * vals, int n)
			{
				InsertRange(_count, vals, n);
			}

			void AddRange(const List<T> & list)
			{
				InsertRange(_count, list.buffer, list._count);
			}

			void RemoveRange(int id, int deleteCount)
			{
#if _DEBUG
				if (id >= _count || id < 0)
					throw "Remove: Index out of range.";
				if(deleteCount < 0)
					throw "Remove: deleteCount smaller than zero.";
#endif
				int actualDeleteCount = ((id + deleteCount) >= _count)? (_count - id) : deleteCount;
				for (int i = id + actualDeleteCount; i < _count; i++)
					buffer[i - actualDeleteCount] = static_cast<T&&>(buffer[i]);
				_count -= actualDeleteCount;
			}

			void RemoveAt(int id)
			{
				RemoveRange(id, 1);
			}

			void Remove(const T & val)
			{
				int idx = IndexOf(val);
				if (idx != -1)
					RemoveAt(idx);
			}

			void Reverse()
			{
				for (int i = 0; i < (_count >> 1); i++)
				{
					Swap(buffer, i, _count - i - 1);
				}
			}

			void FastRemove(const T & val)
			{
				int idx = IndexOf(val);
				FastRemoveAt(idx);
			}

			void FastRemoveAt(int idx)
			{
				if (idx != -1 && _count - 1 != idx)
				{
					buffer[idx] = _Move(buffer[_count - 1]);
				}
				_count--;
			}

			void Clear()
			{
				_count = 0;
			}

			void Reserve(int size)
			{
				if(size > bufferSize)
				{
					T * newBuffer = Allocate(size);
					if (bufferSize)
					{
						/*if (std::has_trivial_copy_assign<T>::value && std::has_trivial_destructor<T>::value)
							memcpy(newBuffer, buffer, _count * sizeof(T));
						else*/
						{
							for (int i = 0; i < _count; i++)
								newBuffer[i] = static_cast<T&&>(buffer[i]);
						}
						FreeBuffer();
					}
					buffer = newBuffer;
					bufferSize = size;
				}
			}

			void GrowToSize(int size)
			{
				int newBufferSize = 1<<Math::Log2Ceil(size);
				if (bufferSize < newBufferSize)
				{
					Reserve(newBufferSize);
				}
				this->_count = size;
			}

			void SetSize(int size)
			{
				Reserve(size);
				_count = size;
			}

			void UnsafeShrinkToSize(int size)
			{
				_count = size;
			}

			void Compress()
			{
				if (bufferSize > _count && _count > 0)
				{
					T * newBuffer = Allocate(_count);
					for (int i = 0; i < _count; i++)
						newBuffer[i] = static_cast<T&&>(buffer[i]);
					FreeBuffer();
					buffer = newBuffer;
					bufferSize = _count;
				}
			}

#ifndef FORCE_INLINE
#ifdef _MSC_VER
#define FORCE_INLINE __forceinline
#else
#define FORCE_INLINE inline
#endif
#endif

			FORCE_INLINE T & operator [](int id) const
			{
#if _DEBUG
				if(id >= _count || id < 0)
					throw IndexOutofRangeException("Operator[]: Index out of Range.");
#endif
				return buffer[id];
			}

			template<typename Func>
			int FindFirst(const Func & predicate) const
			{
				for (int i = 0; i < _count; i++)
				{
					if (predicate(buffer[i]))
						return i;
				}
				return -1;
			}

			template<typename Func>
			int FindLast(const Func & predicate) const
			{
				for (int i = _count - 1; i >= 0; i--)
				{
					if (predicate(buffer[i]))
						return i;
				}
				return -1;
			}

			template<typename T2>
			int IndexOf(const T2 & val) const
			{
				for (int i = 0; i < _count; i++)
				{
					if (buffer[i] == val)
						return i;
				}
				return -1;
			}

			template<typename T2>
			int LastIndexOf(const T2 & val) const
			{
				for (int i = _count - 1; i >= 0; i--)
				{
					if(buffer[i] == val)
						return i;
				}
				return -1;
			}

			void Sort()
			{
				Sort([](T& t1, T& t2){return t1<t2;});
			}

			bool Contains(const T & val)
			{
				for (int i = 0; i<_count; i++)
					if (buffer[i] == val)
						return true;
				return false;
			}

			template<typename Comparer>
			void Sort(Comparer compare)
			{
				//InsertionSort(buffer, 0, _count - 1);
				//QuickSort(buffer, 0, _count - 1, compare);
				std::sort(buffer, buffer + _count, compare);
			}

			template <typename IterateFunc>
			void ForEach(IterateFunc f) const
			{
				for (int i = 0; i<_count; i++)
					f(buffer[i]);
			}

			template<typename Comparer>
			void QuickSort(T * vals, int startIndex, int endIndex, Comparer comparer)
			{
				if(startIndex < endIndex)
				{
					if (endIndex - startIndex < MIN_QSORT_SIZE)
						InsertionSort(vals, startIndex, endIndex, comparer);
					else
					{
						int pivotIndex = (startIndex + endIndex) >> 1;
						int pivotNewIndex = Partition(vals, startIndex, endIndex, pivotIndex, comparer);
						QuickSort(vals, startIndex, pivotNewIndex - 1, comparer);
						QuickSort(vals, pivotNewIndex + 1, endIndex, comparer);
					}
				}

			}
			template<typename Comparer>
			int Partition(T * vals, int left, int right, int pivotIndex, Comparer comparer)
			{
				T pivotValue = vals[pivotIndex];
				Swap(vals, right, pivotIndex);
				int storeIndex = left;
				for (int i = left; i < right; i++)
				{
					if (comparer(vals[i], pivotValue))
					{
						Swap(vals, i, storeIndex);
						storeIndex++;
					}
				}
				Swap(vals, storeIndex, right);
				return storeIndex;
			}
			template<typename Comparer>
			void InsertionSort(T * vals, int startIndex, int endIndex, Comparer comparer)
			{
				for (int i = startIndex  + 1; i <= endIndex; i++)
				{
					T insertValue = static_cast<T&&>(vals[i]);
					int insertIndex = i - 1;
					while (insertIndex >= startIndex && comparer(insertValue, vals[insertIndex]))
					{
						vals[insertIndex + 1] = static_cast<T&&>(vals[insertIndex]);
						insertIndex--;
					}
					vals[insertIndex + 1] = static_cast<T&&>(insertValue);
				}
			}

			inline void Swap(T * vals, int index1, int index2)
			{
				if (index1 != index2)
				{
					T tmp = static_cast<T&&>(vals[index1]);
					vals[index1] = static_cast<T&&>(vals[index2]);
					vals[index2] = static_cast<T&&>(tmp);
				}
			}

			template<typename T2, typename Comparer>
			int BinarySearch(const T2 & obj, Comparer comparer)
			{
				int imin = 0, imax = _count - 1;
				while (imax >= imin)
				{
					int imid = (imin + imax) >> 1;
					int compareResult = comparer(buffer[imid], obj);
					if (compareResult == 0)
						return imid;
					else if (compareResult < 0)
						imin = imid + 1;
					else
						imax = imid - 1;
				}
				return -1;
			}

			template<typename T2>
			int BinarySearch(const T2 & obj)
			{
				return BinarySearch(obj, 
					[](T & curObj, const T2 & thatObj)->int
					{
						if (curObj < thatObj)
							return -1;
						else if (curObj == thatObj)
							return 0;
						else
							return 1;
					});
			}
		};

		template<typename T>
		T Min(const List<T> & list)
		{
			T minVal = list.First();
			for (int i = 1; i<list.Count(); i++)
				if (list[i] < minVal)
					minVal = list[i];
			return minVal;
		}

		template<typename T>
		T Max(const List<T> & list)
		{
			T maxVal = list.First();
			for (int i = 1; i<list.Count(); i++)
				if (list[i] > maxVal)
					maxVal = list[i];
			return maxVal;
		}
	}
}

#endif


================================================
FILE: Source/CoreLib/MemoryPool.cpp
================================================
#include "MemoryPool.h"
#include <cassert>

namespace CoreLib
{
	namespace Basic
	{
		MemoryPool::MemoryPool(unsigned char * pBuffer, int pLog2BlockSize, int numBlocks)
		{
			Init(pBuffer, pLog2BlockSize, numBlocks);
		}
		void MemoryPool::Init(unsigned char * pBuffer, int pLog2BlockSize, int numBlocks)
		{
			assert(pLog2BlockSize >= 1 && pLog2BlockSize <= 30);
			assert(numBlocks >= 4);
			buffer = pBuffer;
			blockSize = 1 << pLog2BlockSize;
			log2BlockSize = pLog2BlockSize;
			numLevels = Math::Log2Floor(numBlocks);
			freeList[0] = (FreeListNode*)buffer;
			freeList[0]->NextPtr = nullptr;
			freeList[0]->PrevPtr = nullptr;
			used.SetMax(1 << (numLevels));
			for (int i = 1; i < MaxLevels; i++)
			{
				freeList[i] = nullptr;
			}
		}
		int MemoryPool::AllocBlock(int level)
		{
			if (level < 0)
				return -1;
			if (freeList[level] == nullptr)
			{
				auto largeBlockAddr = AllocBlock(level - 1);
				if (largeBlockAddr != -1)
				{
					auto block1 = (FreeListNode*)(buffer + ((largeBlockAddr ^ (1 << (numLevels - level))) << log2BlockSize));
					block1->NextPtr = nullptr;
					block1->PrevPtr = nullptr;
					freeList[level] = block1;

					int blockIndex = (1 << level) + (largeBlockAddr >> (numLevels-level)) - 1;
					used.Add(blockIndex);
					return largeBlockAddr;
				}
				else
					return -1;
			}
			else
			{
				auto node = freeList[level];
				if (node->NextPtr)
				{
					node->NextPtr->PrevPtr = node->PrevPtr;
				}
				freeList[level] = freeList[level]->NextPtr;
				int rs = (int)((unsigned char *)node - buffer) >> log2BlockSize;
				int blockIndex = (1 << level) + (rs >> (numLevels - level)) - 1;
				used.Add(blockIndex);
				return rs;
			}
		}
		unsigned char * MemoryPool::Alloc(int size)
		{
			if (size == 0)
				return nullptr;
			int originalSize = size;
			if (size < blockSize)
				size = blockSize;
			int order = numLevels - (Math::Log2Ceil(size) - log2BlockSize);
			assert(order >= 0 && order < MaxLevels);

			bytesAllocated += (1 << ((numLevels-order) + log2BlockSize));
			bytesWasted += (1 << ((numLevels - order) + log2BlockSize)) - originalSize;

			int blockId = AllocBlock(order);
			if (blockId != -1)
				return buffer + (blockId << log2BlockSize);
			else
				return nullptr;
		}
		void MemoryPool::FreeBlock(unsigned char * ptr, int level)
		{
			int indexInLevel = (int)(ptr - buffer) >> (numLevels - level + log2BlockSize);
			int blockIndex = (1 << level) + indexInLevel - 1;
			assert(used.Contains(blockIndex));
			int buddyIndex = (blockIndex & 1) ? blockIndex + 1 : blockIndex - 1;
			used.Remove(blockIndex);
			if (level > 0 && !used.Contains(buddyIndex))
			{
				auto buddyPtr = (FreeListNode *)(buffer + ((((int)(ptr - buffer) >> log2BlockSize) ^ (1 << (numLevels - level))) << log2BlockSize));
				if (buddyPtr->PrevPtr)
				{
					buddyPtr->PrevPtr->NextPtr = buddyPtr->NextPtr;
				}
				if (buddyPtr->NextPtr)
				{
					buddyPtr->NextPtr->PrevPtr = buddyPtr->PrevPtr;
				}
				if (freeList[level] == buddyPtr)
				{
					freeList[level] = buddyPtr->NextPtr;
				}
				// recursively free parent blocks
				auto parentPtr = Math::Min(buddyPtr, (FreeListNode*)ptr);
				if (level > 0)
					FreeBlock((unsigned char*)parentPtr, level - 1);
			}
			else
			{
				// insert to freelist
				auto freeNode = (FreeListNode *)ptr;
				freeNode->NextPtr = freeList[level];
				freeNode->PrevPtr = nullptr;
				if (freeList[level])
					freeList[level]->PrevPtr = freeNode;
				freeList[level] = freeNode;
			}
		}
		void MemoryPool::Free(unsigned char * ptr, int size)
		{
			if (size == 0)
				return;
			int originalSize = size;
			if (size < blockSize)
				size = blockSize;
			int level = numLevels - (Math::Log2Ceil(size) - log2BlockSize);
			bytesAllocated -= (1 << ((numLevels-level) + log2BlockSize));
			bytesWasted -= (1 << ((numLevels - level) + log2BlockSize)) - originalSize;
			FreeBlock(ptr, level);
		}
	}
}



================================================
FILE: Source/CoreLib/MemoryPool.h
================================================
#ifndef CORE_LIB_MEMORY_POOL_H
#define CORE_LIB_MEMORY_POOL_H

#include "Basic.h"
#include "IntSet.h"

namespace CoreLib
{
	namespace Basic
	{
		struct MemoryBlockFields
		{
			unsigned int Occupied : 1;
			unsigned int Order : 31;
		};
		struct FreeListNode
		{
			FreeListNode * PrevPtr = nullptr, *NextPtr = nullptr;
		};
		class MemoryPool
		{
		private:
			static const int MaxLevels = 32;
			int blockSize = 0, log2BlockSize = 0;
			int numLevels = 0;
			int bytesAllocated = 0;
			int bytesWasted = 0;
			unsigned char * buffer = nullptr;
			FreeListNode * freeList[MaxLevels];
			IntSet used;
			int AllocBlock(int level);
			void FreeBlock(unsigned char * ptr, int level);
		public:
			MemoryPool(unsigned char * buffer, int log2BlockSize, int numBlocks);
			MemoryPool() = default;
			void Init(unsigned char * buffer, int log2BlockSize, int numBlocks);
			unsigned char * Alloc(int size);
			void Free(unsigned char * ptr, int size);
		};

		class OutofPoolMemoryException : public Exception
		{};

		template<typename T, int PoolSize>
		class ObjectPool
		{
			static const int ObjectSize = sizeof(T) < 8 ? 8 : sizeof(T);
		private:
			struct FreeList
			{
				FreeList* Next;
			};
			FreeList * freeList = nullptr;
			int allocPtr = 0;
			int poolSize = 0;
			void * buffer = 0;
			T * GetFreeObject()
			{
				if (freeList)
				{
					auto rs = (T*)freeList;
					freeList = freeList->Next;
					return rs;
				}
				return nullptr;
			}
		public:
			ObjectPool() 
			{
				freeList = nullptr;
				allocPtr = 0;
				buffer = malloc(PoolSize * ObjectSize);
			}

			void Close()
			{
				free(buffer);
			}
			
			void Free(T * obj)
			{
				auto newList = (FreeList*)obj;
				newList->Next = freeList;
				freeList = newList;
			}

			void * Buffer()
			{
				return buffer;
			}
			
			T * Alloc()
			{
				auto rs = GetFreeObject();
				if (!rs)
				{
					if
Download .txt
gitextract_nsdljbup/

├── .editorconfig
├── .gitignore
├── Examples/
│   └── hello/
│       ├── README.md
│       ├── hello.cpp
│       ├── hello.sln
│       ├── hello.spire
│       ├── hello.vcxproj
│       └── hello.vcxproj.filters
├── LICENSE.txt
├── README.md
├── Source/
│   ├── CoreLib/
│   │   ├── Allocator.h
│   │   ├── Array.h
│   │   ├── ArrayView.h
│   │   ├── Basic.h
│   │   ├── CMakeLists.txt
│   │   ├── CommandLineParser.cpp
│   │   ├── CommandLineParser.h
│   │   ├── Common.h
│   │   ├── CoreLibBasic.vcxproj
│   │   ├── Dictionary.h
│   │   ├── Exception.h
│   │   ├── Func.h
│   │   ├── Hash.h
│   │   ├── IntSet.h
│   │   ├── LibIO.cpp
│   │   ├── LibIO.h
│   │   ├── LibMath.cpp
│   │   ├── LibMath.h
│   │   ├── LibString.cpp
│   │   ├── LibString.h
│   │   ├── Link.h
│   │   ├── Linq.h
│   │   ├── List.h
│   │   ├── MemoryPool.cpp
│   │   ├── MemoryPool.h
│   │   ├── SecureCRT.h
│   │   ├── SmartPointer.h
│   │   ├── Stream.cpp
│   │   ├── Stream.h
│   │   ├── TextIO.cpp
│   │   ├── TextIO.h
│   │   ├── Tokenizer.cpp
│   │   ├── Tokenizer.h
│   │   ├── TypeTraits.h
│   │   ├── VectorMath.cpp
│   │   ├── VectorMath.h
│   │   └── corelib.natvis
│   ├── Spire.sln
│   ├── SpireCompiler/
│   │   ├── D3DCompiler.cpp
│   │   ├── D3DCompiler.h
│   │   ├── ShaderCompilerShell.cpp
│   │   ├── SpireCompiler.vcxproj
│   │   └── SpireCompiler.vcxproj.filters
│   ├── SpireCore/
│   │   ├── CLikeCodeGen.cpp
│   │   ├── CLikeCodeGen.h
│   │   ├── Closure.cpp
│   │   ├── Closure.h
│   │   ├── CodeGenBackend.h
│   │   ├── CodeGenerator.cpp
│   │   ├── CodeWriter.h
│   │   ├── CompiledProgram.cpp
│   │   ├── CompiledProgram.h
│   │   ├── ConstantPool.cpp
│   │   ├── DiagnosticDefs.h
│   │   ├── Diagnostics.cpp
│   │   ├── Diagnostics.h
│   │   ├── GLSLCodeGen.cpp
│   │   ├── GetDependencyVisitor.cpp
│   │   ├── GetDependencyVisitor.h
│   │   ├── HLSLCodeGen.cpp
│   │   ├── IL.cpp
│   │   ├── IL.h
│   │   ├── InsertImplicitImportOperator.cpp
│   │   ├── KeyHoleMatching.cpp
│   │   ├── Lexer.cpp
│   │   ├── Lexer.h
│   │   ├── Naming.cpp
│   │   ├── Naming.h
│   │   ├── NatvisFile.natvis
│   │   ├── NewSpirVCodeGen.cpp
│   │   ├── Parser.cpp
│   │   ├── Parser.h
│   │   ├── Preprocessor.cpp
│   │   ├── Preprocessor.h
│   │   ├── SamplerUsageAnalysis.cpp
│   │   ├── SamplerUsageAnalysis.h
│   │   ├── Schedule.cpp
│   │   ├── Schedule.h
│   │   ├── ScopeDictionary.h
│   │   ├── SemanticsVisitor.cpp
│   │   ├── ShaderCompiler.cpp
│   │   ├── ShaderCompiler.h
│   │   ├── SpirVCodeGen.cpp
│   │   ├── SpireCore.vcxproj
│   │   ├── SpireCore.vcxproj.filters
│   │   ├── StdInclude.cpp
│   │   ├── StdInclude.h
│   │   ├── StringObject.h
│   │   ├── SymbolTable.cpp
│   │   ├── SymbolTable.h
│   │   ├── Syntax.cpp
│   │   ├── Syntax.h
│   │   ├── SyntaxVisitors.h
│   │   ├── TypeLayout.cpp
│   │   ├── TypeLayout.h
│   │   ├── TypeTranslation.cpp
│   │   ├── TypeTranslation.h
│   │   ├── VariantIR.cpp
│   │   └── VariantIR.h
│   └── SpireLib/
│       ├── SpireLib.cpp
│       ├── SpireLib.h
│       ├── SpireLib.vcxproj
│       └── SpireLib.vcxproj.filters
├── Spire.h
├── SpireAllSource.h
├── Tests/
│   ├── Diagnostics/
│   │   ├── break-outside-loop.spire
│   │   ├── break-outside-loop.spire.expected
│   │   ├── call-argument-type.spire
│   │   ├── call-argument-type.spire.expected
│   │   ├── continue-outside-loop.spire
│   │   ├── continue-outside-loop.spire.expected
│   │   ├── expected-token-eof.spire
│   │   ├── expected-token-eof.spire.expected
│   │   ├── expected-token.spire
│   │   ├── expected-token.spire.expected
│   │   ├── function-redefinition.spire
│   │   ├── function-redefinition.spire.expected
│   │   ├── hull-shader-invalid-domain.spire
│   │   ├── hull-shader-invalid-domain.spire.expected
│   │   ├── hull-shader-no-domain.spire
│   │   ├── hull-shader-no-domain.spire.expected
│   │   ├── illegal-character.spire
│   │   ├── illegal-character.spire.expected
│   │   ├── missing-file.spire
│   │   ├── missing-file.spire.expected
│   │   ├── parameter-already-defined.spire
│   │   ├── parameter-already-defined.spire.expected
│   │   ├── undefined-identifier.spire
│   │   ├── undefined-identifier.spire.expected
│   │   ├── variable-void-type.spire
│   │   ├── variable-void-type.spire.expected
│   │   ├── while-predicate-type.spire
│   │   └── while-predicate-type.spire.expected
│   ├── FrontEnd/
│   │   ├── lexer-comments.spire
│   │   ├── parser-decls.spire
│   │   ├── parser-empty.spire
│   │   ├── parser-error-unclosed-curly.spire
│   │   ├── parser-error-unclosed-curly.spire.expected
│   │   ├── parser-using-file-a.spireh
│   │   ├── parser-using-file.spire
│   │   ├── pipeline-simple.spireh
│   │   ├── struct.spire
│   │   └── typedef.spire
│   ├── HLSLCodeGen/
│   │   ├── DeferredLighting.fs.hlsl
│   │   ├── DeferredLighting.vs.hlsl
│   │   ├── StandardPipeline.spire
│   │   ├── Utils.spire
│   │   └── shader1.spire
│   ├── Preprocessor/
│   │   ├── define-function-like.spire
│   │   ├── define-function-like.spire.expected
│   │   ├── define-simple.spire
│   │   ├── if.spire
│   │   ├── ifdef.spire
│   │   ├── include-a.spireh
│   │   └── include.spire
│   └── SpireTestTool/
│       ├── SpireTestTool.vcxproj
│       ├── SpireTestTool.vcxproj.filters
│       ├── main.cpp
│       ├── os.cpp
│       └── os.h
└── test.bat
Download .txt
SYMBOL INDEX (1616 symbols across 96 files)

FILE: Examples/hello/hello.cpp
  type Vertex (line 41) | struct Vertex
  function HRESULT (line 78) | HRESULT initialize( ID3D11Device* dxDevice )
  function emitSpireDiagnostics (line 225) | void emitSpireDiagnostics(
  function renderFrame (line 258) | void renderFrame(ID3D11DeviceContext* dxContext)
  function finalize (line 303) | void finalize()
  function ID3DBlob (line 310) | ID3DBlob* compileHLSLShader(
  function LRESULT (line 386) | static LRESULT CALLBACK windowProc(
  function WinMain (line 408) | int WINAPI WinMain(

FILE: Source/CoreLib/Allocator.h
  function namespace (line 6) | namespace CoreLib

FILE: Source/CoreLib/Array.h
  function namespace (line 7) | namespace CoreLib

FILE: Source/CoreLib/ArrayView.h
  function namespace (line 6) | namespace CoreLib

FILE: Source/CoreLib/Basic.h
  function namespace (line 16) | namespace CoreLib

FILE: Source/CoreLib/CommandLineParser.cpp
  type CoreLib (line 3) | namespace CoreLib
    type Text (line 5) | namespace Text
      function String (line 12) | String CommandLineParser::GetFileName()
      function String (line 32) | String CommandLineParser::GetOptionValue(const String & opt)
      function String (line 46) | String CommandLineParser::GetToken(int id)

FILE: Source/CoreLib/CommandLineParser.h
  function namespace (line 6) | namespace CoreLib

FILE: Source/CoreLib/Common.h
  function namespace (line 14) | namespace CoreLib

FILE: Source/CoreLib/Dictionary.h
  function namespace (line 10) | namespace CoreLib
  function Rehash (line 175) | void Rehash()
  function Add (line 309) | void Add(TKey && key, TValue && value)
  function AddIfNotExists (line 313) | bool AddIfNotExists(const TKey & key, const TValue & value)
  function AddIfNotExists (line 317) | bool AddIfNotExists(TKey && key, TValue && value)
  function Remove (line 321) | void Remove(const TKey & key)
  function Clear (line 332) | void Clear()
  function class (line 372) | class ItemProxy
  function ItemProxy (line 419) | ItemProxy operator [](TKey && key) const
  type Op (line 509) | struct Op
  function Free (line 523) | void Free()
  function IsDeleted (line 530) | inline bool IsDeleted(int pos) const
  function IsEmpty (line 534) | inline bool IsEmpty(int pos) const
  function SetDeleted (line 538) | inline void SetDeleted(int pos, bool val)
  function SetEmpty (line 545) | inline void SetEmpty(int pos, bool val)
  function Rehash (line 613) | void Rehash()
  function class (line 884) | class _DummyClass
  function Clear (line 977) | void Clear()
  function Add (line 981) | bool Add(const T& obj)
  function Add (line 985) | bool Add(T && obj)
  function Remove (line 989) | void Remove(const T & obj)
  function Contains (line 993) | bool Contains(const T & obj) const

FILE: Source/CoreLib/Exception.h
  function namespace (line 7) | namespace CoreLib

FILE: Source/CoreLib/Func.h
  function namespace (line 6) | namespace CoreLib
  function FuncType (line 164) | FuncType func)
  function Clear (line 199) | void Clear()

FILE: Source/CoreLib/Hash.h
  function namespace (line 9) | namespace Basic

FILE: Source/CoreLib/IntSet.h
  function namespace (line 12) | namespace Basic

FILE: Source/CoreLib/LibIO.cpp
  type CoreLib (line 10) | namespace CoreLib
    type IO (line 12) | namespace IO
      function SetCommandLineWriter (line 18) | void SetCommandLineWriter(CommandLineWriter * writer)
      type _stat32 (line 26) | struct _stat32
      type stat (line 29) | struct stat
      function String (line 34) | String Path::TruncateExt(const String & path)
      function String (line 42) | String Path::ReplaceExt(const String & path, const char * newExt)
      function String (line 53) | String Path::GetFileName(const String & path)
      function String (line 59) | String Path::GetFileNameWithoutEXT(const String & path)
      function String (line 68) | String Path::GetFileExt(const String & path)
      function String (line 76) | String Path::GetDirectoryName(const String & path)
      function String (line 85) | String Path::Combine(const String & path1, const String & path2)
      function String (line 95) | String Path::Combine(const String & path1, const String & path2, con...

FILE: Source/CoreLib/LibIO.h
  function namespace (line 9) | namespace CoreLib

FILE: Source/CoreLib/LibMath.cpp
  type CoreLib (line 3) | namespace CoreLib
    type Basic (line 5) | namespace Basic

FILE: Source/CoreLib/LibMath.h
  function namespace (line 6) | namespace CoreLib

FILE: Source/CoreLib/LibString.cpp
  type CoreLib (line 4) | namespace CoreLib
    type Basic (line 6) | namespace Basic
      function String (line 9) | String StringConcat(const char * lhs, int leftLen, const char * rhs,...
      function String (line 18) | String operator+(const char * op1, const String & op2)
      function String (line 29) | String operator+(const String & op1, const char * op2)
      function String (line 37) | String operator+(const String & op1, const String & op2)
      function StringToInt (line 49) | int StringToInt(const String & str, int radix)
      function StringToUInt (line 56) | unsigned int StringToUInt(const String & str, int radix)
      function StringToDouble (line 63) | double StringToDouble(const String & str)
      function StringToFloat (line 67) | float StringToFloat(const String & str)
      function String (line 72) | String String::ReplaceAll(String src, String dst) const
      function String (line 86) | String String::FromWString(const wchar_t * wstr)
      function String (line 95) | String String::FromWChar(const wchar_t ch)
      function String (line 104) | String String::FromUnicodePoint(unsigned int codePoint)
      function wchar_t (line 112) | const wchar_t * String::ToWString(int * len) const
      function String (line 140) | String String::PadLeft(char ch, int pLen)
      function String (line 150) | String String::PadRight(char ch, int pLen)

FILE: Source/CoreLib/LibString.h
  function namespace (line 11) | namespace CoreLib
  function const (line 194) | char operator[](int id) const
  function String (line 257) | String SubString(int id, int len) const
  function operator (line 311) | bool operator==(const String & str) const
  function operator (line 327) | bool operator!=(const String & str) const
  function operator (line 335) | bool operator>(const String & str) const
  function operator (line 343) | bool operator<(const String & str) const
  function operator (line 351) | bool operator>=(const String & str) const
  function operator (line 360) | bool operator<=(const String & str) const
  function IndexOf (line 401) | int IndexOf(const char * str, int id) const // String str
  function IndexOf (line 415) | int IndexOf(const String & str, int id) const
  function IndexOf (line 420) | int IndexOf(const char * str) const
  function IndexOf (line 425) | int IndexOf(const String & str) const
  function IndexOf (line 430) | int IndexOf(char ch, int id) const
  function IndexOf (line 444) | int IndexOf(char ch) const
  function LastIndexOf (line 449) | int LastIndexOf(char ch) const
  function StartsWith (line 457) | bool StartsWith(const char * str) const // String str
  function StartsWith (line 470) | bool StartsWith(const String & str) const
  function EndsWith (line 475) | bool EndsWith(char * str)  const // String str
  function EndsWith (line 488) | bool EndsWith(const String & str) const
  function Contains (line 493) | bool Contains(const char * str) const // String str
  function Contains (line 500) | bool Contains(const String & str) const
  function GetHashCode (line 505) | int GetHashCode() const
  function EnsureCapacity (line 535) | void EnsureCapacity(int size)
  function Append (line 594) | void Append(char ch)
  function Append (line 598) | void Append(float val)
  function Append (line 605) | void Append(double val)
  function Append (line 633) | void Append(const String & str)
  function Append (line 637) | void Append(const char * str)
  function Append (line 641) | void Append(const char * str, int strLen)
  function Capacity (line 668) | int Capacity()
  function Length (line 678) | int Length()
  function String (line 683) | String ToString()
  function String (line 688) | String ProduceString()
  function String (line 700) | String GetSubString(int start, int count)
  function Remove (line 710) | void Remove(int id, int len)
  function Clear (line 724) | void Clear()

FILE: Source/CoreLib/Link.h
  function namespace (line 7) | namespace CoreLib

FILE: Source/CoreLib/Linq.h
  function namespace (line 6) | namespace CoreLib
  function class (line 119) | class Enumerator
  function operator (line 157) | bool operator != (const Enumerator & iter) const
  function operator (line 161) | bool operator == (const Enumerator & iter) const
  function Enumerator (line 166) | Enumerator begin() const
  function class (line 194) | class Enumerator
  function operator (line 220) | bool operator != (const Enumerator & iter) const
  function operator (line 224) | bool operator == (const Enumerator & iter) const
  function Enumerator (line 229) | Enumerator begin() const
  function class (line 254) | class Enumerator
  function operator (line 280) | bool operator != (const Enumerator & iter) const
  function operator (line 284) | bool operator == (const Enumerator & iter) const
  function operator (line 331) | auto operator *() const -> decltype(*subPtr)
  function operator (line 358) | bool operator != (const Enumerator & iter) const
  function operator (line 362) | bool operator == (const Enumerator & iter) const
  function decltype (line 375) | auto begin() const ->Enumerator<decltype(func(ConstructT<T>())), decltyp...
  function decltype (line 379) | auto end() const ->Enumerator<decltype(func(ConstructT<T>())), decltype(...
  type Type (line 388) | typedef decltype(ConstructT<T>().begin()) Type;
  function TArg (line 396) | static TArg ConstructArg() {}
  type decltype (line 397) | typedef decltype((*f)(ConstructArg()))
  function GetItems (line 417) | auto end() const -> decltype(items.end())

FILE: Source/CoreLib/List.h
  function namespace (line 13) | namespace CoreLib
  function FreeBuffer (line 99) | void FreeBuffer()
  function Free (line 104) | void Free()
  function T (line 118) | T* end() const
  function List (line 149) | static List<T> Create(const T & val, int count)
  function SwapWith (line 200) | inline void SwapWith(List<T, TAllocator> & other)
  function T (line 216) | T* ReleaseBuffer()
  function ArrayView (line 230) | inline ArrayView<T> GetArrayView(int start, int count) const
  function Add (line 239) | void Add(T && obj)
  function Add (line 252) | void Add(const T & obj)
  function T (line 271) | T * Buffer() const
  function Insert (line 281) | void Insert(int id, const T & val)
  function InsertRange (line 286) | void InsertRange(int id, const T * vals, int n)
  function InsertRange (line 339) | void InsertRange(int id, const List<T> & list)
  function AddRange (line 344) | void AddRange(ArrayView<T> list)
  function AddRange (line 349) | void AddRange(const T * vals, int n)
  function AddRange (line 354) | void AddRange(const List<T> & list)
  function RemoveRange (line 359) | void RemoveRange(int id, int deleteCount)
  function RemoveAt (line 373) | void RemoveAt(int id)
  function Remove (line 378) | void Remove(const T & val)
  function Reverse (line 385) | void Reverse()
  function FastRemove (line 393) | void FastRemove(const T & val)
  function FastRemoveAt (line 399) | void FastRemoveAt(int idx)
  function Clear (line 408) | void Clear()
  function Reserve (line 413) | void Reserve(int size)
  function GrowToSize (line 434) | void GrowToSize(int size)
  function SetSize (line 444) | void SetSize(int size)
  function UnsafeShrinkToSize (line 450) | void UnsafeShrinkToSize(int size)
  function Compress (line 455) | void Compress()
  function FORCE_INLINE (line 476) | FORCE_INLINE T & operator [](int id) const
  function Sort (line 529) | void Sort()
  function Contains (line 534) | bool Contains(const T & val)
  function Swap (line 607) | inline void Swap(T * vals, int index1, int index2)

FILE: Source/CoreLib/MemoryPool.cpp
  type CoreLib (line 4) | namespace CoreLib
    type Basic (line 6) | namespace Basic

FILE: Source/CoreLib/MemoryPool.h
  function namespace (line 7) | namespace CoreLib

FILE: Source/CoreLib/SecureCRT.h
  function memcpy_s (line 9) | inline void memcpy_s(void *dest, size_t numberOfElements, const void * s...
  function fopen_s (line 17) | inline void fopen_s(FILE**f, const char * fileName, const char * mode)
  function fread_s (line 22) | inline size_t fread_s(void * buffer, size_t bufferSize, size_t elementSi...
  function wcsnlen_s (line 27) | inline size_t wcsnlen_s(const wchar_t * str, size_t /*numberofElements*/)
  function strnlen_s (line 32) | inline size_t strnlen_s(const char * str, size_t numberofElements)
  function sprintf_s (line 37) | inline int sprintf_s(char * buffer, size_t sizeOfBuffer, const char * fo...
  function swprintf_s (line 46) | inline int swprintf_s(wchar_t * buffer, size_t sizeOfBuffer, const wchar...
  function wcscpy_s (line 55) | inline void wcscpy_s(wchar_t * strDestination, size_t /*numberOfElements...
  function strcpy_s (line 59) | inline void strcpy_s(char * strDestination, size_t /*numberOfElements*/,...
  function wcsncpy_s (line 64) | inline void wcsncpy_s(wchar_t * strDestination, size_t /*numberOfElement...
  function strncpy_s (line 69) | inline void strncpy_s(char * strDestination, size_t /*numberOfElements*/...

FILE: Source/CoreLib/SmartPointer.h
  function namespace (line 6) | namespace CoreLib
  function class (line 45) | class RefObject : public ReferenceCounted
  function GetHashCode (line 154) | int GetHashCode()
  function operator (line 158) | bool operator == (const T * ptr) const
  function operator (line 162) | bool operator != (const T * ptr) const
  function T (line 212) | T* Release()
  function Unreference (line 235) | void Unreference()
  function GetHashCode (line 352) | int GetHashCode()
  function operator (line 356) | bool operator == (const T * ptr) const
  function operator (line 360) | bool operator != (const T * ptr) const
  function T (line 406) | T* Release()
  function Unreference (line 421) | void Unreference()

FILE: Source/CoreLib/Stream.cpp
  type CoreLib (line 7) | namespace CoreLib
    type IO (line 9) | namespace IO
      function Int64 (line 130) | Int64 FileStream::GetPosition()
      function Int64 (line 173) | Int64 FileStream::Read(void * buffer, Int64 length)
      function Int64 (line 186) | Int64 FileStream::Write(const void * buffer, Int64 length)

FILE: Source/CoreLib/Stream.h
  function namespace (line 6) | namespace CoreLib
  function FileMode (line 195) | enum class FileMode

FILE: Source/CoreLib/TextIO.cpp
  type CoreLib (line 7) | namespace CoreLib
    type IO (line 9) | namespace IO
      class Utf8Encoding (line 13) | class Utf8Encoding : public Encoding
        method GetBytes (line 16) | virtual void GetBytes(List<char> & result, const String & str) ove...
        method String (line 20) | virtual String ToString(const char * bytes, int /*length*/) override
      class Utf32Encoding (line 26) | class Utf32Encoding : public Encoding
        method GetBytes (line 29) | virtual void GetBytes(List<char> & result, const String & str) ove...
        method String (line 44) | virtual String ToString(const char * bytes, int length) override
      class Utf16Encoding (line 59) | class Utf16Encoding : public Encoding //UTF16
        method Utf16Encoding (line 64) | Utf16Encoding(bool pReverseOrder)
        method GetBytes (line 67) | virtual void GetBytes(List<char> & result, const String & str) ove...
        method String (line 88) | virtual String ToString(const char * bytes, int length) override
      function Encoding (line 197) | Encoding * StreamReader::DetermineEncoding()
      function String (line 284) | String StreamReader::ReadLine()
      function String (line 313) | String StreamReader::ReadToEnd()

FILE: Source/CoreLib/TextIO.h
  function namespace (line 7) | namespace CoreLib
  function EncodeUnicodePointToUTF8 (line 167) | inline int EncodeUnicodePointToUTF8(char * buffer, int codePoint)
  function EncodeUnicodePointToUTF16 (line 202) | inline int EncodeUnicodePointToUTF16(unsigned short * buffer, int codePo...
  function ReverseBitOrder (line 218) | inline unsigned short ReverseBitOrder(unsigned short val)
  function EncodeUnicodePointToUTF16Reversed (line 225) | inline int EncodeUnicodePointToUTF16Reversed(unsigned short * buffer, in...
  function class (line 241) | class Encoding
  function class (line 251) | class StreamWriter : public TextWriter
  function class (line 272) | class StreamReader : public TextReader
  function virtual (line 303) | virtual bool IsEnd()
  function virtual (line 307) | virtual void Close()
  function ReleaseStream (line 311) | void ReleaseStream()

FILE: Source/CoreLib/Tokenizer.cpp
  type CoreLib (line 5) | namespace CoreLib
    type Text (line 7) | namespace Text
      type State (line 15) | enum class State
      type LexDerivative (line 20) | enum class LexDerivative
      function ParseOperators (line 25) | void ParseOperators(const String & str, List<Token> & tokens, TokenF...
      function TokenizeText (line 304) | List<Token> TokenizeText(const String & fileName, const String & tex...
      function TokenizeText (line 652) | List<Token> TokenizeText(const String & fileName, const String & text)
      function TokenizeText (line 656) | List<Token> TokenizeText(const String & text)
      function String (line 661) | String EscapeStringLiteral(String str)
      function String (line 702) | String UnescapeStringLiteral(String str)
      function String (line 748) | String TokenTypeToString(TokenType type)
      function Split (line 851) | List<String> Split(String text, char c)

FILE: Source/CoreLib/Tokenizer.h
  function namespace (line 6) | namespace CoreLib

FILE: Source/CoreLib/TypeTraits.h
  function namespace (line 4) | namespace CoreLib

FILE: Source/CoreLib/VectorMath.cpp
  type VectorMath (line 3) | namespace VectorMath

FILE: Source/CoreLib/VectorMath.h
  function namespace (line 17) | namespace VectorMath
  function Vec2 (line 164) | inline Vec2 Normalize()
  function Length (line 173) | inline float Length()
  function class (line 179) | class Vec3
  function operator (line 282) | inline bool operator == (const Vec3 & vin)
  function operator (line 286) | inline bool operator != (const Vec3 & vin)
  function GetHashCode (line 290) | inline int GetHashCode()
  function Dot (line 294) | inline static float Dot(const Vec3 & v1, const Vec3 & v2)
  function Cross (line 298) | inline static void Cross(Vec3 & rs_d, const Vec3 & v1, const Vec3 & v2)
  function Vec3 (line 304) | inline static Vec3 Cross(const Vec3 & v1, const Vec3 & v2)
  function Scale (line 312) | inline static void Scale(Vec3 & rs, const Vec3 & v1, float s)
  function Add (line 316) | inline static void Add(Vec3 & rs, const Vec3 & v1, const Vec3 & v2)
  function Subtract (line 322) | inline static void Subtract(Vec3 & rs, const Vec3 & v1, const Vec3 & v2)
  function Multiply (line 328) | inline static void Multiply(Vec3 & rs, const Vec3 & v1, const Vec3 & v2)
  function NormalizeFPU (line 342) | static inline void NormalizeFPU(Vec3 & rs, const Vec3 & vin)
  function Length (line 347) | inline float Length() const;
  function class (line 357) | class Vec4
  function operator (line 494) | inline bool operator == (const Vec4 & vin)
  function operator (line 498) | inline bool operator != (const Vec4 & vin)
  function GetHashCode (line 502) | inline int GetHashCode()
  function LengthFPU (line 513) | inline float LengthFPU() const;
  function class (line 525) | class Vec4_M128
  function Zero (line 543) | inline void Zero()
  function ToVec4 (line 547) | inline void ToVec4(Vec4 & v) const
  function class (line 553) | class Matrix3
  function ClipSpaceType (line 596) | enum class ClipSpaceType
  function Matrix3 (line 643) | inline Matrix3 GetMatrix3()
  function Matrix4 (line 662) | inline Matrix4 operator * (const Matrix4 & matrix)
  function Matrix4 (line 668) | inline Matrix4 & LeftMultiply(const Matrix4 & matrix)
  function Transpose (line 673) | inline void Transpose()
  function class (line 719) | class Matrix4_M128
  function Vec3 (line 772) | inline Vec3 Vec3::FromHomogeneous(const Vec4 & v)
  function Length (line 778) | inline float Vec3::Length() const
  function Add (line 787) | inline void Vec4::Add(Vec4 & rs, const Vec4 & v1, const Vec4 & v2)
  function Subtract (line 794) | inline void Vec4::Subtract(Vec4 & rs, const Vec4 & v1, const Vec4 & v2)
  function Multiply (line 801) | inline void Vec4::Multiply(Vec4 & rs, const Vec4 & v1, const Vec4 & v2)
  function MultiplyScale (line 808) | inline void Vec4::MultiplyScale(Vec4 & rs, const Vec4 & v1, const Vec4 &...
  function Scale (line 815) | inline void Vec4::Scale(Vec4 & rs, const Vec4 & v1, float s)
  function Dot (line 822) | inline float Vec4::Dot(const Vec4 & v1, const Vec4 & v2)
  function Cross (line 826) | inline void Vec4::Cross(Vec4 & rs_d, const Vec4 & v1, const Vec4 & v2)
  function NormalizeFPU (line 863) | inline void Vec4::NormalizeFPU(Vec4& vout, const Vec4& vin)
  function Normalize (line 868) | inline void Vec4::Normalize(Vec4 &vout, const Vec4 &vin)
  function CreateIdentityMatrix (line 889) | inline void Matrix4::CreateIdentityMatrix(Matrix4 & mOut)
  function CreateOrthoMatrix (line 895) | inline void Matrix4::CreateOrthoMatrix(Matrix4 & mOut, float left, float...
  function CreatePerspectiveMatrix (line 915) | inline void Matrix4::CreatePerspectiveMatrix(Matrix4 &mOut, float left, ...
  function CreatePerspectiveMatrixFromViewAngle (line 929) | inline void Matrix4::CreatePerspectiveMatrixFromViewAngle(Matrix4 &mOut,...
  function CreatePerspectiveMatrixFromViewAngleTiled (line 939) | inline void Matrix4::CreatePerspectiveMatrixFromViewAngleTiled(Matrix4 &...
  function CreateRandomMatrix (line 953) | inline void Matrix4::CreateRandomMatrix(Matrix4 & mOut)
  function RotationX (line 960) | inline void Matrix4::RotationX(Matrix4 & rs, float angle)
  function RotationY (line 971) | inline void Matrix4::RotationY(Matrix4 & rs, float angle)
  function RotationZ (line 982) | inline void Matrix4::RotationZ(Matrix4 & rs, float angle)
  function Scale (line 994) | inline void Matrix4::Scale(Matrix4 & rs, float sx, float sy, float sz)
  function Translation (line 1001) | inline void Matrix4::Translation(Matrix4 & rs, float tx, float ty, float...
  function TransposeTransformNormal (line 1008) | inline void Matrix4::TransposeTransformNormal(Vec3 & rs, const Vec3 & vI...
  function TransposeTransform (line 1014) | inline void Matrix4::TransposeTransform(Vec3 & rs, const Vec3 & vIn) const
  function TransposeTransform (line 1020) | inline void Matrix4::TransposeTransform(Vec4 & rs, const Vec4 & vIn) const
  function Transform (line 1027) | inline void Matrix4::Transform(Vec3 & rs, const Vec3& vIn) const
  function Vec3 (line 1033) | inline Vec3 Matrix4::TransformHomogeneous(const Vec3 & vIn) const
  function TransformHomogeneous (line 1045) | inline void Matrix4::TransformHomogeneous(Vec3 & rs, const Vec3 & vIn) c...
  function TransformHomogeneous2D (line 1055) | inline void Matrix4::TransformHomogeneous2D(Vec2 & rs, const Vec3 & vIn)...
  function TransformNormal (line 1063) | inline void Matrix4::TransformNormal(Vec3 & rs, const Vec3& vIn) const
  function Transform (line 1069) | inline void Matrix4::Transform(Vec4 & rs, const Vec4& vIn) const
  function Vec3 (line 1076) | inline Vec3 Matrix4::TransformNormal(const Vec3& vIn) const
  function Vec4 (line 1084) | inline Vec4 Matrix4::Transform(const Vec4& vIn) const
  function MultiplyFPU (line 1093) | inline void Matrix4::MultiplyFPU(Matrix4 &mOut, const Matrix4& M1, const...
  function Multiply (line 1106) | inline void Matrix4::Multiply(Matrix4 &mOut, const Matrix4 &M1, const Ma...
  function Inverse (line 1115) | inline float Matrix4::Inverse(Matrix4 &mOut_d) const
  function ToMatrix4 (line 1128) | inline void Matrix4_M128::ToMatrix4(Matrix4 & mOut) const
  function Transform (line 1135) | inline void Matrix4_M128::Transform(Vec4_M128 & rs, const Vec4& vIn) const
  function Transform (line 1144) | inline void Matrix4_M128::Transform(Vec4 & rs, const Vec4& vIn) const
  function Transform (line 1150) | inline void Matrix4_M128::Transform(Vec4_M128 & rs, const Vec3& vIn) const
  function Transform (line 1158) | inline void Matrix4_M128::Transform(Vec3 & rs, const Vec3& vIn) const
  function Transform (line 1168) | inline void Matrix4_M128::Transform(Vec4_M128 & rs, const Vec4_M128& vIn...
  function TransformNormal (line 1182) | inline void Matrix4_M128::TransformNormal(Vec4_M128 & rs, const Vec4& vI...
  function TransformNormal (line 1190) | inline void Matrix4_M128::TransformNormal(Vec4 & rs, const Vec4& vIn) const
  function TransformNormal (line 1197) | inline void Matrix4_M128::TransformNormal(Vec4_M128 & rs, const Vec3& vI...
  function TransformNormal (line 1205) | inline void Matrix4_M128::TransformNormal(Vec3 & rs, const Vec3& vIn) const
  function Multiply (line 1213) | inline void Matrix4_M128::Multiply(Matrix4_M128 & rs, const Matrix4 & mB...
  function Multiply (line 1261) | inline void Matrix4_M128::Multiply(Matrix4_M128 & rs, const Matrix4_M128...
  function CartesianToSphere (line 1313) | inline void CartesianToSphere(const Vec3 & dir, float & u, float & v)
  function SphereToCartesian (line 1324) | inline void SphereToCartesian(Vec3 & dir, float u, float v)
  function GetOrthoVec (line 1332) | inline void GetOrthoVec(Vec3 & vout, const Vec3 & vin)
  function T (line 1344) | T CatmullInterpolate(const T & p0, const T & p1, const T & p2, const T &...
  function __m128 (line 1376) | inline __m128 operator + (const __m128 & v0, const __m128 & v1)
  function __m128 (line 1380) | inline __m128 operator - (const __m128 & v0, const __m128 & v1)
  function __m128 (line 1384) | inline __m128 operator * (const __m128 & v0, const __m128 & v1)
  function __m128 (line 1388) | inline __m128 operator / (const __m128 & v0, const __m128 & v1)
  function __m128 (line 1392) | inline __m128 operator - (const __m128 & v0)
  function __m128i (line 1414) | inline __m128i operator + (const __m128i & v0, const __m128i & v1)
  function __m128i (line 1418) | inline __m128i operator - (const __m128i & v0, const __m128i & v1)
  function __m128i (line 1422) | inline __m128i operator * (const __m128i & v0, const __m128i & v1)
  function __m128i (line 1426) | inline __m128i operator - (const __m128i & v0)
  function class (line 1433) | class SSEVec3
  function __m128 (line 1455) | inline __m128 Length()
  function Normalize (line 1459) | inline void Normalize(__m128 one)
  function SSEVec3 (line 1466) | inline SSEVec3 operator + (const SSEVec3 &vin)
  function SSEVec3 (line 1474) | inline SSEVec3 operator - (const SSEVec3 &vin)
  function SSEVec3 (line 1482) | inline SSEVec3 operator - ()
  function SSEVec3 (line 1490) | inline SSEVec3 operator * (__m128 scale)
  function __m128 (line 1529) | inline static __m128 Dot(const SSEVec3 & v1, const SSEVec3 & v2)
  function Cross (line 1533) | inline static void Cross(SSEVec3 & rs_d, const SSEVec3 & v1, const SSEVe...
  function class (line 1542) | class SSEVec4
  function __m128 (line 1566) | inline __m128 Length()
  function Normalize (line 1570) | inline void Normalize(__m128 one)
  function SSEVec4 (line 1578) | inline SSEVec4 operator + (const SSEVec4 &vin)
  function SSEVec4 (line 1587) | inline SSEVec4 operator - (const SSEVec4 &vin)
  function SSEVec4 (line 1596) | inline SSEVec4 operator - ()
  function SSEVec4 (line 1605) | inline SSEVec4 operator * (__m128 scale)
  function __m128 (line 1645) | inline static __m128 Dot(const SSEVec4 & v1, const SSEVec4 & v2)
  function class (line 1652) | class SSEMatrix4
  function class (line 1687) | class Vec2i
  function class (line 1700) | class Vec3i
  function class (line 1714) | class Vec4i
  function class (line 1729) | class Quaternion
  function Vec4 (line 1742) | Vec4 ToVec4() const
  function Quaternion (line 1755) | Quaternion operator + (const Quaternion & q) const
  function Quaternion (line 1764) | Quaternion operator * (float s) const
  function Quaternion (line 1773) | Quaternion operator *= (float s)
  function Quaternion (line 1862) | static inline Quaternion FromMatrix(const Matrix3 & a)
  function Quaternion (line 1904) | static inline Quaternion FromCoordinates(const Vec3 & axisX, const Vec3 ...
  function Quaternion (line 1913) | static inline Quaternion FromAxisAngle(const Vec3 & axis, float angle)
  function Dot (line 1919) | static inline float Dot(const Quaternion & q1, const Quaternion & q2)
  function Quaternion (line 1923) | static inline Quaternion Lerp(const Quaternion & q1, const Quaternion & ...
  function Quaternion (line 1931) | static inline Quaternion Slerp(const Quaternion & q1, const Quaternion &...
  function SetYawAngle (line 1951) | static inline void SetYawAngle(Quaternion & q, float yaw)

FILE: Source/SpireCompiler/D3DCompiler.cpp
  class D3DCompilerImpl (line 30) | class D3DCompilerImpl : public D3DCompiler
    method Compile (line 36) | virtual bool Compile(CoreLib::String input, CoreLib::String stageName,...
  function D3DCompiler (line 57) | D3DCompiler * LoadD3DCompiler()
  function D3DCompiler (line 80) | D3DCompiler * LoadD3DCompiler()

FILE: Source/SpireCompiler/D3DCompiler.h
  function class (line 6) | class D3DCompiler : public CoreLib::Object

FILE: Source/SpireCompiler/ShaderCompilerShell.cpp
  function String (line 10) | String tryReadCommandLineArgument(wchar_t const* option, wchar_t***ioCur...
  function wmain (line 24) | int wmain(int argc, wchar_t* argv[])

FILE: Source/SpireCore/CLikeCodeGen.cpp
  type Spire (line 8) | namespace Spire
    type Compiler (line 10) | namespace Compiler
      function ILRecordType (line 12) | ILRecordType * ExtractRecordType(ILType * type)
      function String (line 24) | String AddWorldNameSuffix(String name, String suffix)
      function String (line 66) | String CLikeCodeGen::GetFuncOriginalName(const String & name)
      function IsMatrix (line 170) | static bool IsMatrix(ILOperand* operand)
      function CompiledShaderSource (line 803) | CompiledShaderSource CLikeCodeGen::GenerateShader(CompileResult & re...
      function ExternComponentCodeGenInfo (line 866) | ExternComponentCodeGenInfo CLikeCodeGen::ExtractExternComponentInfo(...
      function StageSource (line 1029) | StageSource CLikeCodeGen::GenerateVertexFragmentDomainShader(ILProgr...
      function StageSource (line 1042) | StageSource CLikeCodeGen::GenerateComputeShader(ILProgram * program,...
      function String (line 1091) | String CLikeCodeGen::GenerateFunction(ILFunction * function)
      function String (line 1114) | String CodeGenContext::DefineVariable(ILOperand * op)

FILE: Source/SpireCore/CLikeCodeGen.h
  function class (line 26) | class ExternComponentCodeGenInfo

FILE: Source/SpireCore/Closure.cpp
  type Spire (line 5) | namespace Spire
    type Compiler (line 7) | namespace Compiler
      function CheckComponentRedefinition (line 9) | void CheckComponentRedefinition(DiagnosticSink * err, ShaderClosure ...
      function CreateShaderClosure (line 52) | RefPtr<ShaderClosure> CreateShaderClosure(DiagnosticSink * err, Symb...
      function CreateShaderClosure (line 188) | RefPtr<ShaderClosure> CreateShaderClosure(DiagnosticSink * err, Symb...
      class ReplaceReferenceVisitor (line 193) | class ReplaceReferenceVisitor : public SyntaxVisitor
        method ReplaceReference (line 199) | void ReplaceReference(RefPtr<StringObject> refComp)
        method ReplaceReferenceVisitor (line 231) | ReplaceReferenceVisitor(ShaderClosure * closure, ShaderComponentSy...
        method VisitImportExpression (line 235) | RefPtr<ExpressionSyntaxNode> VisitImportExpression(ImportExpressio...
        method VisitVarExpression (line 249) | RefPtr<ExpressionSyntaxNode> VisitVarExpression(VarExpressionSynta...
        method VisitMemberExpression (line 259) | RefPtr<ExpressionSyntaxNode> VisitMemberExpression(MemberExpressio...
      class ResolveDependencyVisitor (line 271) | class ResolveDependencyVisitor : public SyntaxVisitor
        method AddReference (line 277) | void AddReference(ShaderComponentSymbol * referee, ImportExpressio...
        method ResolveDependencyVisitor (line 304) | ResolveDependencyVisitor(DiagnosticSink * err, ShaderClosure * pRo...
        method VisitImportExpression (line 308) | RefPtr<ExpressionSyntaxNode> VisitImportExpression(ImportExpressio...
        method VisitVarExpression (line 327) | RefPtr<ExpressionSyntaxNode> VisitVarExpression(VarExpressionSynta...
        method VisitMemberExpression (line 368) | RefPtr<ExpressionSyntaxNode> VisitMemberExpression(MemberExpressio...
      function ResolveReference (line 407) | void ResolveReference(DiagnosticSink * err, ShaderClosure * rootShad...
      function ReplaceRefMapReference (line 422) | void ReplaceRefMapReference(ShaderClosure * root, ShaderClosure * sh...
      function ReplaceReference (line 438) | void ReplaceReference(ShaderClosure * shader, EnumerableDictionary<S...
      function IsInAbstractWorld (line 452) | bool IsInAbstractWorld(PipelineSymbol * pipeline, ShaderComponentSym...
      function AssignUniqueNames (line 458) | void AssignUniqueNames(ShaderClosure * shader, String namePrefix, St...
      function IsConsistentGlobalComponentDefinition (line 487) | bool IsConsistentGlobalComponentDefinition(ShaderComponentSymbol * c...
      function GatherComponents (line 499) | void GatherComponents(DiagnosticSink * err, ShaderClosure * closure,...
      function IsWorldFeasible (line 542) | bool IsWorldFeasible(SymbolTable * symTable, PipelineSymbol * pipeli...
      function SolveWorldConstraints (line 572) | void SolveWorldConstraints(DiagnosticSink * err, SymbolTable * symTa...
      function CheckCircularReference (line 647) | bool CheckCircularReference(DiagnosticSink * err, ShaderClosure * sh...
      function PropagateArgumentConstraints (line 682) | void PropagateArgumentConstraints(ShaderComponentSymbol * requiremen...
      function VerifyAndPropagateArgumentConstraints (line 702) | void VerifyAndPropagateArgumentConstraints(DiagnosticSink * err, Sym...
      function AddPipelineComponents (line 731) | void AddPipelineComponents(ShaderClosure * shader)
      function GatherArgumentMappings (line 740) | void GatherArgumentMappings(EnumerableDictionary<String, String> & r...
      function RemoveTrivialComponents (line 750) | void RemoveTrivialComponents(ShaderClosure * shader)
      function PropagatePipelineRequirements (line 795) | void PropagatePipelineRequirements(DiagnosticSink * err, ShaderClosu...
      function diagnoseModuleUsingStack (line 828) | void diagnoseModuleUsingStack(DiagnosticSink* sink, ShaderClosure * ...
      function CheckPipelineShaderConsistency (line 842) | void CheckPipelineShaderConsistency(DiagnosticSink * err, ShaderClos...
      function FlattenShaderClosure (line 910) | void FlattenShaderClosure(DiagnosticSink * err, SymbolTable * symTab...

FILE: Source/SpireCore/Closure.h
  function namespace (line 5) | namespace Spire

FILE: Source/SpireCore/CodeGenBackend.h
  function namespace (line 9) | namespace Spire

FILE: Source/SpireCore/CodeGenerator.cpp
  type Spire (line 10) | namespace Spire
    type Compiler (line 12) | namespace Compiler
      class ImportNodeVisitor (line 17) | class ImportNodeVisitor : public SyntaxVisitor
        method ImportNodeVisitor (line 21) | ImportNodeVisitor(const Func & f)
        method VisitImportExpression (line 24) | virtual RefPtr<ExpressionSyntaxNode> VisitImportExpression(ImportE...
      function EnumerateImportExpressions (line 32) | void EnumerateImportExpressions(SyntaxNode * node, const Func & f)
      class CodeGenerator (line 38) | class CodeGenerator : public ICodeGenerator
        method PushStack (line 57) | void PushStack(ILOperand * op)
        method ILOperand (line 61) | ILOperand * PopStack()
        method AllocVarInstruction (line 67) | AllocVarInstruction * AllocVar(ExpressionType * etype)
        method FetchArgInstruction (line 84) | FetchArgInstruction * FetchArg(ExpressionType * etype, int argId)
        method TranslateStages (line 100) | void TranslateStages(PipelineSyntaxNode * pipeline)
        method String (line 119) | String GetComponentFunctionName(ComponentSyntaxNode * comp)
        method VisitStruct (line 126) | virtual RefPtr<StructSyntaxNode> VisitStruct(StructSyntaxNode * st...
        method ProcessFunction (line 132) | virtual void ProcessFunction(FunctionSyntaxNode * func) override
        method ProcessStruct (line 136) | virtual void ProcessStruct(StructSyntaxNode * st) override
        method SetSubModuleDescriptorSetId (line 140) | void SetSubModuleDescriptorSetId(ILModuleParameterSet * modulePara...
        method LayoutRule (line 146) | LayoutRule GetDefaultLayoutRule()
        method GenerateParameterBindingInfo (line 150) | void GenerateParameterBindingInfo(ShaderIR * shader)
        method ParameterQualifier (line 322) | ParameterQualifier GetParamQualifier(ParameterSyntaxNode* paramDecl)
        method CopyLayoutAttributes (line 332) | EnumerableDictionary<String, Token> CopyLayoutAttributes(Decl* decl)
        method ProcessShader (line 342) | virtual void ProcessShader(ShaderIR * shader) override
        method EvalReferencedFunctionClosure (line 589) | void EvalReferencedFunctionClosure(ILWorld * world)
        method VisitComponent (line 608) | virtual RefPtr<ComponentSyntaxNode> VisitComponent(ComponentSyntax...
        method VisitComponent (line 612) | void VisitComponent(ComponentDefinitionIR * comp)
        method VisitFunction (line 668) | virtual RefPtr<FunctionSyntaxNode> VisitFunction(FunctionSyntaxNod...
        method VisitBlockStatement (line 691) | virtual RefPtr<StatementSyntaxNode> VisitBlockStatement(BlockState...
        method VisitWhileStatement (line 699) | virtual RefPtr<StatementSyntaxNode> VisitWhileStatement(WhileState...
        method VisitDoWhileStatement (line 714) | virtual RefPtr<StatementSyntaxNode> VisitDoWhileStatement(DoWhileS...
        method VisitForStatement (line 729) | virtual RefPtr<StatementSyntaxNode> VisitForStatement(ForStatement...
        method VisitIfStatement (line 761) | virtual RefPtr<StatementSyntaxNode> VisitIfStatement(IfStatementSy...
        method VisitReturnStatement (line 780) | virtual RefPtr<StatementSyntaxNode> VisitReturnStatement(ReturnSta...
        method VisitBreakStatement (line 814) | virtual RefPtr<StatementSyntaxNode> VisitBreakStatement(BreakState...
        method VisitContinueStatement (line 819) | virtual RefPtr<StatementSyntaxNode> VisitContinueStatement(Continu...
        method VisitSelectExpression (line 824) | virtual RefPtr<ExpressionSyntaxNode> VisitSelectExpression(SelectE...
        method ILOperand (line 835) | ILOperand * EnsureBoolType(ILOperand * op, RefPtr<ExpressionType> ...
        method VisitDiscardStatement (line 849) | virtual RefPtr<StatementSyntaxNode> VisitDiscardStatement(DiscardS...
        method VisitDeclrVariable (line 855) | RefPtr<Variable> VisitDeclrVariable(Variable* varDecl)
        method VisitExpressionStatement (line 868) | virtual RefPtr<StatementSyntaxNode> VisitExpressionStatement(Expre...
        method Assign (line 874) | void Assign(ILOperand * left, ILOperand * right)
        method VisitBinaryExpression (line 909) | virtual RefPtr<ExpressionSyntaxNode> VisitBinaryExpression(BinaryE...
        method VisitProject (line 1027) | virtual RefPtr<ExpressionSyntaxNode> VisitProject(ProjectExpressio...
        method VisitConstantExpression (line 1038) | virtual RefPtr<ExpressionSyntaxNode> VisitConstantExpression(Const...
        method GenerateIndexExpression (line 1059) | void GenerateIndexExpression(ILOperand * base, ILOperand * idx)
        method VisitImportExpression (line 1065) | virtual RefPtr<ExpressionSyntaxNode> VisitImportExpression(ImportE...
        method VisitIndexExpression (line 1100) | virtual RefPtr<ExpressionSyntaxNode> VisitIndexExpression(IndexExp...
        method VisitMemberExpression (line 1111) | virtual RefPtr<ExpressionSyntaxNode> VisitMemberExpression(MemberE...
        method VisitInvokeExpression (line 1168) | virtual RefPtr<ExpressionSyntaxNode> VisitInvokeExpression(InvokeE...
        method VisitTypeCastExpression (line 1235) | virtual RefPtr<ExpressionSyntaxNode> VisitTypeCastExpression(TypeC...
        method VisitUnaryExpression (line 1263) | virtual RefPtr<ExpressionSyntaxNode> VisitUnaryExpression(UnaryExp...
        method GenerateVarRef (line 1349) | bool GenerateVarRef(String name, ExpressionAccess access)
        method VisitVarExpression (line 1367) | virtual RefPtr<ExpressionSyntaxNode> VisitVarExpression(VarExpress...
        method CodeGenerator (line 1388) | CodeGenerator & operator = (const CodeGenerator & other) = delete;
        method CodeGenerator (line 1390) | CodeGenerator(SymbolTable * symbols, DiagnosticSink * pErr, Compil...
        method TranslateStructType (line 1398) | RefPtr<ILStructType> TranslateStructType(StructSyntaxNode* structD...
        method TranslateExpressionType (line 1424) | RefPtr<ILType> TranslateExpressionType(ExpressionType * type)
        method TranslateExpressionType (line 1465) | RefPtr<ILType> TranslateExpressionType(const RefPtr<ExpressionType...
      function ICodeGenerator (line 1472) | ICodeGenerator * CreateCodeGenerator(SymbolTable * symbols, CompileR...

FILE: Source/SpireCore/CodeWriter.h
  function namespace (line 7) | namespace Spire

FILE: Source/SpireCore/CompiledProgram.cpp
  type Spire (line 3) | namespace Spire
    type Compiler (line 5) | namespace Compiler
      function IndentString (line 7) | void IndentString(StringBuilder & sb, String src)
      function ShaderChoiceValue (line 47) | ShaderChoiceValue ShaderChoiceValue::Parse(String str)

FILE: Source/SpireCore/CompiledProgram.h
  function namespace (line 9) | namespace Spire

FILE: Source/SpireCore/ConstantPool.cpp
  type Spire (line 7) | namespace Spire
    type Compiler (line 9) | namespace Compiler
      class ConstantPoolImpl (line 11) | class ConstantPoolImpl
        method ILUndefinedOperand (line 21) | ILUndefinedOperand * GetUndefinedOperand()
        method ILOperand (line 25) | ILOperand * CreateDefaultValue(ILType * type)
        method ILConstOperand (line 73) | ILConstOperand * CreateConstantIntVec(int val, int val2)
        method ILConstOperand (line 89) | ILConstOperand * CreateConstantIntVec(int val, int val2, int val3)
        method ILConstOperand (line 107) | ILConstOperand * CreateConstantIntVec(int val, int val2, int val3,...
        method ILConstOperand (line 126) | ILConstOperand * CreateConstant(ILConstOperand * c)
        method ILConstOperand (line 159) | ILConstOperand * CreateConstantU(unsigned int val)
        method ILConstOperand (line 175) | ILConstOperand * CreateConstant(bool b)
        method ILConstOperand (line 183) | ILConstOperand * CreateConstant(int val, int size = 0)
        method ILConstOperand (line 217) | ILConstOperand * CreateConstant(float val, int size = 0)
        method ILConstOperand (line 262) | ILConstOperand * CreateConstant(float val, float val2)
        method ILConstOperand (line 283) | ILConstOperand * CreateConstant(float val, float val2, float val3)
        method ILConstOperand (line 306) | ILConstOperand * CreateConstant(float val, float val2, float val3,...
        method ConstantPoolImpl (line 330) | ConstantPoolImpl()
      function ILUndefinedOperand (line 353) | ILUndefinedOperand * ConstantPool::GetUndefinedOperand()
      function ILConstOperand (line 357) | ILConstOperand * ConstantPool::CreateConstant(ILConstOperand * c)
      function ILConstOperand (line 361) | ILConstOperand * ConstantPool::CreateConstantIntVec(int val0, int val1)
      function ILConstOperand (line 366) | ILConstOperand * ConstantPool::CreateConstantIntVec(int val0, int va...
      function ILConstOperand (line 370) | ILConstOperand * ConstantPool::CreateConstantIntVec(int val0, int va...
      function ILConstOperand (line 374) | ILConstOperand * ConstantPool::CreateConstant(bool b)
      function ILConstOperand (line 378) | ILConstOperand * ConstantPool::CreateConstantU(unsigned int u)
      function ILConstOperand (line 382) | ILConstOperand * ConstantPool::CreateConstant(int val, int vectorSize)
      function ILConstOperand (line 386) | ILConstOperand * ConstantPool::CreateConstant(float val, int vectorS...
      function ILConstOperand (line 390) | ILConstOperand * ConstantPool::CreateConstant(float val, float val1)
      function ILConstOperand (line 394) | ILConstOperand * ConstantPool::CreateConstant(float val, float val1,...
      function ILConstOperand (line 398) | ILConstOperand * ConstantPool::CreateConstant(float val, float val1,...
      function ILOperand (line 402) | ILOperand * ConstantPool::CreateDefaultValue(ILType * type)

FILE: Source/SpireCore/Diagnostics.cpp
  type Spire (line 10) | namespace Spire {
    type Compiler (line 11) | namespace Compiler {
      function printDiagnosticArg (line 13) | void printDiagnosticArg(StringBuilder& sb, char const* str)
      function printDiagnosticArg (line 18) | void printDiagnosticArg(StringBuilder& sb, int str)
      function printDiagnosticArg (line 23) | void printDiagnosticArg(StringBuilder& sb, CoreLib::Basic::String co...
      function printDiagnosticArg (line 28) | void printDiagnosticArg(StringBuilder& sb, Decl* decl)
      function printDiagnosticArg (line 33) | void printDiagnosticArg(StringBuilder& sb, Type* type)
      function printDiagnosticArg (line 38) | void printDiagnosticArg(StringBuilder& sb, ExpressionType* type)
      function printDiagnosticArg (line 43) | void printDiagnosticArg(StringBuilder& sb, ILType* type)
      function printDiagnosticArg (line 48) | void printDiagnosticArg(StringBuilder& sb, CoreLib::Text::TokenType ...
      function printDiagnosticArg (line 53) | void printDiagnosticArg(StringBuilder& sb, Token const& token)
      function printDiagnosticArg (line 58) | void printDiagnosticArg(StringBuilder& sb, StageAttribute const& attr)
      function CodePosition (line 63) | CodePosition const& getDiagnosticPos(SyntaxNode const* syntax)
      function CodePosition (line 68) | CodePosition const& getDiagnosticPos(CoreLib::Text::Token const& token)
      function CodePosition (line 73) | CodePosition const& getDiagnosticPos(ShaderClosure* shader)
      function formatDiagnosticMessage (line 79) | static void formatDiagnosticMessage(StringBuilder& sb, char const* f...
      type Diagnostics (line 158) | namespace Diagnostics

FILE: Source/SpireCore/Diagnostics.h
  function namespace (line 7) | namespace Spire
  function class (line 126) | class DiagnosticSink
  function namespace (line 206) | namespace Diagnostics

FILE: Source/SpireCore/GLSLCodeGen.cpp
  type Spire (line 10) | namespace Spire
    type Compiler (line 12) | namespace Compiler
      class GLSLCodeGen (line 14) | class GLSLCodeGen : public CLikeCodeGen
        method LayoutRule (line 24) | LayoutRule GetDefaultLayoutRule() override
        method PrintOp (line 29) | void PrintOp(CodeGenContext & ctx, ILOperand * op, bool forceExpre...
        method PrintRasterPositionOutputWrite (line 40) | void PrintRasterPositionOutputWrite(CodeGenContext & ctx, ILOperan...
        method PrintStandardInputReference (line 47) | void PrintStandardInputReference(StringBuilder& sb, ILRecordType* ...
        method PrintStandardArrayInputReference (line 54) | void PrintStandardArrayInputReference(StringBuilder& sb, ILRecordT...
        method PrintPatchInputReference (line 59) | void PrintPatchInputReference(StringBuilder& sb, ILRecordType* rec...
        method PrintDefaultInputReference (line 66) | void PrintDefaultInputReference(StringBuilder& sb, ILRecordType* /...
        method PrintSystemVarReference (line 72) | void PrintSystemVarReference(CodeGenContext & /*ctx*/, StringBuild...
        method PrintProjectInstrExpr (line 100) | void PrintProjectInstrExpr(CodeGenContext & ctx, ProjectInstructio...
        method PrintTypeName (line 292) | void PrintTypeName(StringBuilder& sb, ILType* type) override
        method PrintTextureCall (line 321) | void PrintTextureCall(CodeGenContext & ctx, CallInstruction * instr)
        method DeclareStandardInputRecord (line 437) | void DeclareStandardInputRecord(CodeGenContext & sb, const ILObjec...
        method DeclarePatchInputRecord (line 476) | void DeclarePatchInputRecord(CodeGenContext & sb, const ILObjectDe...
        method GenerateHeader (line 513) | void GenerateHeader(StringBuilder & sb, ILStage * stage)
        method GenerateDomainShaderProlog (line 522) | void GenerateDomainShaderProlog(CodeGenContext & ctx, ILStage * st...
        method PrintParameterReference (line 546) | virtual void PrintParameterReference(StringBuilder& sb, ILModulePa...
        method GenerateShaderParameterDefinition (line 558) | void GenerateShaderParameterDefinition(CodeGenContext & ctx, ILSha...
        method GenerateShaderMetaData (line 683) | virtual void GenerateShaderMetaData(ShaderMetaData & result, ILPro...
        method StageSource (line 708) | StageSource GenerateSingleWorldShader(ILProgram * program, ILShade...
        method StageSource (line 755) | StageSource GenerateHullShader(ILProgram * program, ILShader * sha...
        method GLSLCodeGen (line 903) | GLSLCodeGen(bool vulkanBinding, bool pUseSingleDescSet)
      class StandardOutputStrategy (line 911) | class StandardOutputStrategy : public OutputStrategy
        method StandardOutputStrategy (line 917) | StandardOutputStrategy(GLSLCodeGen * pCodeGen, ILWorld * world, St...
        method DeclareOutput (line 922) | virtual void DeclareOutput(CodeGenContext & ctx, ILStage * stage) ...
        method ProcessExportInstruction (line 942) | virtual void ProcessExportInstruction(CodeGenContext & ctx, Export...
      class ArrayOutputStrategy (line 953) | class ArrayOutputStrategy : public OutputStrategy
        method ArrayOutputStrategy (line 960) | ArrayOutputStrategy(GLSLCodeGen * pCodeGen, ILWorld * world, bool ...
        method DeclareOutput (line 967) | virtual void DeclareOutput(CodeGenContext & ctx, ILStage *) override
        method ProcessExportInstruction (line 981) | virtual void ProcessExportInstruction(CodeGenContext & ctx, Export...
      class PackedBufferOutputStrategy (line 989) | class PackedBufferOutputStrategy : public OutputStrategy
        method PackedBufferOutputStrategy (line 992) | PackedBufferOutputStrategy(GLSLCodeGen * pCodeGen, ILWorld * world)
        method DeclareOutput (line 995) | virtual void DeclareOutput(CodeGenContext & ctx, ILStage *) override
        method ProcessExportInstruction (line 1004) | virtual void ProcessExportInstruction(CodeGenContext & ctx, Export...
      function OutputStrategy (line 1108) | OutputStrategy * GLSLCodeGen::CreateStandardOutputStrategy(ILWorld *...
      function OutputStrategy (line 1112) | OutputStrategy * GLSLCodeGen::CreatePackedBufferOutputStrategy(ILWor...
      function OutputStrategy (line 1116) | OutputStrategy * GLSLCodeGen::CreateArrayOutputStrategy(ILWorld * wo...
      function CodeGenBackend (line 1121) | CodeGenBackend * CreateGLSLCodeGen()
      function CodeGenBackend (line 1125) | CodeGenBackend * CreateGLSL_VulkanCodeGen()
      function CodeGenBackend (line 1129) | CodeGenBackend * CreateGLSL_VulkanOneDescCodeGen()

FILE: Source/SpireCore/GetDependencyVisitor.cpp
  type Spire (line 3) | namespace Spire
    type Compiler (line 5) | namespace Compiler
      function GetDependentComponents (line 7) | EnumerableHashSet<ComponentDependency> GetDependentComponents(Syntax...

FILE: Source/SpireCore/GetDependencyVisitor.h
  function namespace (line 8) | namespace Spire

FILE: Source/SpireCore/HLSLCodeGen.cpp
  type Spire (line 10) | namespace Spire
    type Compiler (line 12) | namespace Compiler
      class HLSLCodeGen (line 14) | class HLSLCodeGen : public CLikeCodeGen
        method LayoutRule (line 23) | LayoutRule GetDefaultLayoutRule() override
        method PrintRasterPositionOutputWrite (line 28) | void PrintRasterPositionOutputWrite(CodeGenContext & ctx, ILOperan...
        method PrintMatrixMulInstrExpr (line 35) | void PrintMatrixMulInstrExpr(CodeGenContext & ctx, ILOperand* op0,...
        method PrintStandardInputReference (line 51) | void PrintStandardInputReference(StringBuilder& sb, ILRecordType* ...
        method PrintStandardArrayInputReference (line 56) | void PrintStandardArrayInputReference(StringBuilder& sb, ILRecordT...
        method PrintPatchInputReference (line 61) | void PrintPatchInputReference(StringBuilder& sb, ILRecordType* /*r...
        method PrintDefaultInputReference (line 66) | void PrintDefaultInputReference(StringBuilder& sb, ILRecordType* /...
        method PrintSystemVarReference (line 72) | void PrintSystemVarReference(CodeGenContext & ctx, StringBuilder& ...
        method PrintCallInstrExprForTarget (line 105) | void PrintCallInstrExprForTarget(CodeGenContext & ctx, CallInstruc...
        method PrintTextureCall (line 177) | void PrintTextureCall(CodeGenContext & ctx, CallInstruction * instr)
        method PrintProjectInstrExpr (line 194) | void PrintProjectInstrExpr(CodeGenContext & ctx, ProjectInstructio...
        method PrintTypeName (line 201) | void PrintTypeName(StringBuilder& sb, ILType* type) override
        method String (line 259) | String GetLastSegment(String accessName)
        method DefineCBufferParameterFields (line 267) | void DefineCBufferParameterFields(CodeGenContext & sb, ILModulePar...
        method DefineBindableParameterFields (line 299) | void DefineBindableParameterFields(CodeGenContext & sb, ILModulePa...
        method DetermineParameterFieldOffset (line 365) | bool DetermineParameterFieldOffset(ILModuleParameterSet * module, ...
        method GenerateShaderParameterDefinition (line 391) | void GenerateShaderParameterDefinition(CodeGenContext & sb, ILShad...
        method PrintParameterReference (line 431) | virtual void PrintParameterReference(StringBuilder& sb, ILModulePa...
        method DeclareStandardInputRecord (line 443) | void DeclareStandardInputRecord(CodeGenContext & sb, const ILObjec...
        method DeclarePatchInputRecord (line 453) | void DeclarePatchInputRecord(CodeGenContext & sb, const ILObjectDe...
        method GenerateDomainShaderAttributes (line 459) | void GenerateDomainShaderAttributes(StringBuilder & sb, ILStage * ...
        method PrintHeaderBoilerplate (line 470) | void PrintHeaderBoilerplate(CodeGenContext& ctx)
        method StageSource (line 493) | StageSource GenerateSingleWorldShader(ILProgram * program, ILShade...
        method DeclareRecordTypeStruct (line 790) | void DeclareRecordTypeStruct(CodeGenContext& ctx, ILRecordType* re...
        type SimpleOutputStrategy (line 851) | struct SimpleOutputStrategy : OutputStrategy
          method SimpleOutputStrategy (line 856) | SimpleOutputStrategy(HLSLCodeGen* hlslCodeGen, ILWorld* world, S...
          method DeclareOutput (line 862) | virtual void DeclareOutput(CodeGenContext & ctx, ILStage * /*sta...
          method ProcessExportInstruction (line 867) | virtual void ProcessExportInstruction(CodeGenContext & ctx, Expo...
        method StageSource (line 876) | StageSource GenerateHullShader(ILProgram * program, ILShader * sha...
      class HLSLArrayOutputStrategy (line 1282) | class HLSLArrayOutputStrategy : public OutputStrategy
        method HLSLArrayOutputStrategy (line 1289) | HLSLArrayOutputStrategy(HLSLCodeGen * pCodeGen, ILWorld * world, b...
        method DeclareOutput (line 1296) | virtual void DeclareOutput(CodeGenContext & ctx, ILStage *) override
        method ProcessExportInstruction (line 1308) | virtual void ProcessExportInstruction(CodeGenContext & ctx, Export...
      class HLSLPackedBufferOutputStrategy (line 1317) | class HLSLPackedBufferOutputStrategy : public OutputStrategy
        method HLSLPackedBufferOutputStrategy (line 1320) | HLSLPackedBufferOutputStrategy(HLSLCodeGen * pCodeGen, ILWorld * w...
        method DeclareOutput (line 1323) | virtual void DeclareOutput(CodeGenContext & ctx, ILStage *) override
        method ProcessExportInstruction (line 1332) | virtual void ProcessExportInstruction(CodeGenContext & ctx, Export...
      function OutputStrategy (line 1436) | OutputStrategy * HLSLCodeGen::CreateStandardOutputStrategy(ILWorld *...
      function OutputStrategy (line 1441) | OutputStrategy * HLSLCodeGen::CreatePackedBufferOutputStrategy(ILWor...
      function OutputStrategy (line 1445) | OutputStrategy * HLSLCodeGen::CreateArrayOutputStrategy(ILWorld * wo...
      function CodeGenBackend (line 1450) | CodeGenBackend * CreateHLSLCodeGen()

FILE: Source/SpireCore/IL.cpp
  type Spire (line 7) | namespace Spire
    type Compiler (line 9) | namespace Compiler
      function BaseTypeFromString (line 13) | RefPtr<ILType> BaseTypeFromString(CoreLib::Text::TokenReader & parser)
      function RoundToAlignment (line 66) | int RoundToAlignment(int offset, int alignment)
      function GetMaxResourceBindings (line 75) | int GetMaxResourceBindings(BindableResourceType type)
      function SizeofBaseType (line 91) | int SizeofBaseType(ILBaseType type)
      function DeserializeBasicType (line 304) | RefPtr<ILType> DeserializeBasicType(CoreLib::Text::TokenReader & rea...
      function DeserializeStructType (line 311) | RefPtr<ILType> DeserializeStructType(CoreLib::Text::TokenReader & re...
      function DeserializeArrayType (line 328) | RefPtr<ILType> DeserializeArrayType(CoreLib::Text::TokenReader & rea...
      function DeserializeGenericType (line 339) | RefPtr<ILType> DeserializeGenericType(CoreLib::Text::TokenReader & r...
      function DeserializeRecordType (line 349) | RefPtr<ILType> DeserializeRecordType(CoreLib::Text::TokenReader & re...
      function ILInstruction (line 376) | ILInstruction * CFGNode::GetFirstNonPhiInstruction()
      function AllInstructionsIterator (line 583) | AllInstructionsIterator & AllInstructionsIterator::operator++()
      function AllInstructionsIterator (line 610) | AllInstructionsIterator AllInstructionsCollection::begin()
      function AllInstructionsIterator (line 614) | AllInstructionsIterator AllInstructionsCollection::end()
      function String (line 618) | String ImportInstruction::ToString()
      function String (line 631) | String ImportInstruction::GetOperatorString()
      function ILType (line 643) | ILType * ILStructType::Clone()
      function String (line 656) | String ILStructType::ToString()
      function ILType (line 667) | ILType * ILRecordType::Clone()
      function String (line 681) | String ILRecordType::ToString()

FILE: Source/SpireCore/IL.h
  function namespace (line 7) | namespace Spire
  function InsertHead (line 1224) | void InsertHead(ILInstruction * instr)
  function InsertTail (line 1228) | void InsertTail(ILInstruction * instr)
  function ConstKey (line 1254) | static ConstKey<T> FromValues(T value, T value1)
  function ConstKey (line 1263) | static ConstKey<T> FromValues(T value, T value1, T value2)
  function ConstKey (line 1273) | static ConstKey<T> FromValues(T value, T value1, T value2, T value3)
  function GetHashCode (line 1284) | int GetHashCode()
  function operator (line 1291) | bool operator == (const ConstKey<T> & other)
  function class (line 1303) | class PhiInstruction : public ILInstruction
  function class (line 1359) | class UnaryInstruction : public ILInstruction
  function virtual (line 1371) | virtual OperandIterator begin() override
  function virtual (line 1375) | virtual OperandIterator end() override
  function class (line 1381) | class MakeRecordInstruction : public ILInstruction
  function class (line 1388) | class ProjectInstruction : public UnaryInstruction
  function class (line 1407) | class ExportInstruction : public UnaryInstruction
  function virtual (line 1424) | virtual String ToString() override
  function virtual (line 1428) | virtual String GetOperatorString() override
  function virtual (line 1432) | virtual ExportInstruction * Clone() override
  function virtual (line 1436) | virtual bool HasSideEffect() override
  function ILInstruction (line 1453) | BinaryInstruction(const BinaryInstruction & other)
  function virtual (line 1462) | virtual OperandIterator begin() override
  function virtual (line 1466) | virtual OperandIterator end() override
  function class (line 1472) | class SelectInstruction : public ILInstruction
  function class (line 1526) | class CallInstruction : public ILInstruction
  function class (line 1588) | class NotInstruction : public UnaryInstruction
  function class (line 1614) | class NegInstruction : public UnaryInstruction
  function class (line 1633) | class SwizzleInstruction : public UnaryInstruction
  function class (line 1652) | class BitNotInstruction : public UnaryInstruction
  function class (line 1678) | class AddInstruction : public BinaryInstruction
  function virtual (line 1760) | virtual String ToString() override
  function virtual (line 1764) | virtual String GetOperatorString() override
  function virtual (line 1768) | virtual MemberLoadInstruction * Clone() override
  function virtual (line 1782) | virtual String GetOperatorString() override
  function virtual (line 1786) | virtual SubInstruction * Clone() override
  function class (line 1793) | class MulInstruction : public BinaryInstruction
  function class (line 1820) | class DivInstruction : public BinaryInstruction
  function class (line 1837) | class ModInstruction : public BinaryInstruction
  function class (line 1854) | class AndInstruction : public BinaryInstruction
  function class (line 1872) | class OrInstruction : public BinaryInstruction
  function class (line 1890) | class BitAndInstruction : public BinaryInstruction
  function class (line 1916) | class BitOrInstruction : public BinaryInstruction
  function class (line 1942) | class BitXorInstruction : public BinaryInstruction
  function class (line 1960) | class ShlInstruction : public BinaryInstruction
  function class (line 1977) | class ShrInstruction : public BinaryInstruction
  function class (line 1994) | class CompareInstruction : public BinaryInstruction
  function class (line 1996) | class CmpgtInstruction : public CompareInstruction
  function class (line 2013) | class CmpgeInstruction : public CompareInstruction
  function class (line 2030) | class CmpltInstruction : public CompareInstruction
  function class (line 2047) | class CmpleInstruction : public CompareInstruction
  function class (line 2073) | class CmpeqlInstruction : public CompareInstruction
  function class (line 2091) | class CmpneqInstruction : public CompareInstruction
  function class (line 2109) | class CastInstruction : public UnaryInstruction
  function class (line 2112) | class Float2IntInstruction : public CastInstruction
  function class (line 2139) | class Int2FloatInstruction : public CastInstruction
  function class (line 2166) | class CopyInstruction : public UnaryInstruction
  function class (line 2193) | class LoadInstruction : public UnaryInstruction
  function class (line 2230) | class DiscardInstruction : public ILInstruction
  function class (line 2257) | class StoreInstruction : public BinaryInstruction
  function class (line 2290) | class MemberUpdateInstruction : public ILInstruction
  function class (line 2348) | class InstructionVisitor : public Object
  function class (line 2396) | class ForInstruction : public ILInstruction
  function class (line 2457) | class IfInstruction : public UnaryInstruction
  function class (line 2494) | class WhileInstruction : public ILInstruction
  function class (line 2521) | class DoInstruction : public ILInstruction
  function class (line 2548) | class ReturnInstruction : public UnaryInstruction
  function class (line 2562) | class BreakInstruction : public ILInstruction
  function class (line 2564) | class ContinueInstruction : public ILInstruction
  function class (line 2567) | class KeyHoleNode

FILE: Source/SpireCore/InsertImplicitImportOperator.cpp
  type Spire (line 7) | namespace Spire
    type Compiler (line 9) | namespace Compiler
      class InsertImplicitImportOperatorVisitor (line 11) | class InsertImplicitImportOperatorVisitor : public SyntaxVisitor
        method InsertImplicitImportOperatorVisitor (line 20) | InsertImplicitImportOperatorVisitor(ShaderIR * ir, DiagnosticSink*...
        method ComponentDefinitionIR (line 24) | ComponentDefinitionIR * MakeComponentAvailableAtWorld(String compo...
        method ComponentDefinitionIR (line 30) | ComponentDefinitionIR * MakeComponentAvailableAtWorldInternal(Hash...
        method ProcessComponentReference (line 114) | RefPtr<ExpressionSyntaxNode> ProcessComponentReference(String comp...
        method VisitVarExpression (line 128) | RefPtr<ExpressionSyntaxNode> VisitVarExpression(VarExpressionSynta...
        method VisitMemberExpression (line 139) | RefPtr<ExpressionSyntaxNode> VisitMemberExpression(MemberExpressio...
        method VisitImportExpression (line 151) | RefPtr<ExpressionSyntaxNode> VisitImportExpression(ImportExpressio...
      function InsertImplicitImportOperators (line 165) | void InsertImplicitImportOperators(DiagnosticSink * err, ShaderIR * ...

FILE: Source/SpireCore/KeyHoleMatching.cpp
  type Spire (line 4) | namespace Spire
    type Compiler (line 6) | namespace Compiler
      function ParseInternal (line 8) | RefPtr<KeyHoleNode> ParseInternal(CoreLib::Text::TokenReader & parser)

FILE: Source/SpireCore/Lexer.cpp
  type Spire (line 8) | namespace Spire
    type Compiler (line 10) | namespace Compiler
      function Token (line 12) | static Token GetEndOfFileToken()
      function Token (line 17) | Token* TokenList::begin() const
      function Token (line 23) | Token* TokenList::end() const
      function Token (line 41) | Token TokenReader::PeekToken() const
      function CodePosition (line 60) | CodePosition TokenReader::PeekLoc() const
      function Token (line 68) | Token TokenReader::AdvanceToken()
      function TokenList (line 82) | TokenList Lexer::Parse(const String & fileName, const String & str, ...

FILE: Source/SpireCore/Lexer.h
  function namespace (line 7) | namespace Spire
  function class (line 65) | class Lexer

FILE: Source/SpireCore/Naming.cpp
  type Spire (line 3) | namespace Spire
    type Compiler (line 5) | namespace Compiler
      function EscapeCodeName (line 9) | CoreLib::String EscapeCodeName(CoreLib::String str)

FILE: Source/SpireCore/Naming.h
  function namespace (line 6) | namespace Spire

FILE: Source/SpireCore/NewSpirVCodeGen.cpp
  type Spire (line 12) | namespace Spire
    type Compiler (line 14) | namespace Compiler
      function PrintILShader (line 16) | void PrintILShader(ILShader * shader)
      class SpirVCodeGen (line 58) | class SpirVCodeGen : public CodeGenBackend
        method CompiledShaderSource (line 61) | virtual CompiledShaderSource GenerateShader(CompileResult & /*resu...
        method LayoutRule (line 68) | LayoutRule GetDefaultLayoutRule() override
      function CodeGenBackend (line 75) | CodeGenBackend * CreateSpirVCodeGen()

FILE: Source/SpireCore/Parser.cpp
  type Spire (line 5) | namespace Spire
    type Compiler (line 7) | namespace Compiler
      class Parser (line 13) | class Parser
        method FillPosition (line 30) | void FillPosition(SyntaxNode * node)
        method PushScope (line 35) | void PushScope(ContainerDecl* containerDecl)
        method PopScope (line 39) | void PopScope()
        method Parser (line 43) | Parser(TokenSpan const& _tokens, DiagnosticSink * sink, String _fi...
        method Parser (line 143) | Parser & operator = (const Parser &) = delete;
      function Unexpected (line 146) | static void Unexpected(
      function Unexpected (line 160) | static void Unexpected(
      function Unexpected (line 176) | static void Unexpected(
      function SkipBalancedToken (line 196) | static CoreLib::Text::TokenType SkipBalancedToken(
      function SkipToMatchingToken (line 213) | static CoreLib::Text::TokenType SkipToMatchingToken(
      function IsClosingToken (line 231) | static bool IsClosingToken(CoreLib::Text::TokenType tokenType)
      function Token (line 248) | Token Parser::ReadToken(const char* expected)
      function Token (line 289) | Token Parser::ReadToken()
      function TryRecover (line 294) | static bool TryRecover(
      function TryRecoverBefore (line 381) | static bool TryRecoverBefore(
      function TryRecover (line 390) | static bool TryRecover(
      function Token (line 398) | Token Parser::ReadToken(CoreLib::Text::TokenType expected)
      function AdvanceIf (line 444) | bool AdvanceIf(Parser* parser, CoreLib::Text::TokenType tokenType)
      function AdvanceIf (line 455) | bool AdvanceIf(Parser* parser, char const* text)
      function AdvanceIfMatch (line 469) | bool AdvanceIfMatch(Parser* parser, CoreLib::Text::TokenType tokenType)
      function Token (line 487) | Token Parser::ReadTypeKeyword()
      function ParseTypeDef (line 511) | RefPtr<TypeDefDecl> ParseTypeDef(Parser* parser)
      function Modifiers (line 530) | static Modifiers ParseModifiers(Parser* parser)
      function ParseUsing (line 658) | static RefPtr<Decl> ParseUsing(
      function Token (line 676) | static Token ParseDeclName(
      type DeclaratorInfo (line 703) | struct DeclaratorInfo
      function ParseFuncDeclHeader (line 710) | static void ParseFuncDeclHeader(
      function ParseFuncDeclHeader (line 733) | static void ParseFuncDeclHeader(
      function ParseFuncDecl (line 756) | static RefPtr<Decl> ParseFuncDecl(
      function CreateVarDeclForContext (line 804) | static RefPtr<VarDeclBase> CreateVarDeclForContext(
      function ParseVarDecl (line 821) | static RefPtr<Decl> ParseVarDecl(
      function ParseDeclaratorDecl (line 879) | static RefPtr<Decl> ParseDeclaratorDecl(
      function ParseDeclWithModifiers (line 911) | static RefPtr<Decl> ParseDeclWithModifiers(
      function ParseDecl (line 957) | static RefPtr<Decl> ParseDecl(
      function ParseDeclBody (line 966) | static void ParseDeclBody(
      type Associativity (line 1601) | enum class Associativity
      function Associativity (line 1606) | Associativity GetAssociativityFromLevel(int level)
      function GetOpLevel (line 1614) | int GetOpLevel(CoreLib::Text::TokenType type)
      function Operator (line 1663) | Operator GetOpFromToken(Token & token)
      function ParseProgram (line 1967) | RefPtr<ProgramSyntaxNode> ParseProgram(

FILE: Source/SpireCore/Parser.h
  function namespace (line 7) | namespace Spire

FILE: Source/SpireCore/Preprocessor.cpp
  type Spire (line 19) | namespace Spire{ namespace Compiler {
    type Compiler (line 19) | namespace Compiler {
      type PreprocessorConditionalState (line 23) | enum class PreprocessorConditionalState
      type PreprocessorConditional (line 32) | struct PreprocessorConditional
      type PreprocessorMacro (line 47) | struct PreprocessorMacro
      type PreprocessorEnvironment (line 49) | struct PreprocessorEnvironment
      type PreprocessorInputStream (line 65) | struct PreprocessorInputStream
      type SourceTextInputStream (line 84) | struct SourceTextInputStream : PreprocessorInputStream
      type MacroExpansion (line 90) | struct MacroExpansion : PreprocessorInputStream
      type ObjectLikeMacroExpansion (line 96) | struct ObjectLikeMacroExpansion : MacroExpansion
      type FunctionLikeMacroExpansion (line 100) | struct FunctionLikeMacroExpansion : MacroExpansion
      type PreprocessorMacroFlavor (line 107) | enum class PreprocessorMacroFlavor
      type PreprocessorMacro (line 118) | struct PreprocessorMacro
      type Preprocessor (line 140) | struct Preprocessor
      function DiagnosticSink (line 161) | static DiagnosticSink* GetSink(Preprocessor* preprocessor)
      function InitializeInputStream (line 178) | static void  InitializeInputStream(Preprocessor* preprocessor, Prepr...
      function DestroyInputStream (line 186) | static void DestroyInputStream(Preprocessor* /*preprocessor*/, Prepr...
      function PreprocessorInputStream (line 193) | static PreprocessorInputStream* CreateInputStreamForSource(Preproces...
      function PushInputStream (line 208) | static void PushInputStream(Preprocessor* preprocessor, Preprocessor...
      function EndInputStream (line 216) | static void EndInputStream(Preprocessor* preprocessor, PreprocessorI...
      function Token (line 237) | static Token AdvanceRawToken(PreprocessorInputStream* inputStream)
      function Token (line 243) | static Token PeekRawToken(PreprocessorInputStream* inputStream)
      function PeekRawTokenType (line 249) | static CoreLib::Text::TokenType PeekRawTokenType(PreprocessorInputSt...
      function Token (line 256) | static Token AdvanceRawToken(Preprocessor* preprocessor)
      function Token (line 288) | static Token PeekRawToken(Preprocessor* preprocessor)
      function PeekSecondRawTokenType (line 320) | CoreLib::Text::TokenType PeekSecondRawTokenType(Preprocessor* prepro...
      function CodePosition (line 365) | static CodePosition PeekLoc(Preprocessor* preprocessor)
      function PeekRawTokenType (line 371) | static CoreLib::Text::TokenType PeekRawTokenType(Preprocessor* prepr...
      function PreprocessorMacro (line 381) | static PreprocessorMacro* CreateMacro(Preprocessor* preprocessor)
      function DestroyMacro (line 393) | static void DestroyMacro(Preprocessor* /*preprocessor*/, Preprocesso...
      function PreprocessorMacro (line 400) | static PreprocessorMacro* LookupMacro(PreprocessorEnvironment* envir...
      function PreprocessorEnvironment (line 412) | static PreprocessorEnvironment* GetCurrentEnvironment(Preprocessor* ...
      function PreprocessorMacro (line 418) | static PreprocessorMacro* LookupMacro(Preprocessor* preprocessor, St...
      function IsMacroBusy (line 425) | static bool IsMacroBusy(PreprocessorMacro* /*macro*/)
      function InitializeMacroExpansion (line 458) | static void InitializeMacroExpansion(
      function PushMacroExpansion (line 469) | static void PushMacroExpansion(
      function AddEndOfStreamToken (line 476) | static void AddEndOfStreamToken(
      function MaybeBeginMacroExpansion (line 488) | static void MaybeBeginMacroExpansion(
      function Token (line 661) | static Token AdvanceToken(Preprocessor* preprocessor)
      function Token (line 715) | static Token PeekToken(Preprocessor* preprocessor)
      function PeekTokenType (line 729) | static CoreLib::Text::TokenType PeekTokenType(Preprocessor* preproce...
      type PreprocessorDirectiveContext (line 744) | struct PreprocessorDirectiveContext
      function Token (line 759) | inline Token const& GetDirective(PreprocessorDirectiveContext* context)
      function String (line 765) | inline String const& GetDirectiveName(PreprocessorDirectiveContext* ...
      function CodePosition (line 771) | inline CodePosition const& GetDirectiveLoc(PreprocessorDirectiveCont...
      function DiagnosticSink (line 777) | static inline DiagnosticSink* GetSink(PreprocessorDirectiveContext* ...
      function CodePosition (line 783) | static CodePosition PeekLoc(PreprocessorDirectiveContext* context)
      function PreprocessorMacro (line 789) | static PreprocessorMacro* LookupMacro(PreprocessorDirectiveContext* ...
      function IsEndOfLine (line 795) | static bool IsEndOfLine(PreprocessorDirectiveContext* context)
      function Token (line 803) | static Token AdvanceRawToken(PreprocessorDirectiveContext* context)
      function Token (line 811) | static Token PeekRawToken(PreprocessorDirectiveContext* context)
      function PeekRawTokenType (line 819) | static CoreLib::Text::TokenType PeekRawTokenType(PreprocessorDirecti...
      function Token (line 827) | static Token AdvanceToken(PreprocessorDirectiveContext* context)
      function Token (line 835) | static Token PeekToken(PreprocessorDirectiveContext* context)
      function PeekTokenType (line 843) | static CoreLib::Text::TokenType PeekTokenType(PreprocessorDirectiveC...
      function SkipToEndOfLine (line 851) | static void SkipToEndOfLine(PreprocessorDirectiveContext* context)
      function ExpectRaw (line 859) | static bool ExpectRaw(PreprocessorDirectiveContext* context, CoreLib...
      function Expect (line 877) | static bool Expect(PreprocessorDirectiveContext* context, CoreLib::T...
      function IsSkipping (line 903) | static bool IsSkipping(Preprocessor* preprocessor)
      function IsSkipping (line 917) | static inline bool IsSkipping(PreprocessorDirectiveContext* context)
      function PreprocessorConditional (line 923) | static PreprocessorConditional* CreateConditional(Preprocessor* /*pr...
      function DestroyConditional (line 931) | static void DestroyConditional(PreprocessorConditional* conditional)
      function BeginConditional (line 937) | static void BeginConditional(PreprocessorDirectiveContext* context, ...
      function PreprocessorExpressionValue (line 983) | static PreprocessorExpressionValue ParseAndEvaluateUnaryExpression(P...
      function GetInfixOpPrecedence (line 1062) | static int GetInfixOpPrecedence(Token const& opToken)
      function PreprocessorExpressionValue (line 1106) | static PreprocessorExpressionValue EvaluateInfixOp(
      function PreprocessorExpressionValue (line 1167) | static PreprocessorExpressionValue ParseAndEvaluateInfixExpressionWi...
      function PreprocessorExpressionValue (line 1219) | static PreprocessorExpressionValue ParseAndEvaluateExpression(Prepro...
      function HandleIfDirective (line 1229) | static void HandleIfDirective(PreprocessorDirectiveContext* context)
      function HandleIfDefDirective (line 1239) | static void HandleIfDefDirective(PreprocessorDirectiveContext* context)
      function HandleIfNDefDirective (line 1252) | static void HandleIfNDefDirective(PreprocessorDirectiveContext* cont...
      function HandleElseDirective (line 1265) | static void HandleElseDirective(PreprocessorDirectiveContext* context)
      function HandleElifDirective (line 1303) | static void HandleElifDirective(PreprocessorDirectiveContext* context)
      function HandleEndIfDirective (line 1343) | static void HandleEndIfDirective(PreprocessorDirectiveContext* context)
      function HandleIncludeDirective (line 1361) | static void HandleIncludeDirective(PreprocessorDirectiveContext* con...
      function HandleDefineDirective (line 1395) | static void HandleDefineDirective(PreprocessorDirectiveContext* cont...
      function HandleUndefDirective (line 1469) | static void HandleUndefDirective(PreprocessorDirectiveContext* context)
      function HandleWarningDirective (line 1493) | static void HandleWarningDirective(PreprocessorDirectiveContext* con...
      function HandleErrorDirective (line 1501) | static void HandleErrorDirective(PreprocessorDirectiveContext* context)
      function HandleLineDirective (line 1509) | static void HandleLineDirective(PreprocessorDirectiveContext* context)
      function HandlePragmaDirective (line 1561) | static void HandlePragmaDirective(PreprocessorDirectiveContext* cont...
      function HandleVersionDirective (line 1569) | static void HandleVersionDirective(PreprocessorDirectiveContext* con...
      type PreprocessorDirectiveFlag (line 1579) | enum PreprocessorDirectiveFlag : unsigned int
      type PreprocessorDirective (line 1586) | struct PreprocessorDirective
      function PreprocessorDirective (line 1622) | static PreprocessorDirective const* FindDirective(String const& name)
      function HandleDirective (line 1638) | static void HandleDirective(PreprocessorDirectiveContext* context)
      function Token (line 1696) | static Token ReadToken(Preprocessor* preprocessor)
      function InitializePreprocessor (line 1738) | static void InitializePreprocessor(
      function FinalizePreprocessor (line 1758) | static void FinalizePreprocessor(
      function DefineMacro (line 1781) | static void DefineMacro(
      function TokenList (line 1804) | static TokenList ReadAllTokens(
      function TokenList (line 1824) | TokenList PreprocessSource(
      function TokenList (line 1845) | TokenList PreprocessSource(

FILE: Source/SpireCore/Preprocessor.h
  function namespace (line 9) | namespace Spire{ namespace Compiler {

FILE: Source/SpireCore/SamplerUsageAnalysis.cpp
  type Spire (line 3) | namespace Spire
    type Compiler (line 5) | namespace Compiler
      function AnalyzeSamplerUsageImpl (line 9) | void AnalyzeSamplerUsageImpl(EnumerableDictionary<ILModuleParameterI...
      function AnalyzeSamplerUsage (line 86) | void AnalyzeSamplerUsage(EnumerableDictionary<ILModuleParameterInsta...

FILE: Source/SpireCore/SamplerUsageAnalysis.h
  function namespace (line 4) | namespace Spire

FILE: Source/SpireCore/Schedule.cpp
  type Spire (line 5) | namespace Spire
    type Compiler (line 7) | namespace Compiler
      class ScheduleParser (line 9) | class ScheduleParser
        method Token (line 16) | Token ReadToken(const char * string)
        method Token (line 31) | Token ReadToken(CoreLib::Text::TokenType type)
        method LookAheadToken (line 46) | bool LookAheadToken(const char * string)
        method ScheduleParser (line 64) | ScheduleParser(DiagnosticSink * sink)
        method Schedule (line 67) | Schedule Parse(String source, String _fileName)
      function Schedule (line 142) | Schedule Schedule::Parse(String source, String fileName, DiagnosticS...

FILE: Source/SpireCore/Schedule.h
  function namespace (line 8) | namespace Spire

FILE: Source/SpireCore/ScopeDictionary.h
  function namespace (line 8) | namespace Spire

FILE: Source/SpireCore/SemanticsVisitor.cpp
  type Spire (line 3) | namespace Spire
    type Compiler (line 5) | namespace Compiler
      function IsNumeric (line 7) | bool IsNumeric(BaseType t)
      function String (line 12) | String GetFullComponentName(ComponentSyntaxNode * comp)
      function String (line 23) | String TranslateHLSLTypeNames(String name)
      class SemanticsVisitor (line 53) | class SemanticsVisitor : public SyntaxVisitor
        method SemanticsVisitor (line 66) | SemanticsVisitor(SymbolTable * symbols, DiagnosticSink * pErr)
        method IsWorldDependent (line 71) | bool IsWorldDependent(PipelineSymbol * pipeline, String world0, St...
        method TranslateTypeNode (line 93) | RefPtr<ExpressionType> TranslateTypeNode(const RefPtr<TypeSyntaxNo...
        method VisitBasicType (line 98) | RefPtr<TypeSyntaxNode> VisitBasicType(BasicTypeSyntaxNode * typeNo...
        method VisitArrayType (line 216) | RefPtr<TypeSyntaxNode> VisitArrayType(ArrayTypeSyntaxNode * typeNo...
        method VisitGenericType (line 225) | RefPtr<TypeSyntaxNode> VisitGenericType(GenericTypeSyntaxNode * ty...
        method VisitPipeline (line 244) | RefPtr<PipelineSyntaxNode> VisitPipeline(PipelineSyntaxNode * pipe...
        method VisitInterface (line 371) | virtual CoreLib::RefPtr<InterfaceSyntaxNode> VisitInterface(Interf...
        method VisitImport (line 391) | virtual RefPtr<ImportSyntaxNode> VisitImport(ImportSyntaxNode * im...
        class ShaderImportVisitor (line 491) | class ShaderImportVisitor : public SyntaxVisitor
          method ShaderImportVisitor (line 498) | ShaderImportVisitor(DiagnosticSink * writer, SymbolTable * symTa...
          method VisitShader (line 501) | virtual RefPtr<ShaderSyntaxNode> VisitShader(ShaderSyntaxNode * ...
          method VisitComponent (line 508) | virtual RefPtr<ComponentSyntaxNode> VisitComponent(ComponentSynt...
          method VisitImport (line 539) | virtual RefPtr<ImportSyntaxNode> VisitImport(ImportSyntaxNode * ...
        method CheckShaderInterfaceRequirements (line 571) | void CheckShaderInterfaceRequirements(ShaderSymbol * shaderSym)
        method VisitShaderPass1 (line 621) | void VisitShaderPass1(ShaderSyntaxNode * shader)
        method VisitShaderPass2 (line 685) | void VisitShaderPass2(ShaderSyntaxNode * shaderNode)
        method MatchType_GenericType (line 699) | bool MatchType_GenericType(String typeName, ExpressionType * value...
        method MatchType_ValueReceiver (line 706) | bool MatchType_ValueReceiver(ExpressionType * receiverType, Expres...
        method VisitComponent (line 728) | virtual RefPtr<ComponentSyntaxNode> VisitComponent(ComponentSyntax...
        method VisitImportStatement (line 770) | virtual RefPtr<StatementSyntaxNode> VisitImportStatement(ImportSta...
        method AddNewComponentSymbol (line 775) | void AddNewComponentSymbol(EnumerableDictionary<String, RefPtr<Sha...
        method VisitProgram (line 846) | virtual RefPtr<ProgramSyntaxNode> VisitProgram(ProgramSyntaxNode *...
        method VisitStruct (line 958) | virtual RefPtr<StructSyntaxNode> VisitStruct(StructSyntaxNode * st...
        method VisitTypeDefDecl (line 967) | virtual RefPtr<TypeDefDecl> VisitTypeDefDecl(TypeDefDecl* decl) ov...
        method VisitFunction (line 973) | virtual RefPtr<FunctionSyntaxNode> VisitFunction(FunctionSyntaxNod...
        method VisitFunctionDeclaration (line 986) | void VisitFunctionDeclaration(FunctionSyntaxNode *functionNode)
        method VisitBlockStatement (line 1019) | virtual RefPtr<StatementSyntaxNode> VisitBlockStatement(BlockState...
        method VisitBreakStatement (line 1027) | virtual RefPtr<StatementSyntaxNode> VisitBreakStatement(BreakState...
        method VisitContinueStatement (line 1033) | virtual RefPtr<StatementSyntaxNode> VisitContinueStatement(Continu...
        method VisitDoWhileStatement (line 1039) | virtual RefPtr<StatementSyntaxNode> VisitDoWhileStatement(DoWhileS...
        method VisitForStatement (line 1055) | virtual RefPtr<StatementSyntaxNode> VisitForStatement(ForStatement...
        method VisitIfStatement (line 1081) | virtual RefPtr<StatementSyntaxNode> VisitIfStatement(IfStatementSy...
        method VisitReturnStatement (line 1097) | virtual RefPtr<StatementSyntaxNode> VisitReturnStatement(ReturnSta...
        method VisitDeclrVariable (line 1127) | virtual RefPtr<Variable> VisitDeclrVariable(Variable* varDecl)
        method VisitWhileStatement (line 1155) | virtual RefPtr<StatementSyntaxNode> VisitWhileStatement(WhileState...
        method VisitExpressionStatement (line 1168) | virtual RefPtr<StatementSyntaxNode> VisitExpressionStatement(Expre...
        method VisitBinaryExpression (line 1173) | virtual RefPtr<ExpressionSyntaxNode> VisitBinaryExpression(BinaryE...
        method VisitConstantExpression (line 1234) | virtual RefPtr<ExpressionSyntaxNode> VisitConstantExpression(Const...
        method VisitIndexExpression (line 1257) | virtual RefPtr<ExpressionSyntaxNode> VisitIndexExpression(IndexExp...
        method MatchArguments (line 1309) | bool MatchArguments(FunctionSyntaxNode * functionNode, List <RefPt...
        method PFuncT (line 1324) | PFuncT FindFunctionOverload(const List<PFuncT> & funcs, const GetP...
        method ShaderComponentSymbol (line 1364) | ShaderComponentSymbol * ResolveFunctionComponent(ShaderSymbol * sh...
        method ShaderComponentSymbol (line 1390) | ShaderComponentSymbol * ResolveFunctionComponent(ShaderSymbol * sh...
        method ResolveFunctionOverload (line 1395) | RefPtr<ExpressionSyntaxNode> ResolveFunctionOverload(InvokeExpress...
        method ResolveFunctionOverload (line 1440) | RefPtr<ExpressionSyntaxNode> ResolveFunctionOverload(InvokeExpress...
        method VisitProject (line 1591) | RefPtr<ExpressionSyntaxNode> VisitProject(ProjectExpressionSyntaxN...
        method ResolveInvoke (line 1608) | RefPtr<ExpressionSyntaxNode> ResolveInvoke(InvokeExpressionSyntaxN...
        method VisitInvokeExpression (line 1627) | virtual RefPtr<ExpressionSyntaxNode> VisitInvokeExpression(InvokeE...
        method String (line 1669) | String OperatorToString(Operator op)
        method VisitUnaryExpression (line 1737) | virtual RefPtr<ExpressionSyntaxNode> VisitUnaryExpression(UnaryExp...
        method VisitVarExpression (line 1759) | virtual RefPtr<ExpressionSyntaxNode> VisitVarExpression(VarExpress...
        method VisitTypeCastExpression (line 1819) | virtual RefPtr<ExpressionSyntaxNode> VisitTypeCastExpression(TypeC...
        method VisitSelectExpression (line 1844) | virtual RefPtr<ExpressionSyntaxNode> VisitSelectExpression(SelectE...
        method VisitMemberExpression (line 1862) | virtual RefPtr<ExpressionSyntaxNode> VisitMemberExpression(MemberE...
        method SemanticsVisitor (line 1990) | SemanticsVisitor & operator = (const SemanticsVisitor &) = delete;
      function SyntaxVisitor (line 1993) | SyntaxVisitor * CreateSemanticsVisitor(SymbolTable * symbols, Diagno...

FILE: Source/SpireCore/ShaderCompiler.cpp
  type Spire (line 26) | namespace Spire
    type Compiler (line 28) | namespace Compiler
      class ShaderCompilerImpl (line 32) | class ShaderCompilerImpl : public ShaderCompiler
        method ResolveAttributes (line 37) | void ResolveAttributes(SymbolTable * symTable)
        method GenerateShaderVariantIR (line 82) | RefPtr<ShaderIR> GenerateShaderVariantIR(CompileResult & cresult, ...
        method ShaderSyntaxNode (line 302) | ShaderSyntaxNode * InstantiateShaderTemplate(DiagnosticSink* sink,...
        method CompileUnit (line 378) | virtual CompileUnit Parse(CompileResult & result, String source, S...
        method Compile (line 385) | virtual void Compile(CompileResult & result, CompilationContext & ...
        method ShaderCompilerImpl (line 592) | ShaderCompilerImpl()
      function ShaderCompiler (line 617) | ShaderCompiler * CreateShaderCompiler()

FILE: Source/SpireCore/ShaderCompiler.h
  type IncludeHandler (line 15) | struct IncludeHandler
  function CompilerMode (line 17) | enum class CompilerMode

FILE: Source/SpireCore/SpirVCodeGen.cpp
  type Spire (line 13) | namespace Spire
    type Compiler (line 15) | namespace Compiler
      type ExecutionModel (line 18) | enum class ExecutionModel
      function String (line 30) | String ExecutionModelToString(ExecutionModel em)
      type ExecutionMode (line 55) | enum class ExecutionMode
      function String (line 70) | String ExecutionModeToString(ExecutionMode em)
      type StorageClass (line 101) | enum class StorageClass
      function String (line 118) | String StorageClassToString(StorageClass store)
      type MemoryAccess (line 151) | enum class MemoryAccess
      function String (line 159) | String MemoryAccessToString(MemoryAccess ma)
      type Decoration (line 176) | enum class Decoration
      function String (line 196) | String DecorationToString(Decoration d)
      type BuiltIn (line 237) | enum class BuiltIn
      function String (line 249) | String BuiltinToString(BuiltIn b)
      type Dim (line 274) | enum class Dim
      function String (line 285) | String DimToString(Dim b)
      type ImageOperands (line 308) | enum class ImageOperands
      function String (line 321) | String ImageOperandsToString(ImageOperands io)
      function GenGLSLstd450InstructionSet (line 348) | Dictionary<String, int> GenGLSLstd450InstructionSet()
      function String (line 393) | String GetFuncOriginalName(const String & name)
      function String (line 406) | String SpirVFloatToString(float v)
      function String (line 414) | String SpirVUIntToString(unsigned int i)
      function GetTypeFromString (line 423) | RefPtr<ILType> GetTypeFromString(String s)
      function GetBaseAlignment (line 430) | int GetBaseAlignment(ILType* Type, int UniformOrBuffer)
      function GetSize (line 464) | int GetSize(ILType* Type, int UniformOrBuffer)
      type IDClass (line 495) | enum class IDClass
      class IDInfo (line 505) | class IDInfo
        method IDInfo (line 520) | IDInfo()
        method IDInfo (line 526) | static IDInfo CreateIDInfoForTypeofValue(int ID, RefPtr<ILType> ty...
        method IDInfo (line 544) | static IDInfo CreateIDInfoForValue(int ID, RefPtr<ILType> typeIL, ...
        method IDInfo (line 561) | static IDInfo CreateIDInfoForPointer(int ID, ILOperand *op, int ty...
        method IDInfo (line 580) | static IDInfo CreateIDInfoForTypeofPointer(int ID, RefPtr<ILType> ...
        method IDInfo (line 594) | static IDInfo CreateIDInfoForFunction(int ID, CompiledFunction * f...
        method IsAvailable (line 604) | bool IsAvailable()
        method GetID (line 608) | int GetID()
        method IDClass (line 613) | IDClass GetClass()
        method IsTypeofValue (line 618) | bool IsTypeofValue()
        method IsValue (line 623) | bool IsValue()
        method IsPointer (line 628) | bool IsPointer()
        method IsTypeofPointer (line 633) | bool IsTypeofPointer()
        method IsFunction (line 638) | bool IsFunction()
        method String (line 643) | String GetVariableName()
        method String (line 648) | String GetTypeName()
        method GetTypeID (line 653) | int GetTypeID()
        method GetBaseTypeID (line 658) | int GetBaseTypeID()
        method GetILType (line 663) | RefPtr<ILType> GetILType()
        method StorageClass (line 668) | StorageClass GetStorageClass()
        method CompiledFunction (line 673) | CompiledFunction * GetFunc()
        method ILOperand (line 679) | ILOperand* GetOp()
      class SpirVCodeBuilder (line 687) | class SpirVCodeBuilder
        method Clear (line 711) | void Clear()
        method Initiate (line 731) | void Initiate()
        method ProduceFunction (line 741) | void ProduceFunction()
        method ProduceWordStream (line 762) | List<unsigned int> ProduceWordStream(int IDBound)
        method String (line 773) | String ProduceTextCode()
        method ProgramHeader (line 783) | void ProgramHeader()
        method OpFunction (line 804) | void OpFunction(const int funcID, const int returnTypeID, const in...
        method OpFunctionParameter (line 819) | void OpFunctionParameter(const int paramID, const int typeID)
        method OpTypeFunction (line 827) | void OpTypeFunction(const int functionTypeID, const int returnType...
        method OpLabel_AtFunctionHeader (line 840) | void OpLabel_AtFunctionHeader(const int label)
        method OpLabel_AtFunctionBody (line 847) | void OpLabel_AtFunctionBody(const int label)
        method OpBranch (line 854) | void OpBranch(const int ID)
        method OpBranchConditional (line 861) | void OpBranchConditional(const int cond, const int tb, const int fb)
        method OpLoopMerge (line 870) | void OpLoopMerge(const int merge, const int cont)
        method OpSelectionMerge (line 879) | void OpSelectionMerge(const int merge)
        method OpPhi (line 887) | void OpPhi(const int ID, const int typeID, const List<int> branches)
        method OpFunctionCall (line 901) | void OpFunctionCall(const int ID, const int typeID, const int func...
        method OpKill (line 915) | void OpKill()
        method OpReturn (line 921) | void OpReturn()
        method OpReturnValue (line 927) | void OpReturnValue(const int ID)
        method OpFunctionEnd (line 934) | void OpFunctionEnd()
        method EncodeString (line 940) | int EncodeString(List<unsigned int> & stream, String S)
        method OpEntryPoint (line 955) | void OpEntryPoint(const ExecutionModel currentExecutionModel, cons...
        method OpExecutionMode (line 973) | void OpExecutionMode(const int entryID, const ExecutionMode mode, ...
        method Decorate (line 996) | int Decorate(const Decoration deco, int op1 = 0)
        method OpDecorate (line 1022) | void OpDecorate(const int ID, const Decoration deco, int op1 = 0)
        method OpMemberDecorate (line 1034) | void OpMemberDecorate(const int ID, const int memberIndex, const D...
        method OpSNegate (line 1047) | void OpSNegate(const int ID, const int typeID, const int valueID)
        method OpFNegate (line 1056) | void OpFNegate(const int ID, const int typeID, const int valueID)
        method OpFAdd (line 1065) | void OpFAdd(const int ID, const int typeID, const int op1, const i...
        method OpFMul (line 1075) | void OpFMul(const int ID, const int typeID, const int op1, const i...
        method OpINotEqual (line 1085) | void OpINotEqual(const int ID, const int typeID, const int id0, co...
        method OpNot (line 1095) | void OpNot(const int ID, const int typeID, const int valueID)
        method OpLogicalNot (line 1104) | void OpLogicalNot(const int ID, const int typeID, const int valueID)
        method OpBinaryInstr (line 1113) | void OpBinaryInstr(const int ID, String opStr, const int typeID, c...
        method OpMatrixTimesScalar (line 1203) | void OpMatrixTimesScalar(const int ID, const int typeID, const int...
        method OpVectorTimesMatrix (line 1213) | void OpVectorTimesMatrix(const int ID, const int typeID, const int...
        method OpMatrixTimesVector (line 1223) | void OpMatrixTimesVector(const int ID, const int typeID, const int...
        method OpMatrixTimesMatrix (line 1233) | void OpMatrixTimesMatrix(const int ID, const int typeID, const int...
        method OpConstantBool (line 1243) | void OpConstantBool(const int typeID, const int ID, const bool b)
        method OpConstantFloat (line 1262) | void OpConstantFloat(const int ID, const int typeID, float f)
        method OpConstantInt (line 1272) | void OpConstantInt(const int ID, const int typeID, int i)
        method OpConstantUInt (line 1281) | void OpConstantUInt(const int ID, const int typeID, const unsigned...
        method OpConstantComposite (line 1292) | void OpConstantComposite(const int ID, const int typeID, const Lis...
        method OpCompositeConstruct (line 1305) | void OpCompositeConstruct(const int ID, const int typeID, const Li...
        method OpCompositeExtract (line 1318) | void OpCompositeExtract(const int ID, const int baseTypeID, const ...
        method OpCompositeInsert (line 1329) | void OpCompositeInsert(const int ID, const int typeID, const int o...
        method OpExtInst (line 1341) | void OpExtInst(const int ID, const int typeID, const int instrNumb...
        method OpStore (line 1357) | void OpStore(const int op0, const int op1)
        method OpLoad (line 1365) | void OpLoad(const int ID, const int typeID, const int variableID, ...
        method OpVariable (line 1378) | void OpVariable(const int ID, const int typeID, StorageClass store)
        method OpAccessChain (line 1402) | void OpAccessChain(const int ID, const int typeID, const int struc...
        method OpImageSampleImplicitLod (line 1413) | void OpImageSampleImplicitLod(
        method OpImageSampleExplicitLod (line 1445) | void OpImageSampleExplicitLod(
        method OpImageSampleDrefImplicitLod (line 1500) | void OpImageSampleDrefImplicitLod(
        method OpImageSampleDrefExplicitLod (line 1519) | void OpImageSampleDrefExplicitLod(
        method OpImageSampleProjDrefImplicitLod (line 1542) | void OpImageSampleProjDrefImplicitLod(
        method OpImageSampleProjDrefExplicitLod (line 1561) | void OpImageSampleProjDrefExplicitLod(
        method OpConvertSToF (line 1584) | void OpConvertSToF(const int ID, const int typeID, const int opera...
        method OpConvertFToS (line 1593) | void OpConvertFToS(const int ID, const int typeID, const int opera...
        method OpConvertFToU (line 1602) | void OpConvertFToU(const int ID, const int typeID, const int opera...
        method OpConvertUToF (line 1611) | void OpConvertUToF(const int ID, const int typeID, const int opera...
        method OpBitCast (line 1620) | void OpBitCast(const int ID, const int typeID, const int operandID)
        method OpTypeVoid (line 1629) | void OpTypeVoid(const int ID)
        method OpTypeBool (line 1636) | void OpTypeBool(const int ID)
        method OpTypeInt (line 1643) | void OpTypeInt(const int ID, const int width, const int signedness)
        method OpTypeFloat (line 1652) | void OpTypeFloat(const int ID, const int width)
        method OpTypeVector (line 1660) | void OpTypeVector(const int ID, const int eleTypeID, const int vec...
        method OpTypeMatrix (line 1669) | void OpTypeMatrix(const int ID, const int colTypeID, const int Dim)
        method OpTypeImage (line 1678) | void OpTypeImage(const int ID, const int sampledTypeID, const Dim ...
        method OpTypeSampledImage (line 1693) | void OpTypeSampledImage(const int ID, const int imageTypeID)
        method OpTypePointer (line 1701) | void OpTypePointer(const int ID, const StorageClass store, const i...
        method OpTypeArray (line 1711) | void OpTypeArray(const int ID, const int elementTypeID, const int ...
        method OpTypeRuntimeArray (line 1720) | void OpTypeRuntimeArray(const int ID, const int elementTypeID)
        method OpTypeStruct (line 1728) | void OpTypeStruct(const int ID, const List<int> & memberIDList)
        method OpDot (line 1741) | void OpDot(const int ID, const int typeID, const int ID0, const in...
        method OpTranspose (line 1752) | void OpTranspose(const int ID, const int typeID, const int Op0)
        method OpDPdx (line 1762) | void OpDPdx(const int ID, const int typeID, const int Op0)
        method OpDPdy (line 1772) | void OpDPdy(const int ID, const int typeID, const int Op0)
        method OpFwidth (line 1782) | void OpFwidth(const int ID, const int typeID, const int Op0)
        method OpName (line 1792) | void OpName(int ID, String Name)
        method OpMemberName (line 1803) | void OpMemberName(int ID, int index, String Name)
      class SpirVCodeGenContext (line 1816) | class SpirVCodeGenContext
        method Clear (line 1847) | void Clear()
        method ClearBuffer (line 1872) | void ClearBuffer()
        method PushScope (line 1880) | void PushScope()
        method PopScope (line 1886) | void PopScope()
        method UpdateVariable (line 1892) | void UpdateVariable(ILOperand* op, int id)
        method FindVariableID (line 1899) | int FindVariableID(ILOperand* op)
        method UpdateValue (line 1914) | void UpdateValue(ILOperand *op, int id)
        method FindValueID (line 1921) | int FindValueID(ILOperand *op)
        method InvalidateValue (line 1933) | void InvalidateValue(ILOperand *op)
        method DefineBasicType (line 1939) | int DefineBasicType(RefPtr<ILType> Type)
        method DefineType (line 2091) | int DefineType(RefPtr<ILType> Type, int UniformOrBuffer = 0)
        method DefineTypePointer (line 2205) | int DefineTypePointer(RefPtr<ILType> Type, StorageClass store, int...
        method AddInstrTypeFunction (line 2219) | int AddInstrTypeFunction(CompiledFunction * func, const List<RefPt...
        method AddInstrConstantBool (line 2237) | int AddInstrConstantBool(int value)
        method AddInstrConstantFloat (line 2251) | int AddInstrConstantFloat(float f)
        method AddInstrConstantInt (line 2261) | int AddInstrConstantInt(int i)
        method AddInstrConstantUInt (line 2275) | int AddInstrConstantUInt(unsigned int i)
        method AddInstrConstantCompositeFloat (line 2289) | int AddInstrConstantCompositeFloat(float *f, int len)
        method AddInstrConstantCompositeInt (line 2313) | int AddInstrConstantCompositeInt(int *v, int len)
        method AddInstrConstantCompositeUInt (line 2337) | int AddInstrConstantCompositeUInt(unsigned int *v, int len)
        method AddInstrConstantMatrix (line 2361) | int AddInstrConstantMatrix(float *f, int n)
        method AddInstrCompositeConstruct (line 2383) | int AddInstrCompositeConstruct(ILOperand* op, RefPtr<ILType> Type,...
        method AddInstrCompositeExtract (line 2394) | int AddInstrCompositeExtract(int ID, RefPtr<ILType> baseType, int ...
        method AddInstrCompositeInsert (line 2403) | int AddInstrCompositeInsert(RefPtr<ILType> Type, int ID, int index...
        method AddInstrExtInst (line 2413) | int AddInstrExtInst(ILOperand* op, RefPtr<ILType> Type, int instrN...
        method AddInstrStore (line 2423) | void AddInstrStore(ILOperand *op, int op0, int op1) {
        method AddInstrVariableDeclaration (line 2429) | int AddInstrVariableDeclaration(ILOperand *op, RefPtr<ILType> type...
        method AddInstrAccessChain_VectorMember (line 2442) | int AddInstrAccessChain_VectorMember(ILOperand *op, int ID, int in...
        method AddInstrAccessChain_StructMember (line 2501) | int AddInstrAccessChain_StructMember(ILOperand *op, int ID, int in...
        method AddInstrAccessChain_StructMember (line 2531) | int AddInstrAccessChain_StructMember(ILOperand *op, String memberN...
        method AddInstrAccessChain_StructMember (line 2545) | int AddInstrAccessChain_StructMember(ILOperand *op, int structID, ...
        method AddInstrAccessChain_ArrayMember (line 2558) | int AddInstrAccessChain_ArrayMember(ILOperand *op, RefPtr<ILType> ...
        method AddInstrLoad (line 2581) | int AddInstrLoad(int variableID, MemoryAccess ma)
        method AddInstrLoad (line 2596) | int AddInstrLoad(ILOperand *op, ILOperand *targetOp, MemoryAccess ma)
        method AddInstrINotEqual (line 2614) | int AddInstrINotEqual(int id0, int id1)
        method AddInstrTexture (line 2630) | int AddInstrTexture(
        method AddInstrTextureShadow (line 2665) | int AddInstrTextureShadow(
        method AddInstrTexture2DShadowProj (line 2700) | int AddInstrTexture2DShadowProj(
        method AddInstrConvertSToF (line 2736) | int AddInstrConvertSToF(int destTypeID, int operandID)
        method AddInstrConvertFToS (line 2749) | int AddInstrConvertFToS(int destTypeID, int operandID)
        method AddInstrConvertUToF (line 2762) | int AddInstrConvertUToF(int destTypeID, int operandID)
        method AddInstrConvertFToU (line 2775) | int AddInstrConvertFToU(int destTypeID, int operandID)
        method AddInstrConvertSToU (line 2788) | int AddInstrConvertSToU(int destTypeID, int operandID)
        method AddInstrConvertUToS (line 2801) | int AddInstrConvertUToS(int destTypeID, int operandID)
        method AddInstrBitcast (line 2814) | int AddInstrBitcast(int destTypeID, int operandID)
        method AddInstrFunctionCall (line 2827) | int AddInstrFunctionCall(ILOperand *op, int typeID, int funcID, Li...
        method AddInstrFnegate (line 2841) | int AddInstrFnegate(ILOperand *op, int typeID, int valueID)
        method AddInstrSnegate (line 2855) | int AddInstrSnegate(ILOperand *op, int typeID, int valueID)
        method AddInstrNot (line 2869) | int AddInstrNot(ILOperand *op, int typeID, int valueID)
        method AddInstrLogicalNot (line 2883) | int AddInstrLogicalNot(ILOperand *op, int typeID, int valueID)
        method AddInstrMatrixTimesScalar (line 2897) | int AddInstrMatrixTimesScalar(ILOperand *op, int ID0, int ID1)
        method AddInstrVectorTimesMatrix (line 2911) | int AddInstrVectorTimesMatrix(ILOperand *op, int ID0, int ID1)
        method AddInstrMatrixTimesVector (line 2925) | int AddInstrMatrixTimesVector(ILOperand *op, int ID0, int ID1)
        method AddInstrMatrixTimesMatrix (line 2939) | int AddInstrMatrixTimesMatrix(ILOperand *op, int ID0, int ID1)
        method AddInstrBinaryInstr (line 2953) | int AddInstrBinaryInstr(ILOperand *op, RefPtr<ILType> instrType, c...
        method AddInstrMulAdd (line 2963) | int AddInstrMulAdd(int operandID, float mul, float add)
        method ConvertBasicType (line 2986) | int ConvertBasicType(int operandID, RefPtr<ILType> srcType, RefPtr...
        method AddInstrSelectionMerge (line 3109) | void AddInstrSelectionMerge(int MergeLabel) {
        method AddInstrBranchConditional (line 3113) | void AddInstrBranchConditional(int ID, int TrueLabel, int FalseLabel)
        method AddInstrLabel_AtFunctionBody (line 3118) | void AddInstrLabel_AtFunctionBody(int Label) {
        method AddInstrLabel_AtFunctionHeader (line 3122) | void AddInstrLabel_AtFunctionHeader(int Label)
        method AddInstrBranch (line 3127) | void AddInstrBranch(int Target)
        method AddInstrPhi (line 3132) | int AddInstrPhi(ILOperand *op, int ID1, int Label1, int ID2, int L...
        method AddInstrLoopMerge (line 3152) | void AddInstrLoopMerge(int MergeLabel, int ContinueLabel)
        method AddInstrReturnValue (line 3157) | void AddInstrReturnValue(int operandID)
        method AddInstrKill (line 3162) | void AddInstrKill()
        method AddInstrDecorate (line 3167) | void AddInstrDecorate(int ID, Decoration deco, int ID1 = 0)
        method AddInstrMemberDecorate (line 3172) | void AddInstrMemberDecorate(int ID, int index, Decoration deco, in...
        method AddInstrFunction (line 3177) | void AddInstrFunction(int funcID, int returnTypeID, int funcTypeID...
        method AddInstrFunctionParameter (line 3183) | void AddInstrFunctionParameter(ILOperand *op, int typeID, String D...
        method AddInstrReturn (line 3200) | void AddInstrReturn()
        method AddInstrFunctionEnd (line 3205) | void AddInstrFunctionEnd()
        method AddInstrEntryPoint (line 3210) | void AddInstrEntryPoint(ExecutionModel EM, int entryID, const List...
        method AddInstrExecutionMode (line 3215) | void AddInstrExecutionMode(int ID, ExecutionMode mode, int op1 = -...
        method AddInstrDot (line 3220) | int AddInstrDot(ILOperand *op, RefPtr<ILType> typeIL, int ID0, int...
        method AddInstrTranspose (line 3235) | int AddInstrTranspose(ILOperand *op, RefPtr<ILType> typeIL, int ID)
        method AddInstrDFdx (line 3250) | int AddInstrDFdx(ILOperand *op, RefPtr<ILType> typeIL, int ID)
        method AddInstrDFdy (line 3265) | int AddInstrDFdy(ILOperand *op, RefPtr<ILType> typeIL, int ID)
        method AddInstrFwidth (line 3280) | int AddInstrFwidth(ILOperand *op, RefPtr<ILType> typeIL, int ID)
        method ProduceFunction (line 3295) | void ProduceFunction()
        method ProduceWordStream (line 3300) | List<unsigned int> ProduceWordStream()
        method String (line 3305) | String ProduceTextCode()
      class SpirvModule (line 3313) | class SpirvModule
        method GetOperandValue (line 3324) | int GetOperandValue(ILOperand * op)
        method GetOperandPointer (line 3411) | int GetOperandPointer(ILOperand * op)
        method PrintAllocVarInstr (line 3439) | void PrintAllocVarInstr(AllocVarInstruction * instr, StorageClass ...
        method PrintCallInstr (line 3451) | void PrintCallInstr(CallInstruction * instr)
        method PrintUnaryInstr (line 3683) | void PrintUnaryInstr(UnaryInstruction * instr)
        method PrintBinaryInstr (line 3724) | void PrintBinaryInstr(BinaryInstruction * instr)
        method PrintUpdateInstr (line 4037) | void PrintUpdateInstr(MemberUpdateInstruction * instr)
        method PrintSelectInstr (line 4078) | void PrintSelectInstr(SelectInstruction * instr)
        method PrintFetchArgInstr (line 4108) | void PrintFetchArgInstr(FetchArgInstruction * instr)
        method PrintExportInstr (line 4116) | void PrintExportInstr(ExportInstruction * instr)
        method PrintImportInstr (line 4229) | void PrintImportInstr(ImportInstruction * instr)
        method PrintInstr (line 4388) | void PrintInstr(ILInstruction & instr)
        method PrintIf (line 4419) | void PrintIf(IfInstruction * instr)
        method PrintFor (line 4450) | void PrintFor(ForInstruction * instr)
        method PrintWhileDo (line 4498) | void PrintWhileDo(WhileInstruction * instr)
        method PrintDoWhile (line 4545) | void PrintDoWhile(DoInstruction * instr)
        method GenerateCode (line 4588) | void GenerateCode(CFGNode * code, int givenLabel = -1, bool LoopRe...
        method Initiate (line 4653) | void Initiate(ExecutionModel model, CompiledWorld * shaderWorld)
        method GenerateFunctionDeclaration (line 4669) | int GenerateFunctionDeclaration(CompiledFunction *func)
        method GenerateFunctionDefinition (line 4684) | int GenerateFunctionDefinition(CompiledFunction *func, ILOperand *...
        method Decorate (line 4735) | void Decorate(int ID, Decoration deco, int op1 = -1)
        method MemberDecorate (line 4740) | void MemberDecorate(int ID, int index, Decoration deco, int op1 = -1)
        method SetDepthReplacing (line 4745) | void SetDepthReplacing()
        method SetLocalSize (line 4750) | void SetLocalSize(unsigned int x)
        method GenerateEntryPoint (line 4762) | void GenerateEntryPoint(int mainFunctionID)
        method GenerateGlGlobalInvocationID (line 4779) | int GenerateGlGlobalInvocationID()
        method GenerateInterfaceForSingleVariable (line 4788) | int GenerateInterfaceForSingleVariable(
        method GenerateInterfaceForStructVariable (line 4810) | std::pair<int,int> GenerateInterfaceForStructVariable(
        method CompiledShaderSource (line 4869) | CompiledShaderSource GenerateShaderWorld()
      class SpirVCodeGen (line 4883) | class SpirVCodeGen : public CodeGenBackend
        method ProcessBufferImportOrExportInterfaces (line 4892) | void ProcessBufferImportOrExportInterfaces(SpirvModule & spvModule...
        method CompiledShaderSource (line 4932) | virtual CompiledShaderSource GenerateShaderWorld(CompileResult & r...
        method SetParameters (line 5483) | virtual void SetParameters(const EnumerableDictionary<String, Stri...
      function CodeGenBackend (line 5491) | CodeGenBackend * CreateSpirVCodeGen()

FILE: Source/SpireCore/StdInclude.cpp
  type Spire (line 290) | namespace Spire
    type Compiler (line 292) | namespace Compiler
      function String (line 296) | String SpireStdLib::GetCode()

FILE: Source/SpireCore/StdInclude.h
  function namespace (line 6) | namespace Spire

FILE: Source/SpireCore/StringObject.h
  function namespace (line 6) | namespace Spire

FILE: Source/SpireCore/SymbolTable.cpp
  type Spire (line 4) | namespace Spire
    type Compiler (line 6) | namespace Compiler
      function String (line 412) | String PrintType(RefPtr<ExpressionType> type, String recordReplaceStr)
      function Decl (line 507) | Decl* SymbolTable::LookUp(String const& name)

FILE: Source/SpireCore/SymbolTable.h
  function namespace (line 11) | namespace Compiler
  function class (line 41) | class ShaderComponentSymbol : public RefObject

FILE: Source/SpireCore/Syntax.cpp
  type Spire (line 7) | namespace Spire
    type Compiler (line 9) | namespace Compiler
      function Decl (line 13) | Decl* Scope::LookUp(String const& name)
      function SpecializeModifier (line 67) | SpecializeModifier * Decl::FindSpecializeModifier()
      function ExpressionType (line 89) | ExpressionType* BasicExpressionType::CreateCanonicalType()
      function BindableResourceType (line 95) | BindableResourceType BasicExpressionType::GetBindableResourceType() ...
      function ExpressionType (line 220) | ExpressionType * BasicExpressionType::Clone()
      function ProgramSyntaxNode (line 231) | ProgramSyntaxNode * ProgramSyntaxNode::Clone(CloneContext & ctx)
      function FunctionSyntaxNode (line 243) | FunctionSyntaxNode * FunctionSyntaxNode::Clone(CloneContext & ctx)
      function ScopeDecl (line 262) | ScopeDecl* ScopeDecl::Clone(CloneContext & ctx)
      function BlockStatementSyntaxNode (line 279) | BlockStatementSyntaxNode * BlockStatementSyntaxNode::Clone(CloneCont...
      function BreakStatementSyntaxNode (line 293) | BreakStatementSyntaxNode * BreakStatementSyntaxNode::Clone(CloneCont...
      function ContinueStatementSyntaxNode (line 301) | ContinueStatementSyntaxNode * ContinueStatementSyntaxNode::Clone(Clo...
      function DoWhileStatementSyntaxNode (line 309) | DoWhileStatementSyntaxNode * DoWhileStatementSyntaxNode::Clone(Clone...
      function EmptyStatementSyntaxNode (line 322) | EmptyStatementSyntaxNode * EmptyStatementSyntaxNode::Clone(CloneCont...
      function ForStatementSyntaxNode (line 330) | ForStatementSyntaxNode * ForStatementSyntaxNode::Clone(CloneContext ...
      function IfStatementSyntaxNode (line 347) | IfStatementSyntaxNode * IfStatementSyntaxNode::Clone(CloneContext & ...
      function ReturnStatementSyntaxNode (line 362) | ReturnStatementSyntaxNode * ReturnStatementSyntaxNode::Clone(CloneCo...
      function VarDeclrStatementSyntaxNode (line 373) | VarDeclrStatementSyntaxNode * VarDeclrStatementSyntaxNode::Clone(Clo...
      function Variable (line 383) | Variable * Variable::Clone(CloneContext & ctx)
      function WhileStatementSyntaxNode (line 394) | WhileStatementSyntaxNode * WhileStatementSyntaxNode::Clone(CloneCont...
      function ExpressionStatementSyntaxNode (line 407) | ExpressionStatementSyntaxNode * ExpressionStatementSyntaxNode::Clone...
      function BinaryExpressionSyntaxNode (line 418) | BinaryExpressionSyntaxNode * BinaryExpressionSyntaxNode::Clone(Clone...
      function ConstantExpressionSyntaxNode (line 429) | ConstantExpressionSyntaxNode * ConstantExpressionSyntaxNode::Clone(C...
      function IndexExpressionSyntaxNode (line 433) | IndexExpressionSyntaxNode * IndexExpressionSyntaxNode::Clone(CloneCo...
      function MemberExpressionSyntaxNode (line 448) | MemberExpressionSyntaxNode * MemberExpressionSyntaxNode::Clone(Clone...
      function InvokeExpressionSyntaxNode (line 458) | InvokeExpressionSyntaxNode * InvokeExpressionSyntaxNode::Clone(Clone...
      function TypeCastExpressionSyntaxNode (line 473) | TypeCastExpressionSyntaxNode * TypeCastExpressionSyntaxNode::Clone(C...
      function SelectExpressionSyntaxNode (line 484) | SelectExpressionSyntaxNode * SelectExpressionSyntaxNode::Clone(Clone...
      function UnaryExpressionSyntaxNode (line 496) | UnaryExpressionSyntaxNode * UnaryExpressionSyntaxNode::Clone(CloneCo...
      function VarExpressionSyntaxNode (line 506) | VarExpressionSyntaxNode * VarExpressionSyntaxNode::Clone(CloneContex...
      function ParameterSyntaxNode (line 514) | ParameterSyntaxNode * ParameterSyntaxNode::Clone(CloneContext & ctx)
      function ComponentSyntaxNode (line 529) | ComponentSyntaxNode * ComponentSyntaxNode::Clone(CloneContext & ctx)
      function ShaderSyntaxNode (line 545) | ShaderSyntaxNode * ShaderSyntaxNode::Clone(CloneContext & ctx)
      function UsingFileDecl (line 561) | UsingFileDecl* UsingFileDecl::Clone(CloneContext & ctx)
      function RateSyntaxNode (line 568) | RateSyntaxNode * RateSyntaxNode::Clone(CloneContext & ctx)
      function WorldSyntaxNode (line 572) | WorldSyntaxNode * WorldSyntaxNode::Clone(CloneContext & ctx)
      function ImportOperatorDefSyntaxNode (line 580) | ImportOperatorDefSyntaxNode * ImportOperatorDefSyntaxNode::Clone(Clo...
      function PipelineSyntaxNode (line 584) | PipelineSyntaxNode * PipelineSyntaxNode::Clone(CloneContext & ctx)
      function ChoiceValueSyntaxNode (line 592) | ChoiceValueSyntaxNode * ChoiceValueSyntaxNode::Clone(CloneContext & ...
      function ImportSyntaxNode (line 600) | ImportSyntaxNode * ImportSyntaxNode::Clone(CloneContext & ctx)
      function ImportArgumentSyntaxNode (line 612) | ImportArgumentSyntaxNode * ImportArgumentSyntaxNode::Clone(CloneCont...
      function ImportStatementSyntaxNode (line 622) | ImportStatementSyntaxNode * ImportStatementSyntaxNode::Clone(CloneCo...
      function TypeDefDecl (line 642) | TypeDefDecl* TypeDefDecl::Clone(CloneContext & ctx)
      function DiscardStatementSyntaxNode (line 652) | DiscardStatementSyntaxNode * DiscardStatementSyntaxNode::Clone(Clone...
      function BasicExpressionType (line 692) | BasicExpressionType * ExpressionType::AsBasicType() const
      function ArrayExpressionType (line 697) | ArrayExpressionType * ExpressionType::AsArrayType() const
      function GenericExpressionType (line 702) | GenericExpressionType * ExpressionType::AsGenericType() const
      function NamedExpressionType (line 707) | NamedExpressionType* ExpressionType::AsNamedType() const
      function ExpressionType (line 712) | ExpressionType* ExpressionType::GetCanonicalType() const
      function ExpressionType (line 835) | ExpressionType* ArrayExpressionType::CreateCanonicalType()
      function ExpressionType (line 851) | ExpressionType * ArrayExpressionType::Clone()
      function ExpressionType (line 872) | ExpressionType* GenericExpressionType::CreateCanonicalType()
      function BindableResourceType (line 881) | BindableResourceType GenericExpressionType::GetBindableResourceType(...
      function ExpressionType (line 893) | ExpressionType * GenericExpressionType::Clone()
      function String (line 902) | String NamedExpressionType::ToString() const
      function ExpressionType (line 907) | ExpressionType * NamedExpressionType::Clone()
      function BindableResourceType (line 914) | BindableResourceType NamedExpressionType::GetBindableResourceType() ...
      function NamedExpressionType (line 925) | NamedExpressionType * NamedExpressionType::AsNamedTypeImpl() const
      function ExpressionType (line 930) | ExpressionType* NamedExpressionType::CreateCanonicalType()
      function ImportExpressionSyntaxNode (line 939) | ImportExpressionSyntaxNode * ImportExpressionSyntaxNode::Clone(Clone...
      function StageSyntaxNode (line 949) | StageSyntaxNode * StageSyntaxNode::Clone(CloneContext &)
      function String (line 963) | String GetOperatorFunctionName(Operator op)
      function ProjectExpressionSyntaxNode (line 1033) | ProjectExpressionSyntaxNode * ProjectExpressionSyntaxNode::Clone(Clo...
      function InterfaceSyntaxNode (line 1043) | InterfaceSyntaxNode * InterfaceSyntaxNode::Clone(CloneContext & ctx)
      function TemplateShaderSyntaxNode (line 1055) | TemplateShaderSyntaxNode * TemplateShaderSyntaxNode::Clone(CloneCont...
      function TemplateShaderParameterSyntaxNode (line 1065) | TemplateShaderParameterSyntaxNode * TemplateShaderParameterSyntaxNod...

FILE: Source/SpireCore/Syntax.h
  function namespace (line 8) | namespace Spire
  type Iterator (line 136) | struct Iterator
  function current (line 156) | current(nullptr)
  function current (line 160) | current(modifier)
  function modifiers (line 165) | modifiers(nullptr)
  function modifiers (line 169) | modifiers(Adjust(modifiers))
  function Iterator (line 172) | Iterator begin() { return Iterator(modifiers); }
  function Iterator (line 173) | Iterator end() { return Iterator(nullptr); }
  function Modifier (line 175) | static Modifier* Adjust(Modifier* modifier)
  type class (line 189) | enum class
  function IsVector (line 215) | inline bool IsVector(BaseType type)
  function GetVectorSize (line 220) | inline int GetVectorSize(BaseType type)
  function BaseType (line 225) | inline BaseType GetVectorBaseType(BaseType type)
  function class (line 243) | class ExpressionType : public RefObject
  function class (line 302) | class BasicExpressionType : public ExpressionType
  function virtual (line 336) | virtual CoreLib::Basic::String ToString() const override;
  function virtual (line 394) | virtual String ToString() const override;
  function class (line 416) | class Scope : public RefObject
  function class (line 429) | class CloneContext
  function class (line 435) | class SyntaxNode : public RefObject
  function class (line 468) | class TypeSyntaxNode : public SyntaxNode
  function class (line 474) | class BasicTypeSyntaxNode : public TypeSyntaxNode
  function class (line 485) | class ArrayTypeSyntaxNode : public TypeSyntaxNode
  function class (line 499) | class GenericTypeSyntaxNode : public TypeSyntaxNode
  function class (line 516) | class Decl : public SyntaxNode
  type RefPtr (line 541) | typedef RefPtr<Decl> Element;
  function explicit (line 548) | explicit FilteredMemberList(
  type Iterator (line 554) | struct Iterator
  function class (line 659) | class SpecializeModifier : public Modifier
  function class (line 671) | class VarDeclBase : public Decl
  function class (line 685) | class StructField : public VarDeclBase
  function class (line 700) | class StructSyntaxNode : public ContainerDecl
  function FindFieldIndex (line 719) | int FindFieldIndex(String name)
  function class (line 792) | class FunctionDeclBase : public ContainerDecl
  function class (line 802) | class FunctionSyntaxNode : public FunctionDeclBase
  function class (line 820) | class ImportOperatorDefSyntaxNode : public FunctionDeclBase
  function class (line 831) | class ChoiceValueSyntaxNode : public ExpressionSyntaxNode
  function class (line 839) | class VarExpressionSyntaxNode : public ExpressionSyntaxNode
  type class (line 850) | enum class
  type class (line 864) | enum class
  function class (line 880) | class ImportExpressionSyntaxNode : public ExpressionSyntaxNode
  function class (line 891) | class ProjectExpressionSyntaxNode : public ExpressionSyntaxNode
  function class (line 899) | class UnaryExpressionSyntaxNode : public ExpressionSyntaxNode
  function class (line 908) | class BinaryExpressionSyntaxNode : public ExpressionSyntaxNode
  function class (line 918) | class IndexExpressionSyntaxNode : public ExpressionSyntaxNode
  function class (line 927) | class MemberExpressionSyntaxNode : public ExpressionSyntaxNode
  function class (line 936) | class InvokeExpressionSyntaxNode : public ExpressionSyntaxNode
  function class (line 945) | class TypeCastExpressionSyntaxNode : public ExpressionSyntaxNode
  function class (line 954) | class SelectExpressionSyntaxNode : public ExpressionSyntaxNode
  function class (line 963) | class EmptyStatementSyntaxNode : public StatementSyntaxNode
  function class (line 970) | class DiscardStatementSyntaxNode : public StatementSyntaxNode
  function VarDeclBase (line 977) | struct Variable : public VarDeclBase
  function class (line 983) | class VarDeclrStatementSyntaxNode : public StatementSyntaxNode
  function class (line 991) | class RateWorld
  function class (line 1004) | class RateSyntaxNode : public SyntaxNode
  function class (line 1015) | class ComponentSyntaxNode : public ContainerDecl
  function class (line 1038) | class WorldSyntaxNode : public Decl
  function class (line 1046) | class StageSyntaxNode : public Decl
  function class (line 1056) | class ShaderDeclBase : public ContainerDecl
  function class (line 1063) | class PipelineSyntaxNode : public ShaderDeclBase
  function class (line 1087) | class ImportArgumentSyntaxNode : public SyntaxNode
  function class (line 1096) | class ImportSyntaxNode : public Decl
  function class (line 1109) | class TemplateShaderParameterSyntaxNode : public SyntaxNode
  function class (line 1117) | class TemplateShaderSyntaxNode : public ShaderDeclBase
  function class (line 1125) | class ShaderSyntaxNode : public ShaderDeclBase
  function class (line 1134) | class InterfaceSyntaxNode : public ShaderDeclBase
  function class (line 1146) | class UsingFileDecl : public Decl
  function class (line 1155) | class ProgramSyntaxNode : public ContainerDecl
  function class (line 1195) | class ImportStatementSyntaxNode : public StatementSyntaxNode
  function class (line 1203) | class IfStatementSyntaxNode : public StatementSyntaxNode
  function class (line 1213) | class ForStatementSyntaxNode : public ScopeStmt
  function class (line 1223) | class WhileStatementSyntaxNode : public StatementSyntaxNode
  function class (line 1232) | class DoWhileStatementSyntaxNode : public StatementSyntaxNode
  function class (line 1241) | class BreakStatementSyntaxNode : public StatementSyntaxNode
  function class (line 1248) | class ContinueStatementSyntaxNode : public StatementSyntaxNode
  function class (line 1255) | class ReturnStatementSyntaxNode : public StatementSyntaxNode
  function class (line 1263) | class ExpressionStatementSyntaxNode : public StatementSyntaxNode
  function DiagnosticSink (line 1275) | DiagnosticSink* getSink() { return sink; }
  function virtual (line 1280) | virtual RefPtr<ProgramSyntaxNode> VisitProgram(ProgramSyntaxNode* program)
  function virtual (line 1293) | virtual RefPtr<UsingFileDecl> VisitUsingFileDecl(UsingFileDecl * decl)
  function virtual (line 1299) | virtual RefPtr<FunctionSyntaxNode> VisitFunction(FunctionSyntaxNode* func)
  function virtual (line 1320) | virtual RefPtr<TypeDefDecl> VisitTypeDefDecl(TypeDefDecl* decl)
  function virtual (line 1325) | virtual RefPtr<StatementSyntaxNode> VisitDiscardStatement(DiscardStateme...
  function virtual (line 1329) | virtual RefPtr<StructField> VisitStructField(StructField * f)
  function virtual (line 1334) | virtual RefPtr<StatementSyntaxNode> VisitBlockStatement(BlockStatementSy...
  function virtual (line 1357) | virtual RefPtr<StatementSyntaxNode> VisitEmptyStatement(EmptyStatementSy...
  function virtual (line 1361) | virtual RefPtr<StatementSyntaxNode> VisitForStatement(ForStatementSyntax...
  function virtual (line 1373) | virtual RefPtr<StatementSyntaxNode> VisitIfStatement(IfStatementSyntaxNo...
  function virtual (line 1383) | virtual RefPtr<StatementSyntaxNode> VisitReturnStatement(ReturnStatement...
  function virtual (line 1389) | virtual RefPtr<StatementSyntaxNode> VisitVarDeclrStatement(VarDeclrState...
  function virtual (line 1394) | virtual RefPtr<StatementSyntaxNode> VisitWhileStatement(WhileStatementSy...
  function virtual (line 1402) | virtual RefPtr<StatementSyntaxNode> VisitExpressionStatement(ExpressionS...
  function virtual (line 1409) | virtual RefPtr<ExpressionSyntaxNode> VisitBinaryExpression(BinaryExpress...
  function virtual (line 1417) | virtual RefPtr<ExpressionSyntaxNode> VisitConstantExpression(ConstantExp...
  function virtual (line 1421) | virtual RefPtr<ExpressionSyntaxNode> VisitIndexExpression(IndexExpressio...
  function virtual (line 1429) | virtual RefPtr<ExpressionSyntaxNode> VisitMemberExpression(MemberExpress...
  function virtual (line 1435) | virtual RefPtr<ExpressionSyntaxNode> VisitInvokeExpression(InvokeExpress...
  function virtual (line 1450) | virtual RefPtr<ExpressionSyntaxNode> VisitTypeCastExpression(TypeCastExp...
  function virtual (line 1456) | virtual RefPtr<ExpressionSyntaxNode> VisitSelectExpression(SelectExpress...
  function virtual (line 1466) | virtual RefPtr<ExpressionSyntaxNode> VisitUnaryExpression(UnaryExpressio...
  function virtual (line 1472) | virtual RefPtr<ExpressionSyntaxNode> VisitVarExpression(VarExpressionSyn...
  function virtual (line 1476) | virtual RefPtr<PipelineSyntaxNode> VisitPipeline(PipelineSyntaxNode * pipe)
  function virtual (line 1487) | virtual RefPtr<ParameterSyntaxNode> VisitParameter(ParameterSyntaxNode* ...
  function virtual (line 1491) | virtual RefPtr<TypeSyntaxNode> VisitBasicType(BasicTypeSyntaxNode* type)
  function virtual (line 1495) | virtual RefPtr<TypeSyntaxNode> VisitArrayType(ArrayTypeSyntaxNode* type)
  function virtual (line 1499) | virtual RefPtr<TypeSyntaxNode> VisitGenericType(GenericTypeSyntaxNode* t...
  function virtual (line 1504) | virtual RefPtr<Variable> VisitDeclrVariable(Variable* dclr)
  function virtual (line 1510) | virtual RefPtr<ImportSyntaxNode> VisitImport(ImportSyntaxNode* imp)
  function virtual (line 1523) | virtual RefPtr<ImportArgumentSyntaxNode> VisitImportArgument(ImportArgum...
  function virtual (line 1529) | virtual RefPtr<ExpressionSyntaxNode> VisitProject(ProjectExpressionSynta...
  function virtual (line 1535) | virtual RefPtr<InterfaceSyntaxNode> VisitInterface(InterfaceSyntaxNode *...

FILE: Source/SpireCore/SyntaxVisitors.h
  function namespace (line 9) | namespace Spire

FILE: Source/SpireCore/TypeLayout.cpp
  type Spire (line 9) | namespace Spire {
    type Compiler (line 10) | namespace Compiler {
      function RoundToAlignment (line 12) | size_t RoundToAlignment(size_t offset, size_t alignment)
      function RoundUpToPowerOfTwo (line 21) | static size_t RoundUpToPowerOfTwo( size_t value )
      type DefaultLayoutRulesImpl (line 30) | struct DefaultLayoutRulesImpl : LayoutRulesImpl
        method LayoutInfo (line 33) | LayoutInfo GetScalarLayout(BaseType baseType) override
        method LayoutInfo (line 76) | LayoutInfo GetScalarLayout(ILBaseType baseType) override
        method LayoutInfo (line 116) | LayoutInfo GetArrayLayout(LayoutInfo elementInfo, size_t elementCo...
        method LayoutInfo (line 124) | LayoutInfo GetVectorLayout(LayoutInfo elementInfo, size_t elementC...
        method LayoutInfo (line 132) | LayoutInfo GetMatrixLayout(LayoutInfo elementInfo, size_t rowCount...
        method LayoutInfo (line 139) | LayoutInfo BeginStructLayout() override
        method AddStructField (line 147) | size_t AddStructField(LayoutInfo* ioStructInfo, LayoutInfo fieldIn...
        method EndStructLayout (line 157) | void EndStructLayout(LayoutInfo* ioStructInfo) override
      type Std140LayoutRulesImpl (line 163) | struct Std140LayoutRulesImpl : DefaultLayoutRulesImpl
        method LayoutInfo (line 167) | LayoutInfo GetArrayLayout(LayoutInfo elementInfo, size_t elementCo...
        method LayoutInfo (line 178) | LayoutInfo BeginStructLayout() override
      type Std430LayoutRulesImpl (line 187) | struct Std430LayoutRulesImpl : DefaultLayoutRulesImpl
      type PackedLayoutRulesImpl (line 191) | struct PackedLayoutRulesImpl : DefaultLayoutRulesImpl
      type HLSLLayoutRulesImpl (line 195) | struct HLSLLayoutRulesImpl : Std140LayoutRulesImpl
        method LayoutInfo (line 197) | LayoutInfo GetVectorLayout(LayoutInfo elementInfo, size_t elementC...
        method LayoutInfo (line 206) | LayoutInfo BeginStructLayout() override
        method AddStructField (line 215) | size_t AddStructField(LayoutInfo* ioStructInfo, LayoutInfo fieldIn...
        method EndStructLayout (line 237) | void EndStructLayout(LayoutInfo* ioStructInfo) override
      function LayoutRulesImpl (line 248) | LayoutRulesImpl* GetLayoutRulesImpl(LayoutRule rule)
      function LayoutInfo (line 261) | LayoutInfo GetLayout(ExpressionType* type, LayoutRulesImpl* rules)
      function LayoutInfo (line 300) | LayoutInfo GetLayout(ILType* type, LayoutRulesImpl* rules)
      function LayoutInfo (line 342) | LayoutInfo GetLayout(ExpressionType* type, LayoutRule rule)
      function LayoutInfo (line 348) | LayoutInfo GetLayout(ILType* type, LayoutRule rule)

FILE: Source/SpireCore/TypeLayout.h
  function namespace (line 7) | namespace Spire {

FILE: Source/SpireCore/TypeTranslation.cpp
  type Spire (line 4) | namespace Spire
    type Compiler (line 6) | namespace Compiler
      function TranslateExpressionType (line 8) | RefPtr<ILType> TranslateExpressionType(ExpressionType * type, Dictio...
      function TranslateExpressionType (line 55) | RefPtr<ILType> TranslateExpressionType(const RefPtr<ExpressionType> ...

FILE: Source/SpireCore/TypeTranslation.h
  function namespace (line 7) | namespace Spire

FILE: Source/SpireCore/VariantIR.cpp
  type Spire (line 6) | namespace Spire
    type Compiler (line 8) | namespace Compiler
      class ReferenceWorkItem (line 105) | class ReferenceWorkItem
        method GetHashCode (line 110) | int GetHashCode()

FILE: Source/SpireCore/VariantIR.h
  function class (line 11) | class ModuleInstanceIR : public RefObject
  function class (line 21) | class ComponentDefinitionIR : public RefObject
  function class (line 41) | class ShaderIR : public RefObject

FILE: Source/SpireLib/SpireLib.cpp
  type SpireDiagnosticSink (line 14) | struct SpireDiagnosticSink
  type SpireUniformFieldImpl (line 20) | struct SpireUniformFieldImpl
  type SpireParameterSet (line 28) | struct SpireParameterSet
  class ComponentMetaData (line 39) | class ComponentMetaData
    method GetHashCode (line 53) | int GetHashCode()
  type CompilerState (line 63) | struct CompilerState
    method Update (line 506) | void Update() // update this state to include latest version of parent
    method CompilerState (line 521) | CompilerState()
    method CompilerState (line 525) | CompilerState(RefPtr<CompilerState> parent)
  type SpireModule (line 65) | struct SpireModule
  type SpireLib (line 83) | namespace SpireLib
    function ReadSource (line 85) | void ReadSource(EnumerableDictionary<String, StageSource> & sources, C...
    function StageSource (line 130) | StageSource ShaderLib::GetStageSource(String stage)
    function CompileUnits (line 167) | List<ShaderLibFile> CompileUnits(Spire::Compiler::CompileResult & comp...
    function CompileShaderSource (line 190) | List<ShaderLibFile> CompileShaderSource(Spire::Compiler::CompileResult...
    function CompileShaderSourceFromFile (line 287) | List<ShaderLibFile> CompileShaderSourceFromFile(Spire::Compiler::Compi...
  type ShaderParameter (line 452) | struct ShaderParameter
  class Shader (line 459) | class Shader
    method Shader (line 469) | Shader(String name, String source)
    method String (line 476) | String GetName() const
    method String (line 480) | String GetSource() const
  class CompileResult (line 486) | class CompileResult
  type CompilerState (line 494) | struct CompilerState : public RefObject
    method Update (line 506) | void Update() // update this state to include latest version of parent
    method CompilerState (line 521) | CompilerState()
    method CompilerState (line 525) | CompilerState(RefPtr<CompilerState> parent)
  class CompilationContext (line 539) | class CompilationContext
    type IncludeHandlerImpl (line 556) | struct IncludeHandlerImpl : IncludeHandler
      method TryToFindIncludeFile (line 560) | virtual bool TryToFindIncludeFile(
    method CompilationContext (line 592) | CompilationContext(bool /*pUseCache*/, CoreLib::String /*pCacheDir*/)
    method SpireModule (line 604) | SpireModule * FindModule(CoreLib::String moduleName)
    method SpireModule (line 614) | SpireModule * SpecializeModule(SpireModule * module, int * params, int...
    method LayoutRule (line 674) | LayoutRule GetUniformBufferLayoutRule()
    method CreateModule (line 682) | RefPtr<SpireModule> CreateModule(CompilerState * state, Spire::Compile...
    method UpdateModuleLibrary (line 780) | void UpdateModuleLibrary(CompilerState * state, List<CompileUnit> & un...
    method LoadModuleSource (line 859) | int LoadModuleSource(CompilerState * state, CoreLib::String src, CoreL...
    method LoadModuleUnits (line 868) | int LoadModuleUnits(CompilerState * state, List<CompileUnit> & units, ...
    method Shader (line 925) | Shader * FindShader(const char * name)
    method Shader (line 932) | Shader * GetShader(int index)
    method GetShaderCount (line 943) | int GetShaderCount()
    method Shader (line 949) | Shader * NewShaderFromSource(CompilerState * state, const char * sourc...
    method Shader (line 958) | Shader * NewShaderFromFile(CompilerState * state, const char * fileNam...
    method PushContext (line 969) | void PushContext()
    method PopContext (line 973) | void PopContext()
    method Compile (line 978) | bool Compile(::CompileResult & result, RefPtr<CompilerState> currentSt...
    method SpireParameterSet (line 986) | SpireParameterSet GetParameterSet(ILModuleParameterSet * module)
    method Compile (line 1019) | bool Compile(::CompileResult & result, RefPtr<CompilerState> currentSt...
  type SpireCompilationEnvironment (line 541) | struct SpireCompilationEnvironment
  class CompilationContext (line 547) | class CompilationContext
    type IncludeHandlerImpl (line 556) | struct IncludeHandlerImpl : IncludeHandler
      method TryToFindIncludeFile (line 560) | virtual bool TryToFindIncludeFile(
    method CompilationContext (line 592) | CompilationContext(bool /*pUseCache*/, CoreLib::String /*pCacheDir*/)
    method SpireModule (line 604) | SpireModule * FindModule(CoreLib::String moduleName)
    method SpireModule (line 614) | SpireModule * SpecializeModule(SpireModule * module, int * params, int...
    method LayoutRule (line 674) | LayoutRule GetUniformBufferLayoutRule()
    method CreateModule (line 682) | RefPtr<SpireModule> CreateModule(CompilerState * state, Spire::Compile...
    method UpdateModuleLibrary (line 780) | void UpdateModuleLibrary(CompilerState * state, List<CompileUnit> & un...
    method LoadModuleSource (line 859) | int LoadModuleSource(CompilerState * state, CoreLib::String src, CoreL...
    method LoadModuleUnits (line 868) | int LoadModuleUnits(CompilerState * state, List<CompileUnit> & units, ...
    method Shader (line 925) | Shader * FindShader(const char * name)
    method Shader (line 932) | Shader * GetShader(int index)
    method GetShaderCount (line 943) | int GetShaderCount()
    method Shader (line 949) | Shader * NewShaderFromSource(CompilerState * state, const char * sourc...
    method Shader (line 958) | Shader * NewShaderFromFile(CompilerState * state, const char * fileNam...
    method PushContext (line 969) | void PushContext()
    method PopContext (line 973) | void PopContext()
    method Compile (line 978) | bool Compile(::CompileResult & result, RefPtr<CompilerState> currentSt...
    method SpireParameterSet (line 986) | SpireParameterSet GetParameterSet(ILModuleParameterSet * module)
    method Compile (line 1019) | bool Compile(::CompileResult & result, RefPtr<CompilerState> currentSt...
  function SpireCompilationContext (line 1072) | SpireCompilationContext * spCreateCompilationContext(const char * cacheDir)
  function spSetCodeGenTarget (line 1077) | void spSetCodeGenTarget(SpireCompilationContext * ctx, int target)
  function spAddSearchPath (line 1082) | void spAddSearchPath(SpireCompilationContext * ctx, const char * searchDir)
  function spAddPreprocessorDefine (line 1087) | void spAddPreprocessorDefine(SpireCompilationContext * ctx, const char *...
  function spSetBackendParameter (line 1092) | void spSetBackendParameter(SpireCompilationContext * ctx, const char * p...
  function spSetShaderToCompile (line 1097) | void spSetShaderToCompile(SpireCompilationContext * ctx, const char * sh...
  function spDestroyCompilationContext (line 1102) | void spDestroyCompilationContext(SpireCompilationContext * ctx)
  function SpireDiagnosticSink (line 1109) | SpireDiagnosticSink* spCreateDiagnosticSink(SpireCompilationContext * /*...
  function spClearDiagnosticSink (line 1116) | void spClearDiagnosticSink(SpireDiagnosticSink* sink)
  function spDestroyDiagnosticSink (line 1124) | void spDestroyDiagnosticSink(SpireDiagnosticSink* sink)
  function spLoadModuleLibrary (line 1131) | void spLoadModuleLibrary(SpireCompilationContext * ctx, const char * fil...
  function spEnvLoadModuleLibrary (line 1136) | void spEnvLoadModuleLibrary(SpireCompilationEnvironment * env, const cha...
  function spLoadModuleLibraryFromSource (line 1141) | void spLoadModuleLibraryFromSource(SpireCompilationContext * ctx, const ...
  function spEnvLoadModuleLibraryFromSource (line 1146) | void spEnvLoadModuleLibraryFromSource(SpireCompilationEnvironment * env,...
  function spPushContext (line 1151) | void spPushContext(SpireCompilationContext * ctx)
  function spPopContext (line 1156) | void spPopContext(SpireCompilationContext * ctx)
  function SpireCompilationEnvironment (line 1161) | SpireCompilationEnvironment * spGetCurrentEnvironment(SpireCompilationCo...
  function SpireCompilationEnvironment (line 1169) | SpireCompilationEnvironment * spCreateEnvironment(SpireCompilationContex...
  function spReleaseEnvironment (line 1180) | void spReleaseEnvironment(SpireCompilationEnvironment * env)
  function SpireShader (line 1185) | SpireShader* spCreateShaderFromSource(SpireCompilationContext * ctx, con...
  function SpireShader (line 1190) | SpireShader * spEnvCreateShaderFromSource(SpireCompilationEnvironment * ...
  function SpireShader (line 1195) | SpireShader * spFindShader(SpireCompilationContext * ctx, const char * n...
  function SpireShader (line 1200) | SpireShader * spEnvFindShader(SpireCompilationEnvironment * env, const c...
  function spGetShaderCount (line 1208) | int spGetShaderCount(SpireCompilationContext * ctx)
  function spEnvGetShaderCount (line 1213) | int spEnvGetShaderCount(SpireCompilationEnvironment * env)
  function SpireShader (line 1218) | SpireShader * spGetShader(SpireCompilationContext * ctx, int index)
  function SpireShader (line 1223) | SpireShader * spEnvGetShader(SpireCompilationEnvironment * env, int index)
  function SpireShader (line 1235) | SpireShader* spCreateShaderFromFile(SpireCompilationContext * ctx, const...
  function SpireShader (line 1240) | SpireShader * spEnvCreateShaderFromFile(SpireCompilationEnvironment * en...
  function spShaderGetId (line 1246) | unsigned int spShaderGetId(SpireShader * shader)
  function spShaderGetParameterBinding (line 1270) | int spShaderGetParameterBinding(SpireShader * shader, int i)
  function spShaderGetParameterCount (line 1277) | int spShaderGetParameterCount(SpireShader * shader)
  function SpireModule (line 1282) | SpireModule * spFindModule(SpireCompilationContext * ctx, const char * m...
  function SpireModule (line 1287) | SpireModule * spEnvFindModule(SpireCompilationEnvironment * env, const c...
  function spGetModuleUID (line 1296) | unsigned int spGetModuleUID(SpireModule * module)
  function SpireModule (line 1308) | SpireModule * spSpecializeModule(SpireCompilationContext * ctx, SpireMod...
  function spModuleGetParameterCount (line 1313) | int spModuleGetParameterCount(SpireModule * module)
  function spModuleGetParameterBufferSize (line 1318) | int spModuleGetParameterBufferSize(SpireModule * module)
  function spModuleHasAttrib (line 1322) | int spModuleHasAttrib(SpireModule * module, const char * name)
  function spModuleGetParameter (line 1327) | int spModuleGetParameter(SpireModule * module, int index, SpireComponent...
  function spModuleGetParameterByName (line 1341) | int spModuleGetParameterByName(SpireModule * module, const char * name, ...
  function spModuleGetSubModuleCount (line 1358) | int spModuleGetSubModuleCount(SpireModule * module)
  function SpireModule (line 1363) | SpireModule * spModuleGetSubModule(SpireModule * module, int index)
  function spModuleGetBufferOffset (line 1368) | int spModuleGetBufferOffset(SpireModule * module)
  function spModuleGetBindingOffset (line 1373) | int spModuleGetBindingOffset(SpireModule * module, SpireBindingIndex * p...
  function spModuleGetRequiredComponents (line 1379) | int spModuleGetRequiredComponents(SpireModule * module, SpireComponentIn...
  function SpireCompilationResult (line 1400) | SpireCompilationResult * spCompileShader(SpireCompilationContext * ctx, ...
  function SPIRE_API (line 1413) | SPIRE_API SpireCompilationResult * spEnvCompileShader(SpireCompilationEn...
  function SpireCompilationResult (line 1420) | SpireCompilationResult * spCompileShaderFromSource(SpireCompilationConte...
  function spDiagnosticSinkHasAnyErrors (line 1429) | int spDiagnosticSinkHasAnyErrors(SpireDiagnosticSink* sink)
  function spGetDiagnosticCount (line 1435) | int spGetDiagnosticCount(SpireDiagnosticSink* sink)
  function spGetDiagnosticByIndex (line 1440) | int spGetDiagnosticByIndex(SpireDiagnosticSink* sink, int index, SpireDi...
  function ReturnStr (line 1463) | int ReturnStr(const char * content, char * buffer, int bufferSize)
  function spGetDiagnosticOutput (line 1480) | int spGetDiagnosticOutput(SpireDiagnosticSink* sink, char * buffer, int ...
  function spGetCompiledShaderNames (line 1496) | int spGetCompiledShaderNames(SpireCompilationResult * result, char * buf...
  function spGetCompiledShaderStageNames (line 1512) | int spGetCompiledShaderStageNames(SpireCompilationResult * result, const...
  function spGetShaderParameterSetCount (line 1569) | int spGetShaderParameterSetCount(SpireCompilationResult * result, const ...
  function SpireParameterSet (line 1588) | SpireParameterSet * spGetShaderParameterSet(SpireCompilationResult * res...
  function spParameterSetGetBufferSize (line 1607) | int spParameterSetGetBufferSize(SpireParameterSet * set)
  function spParameterSetGetBufferOffset (line 1611) | int spParameterSetGetBufferOffset(SpireParameterSet * set)
  function spParameterSetGetStartBindingIndex (line 1615) | int spParameterSetGetStartBindingIndex(SpireParameterSet * set, SpireBin...
  function spParameterSetGetUniformField (line 1623) | int spParameterSetGetUniformField(SpireParameterSet * set, int index, Sp...
  function spParameterSetGetUniformFieldCount (line 1631) | int spParameterSetGetUniformFieldCount(SpireParameterSet * set)
  function spParameterSetGetSubSetCount (line 1635) | int spParameterSetGetSubSetCount(SpireParameterSet * set)
  function SpireParameterSet (line 1639) | SpireParameterSet * spParameterSetGetSubSet(SpireParameterSet * set, int...
  function spParameterSetGetBindingIndex (line 1647) | int spParameterSetGetBindingIndex(SpireParameterSet * set)
  function spParameterSetGetUniformBufferLegacyBindingPoint (line 1651) | int spParameterSetGetUniformBufferLegacyBindingPoint(SpireParameterSet *...
  function spParameterSetGetBindingSlotCount (line 1655) | int spParameterSetGetBindingSlotCount(SpireParameterSet * set)
  function SpireResourceBindingInfo (line 1659) | SpireResourceBindingInfo * spParameterSetGetBindingSlot(SpireParameterSe...
  function spDestroyCompilationResult (line 1663) | void spDestroyCompilationResult(SpireCompilationResult * result)

FILE: Source/SpireLib/SpireLib.h
  function namespace (line 8) | namespace SpireLib

FILE: Spire.h
  type SpireSeverity (line 43) | typedef int SpireSeverity;
  type SpireBindableResourceType (line 53) | typedef int SpireBindableResourceType;
  type SpireCompilationContext (line 92) | struct SpireCompilationContext {}
  type SpireCompilationEnvironment (line 93) | struct SpireCompilationEnvironment
  type SpireShader (line 105) | struct SpireShader {}
  type SpireModule (line 121) | struct SpireModule
  type SpireCompilationResult (line 138) | struct SpireCompilationResult {}
  type SpireBindingIndex (line 140) | struct SpireBindingIndex
  type SpireUniformField (line 149) | struct SpireUniformField
  type SpireDiagnosticSink (line 160) | typedef struct SpireDiagnosticSink SpireDiagnosticSink;
  type SpireDiagnostic (line 165) | struct SpireDiagnostic
  type SpireComponentInfo (line 178) | struct SpireComponentInfo
  type SpireParameterSet (line 192) | typedef struct SpireParameterSet SpireParameterSet;
  type SpireResourceBindingInfo (line 197) | struct SpireResourceBindingInfo

FILE: Tests/SpireTestTool/main.cpp
  function error (line 17) | void error(char const* message, ...)
  type TestResult (line 29) | enum TestResult
  function TestResult (line 35) | TestResult runTestImpl(
  type TestContext (line 109) | struct TestContext
  function runTest (line 116) | void runTest(
  function runTestsInDirectory (line 137) | void runTestsInDirectory(
  function main (line 149) | int main(

FILE: Tests/SpireTestTool/os.cpp
  function OSFindFilesResult (line 29) | OSFindFilesResult osFindFilesInDirectoryMatchingPattern(
  type OSProcessSpawner_ReaderThreadInfo (line 60) | struct OSProcessSpawner_ReaderThreadInfo
  function DWORD (line 66) | static DWORD WINAPI osReaderThreadProc(LPVOID threadParam)
  function OSError (line 149) | OSError OSProcessSpawner::spawnAndWaitForCompletion()

FILE: Tests/SpireTestTool/os.h
  type OSError (line 24) | enum OSError
  type OSFindFilesResult (line 33) | struct OSFindFilesResult
  function Iterator (line 64) | Iterator begin()
  function Iterator (line 70) | Iterator end()
  function getStandardOutput (line 95) | struct OSProcessSpawner
Condensed preview — 171 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,713K chars).
[
  {
    "path": ".editorconfig",
    "chars": 39,
    "preview": "[*]\nindent_style = tab\nindent_size = 4\n"
  },
  {
    "path": ".gitignore",
    "chars": 206,
    "preview": "DebugClang/\n*.user\nautotuneLog.txt\nLibraryRelease/CodePack.exe\n*.exe\n*.exe.config\n*.exe.manifest\n*.pdb\n.vs\n*.VC.opendb\n*"
  },
  {
    "path": "Examples/hello/README.md",
    "chars": 857,
    "preview": "Spire \"Hello World\" Example\n===========================\n\nThe goal of this example is to demonstrate an almost minimal ap"
  },
  {
    "path": "Examples/hello/hello.cpp",
    "chars": 19472,
    "preview": "// hello.cpp\n\n// In order to use the Spire API, we need to include its header\n\n#include <Spire.h>\n\n// We will be renderi"
  },
  {
    "path": "Examples/hello/hello.sln",
    "chars": 1260,
    "preview": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 14\nVisualStudioVersion = 14.0.25420.1\nMinim"
  },
  {
    "path": "Examples/hello/hello.spire",
    "chars": 1219,
    "preview": "// shaders.spire\n\n// TODO(tfoley): strip this down to a minimal pipeline\n\npipeline StandardPipeline\n{\n    [Pinned]\n    i"
  },
  {
    "path": "Examples/hello/hello.vcxproj",
    "chars": 14055,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"14.0\" xmlns=\"http://schemas.micros"
  },
  {
    "path": "Examples/hello/hello.vcxproj.filters",
    "chars": 270,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuil"
  },
  {
    "path": "LICENSE.txt",
    "chars": 1163,
    "preview": "\nSpire - The MIT License (MIT)\nCopyright (c) 2016, Carnegie Mellon University\n\nDevelopers: Yong He, Haomin Long, Teguh H"
  },
  {
    "path": "README.md",
    "chars": 1027,
    "preview": "# Spire\nSpire is a shading language and compiler framework that facilitates modular shader authoring and rapid explorati"
  },
  {
    "path": "Source/CoreLib/Allocator.h",
    "chars": 905,
    "preview": "#ifndef CORE_LIB_ALLOCATOR_H\n#define CORE_LIB_ALLOCATOR_H\n\n#include <stdlib.h>\n\nnamespace CoreLib\n{\n\tnamespace Basic\n\t{\n"
  },
  {
    "path": "Source/CoreLib/Array.h",
    "chars": 2675,
    "preview": "#ifndef CORE_LIB_ARRAY_H\n#define CORE_LIB_ARRAY_H\n\n#include \"Exception.h\"\n#include \"ArrayView.h\"\n\nnamespace CoreLib\n{\n\tn"
  },
  {
    "path": "Source/CoreLib/ArrayView.h",
    "chars": 2309,
    "preview": "#ifndef CORE_LIB_ARRAY_VIEW_H\n#define CORE_LIB_ARRAY_VIEW_H\n\n#include \"Exception.h\"\n\nnamespace CoreLib\n{\n\tnamespace Basi"
  },
  {
    "path": "Source/CoreLib/Basic.h",
    "chars": 333,
    "preview": "#ifndef CORE_LIB_BASIC_H\n#define CORE_LIB_BASIC_H\n\n#include \"Common.h\"\n#include \"LibMath.h\"\n#include \"LibString.h\"\n#incl"
  },
  {
    "path": "Source/CoreLib/CMakeLists.txt",
    "chars": 528,
    "preview": "cmake_minimum_required (VERSION 2.6) \nproject (CoreLib) \n\nadd_library(CoreLib_Basic STATIC\n Basic.h\n Common.h\n Dictionar"
  },
  {
    "path": "Source/CoreLib/CommandLineParser.cpp",
    "chars": 911,
    "preview": "#include \"CommandLineParser.h\"\n\nnamespace CoreLib\n{\n\tnamespace Text\n\t{\n\t\tCommandLineParser::CommandLineParser(const Stri"
  },
  {
    "path": "Source/CoreLib/CommandLineParser.h",
    "chars": 455,
    "preview": "#ifndef CORE_LIB_COMMANDLINE_PARSER\n#define CORE_LIB_COMMANDLINE_PARSER\n\n#include \"Tokenizer.h\"\n\nnamespace CoreLib\n{\n\tna"
  },
  {
    "path": "Source/CoreLib/Common.h",
    "chars": 707,
    "preview": "#ifndef CORE_LIB_COMMON_H\n#define CORE_LIB_COMMON_H\n\n#include <cstdint>\n\n#ifdef __GNUC__\n#define CORE_LIB_ALIGN_16(x) x "
  },
  {
    "path": "Source/CoreLib/CoreLibBasic.vcxproj",
    "chars": 37660,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"14.0\" xmlns=\"http://schemas.microso"
  },
  {
    "path": "Source/CoreLib/Dictionary.h",
    "chars": 23687,
    "preview": "#ifndef CORE_LIB_DICTIONARY_H\n#define CORE_LIB_DICTIONARY_H\n#include \"List.h\"\n#include \"Common.h\"\n#include \"IntSet.h\"\n#i"
  },
  {
    "path": "Source/CoreLib/Exception.h",
    "chars": 1819,
    "preview": "#ifndef CORE_LIB_EXCEPTION_H\n#define CORE_LIB_EXCEPTION_H\n\n#include \"Common.h\"\n#include \"LibString.h\"\n\nnamespace CoreLib"
  },
  {
    "path": "Source/CoreLib/Func.h",
    "chars": 5281,
    "preview": "#ifndef CORELIB_FUNC_H\n#define CORELIB_FUNC_H\n\n#include \"SmartPointer.h\"\n\nnamespace CoreLib\n{\n\tnamespace Basic\n\t{\n\t\ttemp"
  },
  {
    "path": "Source/CoreLib/Hash.h",
    "chars": 1782,
    "preview": "#ifndef CORELIB_HASH_H\n#define CORELIB_HASH_H\n\n#include \"LibMath.h\"\n#include <string.h>\n\nnamespace CoreLib\n{\n\tnamespace "
  },
  {
    "path": "Source/CoreLib/IntSet.h",
    "chars": 3992,
    "preview": "#ifndef BIT_VECTOR_INT_SET_H\n#define BIT_VECTOR_INT_SET_H\n\n#include <memory.h>\n#include \"List.h\"\n#include \"LibMath.h\"\n#i"
  },
  {
    "path": "Source/CoreLib/LibIO.cpp",
    "chars": 3808,
    "preview": "#include \"LibIO.h\"\n#include \"Exception.h\"\n#ifndef __STDC__\n#define __STDC__ 1\n#endif\n#include <sys/stat.h>\n#ifdef _WIN32"
  },
  {
    "path": "Source/CoreLib/LibIO.h",
    "chars": 1725,
    "preview": "#ifndef CORE_LIB_IO_H\n#define CORE_LIB_IO_H\n\n#include \"LibString.h\"\n#include \"Stream.h\"\n#include \"TextIO.h\"\n#include \"Se"
  },
  {
    "path": "Source/CoreLib/LibMath.cpp",
    "chars": 105,
    "preview": "#include \"LibMath.h\"\n\nnamespace CoreLib\n{\n\tnamespace Basic\n\t{\n\t\tconst float Math::Pi = 3.141592654f;\n\t}\n}"
  },
  {
    "path": "Source/CoreLib/LibMath.h",
    "chars": 4559,
    "preview": "#ifndef CORE_LIB_MATH_H\n#define CORE_LIB_MATH_H\n\n#include <math.h>\n\nnamespace CoreLib\n{\n\tnamespace Basic\n\t{\n\t\tclass Math"
  },
  {
    "path": "Source/CoreLib/LibString.cpp",
    "chars": 3956,
    "preview": "#include \"LibString.h\"\n#include \"TextIO.h\"\n\nnamespace CoreLib\n{\n\tnamespace Basic\n\t{\n\t\t_EndLine EndLine;\n\t\tString StringC"
  },
  {
    "path": "Source/CoreLib/LibString.h",
    "chars": 16407,
    "preview": "#ifndef FUNDAMENTAL_LIB_STRING_H\n#define FUNDAMENTAL_LIB_STRING_H\n#include <string.h>\n#include <cstdlib>\n#include <stdio"
  },
  {
    "path": "Source/CoreLib/Link.h",
    "chars": 6199,
    "preview": "#ifndef CORE_LIB_LINK_H\n#define CORE_LIB_LINK_H\n\n#include \"Common.h\"\n#include \"Exception.h\"\n\nnamespace CoreLib\n{\n\tnamesp"
  },
  {
    "path": "Source/CoreLib/Linq.h",
    "chars": 16526,
    "preview": "#ifndef FUNDAMENTAL_LIB_LINQ_H\n#define FUNDAMENTAL_LIB_LINQ_H\n\n#include \"List.h\"\n\nnamespace CoreLib\n{\n\tnamespace Basic\n\t"
  },
  {
    "path": "Source/CoreLib/List.h",
    "chars": 13733,
    "preview": "#ifndef FUNDAMENTAL_LIB_LIST_H\n#define FUNDAMENTAL_LIB_LIST_H\n\n#include \"Allocator.h\"\n#include <type_traits>\n#include \"L"
  },
  {
    "path": "Source/CoreLib/MemoryPool.cpp",
    "chars": 3906,
    "preview": "#include \"MemoryPool.h\"\n#include <cassert>\n\nnamespace CoreLib\n{\n\tnamespace Basic\n\t{\n\t\tMemoryPool::MemoryPool(unsigned ch"
  },
  {
    "path": "Source/CoreLib/MemoryPool.h",
    "chars": 2536,
    "preview": "#ifndef CORE_LIB_MEMORY_POOL_H\n#define CORE_LIB_MEMORY_POOL_H\n\n#include \"Basic.h\"\n#include \"IntSet.h\"\n\nnamespace CoreLib"
  },
  {
    "path": "Source/CoreLib/SecureCRT.h",
    "chars": 1967,
    "preview": "#ifndef _MSC_VER\n#ifndef CORE_LIB_SECURE_CRT_H\n#define CORE_LIB_SECURE_CRT_H\n#include <stdarg.h>\n#include <stdlib.h>\n#in"
  },
  {
    "path": "Source/CoreLib/SmartPointer.h",
    "chars": 8325,
    "preview": "#ifndef FUNDAMENTAL_LIB_SMART_POINTER_H\n#define FUNDAMENTAL_LIB_SMART_POINTER_H\n\n#include \"TypeTraits.h\"\n\nnamespace Core"
  },
  {
    "path": "Source/CoreLib/Stream.cpp",
    "chars": 5072,
    "preview": "#include \"Stream.h\"\n#ifdef _WIN32\n#include <share.h>\n#endif\n#include \"LibIO.h\"\n\nnamespace CoreLib\n{\n\tnamespace IO\n\t{\n\t\tu"
  },
  {
    "path": "Source/CoreLib/Stream.h",
    "chars": 6632,
    "preview": "#ifndef CORE_LIB_STREAM_H\n#define CORE_LIB_STREAM_H\n\n#include \"Basic.h\"\n\nnamespace CoreLib\n{\n\tnamespace IO\n\t{\n\t\tusing Co"
  },
  {
    "path": "Source/CoreLib/TextIO.cpp",
    "chars": 7438,
    "preview": "#include \"TextIO.h\"\n#ifdef _WIN32\n#include <Windows.h>\n#define CONVERT_END_OF_LINE\n#endif\n\nnamespace CoreLib\n{\n\tnamespac"
  },
  {
    "path": "Source/CoreLib/TextIO.h",
    "chars": 8046,
    "preview": "#ifndef CORE_LIB_TEXT_IO_H\n#define CORE_LIB_TEXT_IO_H\n\n#include \"SecureCRT.h\"\n#include \"Stream.h\"\n\nnamespace CoreLib\n{\n\t"
  },
  {
    "path": "Source/CoreLib/Tokenizer.cpp",
    "chars": 18288,
    "preview": "#include \"Tokenizer.h\"\n\nusing namespace CoreLib::Basic;\n\nnamespace CoreLib\n{\n\tnamespace Text\n\t{\n\t\tTokenReader::TokenRead"
  },
  {
    "path": "Source/CoreLib/Tokenizer.h",
    "chars": 6649,
    "preview": "#ifndef CORELIB_TEXT_PARSER_H\n#define CORELIB_TEXT_PARSER_H\n\n#include \"Basic.h\"\n\nnamespace CoreLib\n{\n\tnamespace Text\n\t{\n"
  },
  {
    "path": "Source/CoreLib/TypeTraits.h",
    "chars": 1017,
    "preview": "#ifndef CORELIB_TYPETRAITS_H\n#define CORELIB_TYPETRAITS_H\n\nnamespace CoreLib\n{\n\tnamespace Basic\n\t{\n\t\tstruct TraitResultY"
  },
  {
    "path": "Source/CoreLib/VectorMath.cpp",
    "chars": 13376,
    "preview": "#include \"VectorMath.h\"\n\nnamespace VectorMath\n{\n\tconst __m128 Matrix4_M128::VecOne = _mm_set_ps1(1.0f);\n\tvoid Matrix4::R"
  },
  {
    "path": "Source/CoreLib/VectorMath.h",
    "chars": 49653,
    "preview": "#ifndef VECTOR_MATH_H\n#define VECTOR_MATH_H\n#include <memory.h>\n#include <random>\n#include <cmath>\n#include <xmmintrin.h"
  },
  {
    "path": "Source/CoreLib/corelib.natvis",
    "chars": 3263,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<AutoVisualizer xmlns=\"http://schemas.microsoft.com/vstudio/debugger/natvis/2010"
  },
  {
    "path": "Source/Spire.sln",
    "chars": 27643,
    "preview": "Microsoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 14\nVisualStudioVersion = 14.0.25123.0\nMinimu"
  },
  {
    "path": "Source/SpireCompiler/D3DCompiler.cpp",
    "chars": 1858,
    "preview": "#include \"D3DCompiler.h\"\n#ifdef _WIN32\n\n#include <d3dcompiler.h>\n\nusing namespace CoreLib::Basic;\n\ntypedef HRESULT (WIN"
  },
  {
    "path": "Source/SpireCompiler/D3DCompiler.h",
    "chars": 287,
    "preview": "#ifndef SPIRE_D3D_COMPILER_H\n#define SPIRE_D3D_COMPILER_H\n\n#include \"CoreLib/Basic.h\"\n\nclass D3DCompiler : public CoreLi"
  },
  {
    "path": "Source/SpireCompiler/ShaderCompilerShell.cpp",
    "chars": 5188,
    "preview": "#include \"CoreLib/LibIO.h\"\n#include \"SpireLib.h\"\n#include \"D3DCompiler.h\"\n\nusing namespace CoreLib::Basic;\nusing namesp"
  },
  {
    "path": "Source/SpireCompiler/SpireCompiler.vcxproj",
    "chars": 19032,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"14.0\" xmlns=\"http://schemas.micros"
  },
  {
    "path": "Source/SpireCompiler/SpireCompiler.vcxproj.filters",
    "chars": 1165,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuil"
  },
  {
    "path": "Source/SpireCore/CLikeCodeGen.cpp",
    "chars": 34521,
    "preview": "#include \"CLikeCodeGen.h\"\n#include \"../CoreLib/Tokenizer.h\"\n#include \"Syntax.h\"\n#include \"Naming.h\"\n\nusing namespace Cor"
  },
  {
    "path": "Source/SpireCore/CLikeCodeGen.h",
    "chars": 9242,
    "preview": "// CLikeCodeGen.h\n#ifndef SPIRE_C_LIKE_CODE_GEN_H\n#define SPIRE_C_LIKE_CODE_GEN_H\n\n//\n// This file implements the shared"
  },
  {
    "path": "Source/SpireCore/Closure.cpp",
    "chars": 37498,
    "preview": "#include \"Closure.h\"\n#include \"StringObject.h\"\n#include \"Naming.h\"\n\nnamespace Spire\n{\n\tnamespace Compiler\n\t{\n\t\tvoid Chec"
  },
  {
    "path": "Source/SpireCore/Closure.h",
    "chars": 440,
    "preview": "#ifndef BAKERSL_SHADER_CLOSURE_H\n#define BAKERSL_SHADER_CLOSURE_H\n#include \"SymbolTable.h\"\n\nnamespace Spire\n{\n\tnamespace"
  },
  {
    "path": "Source/SpireCore/CodeGenBackend.h",
    "chars": 715,
    "preview": "#ifndef CODE_GEN_BACKEND_H\n#define CODE_GEN_BACKEND_H\n\n#include \"../CoreLib/Basic.h\"\n#include \"CompiledProgram.h\"\n#inclu"
  },
  {
    "path": "Source/SpireCore/CodeGenerator.cpp",
    "chars": 50148,
    "preview": "#include \"SyntaxVisitors.h\"\n#include \"ScopeDictionary.h\"\n#include \"CodeWriter.h\"\n#include \"StringObject.h\"\n#include \"Nam"
  },
  {
    "path": "Source/SpireCore/CodeWriter.h",
    "chars": 5948,
    "preview": "#ifndef IL_CODE_WRITER_H\n#define IL_CODE_WRITER_H\n\n#include \"IL.h\"\n#include \"ShaderCompiler.h\"\n\nnamespace Spire\n{\n\tnames"
  },
  {
    "path": "Source/SpireCore/CompiledProgram.cpp",
    "chars": 913,
    "preview": "#include \"CompiledProgram.h\"\n\nnamespace Spire\n{\n\tnamespace Compiler\n\t{\n\t\tvoid IndentString(StringBuilder & sb, String sr"
  },
  {
    "path": "Source/SpireCore/CompiledProgram.h",
    "chars": 6049,
    "preview": "#ifndef BAKER_SL_COMPILED_PROGRAM_H\n#define BAKER_SL_COMPILED_PROGRAM_H\n\n#include \"../CoreLib/Basic.h\"\n#include \"Diagnos"
  },
  {
    "path": "Source/SpireCore/ConstantPool.cpp",
    "chars": 11442,
    "preview": "#ifndef CONSTANT_POOL_H\n#define CONSTANT_POOL_H\n\n#include \"ShaderCompiler.h\"\n#include \"IL.h\"\n\nnamespace Spire\n{\n\tnamespa"
  },
  {
    "path": "Source/SpireCore/DiagnosticDefs.h",
    "chars": 23731,
    "preview": "//\n\n// The file is meant to be included multiple times, to produce different\n// pieces of declaration/definition code re"
  },
  {
    "path": "Source/SpireCore/Diagnostics.cpp",
    "chars": 4098,
    "preview": "// Diagnostics.cpp\n#include \"Diagnostics.h\"\n\n#include \"CompiledProgram.h\"\n#include \"SymbolTable.h\"\n#include \"Syntax.h\"\n\n"
  },
  {
    "path": "Source/SpireCore/Diagnostics.h",
    "chars": 7482,
    "preview": "#ifndef RASTER_RENDERER_COMPILE_ERROR_H\n#define RASTER_RENDERER_COMPILE_ERROR_H\n\n#include \"../CoreLib/Basic.h\"\n#include "
  },
  {
    "path": "Source/SpireCore/GLSLCodeGen.cpp",
    "chars": 36594,
    "preview": "#include \"CLikeCodeGen.h\"\n#include \"../CoreLib/Tokenizer.h\"\n#include \"Syntax.h\"\n#include \"Naming.h\"\n#include \"SamplerUsa"
  },
  {
    "path": "Source/SpireCore/GetDependencyVisitor.cpp",
    "chars": 1408,
    "preview": "#include \"GetDependencyVisitor.h\"\n\nnamespace Spire\n{\n\tnamespace Compiler\n\t{\n\t\tEnumerableHashSet<ComponentDependency> Get"
  },
  {
    "path": "Source/SpireCore/GetDependencyVisitor.h",
    "chars": 1364,
    "preview": "#ifndef GET_DEPENDENCY_VISITOR_H\n#define GET_DEPENDENCY_VISITOR_H\n\n#include \"VariantIR.h\"\n#include \"Closure.h\"\n#include "
  },
  {
    "path": "Source/SpireCore/HLSLCodeGen.cpp",
    "chars": 50104,
    "preview": "#include \"CLikeCodeGen.h\"\n#include \"../CoreLib/Tokenizer.h\"\n#include \"Syntax.h\"\n#include \"Naming.h\"\n#include \"TypeLayout"
  },
  {
    "path": "Source/SpireCore/IL.cpp",
    "chars": 19955,
    "preview": "#include \"IL.h\"\n#include \"../CoreLib/LibIO.h\"\n#include \"Syntax.h\"\n#include \"CompiledProgram.h\"\n#include \"../CoreLib/Toke"
  },
  {
    "path": "Source/SpireCore/IL.h",
    "chars": 61081,
    "preview": "#ifndef RASTER_RENDERER_IL_H\n#define RASTER_RENDERER_IL_H\n\n#include \"../CoreLib/Basic.h\"\n#include \"../CoreLib/Tokenizer."
  },
  {
    "path": "Source/SpireCore/InsertImplicitImportOperator.cpp",
    "chars": 7298,
    "preview": "#include \"Closure.h\"\n#include \"VariantIR.h\"\n#include \"StringObject.h\"\n#include \"Naming.h\"\n#include \"GetDependencyVisitor"
  },
  {
    "path": "Source/SpireCore/KeyHoleMatching.cpp",
    "chars": 2330,
    "preview": "#include \"IL.h\"\n#include \"../CoreLib/Tokenizer.h\"\n\nnamespace Spire\n{\n\tnamespace Compiler\n\t{\n\t\tRefPtr<KeyHoleNode> ParseI"
  },
  {
    "path": "Source/SpireCore/Lexer.cpp",
    "chars": 2829,
    "preview": "#include \"Lexer.h\"\n#include \"../CoreLib/Tokenizer.h\"\n\n#include <assert.h>\n\nusing namespace CoreLib::Text;\n\nnamespace Spi"
  },
  {
    "path": "Source/SpireCore/Lexer.h",
    "chars": 1683,
    "preview": "#ifndef RASTER_RENDERER_LEXER_H\n#define RASTER_RENDERER_LEXER_H\n\n#include \"../CoreLib/Basic.h\"\n#include \"Diagnostics.h\"\n"
  },
  {
    "path": "Source/SpireCore/Naming.cpp",
    "chars": 582,
    "preview": "#include \"Naming.h\"\n\nnamespace Spire\n{\n\tnamespace Compiler\n\t{\n\t\tusing namespace CoreLib;\n\n\t\tCoreLib::String EscapeCodeNa"
  },
  {
    "path": "Source/SpireCore/Naming.h",
    "chars": 187,
    "preview": "#ifndef SPIRE_NAMING_H\n#define SPIRE_NAMING_H\n\n#include \"../CoreLib/Basic.h\"\n\nnamespace Spire\n{\n\tnamespace Compiler\n\t{\n\t"
  },
  {
    "path": "Source/SpireCore/NatvisFile.natvis",
    "chars": 485,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?> \n<AutoVisualizer xmlns=\"http://schemas.microsoft.com/vstudio/debugger/natvis/2010"
  },
  {
    "path": "Source/SpireCore/NewSpirVCodeGen.cpp",
    "chars": 1876,
    "preview": "#include \"CodeGenBackend.h\"\n#include \"../CoreLib/Tokenizer.h\"\n#include \"IL.h\"\n#include \"Syntax.h\"\n#include <vector>\n#inc"
  },
  {
    "path": "Source/SpireCore/Parser.cpp",
    "chars": 63856,
    "preview": "#include \"Parser.h\"\n\n#include <assert.h>\n\nnamespace Spire\n{\n\tnamespace Compiler\n\t{\n\t\tconst int MaxExprLevel = 12;\n\n\t\t// "
  },
  {
    "path": "Source/SpireCore/Parser.h",
    "chars": 329,
    "preview": "#ifndef RASTER_RENDERER_PARSER_H\n#define RASTER_RENDERER_PARSER_H\n\n#include \"Lexer.h\"\n#include \"Syntax.h\"\n\nnamespace Spi"
  },
  {
    "path": "Source/SpireCore/Preprocessor.cpp",
    "chars": 62640,
    "preview": "// Preprocessor.cpp\n#include \"Preprocessor.h\"\n\n#include \"Diagnostics.h\"\n#include \"Lexer.h\"\n\n#include <assert.h>\n\nusing n"
  },
  {
    "path": "Source/SpireCore/Preprocessor.h",
    "chars": 1083,
    "preview": "// Preprocessor.h\n#ifndef SPIRE_PREPROCESSOR_H_INCLUDED\n#define SPIRE_PREPROCESSOR_H_INCLUDED\n\n#include \"../CoreLib/Basi"
  },
  {
    "path": "Source/SpireCore/SamplerUsageAnalysis.cpp",
    "chars": 3295,
    "preview": "#include \"SamplerUsageAnalysis.h\"\n\nnamespace Spire\n{\n\tnamespace Compiler\n\t{\n\t\tusing namespace CoreLib;\n\n\t\tvoid AnalyzeSa"
  },
  {
    "path": "Source/SpireCore/SamplerUsageAnalysis.h",
    "chars": 302,
    "preview": "#include \"IL.h\"\n#include \"CompiledProgram.h\"\n\nnamespace Spire\n{\n\tnamespace Compiler\n\t{\n\t\tvoid AnalyzeSamplerUsage(CoreLi"
  },
  {
    "path": "Source/SpireCore/Schedule.cpp",
    "chars": 4032,
    "preview": "#include \"Schedule.h\"\n#include \"Lexer.h\"\nusing namespace CoreLib::Basic;\n\nnamespace Spire\n{\n\tnamespace Compiler\n\t{\n\t\tcla"
  },
  {
    "path": "Source/SpireCore/Schedule.h",
    "chars": 562,
    "preview": "#ifndef BAKER_SL_SCHEDULE_H\n#define BAKER_SL_SCHEDULE_H\n\n#include \"../CoreLib/Basic.h\"\n#include \"Diagnostics.h\"\n#include"
  },
  {
    "path": "Source/SpireCore/ScopeDictionary.h",
    "chars": 1031,
    "preview": "#ifndef RASTER_RENDERER_SCOPE_DICTIONARY_H\n#define RASTER_RENDERER_SCOPE_DICTIONARY_H\n\n#include \"../CoreLib/Basic.h\"\n\nus"
  },
  {
    "path": "Source/SpireCore/SemanticsVisitor.cpp",
    "chars": 73953,
    "preview": "#include \"SyntaxVisitors.h\"\n\nnamespace Spire\n{\n\tnamespace Compiler\n\t{\n\t\tbool IsNumeric(BaseType t)\n\t\t{\n\t\t\treturn t == Ba"
  },
  {
    "path": "Source/SpireCore/ShaderCompiler.cpp",
    "chars": 21859,
    "preview": "// Compiler.cpp : Defines the entry point for the console application.\n//\n#include \"../CoreLib/Basic.h\"\n#include \"../Cor"
  },
  {
    "path": "Source/SpireCore/ShaderCompiler.h",
    "chars": 1863,
    "preview": "#ifndef RASTER_SHADER_COMPILER_H\n#define RASTER_SHADER_COMPILER_H\n\n#include \"../CoreLib/Basic.h\"\n#include \"Diagnostics.h"
  },
  {
    "path": "Source/SpireCore/SpirVCodeGen.cpp",
    "chars": 166945,
    "preview": "#if 0\n#include \"CodeGenBackend.h\"\n#include \"../CoreLib/Tokenizer.h\"\n#include \"IL.h\"\n#include \"Syntax.h\"\n#include <vector"
  },
  {
    "path": "Source/SpireCore/SpireCore.vcxproj",
    "chars": 22303,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"14.0\" xmlns=\"http://schemas.micros"
  },
  {
    "path": "Source/SpireCore/SpireCore.vcxproj.filters",
    "chars": 5202,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuil"
  },
  {
    "path": "Source/SpireCore/StdInclude.cpp",
    "chars": 17224,
    "preview": "#include \"StdInclude.h\"\n#include \"Syntax.h\"\n\nconst char * LibIncludeString = R\"(\n__intrinsic float dFdx(float v);\n__intr"
  },
  {
    "path": "Source/SpireCore/StdInclude.h",
    "chars": 299,
    "preview": "#ifndef SHADER_COMPILER_STD_LIB_H\n#define SHADER_COMPILER_STD_LIB_H\n\n#include \"../CoreLib/Basic.h\"\n\nnamespace Spire\n{\n\tn"
  },
  {
    "path": "Source/SpireCore/StringObject.h",
    "chars": 329,
    "preview": "#ifndef SPIRE_STRING_OBJECT_H\n#define SPIRE_STRING_OBJECT_H\n\n#include \"../CoreLib/Basic.h\"\n\nnamespace Spire\n{\n\tnamespace"
  },
  {
    "path": "Source/SpireCore/SymbolTable.cpp",
    "chars": 17620,
    "preview": "#include \"SymbolTable.h\"\n#include \"ShaderCompiler.h\"\n\nnamespace Spire\n{\n\tnamespace Compiler\n\t{\n\n\t\tbool SymbolTable::Sort"
  },
  {
    "path": "Source/SpireCore/SymbolTable.h",
    "chars": 8567,
    "preview": "#ifndef RASTER_RENDERER_SYMBOL_TABLE_H\n#define RASTER_RENDERER_SYMBOL_TABLE_H\n\n#include \"../CoreLib/Basic.h\"\n#include \"S"
  },
  {
    "path": "Source/SpireCore/Syntax.cpp",
    "chars": 33359,
    "preview": "#include \"Syntax.h\"\n#include \"SyntaxVisitors.h\"\n#include \"SymbolTable.h\"\n\n#include <assert.h>\n\nnamespace Spire\n{\n\tnamesp"
  },
  {
    "path": "Source/SpireCore/Syntax.h",
    "chars": 45094,
    "preview": "#ifndef RASTER_RENDERER_SYNTAX_H\n#define RASTER_RENDERER_SYNTAX_H\n\n#include \"../CoreLib/Basic.h\"\n#include \"Lexer.h\"\n#inc"
  },
  {
    "path": "Source/SpireCore/SyntaxVisitors.h",
    "chars": 838,
    "preview": "#ifndef RASTER_RENDERER_SYNTAX_PRINTER_H\n#define RASTER_RENDERER_SYNTAX_PRINTER_H\n\n#include \"Diagnostics.h\"\n#include \"Sy"
  },
  {
    "path": "Source/SpireCore/TypeLayout.cpp",
    "chars": 11569,
    "preview": "// TypeLayout.cpp\n#include \"TypeLayout.h\"\n\n#include \"Syntax.h\"\n#include \"SymbolTable.h\"\n\n#include <assert.h>\n\nnamespace "
  },
  {
    "path": "Source/SpireCore/TypeLayout.h",
    "chars": 2354,
    "preview": "#ifndef SPIRE_TYPE_LAYOUT_H\n#define SPIRE_TYPE_LAYOUT_H\n\n#include \"../CoreLib/Basic.h\"\n#include \"IL.h\"\n\nnamespace Spire "
  },
  {
    "path": "Source/SpireCore/TypeTranslation.cpp",
    "chars": 1804,
    "preview": "#include \"TypeTranslation.h\"\n#include \"SymbolTable.h\"\n\nnamespace Spire\n{\n\tnamespace Compiler\n\t{\n\t\tRefPtr<ILType> Transla"
  },
  {
    "path": "Source/SpireCore/TypeTranslation.h",
    "chars": 437,
    "preview": "#ifndef SPIRE_TYPE_TRANSLATION_H\n#define SPIRE_TYPE_TRANSLATION_H\n\n#include \"Syntax.h\"\n#include \"IL.h\"\n\nnamespace Spire\n"
  },
  {
    "path": "Source/SpireCore/VariantIR.cpp",
    "chars": 7555,
    "preview": "#include \"VariantIR.h\"\n#include \"Closure.h\"\n#include \"StringObject.h\"\n#include \"GetDependencyVisitor.h\"\n\nnamespace Spire"
  },
  {
    "path": "Source/SpireCore/VariantIR.h",
    "chars": 2134,
    "preview": "#ifndef VARIANT_IR_H\n#define VARIANT_IR_H\n\n#include \"Syntax.h\"\n\nnamespace Spire\n{\n\tnamespace Compiler\n\t{\n\t\tclass ShaderC"
  },
  {
    "path": "Source/SpireLib/SpireLib.cpp",
    "chars": 46643,
    "preview": "#include \"SpireLib.h\"\n#include \"../CoreLib/LibIO.h\"\n#include \"../CoreLib/Tokenizer.h\"\n#include \"../SpireCore/StdInclude."
  },
  {
    "path": "Source/SpireLib/SpireLib.h",
    "chars": 1537,
    "preview": "#ifndef LIB_BAKER_SL_H\n#define LIB_BAKER_SL_H\n\n#include \"../CoreLib/Basic.h\"\n#include \"../CoreLib/Tokenizer.h\"\n#include "
  },
  {
    "path": "Source/SpireLib/SpireLib.vcxproj",
    "chars": 16543,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"14.0\" xmlns=\"http://schemas.microso"
  },
  {
    "path": "Source/SpireLib/SpireLib.vcxproj.filters",
    "chars": 1251,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuil"
  },
  {
    "path": "Spire.h",
    "chars": 30811,
    "preview": "#ifndef SPIRE_H\n#define SPIRE_H\n\n#ifdef _MSC_VER\n#ifdef SPIRE_COMPILING_DLL\n#define SPIRE_API __declspec(dllexport)\n#els"
  },
  {
    "path": "SpireAllSource.h",
    "chars": 1598,
    "preview": "#ifndef SPIRE_NO_CORE_LIB\n#include \"Source/CoreLib/CommandLineParser.cpp\"\n#include \"Source/CoreLib/LibIO.cpp\"\n#include \""
  },
  {
    "path": "Tests/Diagnostics/break-outside-loop.spire",
    "chars": 57,
    "preview": "// `break` where it isn't allowed\n\nvoid foo() { break; }\n"
  },
  {
    "path": "Tests/Diagnostics/break-outside-loop.spire.expected",
    "chars": 164,
    "preview": "result code = -1\nstandard error = {\nTests/Diagnostics/break-outside-loop.spire(3): error 30003: 'break' must appear insi"
  },
  {
    "path": "Tests/Diagnostics/call-argument-type.spire",
    "chars": 108,
    "preview": "// call function with wrong argument type\n\nstruct A {};\nstruct B {};\n\nvoid f(A a) {}\nvoid g(B b)\n{\n\tf(b);\n}\n"
  },
  {
    "path": "Tests/Diagnostics/call-argument-type.spire.expected",
    "chars": 154,
    "preview": "result code = -1\nstandard error = {\nTests/Diagnostics/call-argument-type.spire(9): error 30021: f: no overload takes arg"
  },
  {
    "path": "Tests/Diagnostics/continue-outside-loop.spire",
    "chars": 63,
    "preview": "// `continue` where it isn't allowed\n\nvoid foo() { continue; }\n"
  },
  {
    "path": "Tests/Diagnostics/continue-outside-loop.spire.expected",
    "chars": 170,
    "preview": "result code = -1\nstandard error = {\nTests/Diagnostics/continue-outside-loop.spire(3): error 30004: 'continue' must appea"
  },
  {
    "path": "Tests/Diagnostics/expected-token-eof.spire",
    "chars": 58,
    "preview": "// expected one token, but got EOF\n\nint foo()\n{\n\tint a = 3"
  },
  {
    "path": "Tests/Diagnostics/expected-token-eof.spire.expected",
    "chars": 157,
    "preview": "result code = -1\nstandard error = {\nTests/Diagnostics/expected-token-eof.spire(0): error 20001: unexpected end of file, "
  },
  {
    "path": "Tests/Diagnostics/expected-token.spire",
    "chars": 66,
    "preview": "// expected one token, but got another\n\nint foo()\n{\n\tint a = 3 ]\n}"
  },
  {
    "path": "Tests/Diagnostics/expected-token.spire.expected",
    "chars": 145,
    "preview": "result code = -1\nstandard error = {\nTests/Diagnostics/expected-token.spire(5): error 20001: unexpected ']', expected ';'"
  },
  {
    "path": "Tests/Diagnostics/function-redefinition.spire",
    "chars": 84,
    "preview": "// redefining a function\n\nint foo(int a) { return 0; }\nint foo(int b) { return 1; }\n"
  },
  {
    "path": "Tests/Diagnostics/function-redefinition.spire.expected",
    "chars": 158,
    "preview": "result code = -1\nstandard error = {\nTests/Diagnostics/function-redefinition.spire(4): error 30001: 'foo(int)': function "
  },
  {
    "path": "Tests/Diagnostics/hull-shader-invalid-domain.spire",
    "chars": 1504,
    "preview": "// `HullShader` without `Domain` attribute\n\npipeline P\n{\n    world CoarseVertex;\n    world ControlPoint;\n    world Corne"
  },
  {
    "path": "Tests/Diagnostics/hull-shader-invalid-domain.spire.expected",
    "chars": 179,
    "preview": "result code = -1\nstandard error = {\nTests/Diagnostics/hull-shader-invalid-domain.spire(38): error 50053: 'Domain' should"
  },
  {
    "path": "Tests/Diagnostics/hull-shader-no-domain.spire",
    "chars": 1506,
    "preview": "// `HullShader` without `Domain` attribute\n\npipeline P\n{\n    world CoarseVertex;\n    world ControlPoint;\n    world Corne"
  },
  {
    "path": "Tests/Diagnostics/hull-shader-no-domain.spire.expected",
    "chars": 166,
    "preview": "result code = -1\nstandard error = {\nTests/Diagnostics/hull-shader-no-domain.spire(31): error 50052: 'HullShader' require"
  },
  {
    "path": "Tests/Diagnostics/illegal-character.spire",
    "chars": 25,
    "preview": "// illegal character\n\n$\n\n"
  },
  {
    "path": "Tests/Diagnostics/illegal-character.spire.expected",
    "chars": 144,
    "preview": "result code = -1\nstandard error = {\nTests/Diagnostics/illegal-character.spire(3): error 10000: Illegal character '\\x24'\n"
  },
  {
    "path": "Tests/Diagnostics/missing-file.spire",
    "chars": 70,
    "preview": "// trying to import a non-existant file\n\nusing \"does-not-exist.spire\"\n"
  },
  {
    "path": "Tests/Diagnostics/missing-file.spire.expected",
    "chars": 242,
    "preview": "result code = -1\nstandard error = {\nTests/Diagnostics/missing-file.spire(0): error 20001: unexpected end of file, expect"
  },
  {
    "path": "Tests/Diagnostics/parameter-already-defined.spire",
    "chars": 66,
    "preview": "// re-use parameter name\n\nint foo( int a, float a ) { return 0; }\n"
  },
  {
    "path": "Tests/Diagnostics/parameter-already-defined.spire.expected",
    "chars": 158,
    "preview": "result code = -1\nstandard error = {\nTests/Diagnostics/parameter-already-defined.spire(3): error 30002: parameter 'a' alr"
  },
  {
    "path": "Tests/Diagnostics/undefined-identifier.spire",
    "chars": 59,
    "preview": "// use of undefined identifier\n\nvoid foo()\n{\n\tint a = b;\n}\n"
  },
  {
    "path": "Tests/Diagnostics/undefined-identifier.spire.expected",
    "chars": 148,
    "preview": "result code = -1\nstandard error = {\nTests/Diagnostics/undefined-identifier.spire(5): error 30015: undefined identifier '"
  },
  {
    "path": "Tests/Diagnostics/variable-void-type.spire",
    "chars": 54,
    "preview": "// variable with `void` type\n\nvoid foo()\n{\n\tvoid a;\n}\n"
  },
  {
    "path": "Tests/Diagnostics/variable-void-type.spire.expected",
    "chars": 141,
    "preview": "result code = -1\nstandard error = {\nTests/Diagnostics/variable-void-type.spire(5): error 30009: invalid type 'void'.\n}\ns"
  },
  {
    "path": "Tests/Diagnostics/while-predicate-type.spire",
    "chars": 89,
    "preview": "// bad type for `while` predicate\n\nstruct S {};\n\nvoid foo()\n{\n\tS s;\n\twhile(s) {break;}\n}\n"
  },
  {
    "path": "Tests/Diagnostics/while-predicate-type.spire.expected",
    "chars": 164,
    "preview": "result code = -1\nstandard error = {\nTests/Diagnostics/while-predicate-type.spire(8): error 30010: 'while': expression mu"
  },
  {
    "path": "Tests/FrontEnd/lexer-comments.spire",
    "chars": 164,
    "preview": "// confirming that the lexer handles comments correctly\n\n// line comment\n\n/* block comment\n*/\n\n/* block comments don't n"
  },
  {
    "path": "Tests/FrontEnd/parser-decls.spire",
    "chars": 504,
    "preview": "// test that we can parse all the expected kinds of declarations\n\n// global-scope `using` is another test\n\n// pipeline\np"
  },
  {
    "path": "Tests/FrontEnd/parser-empty.spire",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "Tests/FrontEnd/parser-error-unclosed-curly.spire",
    "chars": 46,
    "preview": "shader Test {\n// Note: no closing curly brace\n"
  },
  {
    "path": "Tests/FrontEnd/parser-error-unclosed-curly.spire.expected",
    "chars": 163,
    "preview": "result code = -1\nstandard error = {\nTests/FrontEnd/parser-error-unclosed-curly.spire(0): error 20001: unexpected end of "
  },
  {
    "path": "Tests/FrontEnd/parser-using-file-a.spireh",
    "chars": 100,
    "preview": "// this file exists to be included by \"parser-using-file.spire\"\n\nfloat a(float x) { return x * x; }\n"
  },
  {
    "path": "Tests/FrontEnd/parser-using-file.spire",
    "chars": 123,
    "preview": "// test that we can include a file via `using`\n\nusing \"parser-using-file-a.spireh\";\n\nfloat base( float x ) { return a(x)"
  },
  {
    "path": "Tests/FrontEnd/pipeline-simple.spireh",
    "chars": 989,
    "preview": "// pipeline-simple.spireh\n\n\n// TODO(tfoley): strip this down to a minimal pipeline\n\npipeline StandardPipeline\n{\n    [Pin"
  },
  {
    "path": "Tests/FrontEnd/struct.spire",
    "chars": 791,
    "preview": "// test that `struct` decls work\n\n#include \"pipeline-simple.spireh\"\n\n// struct declaration\nstruct Foo\n{\n\tvec3 a;\n\tvec3 b"
  },
  {
    "path": "Tests/FrontEnd/typedef.spire",
    "chars": 133,
    "preview": "// test that we can `typedef` a type\n\ntypedef float F32;\n\nF32 foo()\n{\n\tfloat x = 123.0;\n\treturn x;\n}\n\nfloat bar()\n{\n\tret"
  },
  {
    "path": "Tests/HLSLCodeGen/DeferredLighting.fs.hlsl",
    "chars": 7257,
    "preview": "#pragma warning(disable: 3576)\n#pragma pack_matrix( row_major )\nstruct ArrInStruct\n{\nfloat3 ttt;\nfloat3 points[4];\n};\nst"
  },
  {
    "path": "Tests/HLSLCodeGen/DeferredLighting.vs.hlsl",
    "chars": 3002,
    "preview": "#pragma warning(disable: 3576)\n#pragma pack_matrix( row_major )\nstruct SkinningResult\n{\nfloat3 pos;\nfloat3 tangent;\nfloa"
  },
  {
    "path": "Tests/HLSLCodeGen/StandardPipeline.spire",
    "chars": 3928,
    "preview": "pipeline StandardPipeline\n{\n    [Pinned]\n    input world MeshVertex;\n\n    world CoarseVertex;\n    world Fragment;\n    \n "
  },
  {
    "path": "Tests/HLSLCodeGen/Utils.spire",
    "chars": 18264,
    "preview": "\nvec4 QuaternionMul(vec4 q1, vec4 q2)\n{\n    vec4 rs;\n    rs.x = q1.w*q2.x + q1.x*q2.w + q1.y*q2.z - q1.z*q2.y;\n    rs.y "
  },
  {
    "path": "Tests/HLSLCodeGen/shader1.spire",
    "chars": 3171,
    "preview": "using \"StandardPipeline.spire\";\nusing \"Utils.spire\";\n\nstruct ArrInStruct\n{\n\tvec3 ttt;\n\tvec3[4] points;\n}\n\nint Test(in ve"
  },
  {
    "path": "Tests/Preprocessor/define-function-like.spire",
    "chars": 339,
    "preview": "// support for function-like macros\n\n#define FOO(x) 1.0 + x\n\nfloat foo(float y) { return FOO(y) * 2.0; }\n\n// simple toke"
  },
  {
    "path": "Tests/Preprocessor/define-function-like.spire.expected",
    "chars": 240,
    "preview": "result code = -1\nstandard error = {\nTests/Preprocessor/define-function-like.spire(15): error 30015: undefined identifier"
  },
  {
    "path": "Tests/Preprocessor/define-simple.spire",
    "chars": 165,
    "preview": "// #define support\n\n#define FOO 1.0f\n\nfloat foo() { return FOO + 2.0; }\n\n#define BAR 99\n\n#if BAR > 10\nint bar() { return"
  },
  {
    "path": "Tests/Preprocessor/if.spire",
    "chars": 188,
    "preview": "// #ifdef support\n\n\n#if (1 - 1*2) < 0\nint foo() { return 0; }\n#else\nBadThing thatWontCompile;\n#endif\n\n#if (1 >> 1) && ~9"
  },
  {
    "path": "Tests/Preprocessor/ifdef.spire",
    "chars": 184,
    "preview": "// #ifdef support\n\n#define A\n\n#ifdef A\nint foo() { return 0; }\n#else\nBadThing thatWontCompile;\n#endif\n\n#ifdef BadThing\nA"
  },
  {
    "path": "Tests/Preprocessor/include-a.spireh",
    "chars": 48,
    "preview": "// #include support\n\nint bar() { return foo(); }"
  },
  {
    "path": "Tests/Preprocessor/include.spire",
    "chars": 102,
    "preview": "// #include support\n\nint foo() { return 0; }\n\n#include \"include-a.spireh\"\n\nint baz() { return bar(); }"
  },
  {
    "path": "Tests/SpireTestTool/SpireTestTool.vcxproj",
    "chars": 12074,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"14.0\" xmlns=\"http://schemas.micros"
  },
  {
    "path": "Tests/SpireTestTool/SpireTestTool.vcxproj.filters",
    "chars": 1132,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuil"
  },
  {
    "path": "Tests/SpireTestTool/main.cpp",
    "chars": 4057,
    "preview": "// main.cpp\n\n#include \"../../Source/CoreLib/LibIO.h\"\n\nusing namespace CoreLib::Basic;\nusing namespace CoreLib::IO;\n\n#inc"
  },
  {
    "path": "Tests/SpireTestTool/os.cpp",
    "chars": 7809,
    "preview": "// os.cpp\n#include \"os.h\"\n\n#include <assert.h>\n#include <stdio.h>\n#include <stdlib.h>\n\nusing namespace CoreLib::Basic;\n\n"
  },
  {
    "path": "Tests/SpireTestTool/os.h",
    "chars": 3663,
    "preview": "// os.h\n\n#include \"../../Source/CoreLib/LibIO.h\"\n\n// This file encapsulates the platform-specific operations needed by t"
  },
  {
    "path": "test.bat",
    "chars": 107,
    "preview": "@echo off\nsetlocal\npushd %~dp0\n\n:: TODO: ensure that everything is built?\n\n.\\Source\\Debug\\SpireTestTool.exe"
  }
]

About this extraction

This page contains the full source code of the csyonghe/Spire GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 171 files (1.4 MB), approximately 420.6k tokens, and a symbol index with 1616 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!