diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-09-17 15:01:51 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-09-17 15:01:51 -0700 |
commit | f344b250f6f062a1a1902bf69b23ebf9b565de0e (patch) | |
tree | 199bd32a9aee198d5028b1c21b83d2cf0944b2b6 /html/089scenario_filesystem.cc.html | |
parent | 897ae8c1855f830d8819759ea327d147f28a09bf (diff) | |
download | mu-f344b250f6f062a1a1902bf69b23ebf9b565de0e.tar.gz |
3395
Diffstat (limited to 'html/089scenario_filesystem.cc.html')
-rw-r--r-- | html/089scenario_filesystem.cc.html | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/html/089scenario_filesystem.cc.html b/html/089scenario_filesystem.cc.html index f854cb6e..2d13d5ca 100644 --- a/html/089scenario_filesystem.cc.html +++ b/html/089scenario_filesystem.cc.html @@ -53,22 +53,22 @@ scenario assume-filesystem [ |xyz| ] ] - <span class="Normal">data</span>:address:array:file-mapping<span class="Special"> <- </span>get *filesystem:address:filesystem<span class="Delimiter">,</span> data:offset + <span class="Normal">data</span>:&:@:file-mapping<span class="Special"> <- </span>get *filesystem:&:filesystem<span class="Delimiter">,</span> data:offset <span class="Normal">file1</span>:file-mapping<span class="Special"> <- </span>index *data<span class="Delimiter">,</span> <span class="Constant">0</span> - file1-name:address:array:character<span class="Special"> <- </span>get file1<span class="Delimiter">,</span> name:offset - <span class="Constant">10</span>:array:character/<span class="Special">raw <- </span>copy *file1-name - file1-contents:address:array:character<span class="Special"> <- </span>get file1<span class="Delimiter">,</span> contents:offset - <span class="Constant">100</span>:array:character/<span class="Special">raw <- </span>copy *file1-contents + file1-name:text<span class="Special"> <- </span>get file1<span class="Delimiter">,</span> name:offset + <span class="Constant">10</span>:@:<span class="Normal">char</span>/<span class="Special">raw <- </span>copy *file1-name + file1-contents:text<span class="Special"> <- </span>get file1<span class="Delimiter">,</span> contents:offset + <span class="Constant">100</span>:@:<span class="Normal">char</span>/<span class="Special">raw <- </span>copy *file1-contents <span class="Normal">file2</span>:file-mapping<span class="Special"> <- </span>index *data<span class="Delimiter">,</span> <span class="Constant">1</span> - file2-name:address:array:character<span class="Special"> <- </span>get file2<span class="Delimiter">,</span> name:offset - <span class="Constant">30</span>:array:character/<span class="Special">raw <- </span>copy *file2-name - file2-contents:address:array:character<span class="Special"> <- </span>get file2<span class="Delimiter">,</span> contents:offset - <span class="Constant">40</span>:array:character/<span class="Special">raw <- </span>copy *file2-contents + file2-name:text<span class="Special"> <- </span>get file2<span class="Delimiter">,</span> name:offset + <span class="Constant">30</span>:@:<span class="Normal">char</span>/<span class="Special">raw <- </span>copy *file2-name + file2-contents:text<span class="Special"> <- </span>get file2<span class="Delimiter">,</span> contents:offset + <span class="Constant">40</span>:@:<span class="Normal">char</span>/<span class="Special">raw <- </span>copy *file2-contents <span class="Normal">file3</span>:file-mapping<span class="Special"> <- </span>index *data<span class="Delimiter">,</span> <span class="Constant">2</span> - file3-name:address:array:character<span class="Special"> <- </span>get file3<span class="Delimiter">,</span> name:offset - <span class="Constant">50</span>:array:character/<span class="Special">raw <- </span>copy *file3-name - file3-contents:address:array:character<span class="Special"> <- </span>get file3<span class="Delimiter">,</span> contents:offset - <span class="Constant">60</span>:array:character/<span class="Special">raw <- </span>copy *file3-contents + file3-name:text<span class="Special"> <- </span>get file3<span class="Delimiter">,</span> name:offset + <span class="Constant">50</span>:@:<span class="Normal">char</span>/<span class="Special">raw <- </span>copy *file3-name + file3-contents:text<span class="Special"> <- </span>get file3<span class="Delimiter">,</span> contents:offset + <span class="Constant">60</span>:@:<span class="Normal">char</span>/<span class="Special">raw <- </span>copy *file3-contents memory-should-contain [ <span class="Constant">10</span>:array:character<span class="Special"> <- </span>[a] <span class="Constant">100</span>:array:character<span class="Special"> <- </span>[a bc @@ -92,12 +92,12 @@ scenario assume-filesystem [ |x\\\\|yz| ] ] - <span class="Normal">data</span>:address:array:file-mapping<span class="Special"> <- </span>get *filesystem:address:filesystem<span class="Delimiter">,</span> data:offset + <span class="Normal">data</span>:&:@:file-mapping<span class="Special"> <- </span>get *filesystem:&:filesystem<span class="Delimiter">,</span> data:offset <span class="Normal">file1</span>:file-mapping<span class="Special"> <- </span>index *data<span class="Delimiter">,</span> <span class="Constant">0</span> - file1-name:address:array:character<span class="Special"> <- </span>get file1<span class="Delimiter">,</span> name:offset - <span class="Constant">10</span>:array:character/<span class="Special">raw <- </span>copy *file1-name - file1-contents:address:array:character<span class="Special"> <- </span>get file1<span class="Delimiter">,</span> contents:offset - <span class="Constant">20</span>:array:character/<span class="Special">raw <- </span>copy *file1-contents + file1-name:text<span class="Special"> <- </span>get file1<span class="Delimiter">,</span> name:offset + <span class="Constant">10</span>:@:<span class="Normal">char</span>/<span class="Special">raw <- </span>copy *file1-name + file1-contents:text<span class="Special"> <- </span>get file1<span class="Delimiter">,</span> contents:offset + <span class="Constant">20</span>:@:<span class="Normal">char</span>/<span class="Special">raw <- </span>copy *file1-contents memory-should-contain [ <span class="Constant">10</span>:array:character<span class="Special"> <- </span>[a] <span class="Constant">20</span>:array:character<span class="Special"> <- </span>[x|yz @@ -224,12 +224,12 @@ string munge_filesystem_contents<span class="Delimiter">(</span><span class="Nor <span class="Normal">int</span> filesystem_data_address = allocate<span class="Delimiter">(</span>SIZE<span class="Delimiter">(</span>contents<span class="Delimiter">)</span>*<span class="Constant">2</span> + <span class="Comment">/*</span><span class="Comment">array length</span><span class="Comment">*/</span><span class="Constant">1</span><span class="Delimiter">);</span> <span class="Normal">int</span> curr = filesystem_data_address + <span class="Comment">/*</span><span class="Comment">skip refcount and length</span><span class="Comment">*/</span><span class="Constant">2</span><span class="Delimiter">;</span> <span class="Normal">for</span> <span class="Delimiter">(</span>map<string<span class="Delimiter">,</span> string>::const_iterator p = contents<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != contents<span class="Delimiter">.</span>end<span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span> - put<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> curr<span class="Delimiter">,</span> new_mu_string<span class="Delimiter">(</span>p<span class="Delimiter">-></span>first<span class="Delimiter">));</span> + put<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> curr<span class="Delimiter">,</span> new_mu_text<span class="Delimiter">(</span>p<span class="Delimiter">-></span>first<span class="Delimiter">));</span> trace<span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">"mem"</span><span class="Delimiter">)</span> << <span class="Constant">"storing file name "</span> << get<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> curr<span class="Delimiter">)</span> << <span class="Constant">" in location "</span> << curr << end<span class="Delimiter">();</span> put<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> get<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> curr<span class="Delimiter">),</span> <span class="Constant">1</span><span class="Delimiter">);</span> trace<span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">"mem"</span><span class="Delimiter">)</span> << <span class="Constant">"storing refcount 1 in location "</span> << get<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> curr<span class="Delimiter">)</span> << end<span class="Delimiter">();</span> ++curr<span class="Delimiter">;</span> - put<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> curr<span class="Delimiter">,</span> new_mu_string<span class="Delimiter">(</span>p<span class="Delimiter">-></span>second<span class="Delimiter">));</span> + put<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> curr<span class="Delimiter">,</span> new_mu_text<span class="Delimiter">(</span>p<span class="Delimiter">-></span>second<span class="Delimiter">));</span> trace<span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">"mem"</span><span class="Delimiter">)</span> << <span class="Constant">"storing file contents "</span> << get<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> curr<span class="Delimiter">)</span> << <span class="Constant">" in location "</span> << curr << end<span class="Delimiter">();</span> put<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> get<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> curr<span class="Delimiter">),</span> <span class="Constant">1</span><span class="Delimiter">);</span> trace<span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">"mem"</span><span class="Delimiter">)</span> << <span class="Constant">"storing refcount 1 in location "</span> << get<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> curr<span class="Delimiter">)</span> << end<span class="Delimiter">();</span> |