diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2017-11-06 01:28:53 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2017-11-06 01:28:53 -0800 |
commit | d55e77387fd9cc3eae2f17a6c1993f3bcb061a60 (patch) | |
tree | ff395f7d64f196c68560654b027fb1e59bf8bccc /html/036refcount.cc.html | |
parent | 3b776ac3843e925ee24f49e8df51ab6a1db6c085 (diff) | |
download | mu-d55e77387fd9cc3eae2f17a6c1993f3bcb061a60.tar.gz |
4117 - done with delimited continuations
At least this particular implementation of them. Let's play with them now for a while, see if they're fully equivalent to shift/reduce.
Diffstat (limited to 'html/036refcount.cc.html')
-rw-r--r-- | html/036refcount.cc.html | 50 |
1 files changed, 26 insertions, 24 deletions
diff --git a/html/036refcount.cc.html b/html/036refcount.cc.html index d8667152..8cb40e7a 100644 --- a/html/036refcount.cc.html +++ b/html/036refcount.cc.html @@ -1116,30 +1116,32 @@ if ('onhashchange' in window) { <span id="L1051" class="LineNr">1051 </span> initial_num_refcount_updates = Total_refcount_updates<span class="Delimiter">;</span> <span id="L1052" class="LineNr">1052 </span><span class="Delimiter">}</span> <span id="L1053" class="LineNr">1053 </span><span class="Delimiter">:(before "End Non-primitive Call(caller_frame)")</span> -<span id="L1054" class="LineNr">1054 </span>Num_refcount_updates[caller_frame<span class="Delimiter">.</span>running_recipe][caller_frame<span class="Delimiter">.</span>running_step_index] -<span id="L1055" class="LineNr">1055 </span> <span class="Conceal">¦</span> += <span class="Delimiter">(</span>Total_refcount_updates - initial_num_refcount_updates<span class="Delimiter">);</span> -<span id="L1056" class="LineNr">1056 </span>initial_num_refcount_updates = Total_refcount_updates<span class="Delimiter">;</span> -<span id="L1057" class="LineNr">1057 </span><span class="Delimiter">:(after "Begin Return")</span> -<span id="L1058" class="LineNr">1058 </span><span class="Normal">if</span> <span class="Delimiter">(</span>Run_profiler<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L1059" class="LineNr">1059 </span> Num_refcount_updates[current_call<span class="Delimiter">().</span>running_recipe][current_call<span class="Delimiter">().</span>running_step_index] -<span id="L1060" class="LineNr">1060 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> += <span class="Delimiter">(</span>Total_refcount_updates - initial_num_refcount_updates<span class="Delimiter">);</span> -<span id="L1061" class="LineNr">1061 </span> initial_num_refcount_updates = Total_refcount_updates<span class="Delimiter">;</span> -<span id="L1062" class="LineNr">1062 </span><span class="Delimiter">}</span> -<span id="L1063" class="LineNr">1063 </span><span class="Delimiter">:(before "End dump_profile")</span> -<span id="L1064" class="LineNr">1064 </span>fout<span class="Delimiter">.</span>open<span class="Delimiter">(</span><span class="Constant">"profile.refcounts"</span><span class="Delimiter">);</span> -<span id="L1065" class="LineNr">1065 </span><span class="Normal">if</span> <span class="Delimiter">(</span>fout<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L1066" class="LineNr">1066 </span> <span class="Normal">for</span> <span class="Delimiter">(</span>map<recipe_ordinal<span class="Delimiter">,</span> recipe>::iterator p = Recipe<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != Recipe<span class="Delimiter">.</span><a href='003trace.cc.html#L197'>end</a><span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> -<span id="L1067" class="LineNr">1067 </span> <span class="Conceal">¦</span> <a href='036refcount.cc.html#L1071'>dump_recipe_profile</a><span class="Delimiter">(</span>p<span class="Delimiter">-></span>first<span class="Delimiter">,</span> p<span class="Delimiter">-></span>second<span class="Delimiter">,</span> fout<span class="Delimiter">);</span> -<span id="L1068" class="LineNr">1068 </span><span class="Delimiter">}</span> -<span id="L1069" class="LineNr">1069 </span>fout<span class="Delimiter">.</span>close<span class="Delimiter">();</span> -<span id="L1070" class="LineNr">1070 </span><span class="Delimiter">:(code)</span> -<span id="L1071" class="LineNr">1071 </span><span class="Normal">void</span> <a href='036refcount.cc.html#L1071'>dump_recipe_profile</a><span class="Delimiter">(</span><a href='010vm.cc.html#L14'>recipe_ordinal</a> ridx<span class="Delimiter">,</span> <span class="Normal">const</span> recipe& r<span class="Delimiter">,</span> ostream& out<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L1072" class="LineNr">1072 </span> out << <span class="Constant">"recipe "</span> << r<span class="Delimiter">.</span>name << <span class="Constant">" [</span><span class="cSpecial">\n</span><span class="Constant">"</span><span class="Delimiter">;</span> -<span id="L1073" class="LineNr">1073 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span> i < <a href='001help.cc.html#L141'>SIZE</a><span class="Delimiter">(</span>r<span class="Delimiter">.</span>steps<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L1074" class="LineNr">1074 </span> <span class="Conceal">¦</span> out << std::setw<span class="Delimiter">(</span><span class="Constant">6</span><span class="Delimiter">)</span> << Num_refcount_updates[ridx][i] << <span class="Constant">' '</span> << <a href='028call_return.cc.html#L162'>to_string</a><span class="Delimiter">(</span>r<span class="Delimiter">.</span>steps<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">))</span> << <span class="cSpecial">'\n'</span><span class="Delimiter">;</span> -<span id="L1075" class="LineNr">1075 </span> <span class="Delimiter">}</span> -<span id="L1076" class="LineNr">1076 </span> out << <span class="Constant">"]</span><span class="cSpecial">\n\n</span><span class="Constant">"</span><span class="Delimiter">;</span> -<span id="L1077" class="LineNr">1077 </span><span class="Delimiter">}</span> +<span id="L1054" class="LineNr">1054 </span><span class="Normal">if</span> <span class="Delimiter">(</span>Run_profiler<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L1055" class="LineNr">1055 </span> Num_refcount_updates[caller_frame<span class="Delimiter">.</span>running_recipe][caller_frame<span class="Delimiter">.</span>running_step_index] +<span id="L1056" class="LineNr">1056 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> += <span class="Delimiter">(</span>Total_refcount_updates - initial_num_refcount_updates<span class="Delimiter">);</span> +<span id="L1057" class="LineNr">1057 </span> initial_num_refcount_updates = Total_refcount_updates<span class="Delimiter">;</span> +<span id="L1058" class="LineNr">1058 </span><span class="Delimiter">}</span> +<span id="L1059" class="LineNr">1059 </span><span class="Delimiter">:(after "Begin Return")</span> +<span id="L1060" class="LineNr">1060 </span><span class="Normal">if</span> <span class="Delimiter">(</span>Run_profiler<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L1061" class="LineNr">1061 </span> Num_refcount_updates[current_call<span class="Delimiter">().</span>running_recipe][current_call<span class="Delimiter">().</span>running_step_index] +<span id="L1062" class="LineNr">1062 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> += <span class="Delimiter">(</span>Total_refcount_updates - initial_num_refcount_updates<span class="Delimiter">);</span> +<span id="L1063" class="LineNr">1063 </span> initial_num_refcount_updates = Total_refcount_updates<span class="Delimiter">;</span> +<span id="L1064" class="LineNr">1064 </span><span class="Delimiter">}</span> +<span id="L1065" class="LineNr">1065 </span><span class="Delimiter">:(before "End dump_profile")</span> +<span id="L1066" class="LineNr">1066 </span>fout<span class="Delimiter">.</span>open<span class="Delimiter">(</span><span class="Constant">"profile.refcounts"</span><span class="Delimiter">);</span> +<span id="L1067" class="LineNr">1067 </span><span class="Normal">if</span> <span class="Delimiter">(</span>fout<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L1068" class="LineNr">1068 </span> <span class="Normal">for</span> <span class="Delimiter">(</span>map<recipe_ordinal<span class="Delimiter">,</span> recipe>::iterator p = Recipe<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != Recipe<span class="Delimiter">.</span><a href='003trace.cc.html#L197'>end</a><span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> +<span id="L1069" class="LineNr">1069 </span> <span class="Conceal">¦</span> <a href='036refcount.cc.html#L1073'>dump_recipe_profile</a><span class="Delimiter">(</span>p<span class="Delimiter">-></span>first<span class="Delimiter">,</span> p<span class="Delimiter">-></span>second<span class="Delimiter">,</span> fout<span class="Delimiter">);</span> +<span id="L1070" class="LineNr">1070 </span><span class="Delimiter">}</span> +<span id="L1071" class="LineNr">1071 </span>fout<span class="Delimiter">.</span>close<span class="Delimiter">();</span> +<span id="L1072" class="LineNr">1072 </span><span class="Delimiter">:(code)</span> +<span id="L1073" class="LineNr">1073 </span><span class="Normal">void</span> <a href='036refcount.cc.html#L1073'>dump_recipe_profile</a><span class="Delimiter">(</span><a href='010vm.cc.html#L14'>recipe_ordinal</a> ridx<span class="Delimiter">,</span> <span class="Normal">const</span> recipe& r<span class="Delimiter">,</span> ostream& out<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L1074" class="LineNr">1074 </span> out << <span class="Constant">"recipe "</span> << r<span class="Delimiter">.</span>name << <span class="Constant">" [</span><span class="cSpecial">\n</span><span class="Constant">"</span><span class="Delimiter">;</span> +<span id="L1075" class="LineNr">1075 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span> i < <a href='001help.cc.html#L141'>SIZE</a><span class="Delimiter">(</span>r<span class="Delimiter">.</span>steps<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L1076" class="LineNr">1076 </span> <span class="Conceal">¦</span> out << std::setw<span class="Delimiter">(</span><span class="Constant">6</span><span class="Delimiter">)</span> << Num_refcount_updates[ridx][i] << <span class="Constant">' '</span> << <a href='028call_return.cc.html#L162'>to_string</a><span class="Delimiter">(</span>r<span class="Delimiter">.</span>steps<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">))</span> << <span class="cSpecial">'\n'</span><span class="Delimiter">;</span> +<span id="L1077" class="LineNr">1077 </span> <span class="Delimiter">}</span> +<span id="L1078" class="LineNr">1078 </span> out << <span class="Constant">"]</span><span class="cSpecial">\n\n</span><span class="Constant">"</span><span class="Delimiter">;</span> +<span id="L1079" class="LineNr">1079 </span><span class="Delimiter">}</span> </pre> </body> </html> |