forked from stakx/ecma-335
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start by running add-hyperlinks-to-numbered-sections.js for the new f…
…iles Also manually fixed a couple typo link syntax
- Loading branch information
1 parent
f181e46
commit 1986903
Showing
12 changed files
with
19 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
## I.8.2.1.1 Managed pointers and related types | ||
|
||
A **managed pointer** (§[I.12.1.1.2](i.12.1.1.2-object-reference-and-managed-pointer-types-o-and-ref.md)), or **byref** (§[I.8.6.1.3](#todo-missing-hyperlink), §[I.12.4.1.5.2](i.12.4.1.5.2-by-reference-parameters.md)), can point to a local variable, parameter, field of a compound type, or element of an array. However, when a call crosses a remoting boundary (see §[I.12.5](i.12.5-proxies-and-remoting.md)) a conforming implementation can use a copy-in/copyout mechanism instead of a managed pointer. Thus programs shall not rely on the aliasing behavior of true pointers. Managed pointer types are only allowed for local variable (§[I.8.6.1.3](#todo-missing-hyperlink)) and parameter signatures (§[I.8.6.1.4](#todo-missing-hyperlink)); they cannot be used for field signatures (§[I.8.6.1.2](#todo-missing-hyperlink)), as the element type of an array (§[I.8.9.1](i.8.9.1-array-types.md)), and boxing a value of managed pointer type is disallowed (§[I.8.2.4](i.8.2.4-boxing-and-unboxing-of-values.md)). Using a managed pointer type for the return type of methods (§[I.8.6.1.5](#todo-missing-hyperlink)) is not verifiable (§[I.8.8](i.8.8-type-safety-and-verification.md)). | ||
A **managed pointer** (§[I.12.1.1.2](i.12.1.1.2-object-reference-and-managed-pointer-types-o-and-ref.md)), or **byref** (§[I.8.6.1.3](i.8.6.1.3-local-signatures.md), §[I.12.4.1.5.2](i.12.4.1.5.2-by-reference-parameters.md)), can point to a local variable, parameter, field of a compound type, or element of an array. However, when a call crosses a remoting boundary (see §[I.12.5](i.12.5-proxies-and-remoting.md)) a conforming implementation can use a copy-in/copyout mechanism instead of a managed pointer. Thus programs shall not rely on the aliasing behavior of true pointers. Managed pointer types are only allowed for local variable (§[I.8.6.1.3](i.8.6.1.3-local-signatures.md)) and parameter signatures (§[I.8.6.1.4](i.8.6.1.4-paramater-signatures.md)); they cannot be used for field signatures (§[I.8.6.1.2](i.8.6.1.2-location-signatures.md)), as the element type of an array (§[I.8.9.1](i.8.9.1-array-types.md)), and boxing a value of managed pointer type is disallowed (§[I.8.2.4](i.8.2.4-boxing-and-unboxing-of-values.md)). Using a managed pointer type for the return type of methods (§[I.8.6.1.5](i.8.6.1.5-method-signatures.md)) is not verifiable (§[I.8.8](i.8.8-type-safety-and-verification.md)). | ||
|
||
_[Rationale:_ For performance reasons items on the GC heap may not contain references to the interior of other GC objects, this motivates the restrictions on fields and boxing. Further returning a managed pointer which references a local or parameter variable may cause the reference to outlive the variable, hence it is not verifiable. _end rationale]_ | ||
|
||
There are three value types in the Base Class Library (see [Partition IV - BCL](#todo-missing-hyperlink)): `System.TypedReference`, `System.RuntimeArgumentHandle`, and `System.ArgIterator`; which are treated specially by the CLI. | ||
|
||
The value type `System.TypedReference`, or **typed reference** or **typedref**, (§[I.8.2.2](i.8.2.2-built-in-value-and-reference-types.md), §[I.8.6.1.3](#todo-missing-hyperlink), §[I.12.4.1.5.3]) contains both a managed pointer to a location and a runtime representation of the type that can be stored at that location. Typed references have the same restrictions as byrefs. Typed references are created by the CIL instruction mkrefany (see [Partition III](#todo-missing-hyperlink)). The value types `System.RuntimeArgumentHandle` and `System.ArgIterator` (see [Partition IV](#todo-missing-hyperlink) and CIL instruction `arglist` in [Partition III](#todo-missing-hyperlink)), contain pointers into the VES stack. They can be used for local variable and parameter signatures. The use of these types for fields, method return types, the element type of an array, or in boxing is not verifiable (§[I.8.8](i.8.8-type-safety-and-verification.md)). These two types are referred to as **byref-like** types. | ||
The value type `System.TypedReference`, or **typed reference** or **typedref**, (§[I.8.2.2](i.8.2.2-built-in-value-and-reference-types.md), §[I.8.6.1.3](i.8.6.1.3-local-signatures.md), §[I.12.4.1.5.3]) contains both a managed pointer to a location and a runtime representation of the type that can be stored at that location. Typed references have the same restrictions as byrefs. Typed references are created by the CIL instruction mkrefany (see [Partition III](#todo-missing-hyperlink)). The value types `System.RuntimeArgumentHandle` and `System.ArgIterator` (see [Partition IV](#todo-missing-hyperlink) and CIL instruction `arglist` in [Partition III](#todo-missing-hyperlink)), contain pointers into the VES stack. They can be used for local variable and parameter signatures. The use of these types for fields, method return types, the element type of an array, or in boxing is not verifiable (§[I.8.8](i.8.8-type-safety-and-verification.md)). These two types are referred to as **byref-like** types. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.