From 7fe3e053f91e29808f9f110b7165341fc1cba047 Mon Sep 17 00:00:00 2001 From: Zhongxing Xu Date: Wed, 1 Apr 2009 05:26:39 +0000 Subject: [PATCH] Adjust doc format. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68190 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/AnalyzerRegions.txt | 61 ++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/docs/AnalyzerRegions.txt b/docs/AnalyzerRegions.txt index eb661d3914..1e496813ab 100644 --- a/docs/AnalyzerRegions.txt +++ b/docs/AnalyzerRegions.txt @@ -130,36 +130,37 @@ MEMORY REGIONS and REGION TAXONOMY Pointer Casts -Pointer casts allow people to impose different 'views' onto a chunk of memory. - -Usually we have two kinds of casts. One kind of casts cast down with in the type -hierarchy. It imposes more specific views onto more generic memory regions. The -other kind of casts cast up with in the type hierarchy. It strips away more -specific views on top of the more generic memory regions. - -We simulate the down casts by layering another TypedViewRegion on top of the -original region. We simulate the up casts by striping away the top -TypedViewRegion. Down casts is usually simple. For up casts, if the there is no -TypedViewRegion to be stripped, we return the original region. If the underlying -region is of the different type than the cast-to type, we flag an error state. - -For toll-free bridging casts, we return the original region. + Pointer casts allow people to impose different 'views' onto a chunk of memory. + + Usually we have two kinds of casts. One kind of casts cast down with in the + type hierarchy. It imposes more specific views onto more generic memory + regions. The other kind of casts cast up with in the type hierarchy. It strips + away more specific views on top of the more generic memory regions. + + We simulate the down casts by layering another TypedViewRegion on top of the + original region. We simulate the up casts by striping away the top + TypedViewRegion. Down casts is usually simple. For up casts, if the there is + no TypedViewRegion to be stripped, we return the original region. If the + underlying region is of the different type than the cast-to type, we flag an + error state. + + For toll-free bridging casts, we return the original region. Region Bindings -The following region kinds are boundable: VarRegion, CompoundLiteralRegion, -StringRegion, ElementRegion, FieldRegion, and ObjCIvarRegion. - -When binding regions, we perform canonicalization on element regions and field -regions. This is because we can have different views on the same region, some of -which are essentially the same view with different sugar type names. - -To canonicalize a region, we get the canonical types for all TypedViewRegions -along the way up to the root region, and make new TypedViewRegions with those -canonical types. - -All bindings and retrievings are done on the canonicalized regions. - -Canonicalization is transparent outside the region store manager, and more -specifically, unaware outside the Bind() and Retrieve() method. We don't need to -consider region canonicalization when doing pointer cast. + The following region kinds are boundable: VarRegion, CompoundLiteralRegion, + StringRegion, ElementRegion, FieldRegion, and ObjCIvarRegion. + + When binding regions, we perform canonicalization on element regions and field + regions. This is because we can have different views on the same region, some + of which are essentially the same view with different sugar type names. + + To canonicalize a region, we get the canonical types for all TypedViewRegions + along the way up to the root region, and make new TypedViewRegions with those + canonical types. + + All bindings and retrievings are done on the canonicalized regions. + + Canonicalization is transparent outside the region store manager, and more + specifically, unaware outside the Bind() and Retrieve() method. We don't need + to consider region canonicalization when doing pointer cast. -- 2.40.0