Perl 6
SMOP Interpreter Implementation API: Revision 2

This is the API that must be implemented by any interpreter that wants to have its run loop integrated with the SMOP Run Loop.

  • has_next($interpreter: ) -- called before next to see if there is something to be evaluated.
  • next($interpreter: ) -- called before eval to prepare the next node.
  • eval($interpreter: ) -- evaluate the current instruction.
  • setr($interpreter: $value) -- sets the result of the current instruction to the given value, usefull to pass arguments and return values.
  • backtrace($interpreter: ) -- returns the backtrace of the current continuation (the continuation that precedes this one, being it a subroutine call or not). This must not be confused with stacktrace. The semantics might be different. There's no such thing as a native stacktrace in smop, if a language is stack-oriented, the backtrace must be interpreted to provide a sane stacktrace.
  • debug($interpreter: ) -- returns debug information about the current execution.
  • lexical($interpreter: ) -- returns lexical information about the current execution.
  • jail($interpreter: ) -- returns the jail information that any exception-like operator would check to loop for a safe point.

The Debug API

This is completely vague now. The only thing that are presumably interesting to be available are:

  • file name
  • line number
  • character position range (if available)
  • source code

The Lexical API

This is also completely vague now.

  • lookup($lexical: $name) -- returns a variable from the lexical information

Upload Files

Click "Browse" to find the file you want to upload. When you click "Upload file" your file will be uploaded and added to the list of attachments for this page.

Maximum file size: 50MB

 
 
 
File Name Author Date Uploaded Size

Save Page As

Enter a meaningful and distinctive title for your page.

Page Title:

Tip: You'll be able to find this page later by using the title you choose.

Page Already Exists

There is already a page named XXX. Would you like to:

Save with a different name:

Save the page with the name "XXX"

Append your text to the bottom of the existing page named: "XXX"

Upload Files

Click "Browse" to find the file you want to upload. When you click "Add file" this file will be added to the list of attachments for this page, and uploaded when you save the page.

 
 
 
Add Tags

Enter a tag and click "Add tag". The tag will be saved when you save the page.

Tag: 

Suggestions: