For faster navigation, this Iframe is preloading the Wikiwand page for マネージコード.

マネージコード

この記事は検証可能参考文献や出典が全く示されていないか、不十分です。 出典を追加して記事の信頼性向上にご協力ください。(このテンプレートの使い方)出典検索?"マネージコード" – ニュース · 書籍 · スカラー · CiNii · J-STAGE · NDL · dlib.jp · ジャパンサーチ · TWL (2019年8月)

マネージコード (managed code) とは、.NET Frameworkにおける共通言語基盤 (CLI) に準拠した仮想機械上で実行される命令(コード)のことである。

これに対してマネージコード以外のコードはアンマネージコード (unmanaged code) やネイティブコード (native code) と呼ばれる。

マネージコードの実行

[編集]

マネージコードのプログラムは通常C#VB.NETといった人間が読み書きしやすい言語で書かれ、共通中間言語 (CIL) にコンパイルされる。

コードが実行される際、CILは仮想実行システム (VES) で実行環境(プロセッサアーキテクチャ)に依存した機械語にコンパイルされる。このコンパイルはマネージ実行環境のコンパイラによってなされるので、マネージ実行環境はコードが何をしようとしているのかを完全に知ることができる。故にガベージコレクションフック例外処理型安全性の保証、配列境界のチェックなどを行うことができる。

これは古典的にJITコンパイルと言われる手法である。しかし多くのJITコンパイラと違い、仮想機械が機械語に変換する擬似機械語が格納されたファイルは環境依存の機械語(x86PowerPCなど)をも含むことができる。これはAppleUniversal Binaryの考えに似ている。

その他の用例

[編集]

JavaScalaKotlinなどのJava仮想マシン上で動作する言語もまた、中間表現であるJavaバイトコードを出力できる言語であり、管理された安全なコードを記述できるという意味でマネージ言語と呼ばれることもある[1]

脚注

[編集]

関連項目

[編集]
{{bottomLinkPreText}} {{bottomLinkText}}
マネージコード
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?