changeset 18:1fc9d0bd924f default tip

update
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Sat, 20 Apr 2019 18:06:35 +0900
parents a176ea5c0264
children
files Per6_rakudo_OSC2019.mm fig/Perl6_num_convert.svg fig/Rakudo_overview.svg fig/decont_perl6_loc3.svg slide.html slide.md slide.pdf.html
diffstat 7 files changed, 1137 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/Per6_rakudo_OSC2019.mm	Fri Apr 19 23:22:02 2019 +0900
+++ b/Per6_rakudo_OSC2019.mm	Sat Apr 20 18:06:35 2019 +0900
@@ -1,6 +1,6 @@
-<map version="1.1.0">
+<map version="1.0.1">
 <!-- To view this file, download free mind mapping software FreeMind from http://freemind.sourceforge.net -->
-<node CREATED="1555404713709" ID="ID_1727409716" MODIFIED="1555404722904" TEXT="Perl6 Rakudo&#x306e;&#x5185;&#x90e8;&#x69cb;&#x9020;">
+<node CREATED="1555404713709" ID="ID_1727409716" MODIFIED="1555657484224" TEXT="Perl6 Rakudo&#x306e;&#x5185;&#x90e8;&#x69cb;&#x9020;">
 <node CREATED="1555404724612" ID="ID_1448234108" MODIFIED="1555404744931" POSITION="right" TEXT="&#x30b4;&#x30fc;&#x30eb;">
 <node CREATED="1555404750635" ID="ID_1533140732" MODIFIED="1555404756371" TEXT="Perl6&#x81ea;&#x4f53;&#x3092;&#x77e5;&#x3063;&#x3066;&#x3082;&#x3089;&#x3046;"/>
 <node CREATED="1555404757182" ID="ID_857678938" MODIFIED="1555404763884" TEXT="&#x30d0;&#x30a4;&#x30c8;&#x30b3;&#x30fc;&#x30c9;&#x30a4;&#x30f3;&#x30bf;&#x30d7;&#x30ea;&#x30bf;&#x306e;&#x96f0;&#x56f2;&#x6c17;&#x3092;&#x77e5;&#x308b;"/>
@@ -10,6 +10,21 @@
 <node CREATED="1555404767414" ID="ID_46599809" MODIFIED="1555404776988" TEXT="&#x30b5;&#x30f3;&#x30d7;&#x30eb;&#x30b9;&#x30af;&#x30ea;&#x30d7;&#x30c8;"/>
 <node CREATED="1555404810932" ID="ID_1856672723" MODIFIED="1555404834351" TEXT="Perl6&#x3092;&#x30d0;&#x30a4;&#x30c8;&#x30b3;&#x30fc;&#x30c9;&#x5316;"/>
 </node>
+<node CREATED="1555657492282" ID="ID_916912102" MODIFIED="1555657500671" POSITION="left" TEXT="&#x30b9;&#x30af;&#x30ea;&#x30d7;&#x30c8;&#x8a00;&#x8a9e;">
+<node CREATED="1555657501029" ID="ID_284399681" MODIFIED="1555657509094" TEXT="&#x30d7;&#x30ed;&#x30bb;&#x30b9;VM&#x304c;&#x3064;&#x3044;&#x3066;&#x3044;&#x308b;"/>
+<node CREATED="1555657509587" ID="ID_1998248547" MODIFIED="1555657516244" TEXT="&#x3069;&#x308c;&#x3082;&#x30d0;&#x30a4;&#x30c8;&#x30b3;&#x30fc;&#x30c9;&#x306e;&#x306a;&#x3063;&#x3066;&#x3044;&#x308b;">
+<node CREATED="1555657521435" ID="ID_1827530146" MODIFIED="1555657524056" TEXT="&#x591a;&#x8a00;&#x8a9e;"/>
+<node CREATED="1555657524555" ID="ID_780483096" MODIFIED="1555657527300" TEXT="Erlang"/>
+<node CREATED="1555657527957" ID="ID_1068224108" MODIFIED="1555657530073" TEXT="Python"/>
+<node CREATED="1555657530664" ID="ID_1180664989" MODIFIED="1555657532270" TEXT="Ruby"/>
+</node>
+<node CREATED="1555657517140" ID="ID_1166075011" MODIFIED="1555657546679" TEXT="&#x5b9f;&#x884c;&#x307e;&#x3067;&#x306e;&#x6bb5;&#x968e;">
+<node CREATED="1555657547029" ID="ID_922333219" MODIFIED="1555657550895" TEXT="&#x69cb;&#x6587;&#x89e3;&#x6790;"/>
+<node CREATED="1555657551280" ID="ID_158647347" MODIFIED="1555657558120" TEXT="&#x610f;&#x5473;&#x89e3;&#x6790;"/>
+<node CREATED="1555657558660" ID="ID_1092839668" MODIFIED="1555657560877" TEXT="&#x30b3;&#x30fc;&#x30c9;&#x751f;&#x6210;"/>
+<node CREATED="1555657561488" ID="ID_646728001" MODIFIED="1555657565170" TEXT="&#x8a55;&#x4fa1;"/>
+</node>
+</node>
 <node CREATED="1555404734607" ID="ID_419856625" MODIFIED="1555404749342" POSITION="left" TEXT="NQP">
 <node CREATED="1555404780245" ID="ID_1883651519" MODIFIED="1555404787994" TEXT="Rakudo&#x3082;NQP"/>
 <node CREATED="1555404788447" ID="ID_1662711907" MODIFIED="1555404793569" TEXT="NQP&#x3082;NQP&#x3067;&#x66f8;&#x304b;&#x308c;&#x3066;&#x3044;&#x308b;"/>
@@ -29,5 +44,6 @@
 <node CREATED="1555408262980" ID="ID_1866148061" MODIFIED="1555408266509" TEXT="&#x578b;?"/>
 </node>
 </node>
+<node CREATED="1555657484569" ID="ID_940115660" MODIFIED="1555657490921" POSITION="right" TEXT=""/>
 </node>
 </map>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fig/Perl6_num_convert.svg	Sat Apr 20 18:06:35 2019 +0900
@@ -0,0 +1,2 @@
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="333px" height="283px" viewBox="-0.5 -0.5 333 283" content="&lt;mxfile modified=&quot;2019-04-19T12:47:11.428Z&quot; host=&quot;www.draw.io&quot; agent=&quot;Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36&quot; version=&quot;10.6.3&quot; etag=&quot;71VLQWxFhzkD5dWyhHZm&quot; type=&quot;device&quot;&gt;&lt;diagram id=&quot;OVSpcbv3qioNaFlaYYqi&quot;&gt;1VdLj5swEP41SO2hq4AJgWNebQ99SXvosXLBAW8NQ43ZJP31HWI7xCHRRtrNrnLC/mY89nzzsPHIvNx8krQuvkLGhBeMso1HFl4Q+P44xk+HbDUSJaEGcskzo9QD9/wfM+DIoC3PWOMoKgCheO2CKVQVS5WDUSlh7aqtQLi71jRnA+A+pWKI/uSZKjQaB5Me/8x4Xtid/SjRkpJaZeNJU9AM1gcQWXpkLgGUHpWbORMdeZYXve7jGen+YJJV6pIFgV7wSEVrfDPnUlvrLMvQdzMFqQrIoaJi2aMzCW2Vsc7iCGe9zheAGkEfwQem1NYEkrYKECpUKYxU79lt5LjRQCtTAxETZipzZjwLh876ewox9xiUTMktqkgmqOKPrnVqkiDf6/U84cBQdZo2coK2SOAhZivAsxzyF/1twQo+NDsGpqjgj+tNL8RR3n0FpL+INYWH0Na0bBAYl/Z1wRW7r+mOsDXWnUtxoyT82Wcr2dt7ZFKxzdnsOUOoXRCZNDZ17Cdmvu6rwrepXhxUhF33nBiEV4qBF4TVu++/H7BxvL+dUJC3DMX46S6Cja7uhivBNtOuBaPbrMrMcJEK2jQ8dYlCuWUpCvTctBDfvyMdcda5cHS+i1zA4QFH4xMUWeziNmJ2+AF8l4g2RIEbomByRL3ud2bVYdN+whBJjgzpLjkwhGTT7YFa3Sk0lx+YuJcJDrTFPkf2nF6UNtHzKzg6WcFL4sWBN13sBsSbEoPMEoPE8aWVjRWpTpXvHARIRCqouitwxYU4gqjgedWlNmYfQ3zW1TfHR8TUCEqeZbv781S/cDvKSzSI2L8bu+EcDVvEZDJM/+AFOsTkVt4Z8fCdkbzdOyO+4jsjvJ3LzR+7jSj0X/FyS675zvjWlrf0yHjFOOC0/w3Sl0v/M0mW/wE=&lt;/diagram&gt;&lt;/mxfile&gt;" style="background-color: rgb(255, 255, 255);"><defs/><g><path d="M 131 31 L 204.63 31" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 209.88 31 L 202.88 34.5 L 204.63 31 L 202.88 27.5 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><rect x="11" y="1" width="120" height="60" fill="#ffffff" stroke="#000000" stroke-width="3" pointer-events="none"/><g transform="translate(52.5,22.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="36" height="16" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 36px; white-space: nowrap; overflow-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><font style="font-size: 15px">loc_3</font></div></div></foreignObject><text x="18" y="14" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="211" y="1" width="120" height="60" fill="#ffffff" stroke="#000000" stroke-width="3" pointer-events="none"/><g transform="translate(235.5,22.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="70" height="16" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 72px; white-space: nowrap; overflow-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><font style="font-size: 15px">$n(Object)</font></div></div></foreignObject><text x="35" y="14" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><path d="M 151 81.5 L 191 81.5 L 191 131 L 191 165.51 L 222.5 165.51 L 171 200.5 L 119.5 165.51 L 151 165.51 L 151 131 Q 151 131 151 131 Z" fill="none" stroke="#000000" stroke-linejoin="round" stroke-miterlimit="10" pointer-events="none"/><path d="M 191 165.51 L 222.5 165.51 L 171 200.5 L 119.5 165.51 L 151 165.51" fill="none" stroke="#000000" stroke-linejoin="flat" stroke-miterlimit="4" pointer-events="none"/><g transform="translate(238.5,112.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="64" height="17" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 65px; white-space: nowrap; overflow-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><font style="font-size: 16px">キャスト</font></div></div></foreignObject><text x="32" y="15" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><path d="M 121 251 L 194.63 251" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 199.88 251 L 192.88 254.5 L 194.63 251 L 192.88 247.5 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><rect x="1" y="221" width="120" height="60" fill="#ffffff" stroke="#000000" stroke-width="3" pointer-events="none"/><g transform="translate(42.5,242.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="36" height="16" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 36px; white-space: nowrap; overflow-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><font style="font-size: 15px">loc_4</font></div></div></foreignObject><text x="18" y="14" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="201" y="221" width="120" height="60" fill="#ffffff" stroke="#000000" stroke-width="3" pointer-events="none"/><g transform="translate(231.5,242.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="58" height="16" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 60px; white-space: nowrap; overflow-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><font style="font-size: 15px">$n(Num)</font></div></div></foreignObject><text x="29" y="14" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g></g></svg>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fig/Rakudo_overview.svg	Sat Apr 20 18:06:35 2019 +0900
@@ -0,0 +1,2 @@
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="533px" height="463px" viewBox="-0.5 -0.5 533 463" content="&lt;mxfile modified=&quot;2019-04-20T01:58:40.629Z&quot; host=&quot;www.draw.io&quot; agent=&quot;Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36&quot; version=&quot;10.6.3&quot; etag=&quot;vRIX8Eg3QAhMR-nQ-MFk&quot; type=&quot;device&quot;&gt;&lt;diagram id=&quot;yl2K-Hg-9E9-az7IrLc6&quot;&gt;5VnLctsgFP0ath1JCD2WtuO0i6bjNjNtsmQsItFIwoNxbPfri6SrJ85Ukzq2M15FHC6ge84RXByEZ9nus6Sr5E5ELEWOFe0QvkGOY9sk0H8KZF8hvosrIJY8gqAWuOd/GIAWoBsesXUvUAmRKr7qg0uR52ypehiVUmz7YU8i7a+6ojEzgPslTU30F49UUqGB47f4F8bjpF7Z9sKqJ6N1MGSyTmgkth0IzxGeSSFU9ZTtZiwtyKt5qcbdvtLbvJhkuRozwKkGvNB0A7nBe6l9nSyLdO7QFFIlIhY5TectOpVik0esmNHSrTbmqxArDdoa/M2U2oOQdKOEhhKVpdC7VlI8N1RijVRvUSzdS2wtNnIJEFhGURkzyNUz07cbUrUbmciYknsdIllKFX/pz07BFnET1zKnH4C8w0Rig8gFk6m3kCKWNDNI7VO2Tbhi9ytaprbV38w4el6YVGz3qvKvpA4DsAcWhG/Qrtvb1tF2bdOk4+Y67n/Yci/EdlSqSbEfaGCZ0vWaL2v4lqd1GMujOigXOasQ6Lfe6l7PdG9wPveSC9HjOET65yPSM4j8QZ83kfgAGwC2TrgB+AZP071iM10pXCBTxO8z5eITMhUYTH37vrhAkmzvjCSF5v41xyhw0BSXD7h9CG3omriATKaAhHpUgCY2CmYloh88g2nNkDpE50ykQrZHxJM+HwYQTXmcFyeNZpRpfFrwzXVVOYGOjEdRuZMe0q+v8LtI6A4kdFwyTkJ8BAnr2r6nIUGTOQpvS1m0IARkKRQjKNBgiOY+Cl00Ca5JqOb6UG/dY2s3Qo4glH1AqFKEQiivkCW0rkkNYp1TDfMGdyeo/Hl3gUcEHpyj5JRXDtu8oRkUdSr99jrQYYXtuHooCPxEoPXY6bnZAbdlY183cv2iD93GYztD0WyHla1m3D/r7TeVy7BPdsvl2kIjhOwIRQ4ZGrDRZTWssBBcL9xub3jgk3Cgf5UQjOr+ujGcKBhM5A4mqmgwJiq91KQ9zl5jrrTvaS/7Iuzlf0R7WW+0Fx7YyxtOdER7Hbih96qjsmi94kOX2Kc8dM1r/nWr4QxuDsR5PzV0s/19vPqU2v8y4Plf&lt;/diagram&gt;&lt;/mxfile&gt;" style="background-color: rgb(255, 255, 255);"><defs/><g><path d="M 261 61 L 261 130.9" fill="none" stroke="#000000" stroke-width="3" stroke-miterlimit="10" pointer-events="none"/><path d="M 261 137.65 L 256.5 128.65 L 261 130.9 L 265.5 128.65 Z" fill="#000000" stroke="#000000" stroke-width="3" stroke-miterlimit="10" pointer-events="none"/><rect x="201" y="1" width="120" height="60" fill="#ffffff" stroke="#000000" stroke-width="3" pointer-events="none"/><g transform="translate(223.5,24.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="74" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 76px; white-space: nowrap; overflow-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">Perl6Program</div></div></foreignObject><text x="37" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">Perl6Program</text></switch></g><path d="M 190.9 171 L 61 171 L 61 271" fill="none" stroke="#000000" stroke-width="3" stroke-miterlimit="10" pointer-events="none"/><path d="M 197.65 171 L 188.65 175.5 L 190.9 171 L 188.65 166.5 Z" fill="#000000" stroke="#000000" stroke-width="3" stroke-miterlimit="10" pointer-events="none"/><path d="M 321 171 L 471 171 L 471 260.9" fill="none" stroke="#000000" stroke-width="3" stroke-miterlimit="10" pointer-events="none"/><path d="M 471 267.65 L 466.5 258.65 L 471 260.9 L 475.5 258.65 Z" fill="#000000" stroke="#000000" stroke-width="3" stroke-miterlimit="10" pointer-events="none"/><rect x="201" y="141" width="120" height="60" fill="#ffffff" stroke="#000000" stroke-width="3" pointer-events="none"/><g transform="translate(239.5,164.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="42" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 42px; white-space: nowrap; overflow-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">Rakudo</div></div></foreignObject><text x="21" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">Rakudo</text></switch></g><rect x="411" y="271" width="120" height="60" fill="#ffffff" stroke="#000000" stroke-width="3" pointer-events="none"/><g transform="translate(444.5,294.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="52" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 54px; white-space: nowrap; overflow-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">ByteCode</div></div></foreignObject><text x="26" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">ByteCode</text></switch></g><rect x="1" y="271" width="120" height="60" fill="#ffffff" stroke="#000000" stroke-width="3" pointer-events="none"/><g transform="translate(47.5,294.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="26" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 28px; white-space: nowrap; overflow-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">NQP</div></div></foreignObject><text x="13" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">NQP</text></switch></g><g transform="translate(312.5,94.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="96" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 97px; white-space: nowrap; overflow-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">コンパイルを行う</div></div></foreignObject><text x="48" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">コンパイルを行う</text></switch></g><g transform="translate(90.5,222.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="60" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 61px; white-space: nowrap; overflow-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">実装に利用</div></div></foreignObject><text x="30" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">実装に利用</text></switch></g><g transform="translate(388.5,222.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="24" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 25px; white-space: nowrap; overflow-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">生成</div></div></foreignObject><text x="12" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">生成</text></switch></g><rect x="211" y="401" width="120" height="60" fill="#ffffff" stroke="#000000" stroke-width="3" pointer-events="none"/><g transform="translate(247.5,424.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="46" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 46px; white-space: nowrap; overflow-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">MoarVM</div></div></foreignObject><text x="23" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">MoarVM</text></switch></g><path d="M 61 331 L 61 421 Q 61 431 71 431 L 200.9 431" fill="none" stroke="#000000" stroke-width="3" stroke-miterlimit="10" pointer-events="none"/><path d="M 207.65 431 L 198.65 435.5 L 200.9 431 L 198.65 426.5 Z" fill="#000000" stroke="#000000" stroke-width="3" stroke-miterlimit="10" pointer-events="none"/><path d="M 471 331 L 471 421 Q 471 431 461 431 L 341.1 431" fill="none" stroke="#000000" stroke-width="3" stroke-miterlimit="10" pointer-events="none"/><path d="M 334.35 431 L 343.35 426.5 L 341.1 431 L 343.35 435.5 Z" fill="#000000" stroke="#000000" stroke-width="3" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(388.5,372.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="24" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 25px; white-space: nowrap; overflow-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">実行</div></div></foreignObject><text x="12" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">実行</text></switch></g><g transform="translate(148.5,382.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="24" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 25px; white-space: nowrap; overflow-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">実行</div></div></foreignObject><text x="12" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">実行</text></switch></g></g></svg>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fig/decont_perl6_loc3.svg	Sat Apr 20 18:06:35 2019 +0900
@@ -0,0 +1,2 @@
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="523px" height="203px" viewBox="-0.5 -0.5 523 203" content="&lt;mxfile modified=&quot;2019-04-19T10:17:47.135Z&quot; host=&quot;www.draw.io&quot; agent=&quot;Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36&quot; version=&quot;10.6.3&quot; etag=&quot;HQmJYlM22afWPKE2j8SJ&quot; type=&quot;device&quot;&gt;&lt;diagram id=&quot;qYaqPb6P3dWJgVGwbnJ7&quot;&gt;1VbBjpswEP0apPZQCXAC7HE3zXYP7SmHHlcuzIK3xsOaIZB+fU1sQhAbKdI2SnPCfjMez7x5A3hsVXbfNK+KH5iB9EI/6zz21QvDgN0l5tEjO4vEMbNArkXmnEZgI/6AA32HNiKDeuJIiJJENQVTVApSmmBca2ynbi8op7dWPIcZsEm5nKM/RUaFRZMwHvEnEHkx3BxEd9ZS8sHZVVIXPMP2CGJrj600ItlV2a1A9uQNvNhzjyesh8Q0KDrnQGgPbLlsXG0uL9oNxUJmandb1FRgjorL9Yg+aGxUBn1E3+xGn++IlQEDA74C0c41kjeEBiqolM5q7+wvmpRRY6NTBzmBENc5uMqW82KDA4VGe4AlkN4ZFw2Sk9hOo3MngvzgN/JkFo6q92lj79AWSZPEwwuaXI75i94aHAxf6j0D98YhWFbdaDSrvH9KTJ/9IZRJwkaztlljprS3hSDYVHxPWGvmbkpxTRp/H9TKDvG2oAm6k+o5Qag7EMZOxm6Og8Tt23EqgkHqxdFERP7He7C4Feku59KNz2b6n0t3eSHpmnctcaFA3458F9eUb/RfyLc2qqT7/pNogFTyuhbpAD8KObiBygYnhQos4uz+eVMQz6cgud4UxBeagsD3/U9euFCfb2cMomuOQXLBLyl7xl+vt9sHFl6uD2Y7/mTubUe/6mz9Fw==&lt;/diagram&gt;&lt;/mxfile&gt;" style="background-color: rgb(255, 255, 255);"><defs/><g><path d="M 121 31 L 194.63 31" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 199.88 31 L 192.88 34.5 L 194.63 31 L 192.88 27.5 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><rect x="1" y="1" width="120" height="60" fill="#ffffff" stroke="#000000" stroke-width="3" pointer-events="none"/><g transform="translate(42.5,22.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="36" height="16" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 36px; white-space: nowrap; overflow-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><font style="font-size: 15px">loc_0</font></div></div></foreignObject><text x="18" y="14" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><path d="M 321 31 L 394.63 31" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 399.88 31 L 392.88 34.5 L 394.63 31 L 392.88 27.5 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><rect x="201" y="1" width="120" height="60" fill="#ffffff" stroke="#000000" stroke-width="3" pointer-events="none"/><g transform="translate(229.5,22.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="62" height="16" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 62px; white-space: nowrap; overflow-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><font style="font-size: 15px">container</font></div></div></foreignObject><text x="31" y="14" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><path d="M 461 67.37 L 461 141" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 461 62.12 L 464.5 69.12 L 461 67.37 L 457.5 69.12 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><rect x="401" y="1" width="120" height="60" fill="#ffffff" stroke="#000000" stroke-width="3" pointer-events="none"/><g transform="translate(430.5,22.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="60" height="16" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 62px; white-space: nowrap; overflow-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><font style="font-size: 15px">1000($n)</font></div></div></foreignObject><text x="30" y="14" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="401" y="141" width="120" height="60" fill="#ffffff" stroke="#000000" stroke-width="3" pointer-events="none"/><g transform="translate(428.5,162.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="64" height="16" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 66px; white-space: nowrap; overflow-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"><font style="font-size: 15px">loc_3_obj</font></div></div></foreignObject><text x="32" y="14" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g></g></svg>
\ No newline at end of file
--- a/slide.html	Fri Apr 19 23:22:02 2019 +0900
+++ b/slide.html	Sat Apr 20 18:06:35 2019 +0900
@@ -139,7 +139,12 @@
     </ul>
   </li>
   <li>仕様と実装が分離しており, 現在はテストが仕様となっている</li>
-  <li>実装は歴史上複数存在しているが,主流な実装はRakudo</li>
+  <li>実装は歴史上複数存在しているが,主流な実装はRakudo
+    <ul>
+      <li>Haskellで実装されたPugs</li>
+      <li>Pythonとの共同基板を目指したParrot</li>
+    </ul>
+  </li>
   <li>言語的にはスクリプト言語であり, 漸進的型付き言語</li>
   <li>動作環境は、独自のVMのMoarVM, JVM、一部JavaScript上で動作する</li>
 </ul>
@@ -384,7 +389,7 @@
   <!-- _S9SLIDE_ -->
 <h2 id="rakudoの構成図">Rakudoの構成図</h2>
 
-<p><img src="fig/Rakudo_System_overview.png" alt="" /></p>
+<p><img src="fig/Rakudo_overview.svg" alt="" /></p>
 
 <p>(http://brrt-to-the-future.blogspot.com/2015/03/advancing-jit-compiler.html)</p>
 
@@ -749,7 +754,11 @@
 
 <ul>
   <li><code>smrt_numify</code> はレジスタ上のオブジェクトを、 num型に変換し、 別のレジスタに登録する命令</li>
-  <li>今回の整数の比較では、 int型の強制がない為、 数値として比較するためにnum型にキャストしている</li>
+  <li>今回の整数の比較では、 int型の強制がない為、 数値として比較するためにn64型にキャストしている
+    <ul>
+      <li>numはn64型であり、 64ビットの浮動小数点定数の意味</li>
+    </ul>
+  </li>
 </ul>
 
 <p><img src="fig/perl6_num_convert.svg" alt="" /></p>
@@ -760,6 +769,61 @@
 
 <div class='slide'>
   <!-- _S9SLIDE_ -->
+<h2 id="const_i64_16とcoerece_in">const_i64_16とcoerece_in</h2>
+
+<pre><code>    while ( $n &gt; 1) {
+</code></pre>
+
+<pre><code>00009      const_i64_16       loc_2_int, 1
+00010      coerce_in          loc_5_num, loc_2_int
+</code></pre>
+<ul>
+  <li>64ビット整数として1をレジスタ <code>loc_2</code> に設定する</li>
+  <li>その後、 numでの比較のためにキャストし, <code>loc_5</code> レジスタに設定している</li>
+</ul>
+
+
+
+</div>
+
+<div class='slide'>
+  <!-- _S9SLIDE_ -->
+<h2 id="比較とif文の判定">比較とif文の判定</h2>
+
+<pre><code>    while ( $n &gt; 1) {
+</code></pre>
+
+<pre><code>00011      gt_n               loc_2_int, loc_4_num, loc_5_num
+00012      unless_i           loc_2_int, label_2(00031)
+</code></pre>
+
+<ul>
+  <li><code>gt_n</code> で <code>loc_4</code> (nが入っている) レジスタと <code>loc_5</code> (1が入っているレジスタ)を比較する
+    <ul>
+      <li>結果により <code>loc_2</code> レジスタに真偽値がint型で代入される</li>
+    </ul>
+  </li>
+  <li>その結果を <code>unless_i</code> で読み取り、 値が偽であったら <code>label_2(00031)</code> にジャンプする</li>
+</ul>
+
+
+
+</div>
+
+<div class='slide'>
+  <!-- _S9SLIDE_ -->
+<h2 id="c言語での実装へ">C言語での実装へ</h2>
+<ul>
+  <li>今まではスクリプトレベルでの実装を見てきました</li>
+  <li>スクリプトが実行されるVMの実装をCレベルで見ていきましょう</li>
+</ul>
+
+
+
+</div>
+
+<div class='slide'>
+  <!-- _S9SLIDE_ -->
 <h2 id="moarvmのバイトコードインタプリタ部分">MoarVMのバイトコードインタプリタ部分</h2>
 <p>MoarVMなどの言語処理系のバイトコードインタプリタは次のことを繰り返している</p>
 <ol>
@@ -770,7 +834,7 @@
 </ol>
 
 <ul>
-  <li>この部分の実装は大体次のような処理をしている</li>
+  <li>この部分の実装は大体次のようなパターンで記述されている</li>
 </ul>
 
 
@@ -786,7 +850,16 @@
   <li>実行のたびにループで先頭に戻り、次の命令を計算する必要があるので低速</li>
 </ul>
 
-<pre><code>
+<pre><code>    while( pc != NULL) {
+        switch(pc){
+            case ADD_INSTRUCTION:
+                // instruction....
+                break;
+            case SUBD_INSTRUCTION:
+                // instruction....
+                break;
+        }
+    }
 </code></pre>
 
 
@@ -799,6 +872,11 @@
 
 <ul>
   <li>巨大なcase文とループではなく、 次の命令の実行場所に直接jmpで移動する</li>
+  <li>GCC拡張でサポートしている場合「<code>&amp;&amp;ラベル名</code> 」でラベルのアドレスが取得できる
+    <ul>
+      <li>取得したアドレスに対して「goto アドレス」でgoto文でjmpする</li>
+    </ul>
+  </li>
   <li>次の命令に対応するラベルを取得する必要があるが、 ループする必要がなく高速</li>
   <li>ラベルgotoであり、 Cコンパイラの拡張機能として搭載されている
     <ul>
@@ -807,7 +885,19 @@
   </li>
 </ul>
 
-<pre><code>
+<pre><code>    static const void *CODES[] = {&amp;&amp;ADD_INSTRUCTION, &amp;&amp;SUB_INSTRCUTION};
+
+    goto *CODES[pc];
+
+ADD_INSTRUCTION:
+    // instruction...
+    pc++;
+    goto *CODES[pc];
+
+SUB_INSTRUCTION:
+    // instruction...
+    pc++;
+    goto *CODES[pc];
 </code></pre>
 
 
@@ -827,6 +917,326 @@
   <li>一般的にはラベルgotoの方が高速である為、他のスクリプト言語でもラベルgotoが使われている</li>
 </ul>
 
+
+
+</div>
+
+<div class='slide'>
+  <!-- _S9SLIDE_ -->
+<h2 id="moarvmのc言語での実装">MoarVMのC言語での実装</h2>
+
+<ul>
+  <li><a href="https://github.com/MoarVM/MoarVM">GitHub上にリポジトリ</a>がある</li>
+  <li><code>src/core/interp.c</code> がバイトコードインタプリタの実装コード</li>
+  <li>この中でマクロを使いつつ、 バイトコードに対応した命令を処理している</li>
+  <li><code>MVM_interp_run</code>が実際にバイトコードを解釈している</li>
+</ul>
+
+<pre><code>/* This is the interpreter run loop. We have one of these per thread. */
+void MVM_interp_run(MVMThreadContext *tc, void (*initial_invoke)(MVMThreadContext *, void *), void *invoke_data) {
+#if MVM_CGOTO
+#include "oplabels.h"
+#endif
+
+    /* Points to the place in the bytecode right after the current opcode. */
+    /* See the NEXT_OP macro for making sense of this */
+    MVMuint8 *cur_op = NULL;
+
+    /* The current frame's bytecode start. */
+    MVMuint8 *bytecode_start = NULL;
+
+    /* Points to the base of the current register set for the frame we
+     * are presently in. */
+    MVMRegister *reg_base = NULL;
+
+    /* Points to the current compilation unit. */
+    MVMCompUnit *cu = NULL;
+
+    /* The current call site we're constructing. */
+    MVMCallsite *cur_callsite = NULL;
+
+    /* Stash addresses of current op, register base and SC deref base
+     * in the TC; this will be used by anything that needs to switch
+     * the current place we're interpreting. */
+    tc-&gt;interp_cur_op         = &amp;cur_op;
+    tc-&gt;interp_bytecode_start = &amp;bytecode_start;
+    tc-&gt;interp_reg_base       = &amp;reg_base;
+    tc-&gt;interp_cu             = &amp;cu;
+
+    /* With everything set up, do the initial invocation (exactly what this does
+     * varies depending on if this is starting a new thread or is the top-level
+     * program entry point). */
+    initial_invoke(tc, invoke_data);
+</code></pre>
+
+
+
+</div>
+
+<div class='slide'>
+  <!-- _S9SLIDE_ -->
+<h2 id="moarvmのレジスタ構成">MoarVMのレジスタ構成</h2>
+
+<ul>
+  <li>レジスタはそれぞれの型を共用体のデータ構造で持っている</li>
+  <li>型名は各命令の接尾辞に対応している</li>
+</ul>
+
+<pre><code>/* Different views of a register. */
+union MVMRegister {
+    MVMObject         *o;
+    MVMString *s;
+    MVMint8            i8;
+    MVMuint8           u8;
+    MVMint16           i16;
+    MVMuint16          u16;
+    MVMint32           i32;
+    MVMuint32          u32;
+    MVMint64           i64;
+    MVMuint64          u64;
+    MVMnum32           n32;
+    MVMnum64           n64;
+};
+</code></pre>
+
+
+
+</div>
+
+<div class='slide'>
+  <!-- _S9SLIDE_ -->
+<h2 id="mvm_interp_runの登場人物">MVM_interp_runの登場人物</h2>
+
+<ul>
+  <li><code>cur_op</code> が読み取るのバイトコード列の先頭ポインタを保存している</li>
+  <li><code>op</code> が現在実行する命令の数値が入っている</li>
+  <li><code>reg_base</code> がMoarVMのレジスタの集合配列</li>
+</ul>
+
+<pre><code>    /* Points to the place in the bytecode right after the current opcode. */
+    /* See the NEXT_OP macro for making sense of this */
+    MVMuint8 *cur_op = NULL;
+
+    /* The current frame's bytecode start. */
+    MVMuint8 *bytecode_start = NULL;
+
+    /* Points to the base of the current register set for the frame we
+     * are presently in. */
+    MVMRegister *reg_base = NULL;
+</code></pre>
+
+
+
+</div>
+
+<div class='slide'>
+  <!-- _S9SLIDE_ -->
+<h2 id="mvm_interp_runメインループ">MVM_interp_runメインループ</h2>
+
+<ul>
+  <li><code>runloop</code>がメインのループで処理を行っている
+    <ul>
+      <li><code>DISPATCH</code>部分で命令をバイトコード列から取り出している</li>
+    </ul>
+  </li>
+</ul>
+
+<pre><code>    /* Enter runloop. */
+    runloop: {
+        MVMuint16 op;
+
+#if MVM_TRACING
+        if (tracing_enabled) {
+            char *trace_line;
+            trace_line = MVM_exception_backtrace_line(tc, tc-&gt;cur_frame, 0, cur_op);
+            fprintf(stderr, "Op %d%s\n", (int)*((MVMuint16 *)cur_op), trace_line);
+            /* slow tracing is slow. Feel free to speed it. */
+            MVM_free(trace_line);
+        }
+#endif
+
+        /* The ops should be in the same order here as in the oplist file, so
+         * the compiler can can optimise the switch properly. To check if they
+         * are in the same order as the oplist use the
+         * tools/compare-oplist-interp-order.sh helper script. */
+        DISPATCH(NEXT_OP) {
+            OP(no_op):
+                goto NEXT;
+            OP(const_i8):
+            OP(const_i16):
+            OP(const_i32):
+                MVM_exception_throw_adhoc(tc, "const_iX NYI");
+            OP(const_i64):
+                GET_REG(cur_op, 0).i64 = MVM_BC_get_I64(cur_op, 2);
+                cur_op += 10;
+                goto NEXT;
+</code></pre>
+
+
+
+</div>
+
+<div class='slide'>
+  <!-- _S9SLIDE_ -->
+<h2 id="mvm_interp_runメインループ-1">MVM_interp_runメインループ</h2>
+
+<ul>
+  <li><code>DISPATCH</code>はマクロになっている
+    <ul>
+      <li>ラベルgotoが使えるケースはDISPATCHは何も意味を持たない</li>
+      <li>使えない場合はswitch文に展開される
+        <ul>
+          <li><code>op</code> に実行する命令の数値が格納されているので、 これに応じてswitchで飛ぶ</li>
+        </ul>
+      </li>
+    </ul>
+  </li>
+</ul>
+
+<pre><code>#if MVM_CGOTO
+#define DISPATCH(op)
+#define OP(name) OP_ ## name
+#define NEXT *LABELS[NEXT_OP]
+#else
+#define DISPATCH(op) switch (op)
+#define OP(name) case MVM_OP_ ## name
+#define NEXT runloop
+#endif
+</code></pre>
+
+
+
+</div>
+
+<div class='slide'>
+  <!-- _S9SLIDE_ -->
+<h2 id="mvm_interp_runメインループ-2">MVM_interp_runメインループ</h2>
+
+<ul>
+  <li><code>OP</code> が命令のスコープを切るマクロとなっている
+    <ul>
+      <li>gotoが使える場合
+        <ul>
+          <li><code>##name</code> に展開され、 それぞれの命令の名前を持つラベルになる</li>
+        </ul>
+      </li>
+      <li>gotoが使えない場合
+        <ul>
+          <li>case文に展開される</li>
+        </ul>
+      </li>
+    </ul>
+  </li>
+</ul>
+
+<pre><code>#if MVM_CGOTO
+#define DISPATCH(op)
+#define OP(name) OP_ ## name
+#define NEXT *LABELS[NEXT_OP]
+#else
+#define DISPATCH(op) switch (op)
+#define OP(name) case MVM_OP_ ## name
+#define NEXT runloop
+#endif
+</code></pre>
+
+
+
+</div>
+
+<div class='slide'>
+  <!-- _S9SLIDE_ -->
+<h2 id="mvm_interp_runメインループ-3">MVM_interp_runメインループ</h2>
+
+<ul>
+  <li>次の命令には <code>NEXT</code> マクロで移動する
+    <ul>
+      <li>gotoが使える場合
+        <ul>
+          <li>次のラベルに対応したアドレスを配列LABELSから取り出しgotoする</li>
+        </ul>
+      </li>
+      <li>gotoが使えない場合
+        <ul>
+          <li><code>runloop</code>に対してgotoする(先頭へのループ)</li>
+        </ul>
+      </li>
+    </ul>
+  </li>
+</ul>
+
+<pre><code>#if MVM_CGOTO
+#define DISPATCH(op)
+#define OP(name) OP_ ## name
+#define NEXT *LABELS[NEXT_OP]
+#else
+#define DISPATCH(op) switch (op)
+#define OP(name) case MVM_OP_ ## name
+#define NEXT runloop
+#endif
+</code></pre>
+
+
+
+</div>
+
+<div class='slide'>
+  <!-- _S9SLIDE_ -->
+<h2 id="それぞれの命令の実装">それぞれの命令の実装</h2>
+
+<ul>
+  <li>マクロ <code>GET_REG</code> でレジスタ情報を取得する
+    <ul>
+      <li>末尾で型を指定する</li>
+    </ul>
+  </li>
+  <li>よしなに処理をした後に、バイトコード列 <code>cur_op</code> をインクリメントする
+    <ul>
+      <li>計算機のプログラムカウンタを進めることに対応する</li>
+    </ul>
+  </li>
+</ul>
+
+<pre><code>    OP(add_i):
+        GET_REG(cur_op, 0).i64 = GET_REG(cur_op, 2).i64 + GET_REG(cur_op, 4).i64;
+        cur_op += 6;
+        goto NEXT;
+    OP(sub_i):
+        GET_REG(cur_op, 0).i64 = GET_REG(cur_op, 2).i64 - GET_REG(cur_op, 4).i64;
+        cur_op += 6;
+        goto NEXT;
+    OP(mul_i):
+        GET_REG(cur_op, 0).i64 = GET_REG(cur_op, 2).i64 * GET_REG(cur_op, 4).i64;
+        cur_op += 6;
+        goto NEXT;
+</code></pre>
+
+
+
+</div>
+
+<div class='slide'>
+  <!-- _S9SLIDE_ -->
+<h2 id="本日の展示について">本日の展示について</h2>
+
+<ul>
+  <li>現在当研究室で開発しているContinuationBasedC(CbC)で一部Perl6の処理系を書いています</li>
+  <li>また、 CbCを用いたGearsOSの展示も行っています</li>
+</ul>
+
+
+
+</div>
+
+<div class='slide'>
+  <!-- _S9SLIDE_ -->
+<h2 id="まとめ">まとめ</h2>
+<ul>
+  <li>Perl6の内部構造に迫りました</li>
+  <li>スクリプト言語の中身も通常の計算機と同じような処理をしています</li>
+  <li>OSSなので皆さん読んで改造してみましょう!!</li>
+</ul>
+
 </div>
 
 
--- a/slide.md	Fri Apr 19 23:22:02 2019 +0900
+++ b/slide.md	Sat Apr 20 18:06:35 2019 +0900
@@ -26,6 +26,8 @@
     - 現在は別の言語として開発がそれぞれ進んでいる
 - 仕様と実装が分離しており, 現在はテストが仕様となっている
 - 実装は歴史上複数存在しているが,主流な実装はRakudo
+    - Haskellで実装されたPugs
+    - Pythonとの共同基板を目指したParrot
 - 言語的にはスクリプト言語であり, 漸進的型付き言語
 - 動作環境は、独自のVMのMoarVM, JVM、一部JavaScript上で動作する
 
@@ -165,7 +167,7 @@
 
 ## Rakudoの構成図
 
-![](fig/Rakudo_System_overview.png)
+![](fig/Rakudo_overview.svg)
 
 (http://brrt-to-the-future.blogspot.com/2015/03/advancing-jit-compiler.html)
 
@@ -413,10 +415,43 @@
 
 
 - `smrt_numify` はレジスタ上のオブジェクトを、 num型に変換し、 別のレジスタに登録する命令
-- 今回の整数の比較では、 int型の強制がない為、 数値として比較するためにnum型にキャストしている
+- 今回の整数の比較では、 int型の強制がない為、 数値として比較するためにn64型にキャストしている
+    - numはn64型であり、 64ビットの浮動小数点定数の意味
 
 ![](fig/perl6_num_convert.svg)
 
+## const_i64_16とcoerece_in
+
+```
+    while ( $n > 1) {
+```
+
+```
+00009      const_i64_16       loc_2_int, 1
+00010      coerce_in          loc_5_num, loc_2_int
+```
+- 64ビット整数として1をレジスタ `loc_2` に設定する
+- その後、 numでの比較のためにキャストし, `loc_5` レジスタに設定している
+
+## 比較とif文の判定
+
+```
+    while ( $n > 1) {
+```
+
+```
+00011      gt_n               loc_2_int, loc_4_num, loc_5_num
+00012      unless_i           loc_2_int, label_2(00031)
+```
+
+- `gt_n` で `loc_4` (nが入っている) レジスタと `loc_5` (1が入っているレジスタ)を比較する
+    - 結果により `loc_2` レジスタに真偽値がint型で代入される
+- その結果を `unless_i` で読み取り、 値が偽であったら `label_2(00031)` にジャンプする
+
+## C言語での実装へ
+- 今まではスクリプトレベルでの実装を見てきました
+− スクリプトが実行されるVMの実装をCレベルで見ていきましょう
+
 ## MoarVMのバイトコードインタプリタ部分
 MoarVMなどの言語処理系のバイトコードインタプリタは次のことを繰り返している
 1. 入力されたバイトコード列から命令に対応する部分を読み取る
@@ -424,7 +459,7 @@
 3. 命令部分を実行する
 4. バイトコード列を次に進め、繰り返す
 
-- この部分の実装は大体次のような処理をしている
+- この部分の実装は大体次のようなパターンで記述されている
 
 ## 巨大なswitch文を使うケース
 
@@ -432,16 +467,41 @@
 - 実行のたびにループで先頭に戻り、次の命令を計算する必要があるので低速
 
 ```
+    while( pc != NULL) {
+        switch(pc){
+            case ADD_INSTRUCTION:
+                // instruction....
+                break;
+            case SUBD_INSTRUCTION:
+                // instruction....
+                break;
+        }
+    }
 ```
 
 ## Cコンパイラのラベルgotoを使うケース
 
 - 巨大なcase文とループではなく、 次の命令の実行場所に直接jmpで移動する
+- GCC拡張でサポートしている場合「`&&ラベル名` 」でラベルのアドレスが取得できる
+    - 取得したアドレスに対して「goto アドレス」でgoto文でjmpする
 - 次の命令に対応するラベルを取得する必要があるが、 ループする必要がなく高速
 - ラベルgotoであり、 Cコンパイラの拡張機能として搭載されている
     - gccおよびLLVM/clangには実装されている
 
 ```
+    static const void *CODES[] = {&&ADD_INSTRUCTION, &&SUB_INSTRCUTION};
+
+    goto *CODES[pc];
+
+ADD_INSTRUCTION:
+    // instruction...
+    pc++;
+    goto *CODES[pc];
+
+SUB_INSTRUCTION:
+    // instruction...
+    pc++;
+    goto *CODES[pc];
 ```
 
 ## MoarVMでは
@@ -449,3 +509,221 @@
 - 使えないコンパイラの場合は、 switch文を利用する
     - この判断はマクロで処理をしている
 − 一般的にはラベルgotoの方が高速である為、他のスクリプト言語でもラベルgotoが使われている
+
+## MoarVMのC言語での実装
+
+- [GitHub上にリポジトリ](https://github.com/MoarVM/MoarVM)がある
+- `src/core/interp.c` がバイトコードインタプリタの実装コード
+- この中でマクロを使いつつ、 バイトコードに対応した命令を処理している
+- `MVM_interp_run`が実際にバイトコードを解釈している
+
+
+```
+/* This is the interpreter run loop. We have one of these per thread. */
+void MVM_interp_run(MVMThreadContext *tc, void (*initial_invoke)(MVMThreadContext *, void *), void *invoke_data) {
+#if MVM_CGOTO
+#include "oplabels.h"
+#endif
+
+    /* Points to the place in the bytecode right after the current opcode. */
+    /* See the NEXT_OP macro for making sense of this */
+    MVMuint8 *cur_op = NULL;
+
+    /* The current frame's bytecode start. */
+    MVMuint8 *bytecode_start = NULL;
+
+    /* Points to the base of the current register set for the frame we
+     * are presently in. */
+    MVMRegister *reg_base = NULL;
+
+    /* Points to the current compilation unit. */
+    MVMCompUnit *cu = NULL;
+
+    /* The current call site we're constructing. */
+    MVMCallsite *cur_callsite = NULL;
+
+    /* Stash addresses of current op, register base and SC deref base
+     * in the TC; this will be used by anything that needs to switch
+     * the current place we're interpreting. */
+    tc->interp_cur_op         = &cur_op;
+    tc->interp_bytecode_start = &bytecode_start;
+    tc->interp_reg_base       = &reg_base;
+    tc->interp_cu             = &cu;
+
+    /* With everything set up, do the initial invocation (exactly what this does
+     * varies depending on if this is starting a new thread or is the top-level
+     * program entry point). */
+    initial_invoke(tc, invoke_data);
+```
+
+## MoarVMのレジスタ構成
+
+- レジスタはそれぞれの型を共用体のデータ構造で持っている
+- 型名は各命令の接尾辞に対応している
+
+```
+/* Different views of a register. */
+union MVMRegister {
+    MVMObject         *o;
+    MVMString *s;
+    MVMint8            i8;
+    MVMuint8           u8;
+    MVMint16           i16;
+    MVMuint16          u16;
+    MVMint32           i32;
+    MVMuint32          u32;
+    MVMint64           i64;
+    MVMuint64          u64;
+    MVMnum32           n32;
+    MVMnum64           n64;
+};
+```
+
+
+## MVM_interp_runの登場人物
+
+- `cur_op` が読み取るのバイトコード列の先頭ポインタを保存している
+- `op` が現在実行する命令の数値が入っている
+- `reg_base` がMoarVMのレジスタの集合配列
+
+```
+    /* Points to the place in the bytecode right after the current opcode. */
+    /* See the NEXT_OP macro for making sense of this */
+    MVMuint8 *cur_op = NULL;
+
+    /* The current frame's bytecode start. */
+    MVMuint8 *bytecode_start = NULL;
+
+    /* Points to the base of the current register set for the frame we
+     * are presently in. */
+    MVMRegister *reg_base = NULL;
+```
+
+## MVM_interp_runメインループ
+
+- `runloop`がメインのループで処理を行っている
+    - `DISPATCH`部分で命令をバイトコード列から取り出している
+
+```
+    /* Enter runloop. */
+    runloop: {
+        MVMuint16 op;
+
+#if MVM_TRACING
+        if (tracing_enabled) {
+            char *trace_line;
+            trace_line = MVM_exception_backtrace_line(tc, tc->cur_frame, 0, cur_op);
+            fprintf(stderr, "Op %d%s\n", (int)*((MVMuint16 *)cur_op), trace_line);
+            /* slow tracing is slow. Feel free to speed it. */
+            MVM_free(trace_line);
+        }
+#endif
+
+        /* The ops should be in the same order here as in the oplist file, so
+         * the compiler can can optimise the switch properly. To check if they
+         * are in the same order as the oplist use the
+         * tools/compare-oplist-interp-order.sh helper script. */
+        DISPATCH(NEXT_OP) {
+            OP(no_op):
+                goto NEXT;
+            OP(const_i8):
+            OP(const_i16):
+            OP(const_i32):
+                MVM_exception_throw_adhoc(tc, "const_iX NYI");
+            OP(const_i64):
+                GET_REG(cur_op, 0).i64 = MVM_BC_get_I64(cur_op, 2);
+                cur_op += 10;
+                goto NEXT;
+```
+
+## MVM_interp_runメインループ
+
+- `DISPATCH`はマクロになっている
+    - ラベルgotoが使えるケースはDISPATCHは何も意味を持たない
+    - 使えない場合はswitch文に展開される
+        - `op` に実行する命令の数値が格納されているので、 これに応じてswitchで飛ぶ
+
+
+```
+#if MVM_CGOTO
+#define DISPATCH(op)
+#define OP(name) OP_ ## name
+#define NEXT *LABELS[NEXT_OP]
+#else
+#define DISPATCH(op) switch (op)
+#define OP(name) case MVM_OP_ ## name
+#define NEXT runloop
+#endif
+```
+
+## MVM_interp_runメインループ
+
+- `OP` が命令のスコープを切るマクロとなっている
+    - gotoが使える場合
+        - `##name` に展開され、 それぞれの命令の名前を持つラベルになる
+    - gotoが使えない場合
+        - case文に展開される
+
+```
+#if MVM_CGOTO
+#define DISPATCH(op)
+#define OP(name) OP_ ## name
+#define NEXT *LABELS[NEXT_OP]
+#else
+#define DISPATCH(op) switch (op)
+#define OP(name) case MVM_OP_ ## name
+#define NEXT runloop
+#endif
+```
+
+## MVM_interp_runメインループ
+
+- 次の命令には `NEXT` マクロで移動する
+    - gotoが使える場合
+        - 次のラベルに対応したアドレスを配列LABELSから取り出しgotoする
+    - gotoが使えない場合
+        - `runloop`に対してgotoする(先頭へのループ)
+
+```
+#if MVM_CGOTO
+#define DISPATCH(op)
+#define OP(name) OP_ ## name
+#define NEXT *LABELS[NEXT_OP]
+#else
+#define DISPATCH(op) switch (op)
+#define OP(name) case MVM_OP_ ## name
+#define NEXT runloop
+#endif
+```
+
+## それぞれの命令の実装
+
+- マクロ `GET_REG` でレジスタ情報を取得する
+    - 末尾で型を指定する
+- よしなに処理をした後に、バイトコード列 `cur_op` をインクリメントする
+    - 計算機のプログラムカウンタを進めることに対応する
+
+```
+    OP(add_i):
+        GET_REG(cur_op, 0).i64 = GET_REG(cur_op, 2).i64 + GET_REG(cur_op, 4).i64;
+        cur_op += 6;
+        goto NEXT;
+    OP(sub_i):
+        GET_REG(cur_op, 0).i64 = GET_REG(cur_op, 2).i64 - GET_REG(cur_op, 4).i64;
+        cur_op += 6;
+        goto NEXT;
+    OP(mul_i):
+        GET_REG(cur_op, 0).i64 = GET_REG(cur_op, 2).i64 * GET_REG(cur_op, 4).i64;
+        cur_op += 6;
+        goto NEXT;
+```
+
+## 本日の展示について
+
+- 現在当研究室で開発しているContinuationBasedC(CbC)で一部Perl6の処理系を書いています
+- また、 CbCを用いたGearsOSの展示も行っています
+
+## まとめ
+- Perl6の内部構造に迫りました
+- スクリプト言語の中身も通常の計算機と同じような処理をしています
+- OSSなので皆さん読んで改造してみましょう!!
--- a/slide.pdf.html	Fri Apr 19 23:22:02 2019 +0900
+++ b/slide.pdf.html	Sat Apr 20 18:06:35 2019 +0900
@@ -123,7 +123,12 @@
     </ul>
   </li>
   <li>仕様と実装が分離しており, 現在はテストが仕様となっている</li>
-  <li>実装は歴史上複数存在しているが,主流な実装はRakudo</li>
+  <li>実装は歴史上複数存在しているが,主流な実装はRakudo
+    <ul>
+      <li>Haskellで実装されたPugs</li>
+      <li>Pythonとの共同基板を目指したParrot</li>
+    </ul>
+  </li>
   <li>言語的にはスクリプト言語であり, 漸進的型付き言語</li>
   <li>動作環境は、独自のVMのMoarVM, JVM、一部JavaScript上で動作する</li>
 </ul>
@@ -368,7 +373,7 @@
   <!-- _S9SLIDE_ -->
 <h2 id="rakudoの構成図">Rakudoの構成図</h2>
 
-<p><img src="fig/Rakudo_System_overview.png" alt="" /></p>
+<p><img src="fig/Rakudo_overview.svg" alt="" /></p>
 
 <p>(http://brrt-to-the-future.blogspot.com/2015/03/advancing-jit-compiler.html)</p>
 
@@ -733,7 +738,11 @@
 
 <ul>
   <li><code>smrt_numify</code> はレジスタ上のオブジェクトを、 num型に変換し、 別のレジスタに登録する命令</li>
-  <li>今回の整数の比較では、 int型の強制がない為、 数値として比較するためにnum型にキャストしている</li>
+  <li>今回の整数の比較では、 int型の強制がない為、 数値として比較するためにn64型にキャストしている
+    <ul>
+      <li>numはn64型であり、 64ビットの浮動小数点定数の意味</li>
+    </ul>
+  </li>
 </ul>
 
 <p><img src="fig/perl6_num_convert.svg" alt="" /></p>
@@ -744,6 +753,61 @@
 
 <div class='slide'>
   <!-- _S9SLIDE_ -->
+<h2 id="const_i64_16とcoerece_in">const_i64_16とcoerece_in</h2>
+
+<pre><code>    while ( $n &gt; 1) {
+</code></pre>
+
+<pre><code>00009      const_i64_16       loc_2_int, 1
+00010      coerce_in          loc_5_num, loc_2_int
+</code></pre>
+<ul>
+  <li>64ビット整数として1をレジスタ <code>loc_2</code> に設定する</li>
+  <li>その後、 numでの比較のためにキャストし, <code>loc_5</code> レジスタに設定している</li>
+</ul>
+
+
+
+</div>
+
+<div class='slide'>
+  <!-- _S9SLIDE_ -->
+<h2 id="比較とif文の判定">比較とif文の判定</h2>
+
+<pre><code>    while ( $n &gt; 1) {
+</code></pre>
+
+<pre><code>00011      gt_n               loc_2_int, loc_4_num, loc_5_num
+00012      unless_i           loc_2_int, label_2(00031)
+</code></pre>
+
+<ul>
+  <li><code>gt_n</code> で <code>loc_4</code> (nが入っている) レジスタと <code>loc_5</code> (1が入っているレジスタ)を比較する
+    <ul>
+      <li>結果により <code>loc_2</code> レジスタに真偽値がint型で代入される</li>
+    </ul>
+  </li>
+  <li>その結果を <code>unless_i</code> で読み取り、 値が偽であったら <code>label_2(00031)</code> にジャンプする</li>
+</ul>
+
+
+
+</div>
+
+<div class='slide'>
+  <!-- _S9SLIDE_ -->
+<h2 id="c言語での実装へ">C言語での実装へ</h2>
+<ul>
+  <li>今まではスクリプトレベルでの実装を見てきました</li>
+  <li>スクリプトが実行されるVMの実装をCレベルで見ていきましょう</li>
+</ul>
+
+
+
+</div>
+
+<div class='slide'>
+  <!-- _S9SLIDE_ -->
 <h2 id="moarvmのバイトコードインタプリタ部分">MoarVMのバイトコードインタプリタ部分</h2>
 <p>MoarVMなどの言語処理系のバイトコードインタプリタは次のことを繰り返している</p>
 <ol>
@@ -754,7 +818,7 @@
 </ol>
 
 <ul>
-  <li>この部分の実装は大体次のような処理をしている</li>
+  <li>この部分の実装は大体次のようなパターンで記述されている</li>
 </ul>
 
 
@@ -770,7 +834,16 @@
   <li>実行のたびにループで先頭に戻り、次の命令を計算する必要があるので低速</li>
 </ul>
 
-<pre><code>
+<pre><code>    while( pc != NULL) {
+        switch(pc){
+            case ADD_INSTRUCTION:
+                // instruction....
+                break;
+            case SUBD_INSTRUCTION:
+                // instruction....
+                break;
+        }
+    }
 </code></pre>
 
 
@@ -783,6 +856,11 @@
 
 <ul>
   <li>巨大なcase文とループではなく、 次の命令の実行場所に直接jmpで移動する</li>
+  <li>GCC拡張でサポートしている場合「<code>&amp;&amp;ラベル名</code> 」でラベルのアドレスが取得できる
+    <ul>
+      <li>取得したアドレスに対して「goto アドレス」でgoto文でjmpする</li>
+    </ul>
+  </li>
   <li>次の命令に対応するラベルを取得する必要があるが、 ループする必要がなく高速</li>
   <li>ラベルgotoであり、 Cコンパイラの拡張機能として搭載されている
     <ul>
@@ -791,7 +869,19 @@
   </li>
 </ul>
 
-<pre><code>
+<pre><code>    static const void *CODES[] = {&amp;&amp;ADD_INSTRUCTION, &amp;&amp;SUB_INSTRCUTION};
+
+    goto *CODES[pc];
+
+ADD_INSTRUCTION:
+    // instruction...
+    pc++;
+    goto *CODES[pc];
+
+SUB_INSTRUCTION:
+    // instruction...
+    pc++;
+    goto *CODES[pc];
 </code></pre>
 
 
@@ -811,6 +901,326 @@
   <li>一般的にはラベルgotoの方が高速である為、他のスクリプト言語でもラベルgotoが使われている</li>
 </ul>
 
+
+
+</div>
+
+<div class='slide'>
+  <!-- _S9SLIDE_ -->
+<h2 id="moarvmのc言語での実装">MoarVMのC言語での実装</h2>
+
+<ul>
+  <li><a href="https://github.com/MoarVM/MoarVM">GitHub上にリポジトリ</a>がある</li>
+  <li><code>src/core/interp.c</code> がバイトコードインタプリタの実装コード</li>
+  <li>この中でマクロを使いつつ、 バイトコードに対応した命令を処理している</li>
+  <li><code>MVM_interp_run</code>が実際にバイトコードを解釈している</li>
+</ul>
+
+<pre><code>/* This is the interpreter run loop. We have one of these per thread. */
+void MVM_interp_run(MVMThreadContext *tc, void (*initial_invoke)(MVMThreadContext *, void *), void *invoke_data) {
+#if MVM_CGOTO
+#include "oplabels.h"
+#endif
+
+    /* Points to the place in the bytecode right after the current opcode. */
+    /* See the NEXT_OP macro for making sense of this */
+    MVMuint8 *cur_op = NULL;
+
+    /* The current frame's bytecode start. */
+    MVMuint8 *bytecode_start = NULL;
+
+    /* Points to the base of the current register set for the frame we
+     * are presently in. */
+    MVMRegister *reg_base = NULL;
+
+    /* Points to the current compilation unit. */
+    MVMCompUnit *cu = NULL;
+
+    /* The current call site we're constructing. */
+    MVMCallsite *cur_callsite = NULL;
+
+    /* Stash addresses of current op, register base and SC deref base
+     * in the TC; this will be used by anything that needs to switch
+     * the current place we're interpreting. */
+    tc-&gt;interp_cur_op         = &amp;cur_op;
+    tc-&gt;interp_bytecode_start = &amp;bytecode_start;
+    tc-&gt;interp_reg_base       = &amp;reg_base;
+    tc-&gt;interp_cu             = &amp;cu;
+
+    /* With everything set up, do the initial invocation (exactly what this does
+     * varies depending on if this is starting a new thread or is the top-level
+     * program entry point). */
+    initial_invoke(tc, invoke_data);
+</code></pre>
+
+
+
+</div>
+
+<div class='slide'>
+  <!-- _S9SLIDE_ -->
+<h2 id="moarvmのレジスタ構成">MoarVMのレジスタ構成</h2>
+
+<ul>
+  <li>レジスタはそれぞれの型を共用体のデータ構造で持っている</li>
+  <li>型名は各命令の接尾辞に対応している</li>
+</ul>
+
+<pre><code>/* Different views of a register. */
+union MVMRegister {
+    MVMObject         *o;
+    MVMString *s;
+    MVMint8            i8;
+    MVMuint8           u8;
+    MVMint16           i16;
+    MVMuint16          u16;
+    MVMint32           i32;
+    MVMuint32          u32;
+    MVMint64           i64;
+    MVMuint64          u64;
+    MVMnum32           n32;
+    MVMnum64           n64;
+};
+</code></pre>
+
+
+
+</div>
+
+<div class='slide'>
+  <!-- _S9SLIDE_ -->
+<h2 id="mvm_interp_runの登場人物">MVM_interp_runの登場人物</h2>
+
+<ul>
+  <li><code>cur_op</code> が読み取るのバイトコード列の先頭ポインタを保存している</li>
+  <li><code>op</code> が現在実行する命令の数値が入っている</li>
+  <li><code>reg_base</code> がMoarVMのレジスタの集合配列</li>
+</ul>
+
+<pre><code>    /* Points to the place in the bytecode right after the current opcode. */
+    /* See the NEXT_OP macro for making sense of this */
+    MVMuint8 *cur_op = NULL;
+
+    /* The current frame's bytecode start. */
+    MVMuint8 *bytecode_start = NULL;
+
+    /* Points to the base of the current register set for the frame we
+     * are presently in. */
+    MVMRegister *reg_base = NULL;
+</code></pre>
+
+
+
+</div>
+
+<div class='slide'>
+  <!-- _S9SLIDE_ -->
+<h2 id="mvm_interp_runメインループ">MVM_interp_runメインループ</h2>
+
+<ul>
+  <li><code>runloop</code>がメインのループで処理を行っている
+    <ul>
+      <li><code>DISPATCH</code>部分で命令をバイトコード列から取り出している</li>
+    </ul>
+  </li>
+</ul>
+
+<pre><code>    /* Enter runloop. */
+    runloop: {
+        MVMuint16 op;
+
+#if MVM_TRACING
+        if (tracing_enabled) {
+            char *trace_line;
+            trace_line = MVM_exception_backtrace_line(tc, tc-&gt;cur_frame, 0, cur_op);
+            fprintf(stderr, "Op %d%s\n", (int)*((MVMuint16 *)cur_op), trace_line);
+            /* slow tracing is slow. Feel free to speed it. */
+            MVM_free(trace_line);
+        }
+#endif
+
+        /* The ops should be in the same order here as in the oplist file, so
+         * the compiler can can optimise the switch properly. To check if they
+         * are in the same order as the oplist use the
+         * tools/compare-oplist-interp-order.sh helper script. */
+        DISPATCH(NEXT_OP) {
+            OP(no_op):
+                goto NEXT;
+            OP(const_i8):
+            OP(const_i16):
+            OP(const_i32):
+                MVM_exception_throw_adhoc(tc, "const_iX NYI");
+            OP(const_i64):
+                GET_REG(cur_op, 0).i64 = MVM_BC_get_I64(cur_op, 2);
+                cur_op += 10;
+                goto NEXT;
+</code></pre>
+
+
+
+</div>
+
+<div class='slide'>
+  <!-- _S9SLIDE_ -->
+<h2 id="mvm_interp_runメインループ-1">MVM_interp_runメインループ</h2>
+
+<ul>
+  <li><code>DISPATCH</code>はマクロになっている
+    <ul>
+      <li>ラベルgotoが使えるケースはDISPATCHは何も意味を持たない</li>
+      <li>使えない場合はswitch文に展開される
+        <ul>
+          <li><code>op</code> に実行する命令の数値が格納されているので、 これに応じてswitchで飛ぶ</li>
+        </ul>
+      </li>
+    </ul>
+  </li>
+</ul>
+
+<pre><code>#if MVM_CGOTO
+#define DISPATCH(op)
+#define OP(name) OP_ ## name
+#define NEXT *LABELS[NEXT_OP]
+#else
+#define DISPATCH(op) switch (op)
+#define OP(name) case MVM_OP_ ## name
+#define NEXT runloop
+#endif
+</code></pre>
+
+
+
+</div>
+
+<div class='slide'>
+  <!-- _S9SLIDE_ -->
+<h2 id="mvm_interp_runメインループ-2">MVM_interp_runメインループ</h2>
+
+<ul>
+  <li><code>OP</code> が命令のスコープを切るマクロとなっている
+    <ul>
+      <li>gotoが使える場合
+        <ul>
+          <li><code>##name</code> に展開され、 それぞれの命令の名前を持つラベルになる</li>
+        </ul>
+      </li>
+      <li>gotoが使えない場合
+        <ul>
+          <li>case文に展開される</li>
+        </ul>
+      </li>
+    </ul>
+  </li>
+</ul>
+
+<pre><code>#if MVM_CGOTO
+#define DISPATCH(op)
+#define OP(name) OP_ ## name
+#define NEXT *LABELS[NEXT_OP]
+#else
+#define DISPATCH(op) switch (op)
+#define OP(name) case MVM_OP_ ## name
+#define NEXT runloop
+#endif
+</code></pre>
+
+
+
+</div>
+
+<div class='slide'>
+  <!-- _S9SLIDE_ -->
+<h2 id="mvm_interp_runメインループ-3">MVM_interp_runメインループ</h2>
+
+<ul>
+  <li>次の命令には <code>NEXT</code> マクロで移動する
+    <ul>
+      <li>gotoが使える場合
+        <ul>
+          <li>次のラベルに対応したアドレスを配列LABELSから取り出しgotoする</li>
+        </ul>
+      </li>
+      <li>gotoが使えない場合
+        <ul>
+          <li><code>runloop</code>に対してgotoする(先頭へのループ)</li>
+        </ul>
+      </li>
+    </ul>
+  </li>
+</ul>
+
+<pre><code>#if MVM_CGOTO
+#define DISPATCH(op)
+#define OP(name) OP_ ## name
+#define NEXT *LABELS[NEXT_OP]
+#else
+#define DISPATCH(op) switch (op)
+#define OP(name) case MVM_OP_ ## name
+#define NEXT runloop
+#endif
+</code></pre>
+
+
+
+</div>
+
+<div class='slide'>
+  <!-- _S9SLIDE_ -->
+<h2 id="それぞれの命令の実装">それぞれの命令の実装</h2>
+
+<ul>
+  <li>マクロ <code>GET_REG</code> でレジスタ情報を取得する
+    <ul>
+      <li>末尾で型を指定する</li>
+    </ul>
+  </li>
+  <li>よしなに処理をした後に、バイトコード列 <code>cur_op</code> をインクリメントする
+    <ul>
+      <li>計算機のプログラムカウンタを進めることに対応する</li>
+    </ul>
+  </li>
+</ul>
+
+<pre><code>    OP(add_i):
+        GET_REG(cur_op, 0).i64 = GET_REG(cur_op, 2).i64 + GET_REG(cur_op, 4).i64;
+        cur_op += 6;
+        goto NEXT;
+    OP(sub_i):
+        GET_REG(cur_op, 0).i64 = GET_REG(cur_op, 2).i64 - GET_REG(cur_op, 4).i64;
+        cur_op += 6;
+        goto NEXT;
+    OP(mul_i):
+        GET_REG(cur_op, 0).i64 = GET_REG(cur_op, 2).i64 * GET_REG(cur_op, 4).i64;
+        cur_op += 6;
+        goto NEXT;
+</code></pre>
+
+
+
+</div>
+
+<div class='slide'>
+  <!-- _S9SLIDE_ -->
+<h2 id="本日の展示について">本日の展示について</h2>
+
+<ul>
+  <li>現在当研究室で開発しているContinuationBasedC(CbC)で一部Perl6の処理系を書いています</li>
+  <li>また、 CbCを用いたGearsOSの展示も行っています</li>
+</ul>
+
+
+
+</div>
+
+<div class='slide'>
+  <!-- _S9SLIDE_ -->
+<h2 id="まとめ">まとめ</h2>
+<ul>
+  <li>Perl6の内部構造に迫りました</li>
+  <li>スクリプト言語の中身も通常の計算機と同じような処理をしています</li>
+  <li>OSSなので皆さん読んで改造してみましょう!!</li>
+</ul>
+
 </div>