Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

Commit

Permalink
3799
Browse files Browse the repository at this point in the history
  • Loading branch information
akkartik committed Mar 19, 2017
1 parent cd72379 commit 797edfd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions 013update_operation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ void update_instruction_operations(const recipe_ordinal r) {
instruction& inst = caller.steps.at(index);
if (inst.is_label) continue;
if (!contains_key(Recipe_ordinal, inst.name)) {
raise << maybe(caller.name) << "instruction '" << inst.name << "' has no recipe\n" << end();
raise << maybe(caller.name) << "instruction '" << inst.name << "' has no recipe in '" << to_original_string(inst) << "'\n" << end();
continue;
}
inst.operation = get(Recipe_ordinal, inst.name);
Expand All @@ -32,4 +32,4 @@ string maybe(string s) {
def main [
1:number , copy 0 # typo: ',' instead of '<-'
]
+error: main: instruction '1:number' has no recipe
+error: main: instruction '1:number' has no recipe in '1:number copy, 0'
2 changes: 1 addition & 1 deletion 038new_text.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ int new_mu_text(const string& contents) {
def main [
[abc]
]
+error: main: instruction '[abc]' has no recipe
+error: main: instruction '[abc]' has no recipe in '[abc] '

//: stash recognizes strings

Expand Down
4 changes: 2 additions & 2 deletions html/013update_operation.cc.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<span id="L13" class="LineNr">13 </span> <span class="Conceal">¦</span> instruction&amp; inst = caller<span class="Delimiter">.</span>steps<span class="Delimiter">.</span>at<span class="Delimiter">(</span>index<span class="Delimiter">);</span>
<span id="L14" class="LineNr">14 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>inst<span class="Delimiter">.</span>is_label<span class="Delimiter">)</span> <span class="Identifier">continue</span><span class="Delimiter">;</span>
<span id="L15" class="LineNr">15 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>!contains_key<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> inst<span class="Delimiter">.</span>name<span class="Delimiter">))</span> <span class="Delimiter">{</span>
<span id="L16" class="LineNr">16 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L168'>raise</a> &lt;&lt; <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>caller<span class="Delimiter">.</span>name<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;instruction '&quot;</span> &lt;&lt; inst<span class="Delimiter">.</span>name &lt;&lt; <span class="Constant">&quot;' has no <a href='010vm.cc.html#L19'>recipe</a></span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span>
<span id="L16" class="LineNr">16 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L168'>raise</a> &lt;&lt; <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>caller<span class="Delimiter">.</span>name<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;instruction '&quot;</span> &lt;&lt; inst<span class="Delimiter">.</span>name &lt;&lt; <span class="Constant">&quot;' has no <a href='010vm.cc.html#L19'>recipe</a> in '&quot;</span> &lt;&lt; to_original_string<span class="Delimiter">(</span>inst<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span>
<span id="L17" class="LineNr">17 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Identifier">continue</span><span class="Delimiter">;</span>
<span id="L18" class="LineNr">18 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span>
<span id="L19" class="LineNr">19 </span> <span class="Conceal">¦</span> inst<span class="Delimiter">.</span>operation = get<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> inst<span class="Delimiter">.</span>name<span class="Delimiter">);</span>
Expand All @@ -96,7 +96,7 @@
<span id="L32" class="LineNr">32 </span><span class="muRecipe">def</span> <a href='000organization.cc.html#L113'>main</a> [
<span id="L33" class="LineNr">33 </span> <span class="Constant">1</span>:number <span class="Delimiter">,</span> copy <span class="Constant">0</span> <span class="Comment"># typo: ',' instead of '&lt;-'</span>
<span id="L34" class="LineNr">34 </span>]
<span id="L35" class="LineNr">35 </span><span class="traceContains">+error: <a href='000organization.cc.html#L113'>main</a>: <a href='010vm.cc.html#L32'>instruction</a> '1:number' has no <a href='010vm.cc.html#L19'>recipe</a></span>
<span id="L35" class="LineNr">35 </span><span class="traceContains">+error: <a href='000organization.cc.html#L113'>main</a>: <a href='010vm.cc.html#L32'>instruction</a> '1:number' has no <a href='010vm.cc.html#L19'>recipe</a> in '1:number copy, 0'</span>
</pre>
</body>
</html>
Expand Down
2 changes: 1 addition & 1 deletion html/038new_text.cc.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
<span id="L69" class="LineNr"> 69 </span><span class="muRecipe">def</span> <a href='000organization.cc.html#L113'>main</a> [
<span id="L70" class="LineNr"> 70 </span> [abc]
<span id="L71" class="LineNr"> 71 </span>]
<span id="L72" class="LineNr"> 72 </span><span class="traceContains">+error: <a href='000organization.cc.html#L113'>main</a>: <a href='010vm.cc.html#L32'>instruction</a> '[abc]' has no <a href='010vm.cc.html#L19'>recipe</a></span>
<span id="L72" class="LineNr"> 72 </span><span class="traceContains">+error: <a href='000organization.cc.html#L113'>main</a>: <a href='010vm.cc.html#L32'>instruction</a> '[abc]' has no <a href='010vm.cc.html#L19'>recipe</a> in '[abc] '</span>
<span id="L73" class="LineNr"> 73 </span>
<span id="L74" class="LineNr"> 74 </span><span class="Comment">//: stash recognizes strings</span>
<span id="L75" class="LineNr"> 75 </span>
Expand Down

0 comments on commit 797edfd

Please sign in to comment.