public
Fork of stevedekorte/io
Description: Io programming language
Homepage: http://iolanguage.com
Clone URL: git://github.com/oleganza/io.git
Search Repo:
docs for Coroutine & Compiler
oleganza (author)
Wed Jul 02 17:56:54 -0700 2008
commit  f14d986687cfc8fdf927a2a452dcd506f11b20b5
tree    c2ed18433f31b81d363c6d63c1972d9e32c2eede
parent  3b4b4a8f3abd7774276846b776f55b4b5f0bf525
...
1645
1646
1647
1648
 
1649
1650
1651
...
1656
1657
1658
1659
 
1660
1661
 
1662
1663
1664
...
1738
1739
1740
1741
 
1742
1743
1744
1745
 
1746
1747
1748
1749
 
1750
1751
1752
1753
 
1754
1755
1756
...
1758
1759
1760
1761
 
1762
1763
1764
1765
 
1766
1767
1768
1769
 
1770
1771
1772
...
1778
1779
1780
1781
 
1782
1783
1784
...
1790
1791
1792
1793
 
1794
1795
1796
...
1803
1804
1805
1806
 
1807
1808
1809
1810
 
1811
1812
1813
...
1815
1816
1817
1818
 
 
1819
1820
1821
...
1824
1825
1826
1827
 
1828
1829
1830
1831
 
1832
1833
1834
...
1844
1845
1846
1847
 
1848
1849
1850
1851
 
1852
1853
1854
1855
 
1856
1857
1858
...
1863
1864
1865
1866
 
1867
1868
1869
1870
 
1871
1872
1873
1874
 
1875
1876
1877
1878
 
1879
1880
1881
1882
 
1883
1884
1885
1886
 
1887
1888
1889
1890
 
1891
1892
1893
...
1895
1896
1897
1898
 
1899
1900
1901
...
1903
1904
1905
1906
 
1907
1908
1909
...
1912
1913
1914
1915
 
1916
1917
1918
...
9010
9011
9012
9013
 
9014
9015
9016
...
17273
17274
17275
17276
 
17277
17278
17279
...
18768
18769
18770
 
18771
18772
18773
18774
18775
18776
 
18777
18778
18779
...
18784
18785
18786
 
 
 
 
18787
18788
18789
...
18808
18809
18810
 
 
 
 
18811
18812
18813
...
1645
1646
1647
 
1648
1649
1650
1651
...
1656
1657
1658
 
1659
1660
 
1661
1662
1663
1664
...
1738
1739
1740
 
1741
1742
1743
1744
 
1745
1746
1747
1748
 
1749
1750
1751
1752
 
1753
1754
1755
1756
...
1758
1759
1760
 
1761
1762
1763
1764
 
1765
1766
1767
1768
 
1769
1770
1771
1772
...
1778
1779
1780
 
1781
1782
1783
1784
...
1790
1791
1792
 
1793
1794
1795
1796
...
1803
1804
1805
 
1806
1807
1808
1809
 
1810
1811
1812
1813
...
1815
1816
1817
 
1818
1819
1820
1821
1822
...
1825
1826
1827
 
1828
1829
1830
1831
 
1832
1833
1834
1835
...
1845
1846
1847
 
1848
1849
1850
1851
 
1852
1853
1854
1855
 
1856
1857
1858
1859
...
1864
1865
1866
 
1867
1868
1869
1870
 
1871
1872
1873
1874
 
1875
1876
1877
1878
 
1879
1880
1881
1882
 
1883
1884
1885
1886
 
1887
1888
1889
1890
 
1891
1892
1893
1894
...
1896
1897
1898
 
1899
1900
1901
1902
...
1904
1905
1906
 
1907
1908
1909
1910
...
1913
1914
1915
 
1916
1917
1918
1919
...
9011
9012
9013
 
9014
9015
9016
9017
...
17274
17275
17276
 
17277
17278
17279
17280
...
18769
18770
18771
18772
18773
18774
18775
18776
18777
18778
18779
18780
18781
18782
...
18787
18788
18789
18790
18791
18792
18793
18794
18795
18796
...
18815
18816
18817
18818
18819
18820
18821
18822
18823
18824
0
@@ -1645,7 +1645,7 @@ Contains methods related to the compiling code.
0
 <h3>Slot Index</h3>
0
 <div class=slotIndex>
0
 <a href="#Compiler-messageForString">messageForString()</a><br>
0
-<a href="#Compiler-messageForString2">messageForString2</a><br>
0
+<a href="#Compiler-messageForString2">messageForString2()</a><br>
0
 <a href="#Compiler-messageForTokens">messageForTokens()</a><br>
0
 <a href="#Compiler-tokensForString">tokensForString()</a><br>
0
 </div>
0
@@ -1656,9 +1656,9 @@ Contains methods related to the compiling code.
0
 <div class=slotDescription>
0
 Returns the compiled message object for aString.
0
 </div>
0
-<a name="Compiler-messageForString2"></a><b>messageForString2</b><p>
0
+<a name="Compiler-messageForString2"></a><b>messageForString2(aString)</b><p>
0
 <div class=slotDescription>
0
-<div class=error>undocumented</div>
0
+Returns the compiled message object for aString. (Runs raw string against lexer directly.)
0
 </div>
0
 <a name="Compiler-messageForTokens"></a><b>messageForTokens(aList)</b><p>
0
 <div class=slotDescription>
0
@@ -1738,19 +1738,19 @@ Object wrapper for an Io coroutine.
0
 <p>
0
 <a name="Coroutine-backTraceString"></a><b>backTraceString</b><p>
0
 <div class=slotDescription>
0
-<div class=error>undocumented</div>
0
+Returns a formatted callStack output along with exception info (if any). In case of CGI script, wraps output with &lt;code&gt; tag.
0
 </div>
0
 <a name="Coroutine-callStack"></a><b>callStack</b><p>
0
 <div class=slotDescription>
0
-<div class=error>undocumented</div>
0
+Returns a list of Call objects.
0
 </div>
0
 <a name="Coroutine-currentCoroutine"></a><b>currentCoroutine</b><p>
0
 <div class=slotDescription>
0
-<div class=error>undocumented</div>
0
+Returns currently running coroutine in Io state.
0
 </div>
0
 <a name="Coroutine-debugWriteln"></a><b>debugWriteln</b><p>
0
 <div class=slotDescription>
0
-<div class=error>undocumented</div>
0
+(See <tt>Object debugWriteln</tt>.)
0
 </div>
0
 <a name="Coroutine-exception"></a><b>exception</b><p>
0
 <div class=slotDescription>
0
@@ -1758,15 +1758,15 @@ Returns the current exception or nil if there is none.
0
 </div>
0
 <a name="Coroutine-freeStack"></a><b>freeStack</b><p>
0
 <div class=slotDescription>
0
-<div class=error>undocumented</div>
0
+Frees all the internal data from the receiver's stack. Returns self.
0
 </div>
0
 <a name="Coroutine-ignoredCoroutineMethodNames"></a><b>ignoredCoroutineMethodNames</b><p>
0
 <div class=slotDescription>
0
-<div class=error>undocumented</div>
0
+List of methods to ignore when building a <tt>callStack</tt>.
0
 </div>
0
 <a name="Coroutine-implementation"></a><b>implementation</b><p>
0
 <div class=slotDescription>
0
-<div class=error>undocumented</div>
0
+Returns coroutine implementation type: "fibers", "ucontext" or "setjmp"
0
 </div>
0
 <a name="Coroutine-inException"></a><b>inException</b><p>
0
 <div class=slotDescription>
0
@@ -1778,7 +1778,7 @@ Returns List of values on this coroutine's stack.
0
 </div>
0
 <a name="Coroutine-isCurrent"></a><b>isCurrent</b><p>
0
 <div class=slotDescription>
0
-<div class=error>undocumented</div>
0
+Returns true if the receiver is currently running coroutine.
0
 </div>
0
 <a name="Coroutine-isYielding"></a><b>isYielding</b><p>
0
 <div class=slotDescription>
0
@@ -1790,7 +1790,7 @@ A label slot useful for debugging purposes.
0
 </div>
0
 <a name="Coroutine-main"></a><b>main</b><p>
0
 <div class=slotDescription>
0
-<div class=error>undocumented</div>
0
+[Seems to be obsolete!] Executes runMessage, resumes parent coroutine.
0
 </div>
0
 <a name="Coroutine-parentCoroutine"></a><b>parentCoroutine</b><p>
0
 <div class=slotDescription>
0
@@ -1803,11 +1803,11 @@ Removes current coroutine from the yieldingCoros queue and
0
 </div>
0
 <a name="Coroutine-pauseCurrentAndResumeSelf"></a><b>pauseCurrentAndResumeSelf</b><p>
0
 <div class=slotDescription>
0
-<div class=error>undocumented</div>
0
+Pauses current coroutine and yields to a receiver.
0
 </div>
0
 <a name="Coroutine-raiseException"></a><b>raiseException</b><p>
0
 <div class=slotDescription>
0
-<div class=error>undocumented</div>
0
+Sets exception in the receiver and resumes parent coroutine.
0
 </div>
0
 <a name="Coroutine-result"></a><b>result</b><p>
0
 <div class=slotDescription>
0
@@ -1815,7 +1815,8 @@ The result set when the coroutine ends.
0
 </div>
0
 <a name="Coroutine-resume"></a><b>resume</b><p>
0
 <div class=slotDescription>
0
-<div class=error>undocumented</div>
0
+Yields to the receiver. Runs the receiver if it is not running yet.
0
+ Returns self.
0
 </div>
0
 <a name="Coroutine-resumeLater"></a><b>resumeLater</b><p>
0
 <div class=slotDescription>
0
@@ -1824,11 +1825,11 @@ Promotes receiver to the top of the yieldingCoros queue, but not yielding to it.
0
 </div>
0
 <a name="Coroutine-resumeParentCoroutine"></a><b>resumeParentCoroutine</b><p>
0
 <div class=slotDescription>
0
-<div class=error>undocumented</div>
0
+Pauses current coroutine and resumes parent.
0
 </div>
0
 <a name="Coroutine-run"></a><b>run</b><p>
0
 <div class=slotDescription>
0
-<div class=error>undocumented</div>
0
+Runs receiver and returns self.
0
 </div>
0
 <a name="Coroutine-runLocals"></a><b>runLocals</b><p>
0
 <div class=slotDescription>
0
@@ -1844,15 +1845,15 @@ The object which the coroutine will send a message to when it starts.
0
 </div>
0
 <a name="Coroutine-setException"></a><b>setException</b><p>
0
 <div class=slotDescription>
0
-<div class=error>undocumented</div>
0
+
0
 </div>
0
 <a name="Coroutine-setInException"></a><b>setInException</b><p>
0
 <div class=slotDescription>
0
-<div class=error>undocumented</div>
0
+
0
 </div>
0
 <a name="Coroutine-setLabel"></a><b>setLabel</b><p>
0
 <div class=slotDescription>
0
-<div class=error>undocumented</div>
0
+
0
 </div>
0
 <a name="Coroutine-setMessageDebugging"></a><b>setMessageDebugging(aBoolean)</b><p>
0
 <div class=slotDescription>
0
@@ -1863,31 +1864,31 @@ for more information.
0
 </div>
0
 <a name="Coroutine-setParentCoroutine"></a><b>setParentCoroutine</b><p>
0
 <div class=slotDescription>
0
-<div class=error>undocumented</div>
0
+
0
 </div>
0
 <a name="Coroutine-setResult"></a><b>setResult</b><p>
0
 <div class=slotDescription>
0
-<div class=error>undocumented</div>
0
+
0
 </div>
0
 <a name="Coroutine-setRunLocals"></a><b>setRunLocals</b><p>
0
 <div class=slotDescription>
0
-<div class=error>undocumented</div>
0
+
0
 </div>
0
 <a name="Coroutine-setRunMessage"></a><b>setRunMessage</b><p>
0
 <div class=slotDescription>
0
-<div class=error>undocumented</div>
0
+
0
 </div>
0
 <a name="Coroutine-setRunTarget"></a><b>setRunTarget</b><p>
0
 <div class=slotDescription>
0
-<div class=error>undocumented</div>
0
+
0
 </div>
0
 <a name="Coroutine-setStackSize"></a><b>setStackSize</b><p>
0
 <div class=slotDescription>
0
-<div class=error>undocumented</div>
0
+
0
 </div>
0
 <a name="Coroutine-setYieldingCoros"></a><b>setYieldingCoros</b><p>
0
 <div class=slotDescription>
0
-<div class=error>undocumented</div>
0
+
0
 </div>
0
 <a name="Coroutine-showStack"></a><b>showStack</b><p>
0
 <div class=slotDescription>
0
@@ -1895,7 +1896,7 @@ Writes backTraceString to STDOUT.
0
 </div>
0
 <a name="Coroutine-showYielding"></a><b>showYielding</b><p>
0
 <div class=slotDescription>
0
-<div class=error>undocumented</div>
0
+Prints a list of yielding coroutines to STDOUT.
0
 </div>
0
 <a name="Coroutine-stackSize"></a><b>stackSize</b><p>
0
 <div class=slotDescription>
0
@@ -1903,7 +1904,7 @@ Stack size allocated for each new coroutine. Coroutines will automatically chain
0
 </div>
0
 <a name="Coroutine-typeId"></a><b>typeId</b><p>
0
 <div class=slotDescription>
0
-<div class=error>undocumented</div>
0
+Returns <type>_<uniqueHexId> string.
0
 </div>
0
 <a name="Coroutine-yield"></a><b>yield</b><p>
0
 <div class=slotDescription>
0
@@ -1912,7 +1913,7 @@ Yields to another coroutine in the yieldingCoros queue.
0
 </div>
0
 <a name="Coroutine-yieldCurrentAndResumeSelf"></a><b>yieldCurrentAndResumeSelf</b><p>
0
 <div class=slotDescription>
0
-<div class=error>undocumented</div>
0
+Yields to a receiver.
0
 </div>
0
 <a name="Coroutine-yieldingCoros"></a><b>yieldingCoros</b><p>
0
 <div class=slotDescription>
0
@@ -9010,7 +9011,7 @@ Returns one-line string representation up to 40 characters long.
0
 </div>
0
 <a name="Message-asStackEntry"></a><b>asStackEntry</b><p>
0
 <div class=slotDescription>
0
-<div class=error>undocumented</div>
0
+Returns a string containing message name, file and line.
0
 </div>
0
 <a name="Message-asString"></a><b>asString</b><p>
0
 <div class=slotDescription>
0
@@ -17273,7 +17274,7 @@ Returns the path of io installation. The default is $INSTALL_PREFIX/lib/io.
0
 </div>
0
 <a name="System-launchPath"></a><b>launchPath</b><p>
0
 <div class=slotDescription>
0
-<div class=error>undocumented</div>
0
+Returns a pathComponent of the launch file.
0
 </div>
0
 <a name="System-launchScript"></a><b>launchScript</b><p>
0
 <div class=slotDescription>
0
@@ -18768,12 +18769,14 @@ nil is a singleton object that is used as a placeholder and to mean false in Io.
0
 <h3>Slot Index</h3>
0
 <div class=slotIndex>
0
 <a href="#nil-and">and()</a><br>
0
+<a href="#nil-catch">catch</a><br>
0
 <a href="#nil-clone">clone</a><br>
0
 <a href="#nil-else">else()</a><br>
0
 <a href="#nil-ifNil">ifNil()</a><br>
0
 <a href="#nil-isNil">isNil</a><br>
0
 <a href="#nil-justSerialized">justSerialized()</a><br>
0
 <a href="#nil-or">or()</a><br>
0
+<a href="#nil-pass">pass</a><br>
0
 <a href="#nil-print">print</a><br>
0
 <a href="#nil-then">then()</a><br>
0
 </div>
0
@@ -18784,6 +18787,10 @@ nil is a singleton object that is used as a placeholder and to mean false in Io.
0
 <div class=slotDescription>
0
 Returns nil without evaluating expression.
0
 </div>
0
+<a name="nil-catch"></a><b>catch</b><p>
0
+<div class=slotDescription>
0
+Does nothing, returns nil. See <tt>Exception catch</tt>.
0
+</div>
0
 <a name="nil-clone"></a><b>clone</b><p>
0
 <div class=slotDescription>
0
 returns self since nil is a singleton.
0
@@ -18808,6 +18815,10 @@ Writes the receiver's code into the stream.
0
 <div class=slotDescription>
0
 Returns anObject if anObject is not nil. Otherwise returns nil.
0
 </div>
0
+<a name="nil-pass"></a><b>pass</b><p>
0
+<div class=slotDescription>
0
+Does nothing, returns nil. See <tt>Exception pass</tt>.
0
+</div>
0
 <a name="nil-print"></a><b>print</b><p>
0
 <div class=slotDescription>
0
 Prints 'nil'. Returns self.
...
337
338
339
340
 
341
342
343
...
337
338
339
 
340
341
342
343
0
@@ -337,7 +337,7 @@ Object do(
0
   )
0
 
0
   //doc Object launchFile(pathString) Eval file at pathString as if from the command line in it's folder.
0
-
0
+ //doc System launchPath Returns a pathComponent of the launch file.
0
   launchFile := method(path, args,
0
     args ifNil(args = List clone)
0
     System launchPath := path pathComponent
...
60
61
62
 
63
64
65
 
66
67
68
 
69
70
71
 
72
73
74
 
75
76
77
 
78
79
80
 
81
82
83
 
84
85
86
 
87
88
89
 
90
 
91
92
93
94
95
 
 
96
97
98
...
147
148
149
 
150
151
152
153
154
155
 
 
156
157
158
159
160
161
 
 
162
163
 
 
164
165
 
166
167
168
...
174
175
176
 
177
178
179
...
222
223
224
225
226
227
 
228
229
 
 
230
231
232
233
 
 
234
235
236
237
238
239
 
 
240
241
242
...
264
265
266
 
267
268
269
...
343
344
345
 
 
346
347
348
...
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
 
106
107
108
109
110
...
159
160
161
162
163
164
165
166
167
 
168
169
170
171
172
173
174
 
175
176
177
 
178
179
180
181
182
183
184
185
...
191
192
193
194
195
196
197
...
240
241
242
 
 
 
243
244
 
245
246
247
248
249
 
250
251
252
253
254
255
256
 
257
258
259
260
261
...
283
284
285
286
287
288
289
...
363
364
365
366
367
368
369
370
0
@@ -60,39 +60,51 @@ Scheduler := Object clone do(
0
 
0
 Coroutine do(
0
   //doc Coroutine stackSize Stack size allocated for each new coroutine. Coroutines will automatically chain themselves as need if more stack space is required.
0
+ //doc Coroutine setStackSize
0
   stackSize ::= 128000 // PPC needs 128k for current parser
0
   
0
   //doc Coroutine exception Returns the current exception or nil if there is none.
0
+ //doc Coroutine setException
0
   exception ::= nil
0
   
0
   //doc Coroutine parentCoroutine Returns the parent coroutine this one was chained from or nil if it wasn't chained. When a Coroutine ends, it will attempt to resume it's parent.
0
+ //doc Coroutine setParentCoroutine
0
   parentCoroutine ::= nil
0
   
0
   //doc Coroutine runTarget The object which the coroutine will send a message to when it starts.
0
+ //doc Coroutine setRunTarget
0
   runTarget ::= nil
0
 
0
   //doc Coroutine runLocals The locals object in whose context the coroutine will send it's run message.
0
+ //doc Coroutine setRunLocals
0
   runLocals ::= nil
0
 
0
   //doc Coroutine runMessage The message to send to the runTarget when the coroutine starts.
0
+ //doc Coroutine setRunMessage
0
   runMessage ::= nil
0
 
0
   //doc Coroutine result The result set when the coroutine ends.
0
+ //doc Coroutine setResult
0
   result ::= nil
0
   
0
   //doc Coroutine label A label slot useful for debugging purposes.
0
+ //doc Coroutine setLabel
0
   label ::= ""
0
 
0
   //doc Coroutine inException Set to true when processing an exception in the coroutine.
0
+ //doc Coroutine setInException
0
   inException ::= false
0
   
0
   //doc Coroutine yieldingCoros Reference to Scheduler yieldingCoros.
0
+ //doc Coroutine setYieldingCoros
0
   yieldingCoros ::= Scheduler yieldingCoros
0
+ //doc Coroutine debugWriteln (See <tt>Object debugWriteln</tt>.)
0
   debugWriteln := nil
0
 
0
   label := method(self uniqueId)
0
   setLabel := method(s, self label = s .. "_" .. self uniqueId)
0
-
0
+
0
+ //doc Coroutine showYielding Prints a list of yielding coroutines to STDOUT.
0
   showYielding := method(s,
0
     writeln(" ", label, " ", s)
0
     yieldingCoros foreach(v, writeln(" ", v uniqueId))
0
@@ -147,22 +159,27 @@ Coroutine do(
0
   )
0
 
0
   //FIXME: these two methods are identical!!
0
+ //doc Coroutine yieldCurrentAndResumeSelf Yields to a receiver.
0
   yieldCurrentAndResumeSelf := method(
0
     //showYielding("yieldCurrentAndResumeSelf")
0
     yieldingCoros remove(self)
0
     isCurrent ifFalse(resume)
0
   )
0
-
0
+ //FIXME: these two methods are identical!!
0
+ //doc Coroutine pauseCurrentAndResumeSelf Pauses current coroutine and yields to a receiver.
0
   pauseCurrentAndResumeSelf := method(
0
     //showYielding("pauseCurrentAndResumeSelf")
0
     yieldingCoros remove(self)
0
     isCurrent ifFalse(resume)
0
   )
0
-
0
+
0
+ //doc Coroutine typeId Returns <type>_<uniqueHexId> string.
0
   typeId := method(self type .. "_0x" .. self uniqueId asString toBase(16))
0
-
0
+
0
+ //doc Coroutine ignoredCoroutineMethodNames List of methods to ignore when building a <tt>callStack</tt>.
0
   ignoredCoroutineMethodNames := list("setResult", "main", "pauseCurrentAndResumeSelf", "resumeParentCoroutine", "raiseException")
0
 
0
+ //doc Coroutine callStack Returns a list of Call objects.
0
   callStack := method(
0
     stack := ioStack
0
     stack selectInPlace(v, Object argIsCall(getSlot("v"))) reverseInPlace
0
@@ -174,6 +191,7 @@ Coroutine do(
0
     stack
0
   )
0
 
0
+ //doc Coroutine backTraceString Returns a formatted callStack output along with exception info (if any). In case of CGI script, wraps output with &lt;code&gt; tag.
0
   backTraceString := method(
0
     if(Coroutine inException,
0
       writeln("\n", exception type, ": ", exception error, "\n\n")
0
@@ -222,21 +240,22 @@ Coroutine do(
0
     buf
0
   )
0
 
0
- /*doc Coroutine showStack
0
- Writes backTraceString to STDOUT.
0
- */
0
+ //doc Coroutine showStack Writes backTraceString to STDOUT.
0
   showStack := method(write(backTraceString))
0
-
0
+
0
+ //doc Coroutine resumeParentCoroutine Pauses current coroutine and resumes parent.
0
   resumeParentCoroutine := method(
0
     if(parentCoroutine, parentCoroutine pauseCurrentAndResumeSelf)
0
   )
0
-
0
+
0
+ //doc Coroutine main [Seems to be obsolete!] Executes runMessage, resumes parent coroutine.
0
   main := method(
0
     setResult(self getSlot("runTarget") doMessage(runMessage, self getSlot("runLocals")))
0
     resumeParentCoroutine
0
     pause
0
   )
0
-
0
+
0
+ //doc Coroutine raiseException Sets exception in the receiver and resumes parent coroutine.
0
   raiseException := method(e,
0
     self setException(e)
0
     resumeParentCoroutine
0
@@ -264,6 +283,7 @@ Message do(
0
     if (c size < length, c, c slice(0, length) .. "...") asMutable replaceSeq("\n", ";")
0
   )
0
 
0
+ //doc Message asStackEntry Returns a string containing message name, file and line.
0
   asStackEntry := method(
0
     label := label lastPathComponent fileName
0
     label alignLeft(19) .. lineNumber asString alignLeft(7) .. name
0
@@ -343,6 +363,8 @@ Object do(
0
 )
0
 
0
 nil do(
0
+ //doc nil catch Does nothing, returns nil. See <tt>Exception catch</tt>.
0
+ //doc nil pass Does nothing, returns nil. See <tt>Exception pass</tt>.
0
   catch := nil
0
   pass := nil
0
 )
...
105
106
107
 
 
 
108
109
110
...
105
106
107
108
109
110
111
112
113
0
@@ -105,6 +105,9 @@ IoObject *IoObject_messageForString(IoObject *self, IoObject *locals, IoMessage
0
 
0
 IoObject *IoObject_messageForString2(IoObject *self, IoObject *locals, IoMessage *m)
0
 {
0
+ /*doc Compiler messageForString2(aString)
0
+ Returns the compiled message object for aString. (Runs raw string against lexer directly.)
0
+ */
0
   IoLexer *lexer = IoLexer_new();
0
   char *text = IoMessage_locals_cStringArgAt_(m, locals, 0);
0
   IoMessage *msg;
...
286
287
288
 
 
 
289
290
291
...
354
355
356
 
 
 
357
358
359
...
418
419
420
 
 
 
 
421
422
423
424
425
426
 
 
 
427
428
429
430
431
 
 
 
432
433
434
435
436
437
 
 
 
438
439
440
...
286
287
288
289
290
291
292
293
294
...
357
358
359
360
361
362
363
364
365
...
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
0
@@ -286,6 +286,9 @@ void IoCoroutine_coroStartWithContextAndCFunction(void *context, CoroStartCallba
0
 
0
 IoObject *IoCoroutine_freeStack(IoCoroutine *self, IoObject *locals, IoMessage *m)
0
 {
0
+ /*doc Coroutine freeStack
0
+ Frees all the internal data from the receiver's stack. Returns self.
0
+ */
0
   IoCoroutine *current = IoState_currentCoroutine(IOSTATE);
0
 
0
   if (current != self && DATA(self)->cid)
0
@@ -354,6 +357,9 @@ void IoCoroutine_rawRun(IoCoroutine *self)
0
 
0
 IoObject *IoCoroutine_run(IoCoroutine *self, IoObject *locals, IoMessage *m)
0
 {
0
+ /*doc Coroutine run
0
+ Runs receiver and returns self.
0
+ */
0
   IoCoroutine_rawRun(self);
0
   return IoCoroutine_rawResult(self);
0
 }
0
@@ -418,23 +424,36 @@ IoObject *IoCoroutine_rawResume(IoCoroutine *self)
0
 
0
 IoObject *IoCoroutine_resume(IoCoroutine *self, IoObject *locals, IoMessage *m)
0
 {
0
+ /*doc Coroutine resume
0
+ Yields to the receiver. Runs the receiver if it is not running yet.
0
+ Returns self.
0
+ */
0
   //printf("IoCoroutine_resume()\n");
0
   return IoCoroutine_rawResume(self);
0
 }
0
 
0
 IoObject *IoCoroutine_implementation(IoCoroutine *self, IoObject *locals, IoMessage *m)
0
 {
0
+ /*doc Coroutine implementation
0
+ Returns coroutine implementation type: "fibers", "ucontext" or "setjmp"
0
+ */
0
   return IOSYMBOL(CORO_IMPLEMENTATION);
0
 }
0
 
0
 IoObject *IoCoroutine_isCurrent(IoCoroutine *self, IoObject *locals, IoMessage *m)
0
 {
0
+ /*doc Coroutine isCurrent
0
+ Returns true if the receiver is currently running coroutine.
0
+ */
0
   IoObject *v = IOBOOL(self, self == IoState_currentCoroutine(IOSTATE));
0
   return v;
0
 }
0
 
0
 IoObject *IoCoroutine_currentCoroutine(IoCoroutine *self, IoObject *locals, IoMessage *m)
0
 {
0
+ /*doc Coroutine currentCoroutine
0
+ Returns currently running coroutine in Io state.
0
+ */
0
   return IoState_currentCoroutine(IOSTATE);
0
 }
0
 

Comments

    No one has commented yet.