Update the Alloy blogpost to point to the GitHub files.
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
parent
77ec1aa969
commit
12aca7ca58
|
@ -435,7 +435,7 @@ apply Alloy. First, here's the code in C++ that defines the various flags
|
|||
I'd be working with (though I've omitted flags that are not currently
|
||||
used in the implementation).
|
||||
|
||||
```C++
|
||||
{{< githubsnippet "chapel-lang/chapel" "390187df504f58cbf721a87d5632cdf7ea37563f" "frontend/include/chpl/resolution/scope-types.h" "C++" 45 >}}
|
||||
enum {
|
||||
/** Public */
|
||||
PUBLIC = 1,
|
||||
|
@ -450,7 +450,7 @@ used in the implementation).
|
|||
/** Something other than a method declaration */
|
||||
NOT_METHOD = 128,
|
||||
};
|
||||
```
|
||||
{{< /githubsnippet >}}
|
||||
|
||||
These are the flags that we model using a `Bitset`: `PUBLIC`,
|
||||
`METHOD_FIELD`, and `METHOD` are modeled using `positiveFlags`, and
|
||||
|
@ -461,7 +461,7 @@ system (particularly when we _know_ it's an approximation). However, the
|
|||
flags aren't used arbitrarily; in fact, it wasn't too hard to track down the
|
||||
most important place in the code where bitsets are built.
|
||||
|
||||
```C++{linenos=true, linenostart=914}
|
||||
{{< githubsnippet "chapel-lang/chapel" "390187df504f58cbf721a87d5632cdf7ea37563f" "frontend/lib/resolution/scope-queries.cpp" "C++" 914 >}}
|
||||
IdAndFlags::Flags curFilter = 0;
|
||||
/* ... some unrelated code ... */
|
||||
if (skipPrivateVisibilities) {
|
||||
|
@ -472,7 +472,7 @@ most important place in the code where bitsets are built.
|
|||
} else if (!includeMethods && receiverScopes.empty()) {
|
||||
curFilter |= IdAndFlags::NOT_METHOD;
|
||||
}
|
||||
```
|
||||
{{< /githubsnippet >}}
|
||||
|
||||
The above code converts the current search parameters into `Bitfield`
|
||||
flags. For instance, if a `use` statement is being processed that doesn't
|
||||
|
|
Loading…
Reference in New Issue
Block a user