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

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

<channel>
<title><![CDATA[Perl 6: SMOP Boot Sequence]]></title>
<link>http://www.perlfoundation.org/perl6/index.cgi?smop_boot_sequence</link>
<description></description>
<pubDate>Fri, 01 Feb 2008 16:14:34 -0000</pubDate>
<webMaster>synedra@gmail.com</webMaster>
<generator>Socialtext Workspace v2.14.7.2</generator>

<item>
<title><![CDATA[SMOP Boot Sequence]]></title>
<link>http://www.perlfoundation.org/perl6/index.cgi?smop_boot_sequence</link>
<description><![CDATA[<div class="wiki">
<p>
Because of the way that <a href="http://www.perlfoundation.org/perl6/index.cgi?smop_oo_bootstrap" title="(62 months) At first, it s important to understand that all C typedef structs in [SMOP] are meant to support Per...">SMOP OO Bootstrap</a>, it's important to have a very precise definition of its boot process, in order to make sure that no call using values that weren't yet defined occour, since this would probably cause a segfault.</p>
<h1 id="kernel_loading">Kernel Loading</h1>
<h3 id="smop_constant_identifiers"><a href="http://www.perlfoundation.org/perl6/index.cgi?smop_constant_identifiers" title="(65 months) As everything in [SMOP] is an object, including the method identifiers in the messages to the [SMOP ...">SMOP Constant Identifiers</a></h3>
<p>
The constant identifiers, as its Responder Interface, use a very simplistic code to start. It uses plain libc calloc calls to initialize it, with static methods. Before the boot finishes, it is not allowed to call any method on a constant identifier. The correct way of matching a constant identifier during boot is by checking for pointer equity. This values are not subject to garbage collection.</p>
<h3 id="smop_lowlevel"><a href="http://www.perlfoundation.org/perl6/index.cgi?SMOP%20Lowlevel" title="[click to create page]" class="incipient">SMOP Lowlevel</a></h3>
<p>
The smop lowlevel implements the basic default memory management mechanism of SMOP. Most of the objects will depend on it.</p>
<h3 id="smop_interpreter_instance_prototype">SMOP Interpreter Instance Prototype</h3>
<p>
The prototype of the interpreter instance is the one that will enable evaluating any code. There will be no way of calling anyting in it untill the capture object is booted. But as the interpreter prototype doesn't depend on the lowlevel, it's initialized here, specially because there's a constant capture that uses this pointer.</p>
<h3 id="smop_native_types_capture"><a href="http://www.perlfoundation.org/perl6/index.cgi?smop_native_types" title="(65 months) Besides the basic structures to which all objects must be binary-compatible with, we also need to ha...">SMOP Native Types</a>: capture</h3>
<p>
 As every call, from bottom-up, is compatible with the high-level runtime. Every call need a capture object, this way, the capture native type is a key to bootstrap. There are native C methods to create and access the capture from C, as well as there will be high-level methods to do it too.</p>
<h3 id="smop_native_types_int"><a href="http://www.perlfoundation.org/perl6/index.cgi?smop_native_types" title="(65 months) Besides the basic structures to which all objects must be binary-compatible with, we also need to ha...">SMOP Native Types</a>: int</h3>
<p>
 The capture type defines positional access, as the default smop interpreter implementation have operators that depends on ints. That's why int needs to be initialized here.</p>
<h3 id="smop_native_types_bool"><a href="http://www.perlfoundation.org/perl6/index.cgi?smop_native_types" title="(65 months) Besides the basic structures to which all objects must be binary-compatible with, we also need to ha...">SMOP Native Types</a>: bool</h3>
<p>
 The capture type defines positional access, as the default smop interpreter implementation have operators that depends on ints. That's why int needs to be initialized here.</p>
<h3 id="default_smop_interpreter_implementation"><a href="http://www.perlfoundation.org/perl6/index.cgi?default_smop_interpreter_implementation" title="(65 months) Every operation message is composed by basically three elements responder which responder interface ...">Default SMOP Interpreter Implementation</a></h3>
<p>
At this point we already have everything needed to initialize the smop_stack objects. They need to be initialized soon as the lowlevel object destruction depends on it.</p>
<h1 id="init">Init</h1>
<p>
At this point, we have a somewhat complete environment, then are then in the safer phase of the boot.</p>
<h2 id="smop_native_types"><a href="http://www.perlfoundation.org/perl6/index.cgi?smop_native_types" title="(65 months) Besides the basic structures to which all objects must be binary-compatible with, we also need to ha...">SMOP Native Types</a></h2>
<p>
The rest of the SMOP native types should be initialized.</p>
<h2 id="smop_builtin_types">SMOP Builtin Types</h2>
<p>
Here the bultin types should be initialized.</p>
<h2 id="global_namespace">Global Namespace</h2>
<p>
The global namespace should be created, and the types registered in it.</p>
<h1 id="what_happens_after_that">What happens after that?</h1>
<p>
Well, at that time, the smop library will hand control to the executing program, no real executable was planned yet. Everything is now in terms of the test cases only. Maybe embedding in Perl 5 using OP customization is a nice start idea.</p>
</div>
]]></description>
<author>Daniel Ruoso</author>
<guid isPermaLink="true">http://www.perlfoundation.org/perl6/index.cgi?smop_boot_sequence</guid>
<pubDate>Fri, 01 Feb 2008 16:14:34 -0000</pubDate>
</item>

</channel>
</rss>