Shared Source CLI 2.0 Directory Layout Overview

2 篇文章 0 订阅

sscli20 is the top-level directory

To build the SSCLI, you must be running within a command window in Microsoft Windows®. The build procedure is detailed in the document building_sscli.html; but to summarize, you first set up your environment by running one of the env scripts with one of the build options (checked, debug, or free) and then run the buildall.bat batch file. 

Key files in this directory:

  • license.txt and license_banner_for_sources.txt
  • env.bat
  • buildall.cmd
  • readfirst.html

sscli20/binaries.x86*.rotor contains build binary output

This directory is generated during the build process and contains the build output, including managed and unmanaged executables and shared dynamic link libraries and class libraries, as well as debugging symbols and the directory used as the global assembly cache.  Note that some core build output can be found in the sscli20/binaries.x86*.rotor root directory, while tools are mostly in sdk/bin directory.

Each target that you build (debug, checked, or free) will generate a separate set of build output subdirectories. The "*" character will be replaced with "dbg" on debug builds, "chk" on checked builds and "fre" on free builds.

Note: The sscli20/binaries.x86*.rotor directory will only exist after a build has completed.

sscli20/clr/src contains the core CLI and base class library implementations

The sscli20/clr/src directory contains a substantial amount of the CLI and all the base class library code. The following table contains a detailed description of the key subdirectories.
 

SubdirectorySubdirectory Description
vm subdirectoryContains the bulk of the CLI core implementation, including the garbage collector, the class loader, the type system, error reporting, application domains, assemblies, delegate support, reflection, security, and the code manager.

The vm subdirectory contains numerous valuable files to review. (For those curious about the build process, note that vm has a dirs file, but the sources file can be found in the vm/wks subdirectory.)

csharp subdirectoryContains the sources for the C# compiler (csc.exe) and the Assembly Linker.
classlibnative subdirectoryContains common types and internationalization routines.
dacupdatedll subdirectoryBuild scripts to autogenerate tables describing layout for the SOS debugger extension.
jit64 subdirectoryContains the source for the implementation of the standalone verifier. Sorry, no actual 64bit JIT here.
inc subdirectoryCommon include files.
ipcman subdirectoryContains the sources for interprocess communication.
managedlibraries subdirectoryContains source for remoting and the soapserializer.
utilcode subdirectoryContains core routines used throughout the runtime, the tools, and the C# compiler.

Includes code for path handling and parsing, array and hashtable management, C runtime routines, character case support, library and assembly loading, debugging and logging instrumentation, and synchronization, as well as utility code for many miscellaneous tasks such as formatting, GUID creation, error handling, and registry and configuration access.

md subdirectoryContains a metadata reader and writer.
fjit subdirectoryContains the SSCLI JIT compiler and its verifier.
fusion subdirectoryContains code that implements binding to assemblies, policy checking for the binding process, and the global assembly cache.
bcl subdirectoryContains C# code for the ECMA base class libraries. Most of the interesting code is in system and its sub-directories.
debug subdirectoryContains the source code for the Runtime Debugger.
ilasm subdirectoryContains the source code for the CIL Assembler.
ildasm subdirectoryContains the source code for the CIL Disassembler.
tools subdirectoryContains source code for the PEVerify tool, a managed code launch tool (clix.exe), a metadata dump tool (metainfo.exe), a reader/writer for managed debugger symbols, and numerous other tools.
toolbox subdirectoryContains source code for caspol, strike and other tools.
dlls subdirectoryContains subdirectories for all of the native shared libraries that are linked as a part of the build process.

These directories are useful for utility functions for building tools.

xmlparser subdirectoryContains source for the XML parser.

sscli20/docs is documentation for the Shared Source CLI

The sscli20/docs directory contains the documentation for the SSCLI.

Some points of interest in this directory:

  • relnotes.html - release notes.
  • testing_overview.html - overview of the testing infrastructure.
  • glossary.html - glossary of terms used in the documentation and source code.
  • index.html - index of documentation.

The subdirectories contain additional documentation.  See the index.html for the full details.

sscli20/fx/src contains C# code that implements fundamental managed class libraries

The sscli20/fx/src directory contains several subdirectories with implementations of major namespaces, such as regular expression support, XML support, and networking. There is also code in the subdirectories for other miscellaneous features.

sscli20/jscript/engine contains the sources for a JScript compiler

The JScript compiler is written entirely in C#, so it is interesting both as an example of a large C# project and as an example of how to compile against the CLI intermediate language. The compiler uses the System.Reflection classes extensively in producing its managed executable output. JScript is also a very dynamic language, and as such, demonstrates many useful compiler techniques for generating CIL and runtime structures on the fly.

sscli20/pal contains implementations of the Platform Adaptation Layer (PAL)

Within the pal subdirectory there are two subdirectories, unix and win32. The unix directory contains the implementation of the PAL for UNIX system-based platforms and, logically enough, the win32 directory contains the Windows PAL. There is also an important header file, rotor_pal.h, which declares all of the APIs that a developer building a new PAL would have to implement. See the PAL Specification for more details on this topic.

The Win32 PAL is primarily a thin wrapper over the underlying Win32 API with some logging and parameter-checking functionality in some cases. The code for doing portable exception handling (in exception.c) might be useful to read.

The PAL for UNIX system-based platforms, on the other hand, contains a substantial amount of significant code.  This code serves to map from Win32 API calls into equivalent functionality on UNIX system-based platforms where this exists, or implements that functionality where it does not exist.  Some examples of the mapping work include Unicode support, exception handling, memory-mapped files, debugger support, sockets, and file I/O as well as other core functionality.

sscli20/palrt/src contains the implementation of the PAL runtime

To make life simpler for developers who wish to create new PAL implementations, some of the more generic or reusable implementation details have been split out into a separate library, called the PAL runtime.  Even if you are not implementing a PAL the sscli20/palrt/src directory still might be of interest because it contains a number of useful odds and ends, including:

  • Implementation of the simple COM APIs used in SSCLI.
  • Cryptographic code used to support strong names and the CLI.
  • C runtime functions.
  • Math and decimal math routines.
  • Support for streaming over memory.
  • String, URL, and path name parsing and manipulation.
  • Configuration and resource loading.
  • Code used when calling from platform-native code to managed code.

The PAL runtime is used by the PAL on UNIX system-based platforms. Note the reduced set of Windows header files in sscli20/palrt/inc subdirectory; these are included in order to pull in these API helpers. If you wish to implement a new PAL, you will probably want to use the same technique.

sscli20/samples contains source code for samples

The sscli20/samples directory contains samples that demonstrate SSCLI functionality.

sscli20/tests contains numerous tests and test suites

The sscli20/tests directory contains a large number of small tests that can be used, once you have built the sources, to avoid regressions while modifying the code. The file rrun.pl is a Perl driver containing useful comments embedded within it that can be used to run the tests for the runtime itself, while the palsuite subdirectory contains tests for the PAL implementation for UNIX system-based platforms.

sscli20/tools contains source code for portable build tools

Once a PAL has been created, using the native tool chain for whatever platform is being built, a set of portable build tools are then built against the PAL. This is the bootstrap that enables the bulk of the build process; these tools use the PAL APIs to accomplish their work. Documentation for all of these tools can be found in the sscli20/docs/buildtools directory; see in particular build.exe, binplace.exe, and nmake.exe.

 

1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 、4下载使用后,可先查看README.md或论文文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。 5、资源来自互联网采集,如有侵权,私聊博主删除。 6、可私信博主看论文后选择购买源代码。 1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合;、下载 4使用后,可先查看README.md或论文文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。 5、资源来自互联网采集,如有侵权,私聊博主删除。 6、可私信博主看论文后选择购买源代码。 1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合;、 4下载使用后,可先查看README.md或论文文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。 5、资源来自互联网采集,如有侵权,私聊博主删除。 6、可私信博主看论文后选择购买源代码。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值