<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0" xmlns:blogChannel="http://backend.userland.com/blogChannelModule">

<channel>
<title><![CDATA[Perl 6: SMOP Interpreter Implementation API]]></title>
<link>http://www.perlfoundation.org/perl6/index.cgi?smop_interpreter_implementation_api</link>
<description></description>
<pubDate>Tue, 05 Aug 2008 00:25:40 -0000</pubDate>
<webMaster>synedra@gmail.com</webMaster>
<generator>Socialtext Workspace v2.14.7.2</generator>

<item>
<title><![CDATA[SMOP Interpreter Implementation API]]></title>
<link>http://www.perlfoundation.org/perl6/index.cgi?smop_interpreter_implementation_api</link>
<description><![CDATA[<div class="wiki">
<p>
This is the API that must be implemented by any interpreter that wants to have its run loop integrated with the <a href="http://www.perlfoundation.org/perl6/index.cgi?smop_run_loop" title="(64 months) This code illustrates how the SMOP Run Loop works .pre if ( interpreter.has_next()) interpreter.next...">SMOP Run Loop</a>.</p>
<ul>
<li>Running operations</li>

<ul>
<li>has_next($interpreter: ) -- called before next to see if there is something to be evaluated.</li>
<li>next($interpreter: ) -- called before eval to prepare the next node.</li>
<li>eval($interpreter: ) -- evaluate the current instruction.</li>
<li>setr($interpreter: $value) -- receive information from other continuation. Usually, these are arguments or return values.</li>
</ul>
<li>Introspection operators</li>

<ul>
<li>caller($interpreter: ) -- returns the continuation that precedes the current one.</li>
<li>lexical($interpreter: ) -- returns lexical information about the current execution.</li>
<li>jail($interpreter: ) -- returns the jail information that any exception-like operator would check to loop for a safe point.</li>
<li>debug($interpreter: ) -- returns debug information about the current execution.</li>
</ul></ul>
<h2 id="the_debug_api">The Debug API</h2>
<p>
This is completely vague now. The only thing that are presumably interesting to be available are:</p>
<ul>
<li>file name</li>
<li>line number</li>
<li>character position range (if available)</li>
<li>source code</li>
</ul>
<h2 id="the_lexical_api">The Lexical API</h2>
<p>
<a href="http://www.perlfoundation.org/perl6/index.cgi?smop_lexical_scope_implementation" title="(58 months) One first hard step in implementing lexical scopes is to put together a lot of details that are spre...">SMOP Lexical Scope Implementation</a></p>
</div>
]]></description>
<author>Daniel Ruoso</author>
<guid isPermaLink="true">http://www.perlfoundation.org/perl6/index.cgi?smop_interpreter_implementation_api</guid>
<pubDate>Tue, 05 Aug 2008 00:25:40 -0000</pubDate>
</item>

</channel>
</rss>