Changeset 317

Show
Ignore:
Timestamp:
06/27/08 20:42:38 (2 months ago)
Author:
JarrettBillingsley
Message:

Last old MD2 implementation commit!

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/v2/docs/candydoc/modules.ddoc

    r277 r317  
    11MODULES = 
     2    $(MODULE_FULL minid.minid) 
     3    $(MODULE_FULL minid.types) 
     4    $(MODULE_FULL minid.compiler) 
     5    $(MODULE_FULL minid.utils) 
    26    $(MODULE_FULL minid.bind) 
  • branches/v2/docs/minid.compiler.html

    r277 r317  
    5252<dl> 
    5353<script>explorer.outline.writeEnabled = true;</script> 
    54 <dt><span class="decl">MDModuleDef  
    55 <span class="currsymbol">compileModule</span> 
    56 <script>explorer.outline.addDecl('compileModule');</script> 
    57  
    58 (char[] <span class="funcparam">filename</span>); 
    59 </span></dt> 
    60 <script>explorer.outline.writeEnabled = false;</script> 
    61  
    62  
    63 <dd>Compile a source code file into a binary module.  Takes the path to the source file and returns 
    64 the compiled module, which can be loaded into a context. 
    65 <br><br> 
    66 You shouldn't have to deal with this function that much.  Most of the time the compilation of 
    67 modules should be handled for you by the import system in MDContext. 
    68 <br><br> 
    69  
    70 </dd> 
    71  
    72 <script>explorer.outline.writeEnabled = true;</script> 
    73 <dt><span class="decl">MDModuleDef  
    74 <span class="currsymbol">compileModule</span> 
    75 <script>explorer.outline.addDecl('compileModule');</script> 
    76  
    77 (dchar[] <span class="funcparam">source</span>, char[] <span class="funcparam">name</span>); 
    78 </span></dt> 
    79 <script>explorer.outline.writeEnabled = false;</script> 
    80  
    81  
    82 <dd>Compile a module from a string containing the <span class="funcparam">source</span> code. 
    83 <br><br> 
    84 <b>Params:</b><br> 
    85 <table><tr> 
    86 <td nowrap valign="top" style="padding-right: 8px">dchar[] <span class="funcparam">source</span></td> 
    87  
    88                 
    89 <td>The <span class="funcparam">source</span> code as a string.</td></tr> 
    90 <tr> 
    91 <td nowrap valign="top" style="padding-right: 8px">char[] <span class="funcparam">name</span></td> 
    92  
    93                 
    94 <td>The <span class="funcparam">name</span> which should be used as the <span class="funcparam">source</span> <span class="funcparam">name</span> in compiler error message.  Takes the 
    95         place of the filename when compiling from a <span class="funcparam">source</span> file.</td></tr> 
    96 </table><br> 
    97 <b>Returns:</b><br> 
    98 The compiled module. 
    99 <br><br> 
    100  
    101 </dd> 
    102  
    103 <script>explorer.outline.writeEnabled = true;</script> 
    104 <dt><span class="decl">MDFuncDef  
    105 <span class="currsymbol">compileStatements</span> 
    106 <script>explorer.outline.addDecl('compileStatements');</script> 
    107  
    108 (dchar[] <span class="funcparam">source</span>, char[] <span class="funcparam">name</span>); 
    109 </span></dt> 
    110 <script>explorer.outline.writeEnabled = false;</script> 
    111  
    112  
    113 <dd>Compile a list of statements into a function body which takes a variadic number of arguments.  Kind 
    114 of like a module without the module statement. 
    115 <br><br> 
    116 <b>Params:</b><br> 
    117 <table><tr> 
    118 <td nowrap valign="top" style="padding-right: 8px">dchar[] <span class="funcparam">source</span></td> 
    119  
    120                 
    121 <td>The <span class="funcparam">source</span> code as a string.</td></tr> 
    122 <tr> 
    123 <td nowrap valign="top" style="padding-right: 8px">char[] <span class="funcparam">name</span></td> 
    124  
    125                 
    126 <td>The <span class="funcparam">name</span> to use as the <span class="funcparam">source</span> <span class="funcparam">name</span> for compilation errors.</td></tr> 
    127 </table><br> 
    128 <b>Returns:</b><br> 
    129 The compiled function. 
    130 <br><br> 
    131  
    132 </dd> 
    133  
    134 <script>explorer.outline.writeEnabled = true;</script> 
    135 <dt><span class="decl">MDFuncDef  
    136 <span class="currsymbol">compileExpression</span> 
    137 <script>explorer.outline.addDecl('compileExpression');</script> 
    138  
    139 (dchar[] <span class="funcparam">source</span>, char[] <span class="funcparam">name</span>); 
    140 </span></dt> 
    141 <script>explorer.outline.writeEnabled = false;</script> 
    142  
    143  
    144 <dd>Compile a single expression into a function which returns the value of that expression when called. 
    145 <br><br> 
    146 <b>Params:</b><br> 
    147 <table><tr> 
    148 <td nowrap valign="top" style="padding-right: 8px">dchar[] <span class="funcparam">source</span></td> 
    149  
    150                 
    151 <td>The <span class="funcparam">source</span> code as a string.</td></tr> 
    152 <tr> 
    153 <td nowrap valign="top" style="padding-right: 8px">char[] <span class="funcparam">name</span></td> 
    154  
    155                 
    156 <td>The <span class="funcparam">name</span> to use as the <span class="funcparam">source</span> <span class="funcparam">name</span> for compilation errors.</td></tr> 
    157 </table><br> 
    158 <b>Returns:</b><br> 
    159 The compiled function. 
    160 <br><br> 
    161  
    162 </dd> 
    163  
    164 <script>explorer.outline.writeEnabled = true;</script> 
    165 <dt><span class="decl">MDValue   
    166 <span class="currsymbol">loadJSON</span> 
    167 <script>explorer.outline.addDecl('loadJSON');</script> 
    168  
    169 (dchar[] <span class="funcparam">source</span>); 
    170 </span></dt> 
    171 <script>explorer.outline.writeEnabled = false;</script> 
    172  
    173  
    174 <dd>Parses a JSON string into a MiniD value and returns that value.  Just like the MiniD baselib 
    175 function. 
    176 <br><br> 
    177  
    178 </dd> 
    179  
    180 <script>explorer.outline.writeEnabled = true;</script> 
    18154<dt><span class="decl">class  
    18255<span class="currsymbol">AstNode</span> 
     
    594467 
    595468<script>explorer.outline.writeEnabled = true;</script> 
     469<dt><span class="decl">uint  
     470<span class="currsymbol">typeMask</span> 
     471<script>explorer.outline.addDecl('typeMask');</script> 
     472 
     473; 
     474</span></dt> 
     475<script>explorer.outline.writeEnabled = false;</script> 
     476 
     477 
     478<dd>The type mask of the parameter, that is, what basic types can be passed to it. 
     479        Defaults to TypeMask.Any, which allows any type to be passed.  This should not be 
     480        set to 0; the codegen does not check for this so it's up to you. 
     481         
     482<br><br> 
     483 
     484</dd> 
     485 
     486<script>explorer.outline.writeEnabled = true;</script> 
     487<dt><span class="decl">Expression[]  
     488<span class="currsymbol">objectTypes</span> 
     489<script>explorer.outline.addDecl('objectTypes');</script> 
     490 
     491; 
     492</span></dt> 
     493<script>explorer.outline.writeEnabled = false;</script> 
     494 
     495 
     496<dd>If typeMask allows objects, this can be a list of expressions which should evaluate 
     497        at runtime to object types that this parameter can accept.  This is an optional 
     498        list.  If typeMask does not allow objects, this should be empty. 
     499         
     500<br><br> 
     501 
     502</dd> 
     503 
     504<script>explorer.outline.writeEnabled = true;</script> 
    596505<dt><span class="decl">Expression  
    597506<span class="currsymbol">defValue</span> 
     
    792701 
    793702<script>explorer.outline.writeEnabled = true;</script> 
    794 <dt><span class="decl">static Param []  
     703<dt><span class="decl">static FuncDef  
     704<span class="currsymbol">parseHaskell</span> 
     705<script>explorer.outline.addDecl('parseHaskell');</script> 
     706 
     707(Lexer <span class="funcparam">l</span>); 
     708</span></dt> 
     709<script>explorer.outline.writeEnabled = false;</script> 
     710 
     711 
     712<dd>Parse a Haskell-style function literal, like "\f -&gt; f + 1" or "\(a, b) -&gt; a(b)". 
     713     
     714<br><br> 
     715 
     716</dd> 
     717 
     718<script>explorer.outline.writeEnabled = true;</script> 
     719<dt><span class="decl">static Param[]  
    795720<span class="currsymbol">parseParams</span> 
    796721<script>explorer.outline.addDecl('parseParams');</script> 
     
    821746 
    822747</dd> 
     748 
     749<script>explorer.outline.writeEnabled = true;</script> 
     750<dt><span class="decl">static uint  
     751<span class="currsymbol">parseType</span> 
     752<script>explorer.outline.addDecl('parseType');</script> 
     753 
     754(Lexer <span class="funcparam">l</span>, out Expression[] <span class="funcparam">objectTypes</span>); 
     755</span></dt> 
     756<script>explorer.outline.writeEnabled = false;</script> 
     757 
     758 
     759<dd>Parse a parameter type.  This corresponds to the Type element of the grammar. 
     760    Returns the type mask, as well as an optional list of object types that this 
     761    parameter can accept in the <span class="funcparam">objectTypes</span> parameter. 
     762     
     763<br><br> 
     764 
     765</dd> 
    823766</dl> 
    824767<script>explorer.outline.decSymbolLevel();</script> 
     
    12621205</table><br> 
    12631206 
     1207</dd> 
     1208</dl> 
     1209<script>explorer.outline.decSymbolLevel();</script> 
     1210 
     1211 
     1212</dd> 
     1213 
     1214<script>explorer.outline.writeEnabled = true;</script> 
     1215<dt><span class="decl">class  
     1216<span class="currsymbol">AssertStatement</span> 
     1217<script>explorer.outline.addDecl('AssertStatement');</script> 
     1218 
     1219: minid.compiler.Statement; 
     1220</span></dt> 
     1221<script>explorer.outline.writeEnabled = false;</script> 
     1222 
     1223 
     1224<dd>This node represents an assertion statement. 
     1225<br><br> 
     1226 
     1227 
     1228<script>explorer.outline.incSymbolLevel();</script> 
     1229<dl> 
     1230<script>explorer.outline.writeEnabled = true;</script> 
     1231<dt><span class="decl">Expression  
     1232<span class="currsymbol">cond</span> 
     1233<script>explorer.outline.addDecl('cond');</script> 
     1234 
     1235; 
     1236</span></dt> 
     1237<script>explorer.outline.writeEnabled = false;</script> 
     1238 
     1239 
     1240<dd>A required expression that is the condition checked by the assertion. 
     1241     
     1242<br><br> 
     1243 
     1244</dd> 
     1245 
     1246<script>explorer.outline.writeEnabled = true;</script> 
     1247<dt><span class="decl">Expression  
     1248<span class="currsymbol">msg</span> 
     1249<script>explorer.outline.addDecl('msg');</script> 
     1250 
     1251; 
     1252</span></dt> 
     1253<script>explorer.outline.writeEnabled = false;</script> 
     1254 
     1255 
     1256<dd>An optional message that will be used if the assertion fails.  This member 
     1257    can be <b>null</b>, in which case a message will be generated for the assertion 
     1258    based on its location.  If it's not <b>null</b>, it must evaluate to a string. 
     1259     
     1260<br><br> 
     1261 
     1262</dd> 
     1263 
     1264<script>explorer.outline.writeEnabled = true;</script> 
     1265<dt><span class="decl">this(Location <span class="funcparam">location</span>, Location <span class="funcparam">endLocation</span>, Expression <span class="funcparam">cond</span>, Expression <span class="funcparam">msg</span> = null); 
     1266</span></dt> 
     1267<script>explorer.outline.writeEnabled = false;</script> 
     1268 
     1269 
     1270<dd><br><br> 
    12641271</dd> 
    12651272</dl> 
     
    46234630 
    46244631<script>explorer.outline.incSymbolLevel();</script> 
    4625 <dl></dl> 
     4632<dl> 
     4633<script>explorer.outline.writeEnabled = true;</script> 
     4634<dt><span class="decl">this(Location <span class="funcparam">location</span>, Location <span class="funcparam">endLocation</span>, Expression <span class="funcparam">left</span>, Expression <span class="funcparam">right</span>); 
     4635</span></dt> 
     4636<script>explorer.outline.writeEnabled = false;</script> 
     4637 
     4638 
     4639<dd><br><br> 
     4640</dd> 
     4641</dl> 
    46264642<script>explorer.outline.decSymbolLevel();</script> 
    46274643 
     
    46444660 
    46454661<script>explorer.outline.incSymbolLevel();</script> 
    4646 <dl></dl> 
     4662<dl> 
     4663<script>explorer.outline.writeEnabled = true;</script> 
     4664<dt><span class="decl">this(Location <span class="funcparam">location</span>, Location <span class="funcparam">endLocation</span>, Expression <span class="funcparam">left</span>, Expression <span class="funcparam">right</span>); 
     4665</span></dt> 
     4666<script>explorer.outline.writeEnabled = false;</script> 
     4667 
     4668 
     4669<dd><br><br> 
     4670</dd> 
     4671</dl> 
    46474672<script>explorer.outline.decSymbolLevel();</script> 
    46484673 
     
    46654690 
    46664691<script>explorer.outline.incSymbolLevel();</script> 
    4667 <dl></dl> 
     4692<dl> 
     4693<script>explorer.outline.writeEnabled = true;</script> 
     4694<dt><span class="decl">this(Location <span class="funcparam">location</span>, Location <span class="funcparam">endLocation</span>, Expression <span class="funcparam">left</span>, Expression <span class="funcparam">right</span>); 
     4695</span></dt> 
     4696<script>explorer.outline.writeEnabled = false;</script> 
     4697 
     4698 
     4699<dd><br><br> 
     4700</dd> 
     4701</dl> 
    46684702<script>explorer.outline.decSymbolLevel();</script> 
    46694703 
     
    53885422 
    53895423 to be used when calling the function.  This corresponds to 'x' in 
    5390     the expression "f(with x)".  If this member is <b>null</b>, there is no custom 
    5391      
     5424    the expression "f(with x)".  If this member is <b>null</b>, a  
    53925425<span class="currsymbol">context</span> 
    53935426<script>explorer.outline.addDecl('context');</script> 
    53945427 
    5395  and the  
    5396 <span class="currsymbol">context</span> 
    5397 <script>explorer.outline.addDecl('context');</script> 
    5398  
    5399  will be determined automatically. 
     5428 of '<b>null</b>' will 
     5429    be passed to the function. 
    54005430     
    54015431<br><br> 
     
    57165746 
    57175747<script>explorer.outline.writeEnabled = true;</script> 
    5718 <dt><span class="decl">static MDValue  
     5748<dt><span class="decl">static MDValue  
    57195749<span class="currsymbol">parseJSON</span> 
    57205750<script>explorer.outline.addDecl('parseJSON');</script> 
     
    58925922 
    58935923<script>explorer.outline.writeEnabled = true;</script> 
    5894 <dt><span class="decl">static MDValue  
     5924<dt><span class="decl">static MDValue  
    58955925<span class="currsymbol">parseJSON</span> 
    58965926<script>explorer.outline.addDecl('parseJSON');</script> 
     
    59716001 
    59726002<script>explorer.outline.writeEnabled = true;</script> 
    5973 <dt><span class="decl">static MDValue  
     6003<dt><span class="decl">static MDValue  
    59746004<span class="currsymbol">parseJSON</span> 
    59756005<script>explorer.outline.addDecl('parseJSON');</script> 
     
    61536183 
    61546184<script>explorer.outline.writeEnabled = true;</script> 
    6155 <dt><span class="decl">static MDValue  
     6185<dt><span class="decl">static MDValue  
    61566186<span class="currsymbol">parseJSON</span> 
    61576187<script>explorer.outline.addDecl('parseJSON');</script> 
     
    62326262 
    62336263<script>explorer.outline.writeEnabled = true;</script> 
    6234 <dt><span class="decl">static MDValue  
     6264<dt><span class="decl">static MDValue  
    62356265<span class="currsymbol">parseJSON</span> 
    62366266<script>explorer.outline.addDecl('parseJSON');</script> 
     
    63116341 
    63126342<script>explorer.outline.writeEnabled = true;</script> 
    6313 <dt><span class="decl">static MDValue  
     6343<dt><span class="decl">static MDValue  
    63146344<span class="currsymbol">parseJSON</span> 
    63156345<script>explorer.outline.addDecl('parseJSON');</script> 
     
    63766406<span class="currsymbol">parse</span> 
    63776407<script>explorer.outline.addDecl('parse');</script> 
     6408 
     6409(Lexer <span class="funcparam">l</span>); 
     6410</span></dt> 
     6411<script>explorer.outline.writeEnabled = false;</script> 
     6412 
     6413 
     6414<dd><br><br> 
     6415</dd> 
     6416 
     6417<script>explorer.outline.writeEnabled = true;</script> 
     6418<dt><span class="decl">static FuncLiteralExp  
     6419<span class="currsymbol">parseHaskell</span> 
     6420<script>explorer.outline.addDecl('parseHaskell');</script> 
    63786421 
    63796422(Lexer <span class="funcparam">l</span>); 
     
    68526895 
    68536896<script>explorer.outline.writeEnabled = true;</script> 
    6854 <dt><span class="decl">static MDValue  
     6897<dt><span class="decl">static MDValue  
    68556898<span class="currsymbol">parseJSON</span> 
    68566899<script>explorer.outline.addDecl('parseJSON');</script> 
     
    69316974 
    69326975<script>explorer.outline.writeEnabled = true;</script> 
    6933 <dt><span class="decl">static MDValue  
     6976<dt><span class="decl">static MDValue  
    69346977<span class="currsymbol">parseJSON</span> 
    69356978<script>explorer.outline.addDecl('parseJSON');</script> 
     
    73057348            Page was generated with 
    73067349            <img src="candydoc/img/candydoc.gif" style="vertical-align:middle; position:relative; top:-1px"> 
    7307             on Thu Feb 14 15:53:04 2008 
     7350            on Fri Jun 13 09:57:36 2008 
    73087351 
    73097352        </td></tr> 
  • branches/v2/docs/minid.minid.html

    r277 r317  
    220220<script>explorer.outline.writeEnabled = true;</script> 
    221221<dt><span class="decl"> 
     222<span class="currsymbol">Time</span> 
     223<script>explorer.outline.addDecl('Time');</script> 
     224 
     225</span></dt> 
     226<script>explorer.outline.writeEnabled = false;</script> 
     227 
     228 
     229<dd> 
     230<span class="currsymbol">Time</span> 
     231<script>explorer.outline.addDecl('Time');</script> 
     232 
     233 functions. 
     234     
     235<br><br> 
     236 
     237</dd> 
     238 
     239<script>explorer.outline.writeEnabled = true;</script> 
     240<dt><span class="decl"> 
    222241<span class="currsymbol">Safe</span> 
    223242<script>explorer.outline.addDecl('Safe');</script> 
     
    227246 
    228247 
    229 <dd>This flag is an OR of Array, Char, Math, String, Table, and Regexp.  It represents all 
    230     the libraries which are "safe", i.e. malicious scripts would not be able to use the IO 
     248<dd>This flag is an OR of Array, Char, Math, String, Table, Regexp, and Time.  It represents 
     249    all the libraries which are "safe", i.e. malicious scripts would not be able to use the IO 
    231250    or OS libraries to do bad things. 
    232251     
     
    264283<script>explorer.outline.addDecl('NewContext');</script> 
    265284 
    266 (uint <span class="funcparam">libs</span> = cast(uint)cast(MDStdlib)255); 
     285(uint <span class="funcparam">libs</span> = cast(uint)cast(MDStdlib)511); 
    267286</span></dt> 
    268287<script>explorer.outline.writeEnabled = false;</script> 
     
    270289 
    271290<dd>Initializes a new MiniD context and loads any specified standard libraries into it.  Each new 
    272 context is also given a new MDState as its main thread. 
     291context is also given a new MDState as its main thread.  The base library is always loaded into 
     292the context. 
    273293<br><br> 
    274294<b>Params:</b><br> 
     
    292312<script>explorer.outline.addDecl('loadModuleString');</script> 
    293313 
    294 (MDState <span class="funcparam">s</span>, dchar[] <span class="funcparam">source</span>, MDValue [] <span class="funcparam">params</span> = null, char[] <span class="funcparam">name</span> = "&lt;module string&gt;"); 
     314(MDState <span class="funcparam">s</span>, dchar[] <span class="funcparam">source</span>, char[] <span class="funcparam">name</span> = "&lt;module string&gt;"); 
    295315</span></dt> 
    296316<script>explorer.outline.writeEnabled = false;</script> 
     
    311331                
    312332<td>The <span class="funcparam">source</span> code of the module, exactly as it would appear in a file.</td></tr> 
    313 <tr> 
    314 <td nowrap valign="top" style="padding-right: 8px">MDValue [] <span class="funcparam">params</span></td> 
    315  
    316                 
    317 <td>An optional list of parameters.  These are passed as the variadic parameters 
    318         to the top-level module function.  Defaults to <b>null</b> (no parameters).</td></tr> 
    319333<tr> 
    320334<td nowrap valign="top" style="padding-right: 8px">char[] <span class="funcparam">name</span></td> 
     
    335349<script>explorer.outline.addDecl('loadStatementString');</script> 
    336350 
    337 (MDState <span class="funcparam">s</span>, dchar[] <span class="funcparam">source</span>, MDNamespace <span class="funcparam">ns</span> = cast(MDNamespace)null, MDValue [] <span class="funcparam">params</span> = null, char[] <span class="funcparam">name</span> = "&lt;statement string&gt;"); 
     351(MDState <span class="funcparam">s</span>, dchar[] <span class="funcparam">source</span>, MDNamespace <span class="funcparam">ns</span> = cast(MDNamespace)null, MDValue[] <span class="funcparam">params</span> = null, char[] <span class="funcparam">name</span> = "&lt;statement string&gt;"); 
    338352</span></dt> 
    339353<script>explorer.outline.writeEnabled = false;</script> 
     
    362376        Defaults to the global namespace of the state'<span class="funcparam">s</span> owning context.</td></tr> 
    363377<tr> 
    364 <td nowrap valign="top" style="padding-right: 8px">MDValue [] <span class="funcparam">params</span></td> 
     378<td nowrap valign="top" style="padding-right: 8px">MDValue[] <span class="funcparam">params</span></td> 
    365379 
    366380                
     
    383397 
    384398<script>explorer.outline.writeEnabled = true;</script> 
    385 <dt><span class="decl">MDValue  
     399<dt><span class="decl">MDValue  
    386400<span class="currsymbol">eval</span> 
    387401<script>explorer.outline.addDecl('eval');</script> 
     
    568582            Page was generated with 
    569583            <img src="candydoc/img/candydoc.gif" style="vertical-align:middle; position:relative; top:-1px"> 
    570             on Thu Feb 14 15:53:03 2008 
     584            on Fri Jun 13 09:57:35 2008 
    571585 
    572586        </td></tr> 
  • branches/v2/docs/minid.types.html

    r277 r317  
    136136 
    137137<script>explorer.outline.writeEnabled = true;</script> 
    138 <dt><span class="decl">this(MDValue * <span class="funcparam">val</span>); 
     138<dt><span class="decl">this(MDValue* <span class="funcparam">val</span>); 
    139139</span></dt> 
    140140<script>explorer.outline.writeEnabled = false;</script> 
     
    263263 
    264264<script>explorer.outline.writeEnabled = true;</script> 
    265 <dt><span class="decl">this(Location <span class="funcparam">loc</span>, MDValue * <span class="funcparam">val</span>); 
     265<dt><span class="decl">this(Location <span class="funcparam">loc</span>, MDValue* <span class="funcparam">val</span>); 
    266266</span></dt> 
    267267<script>explorer.outline.writeEnabled = false;</script> 
     
    406406<script>explorer.outline.addDecl('opEquals');</script> 
    407407 
    408 (MDValue * <span class="funcparam">other</span>); 
     408(MDValue* <span class="funcparam">other</span>); 
    409409</span></dt> 
    410410<script>explorer.outline.writeEnabled = false;</script> 
     
    423423<script>explorer.outline.addDecl('opCmp');</script> 
    424424 
    425 (MDValue * <span class="funcparam">other</span>); 
     425(MDValue* <span class="funcparam">other</span>); 
    426426</span></dt> 
    427427<script>explorer.outline.writeEnabled = false;</script> 
     
    445445<script>explorer.outline.addDecl('compare');</script> 
    446446 
    447 (MDValue * <span class="funcparam">other</span>); 
     447(MDValue* <span class="funcparam">other</span>); 
    448448</span></dt> 
    449449<script>explorer.outline.writeEnabled = false;</script> 
     
    857857This holds an immutable string.  The hash for this string is calculated once upon creation, 
    858858improving speed when used as the key to an AA (which, in MiniD, is very often -- all namespaces 
    859 use MDStrings as keys).  Immutability also avoids the problem of using a string as an AA key 
     859use MDStrings as keys).  Immutability also avoids the problem of using a string as a key 
    860860and then changing it, which would result in undefined behavior. 
    861861<br><br> 
     
    11961196<script>explorer.outline.writeEnabled = true;</script> 
    11971197<dt><span class="decl">this(MDNamespace <span class="funcparam">environment</span>, int delegate(MDState, uint) <span class="funcparam">dg</span>, dchar[] <span class="funcparam">name</span>, MDValue[] <span class="funcparam">upvals</span> = null); 
    1198 <br>this(MDNamespace <span class="funcparam">environment</span>, int(* <span class="funcparam">func</span>)(MDState, uint), dchar[] <span class="funcparam">name</span>, MDValue[] <span class="funcparam">upvals</span> = null); 
     1198<br>this(MDNamespace <span class="funcparam">environment</span>, int function(MDState, uint) <span class="funcparam">func</span>, dchar[] <span class="funcparam">name</span>, MDValue[] <span class="funcparam">upvals</span> = null); 
    11991199</span></dt> 
    12001200<script>explorer.outline.writeEnabled = false;</script> 
     
    12291229<td>The <span class="funcparam">name</span> of the function, which will be used in error messages and when its toString is called.</td></tr> 
    12301230<tr> 
    1231 <td nowrap valign="top" style="padding-right: 8px">MDValue [] <span class="funcparam">upvals</span></td> 
     1231<td nowrap valign="top" style="padding-right: 8px">MDValue[] <span class="funcparam">upvals</span></td> 
    12321232 
    12331233                
     
    15081508 
    15091509<script>explorer.outline.writeEnabled = true;</script> 
    1510 <dt><span class="decl">MDValue *  
     1510<dt><span class="decl">MDValue*  
    15111511<span class="currsymbol">opIn_r</span> 
    15121512<script>explorer.outline.addDecl('opIn_r');</script> 
     
    15241524 
    15251525<script>explorer.outline.writeEnabled = true;</script> 
    1526 <dt><span class="decl">MDValue *  
     1526<dt><span class="decl">MDValue*  
    15271527<span class="currsymbol">opIndex</span> 
    15281528<script>explorer.outline.addDecl('opIndex');</script> 
     
    17261726<script>explorer.outline.addDecl('sort');</script> 
    17271727 
    1728 (bool delegate(MDValue , MDValue ) <span class="funcparam">predicate</span>); 
     1728(bool delegate(MDValue, MDValue) <span class="funcparam">predicate</span>); 
    17291729</span></dt> 
    17301730<script>explorer.outline.writeEnabled = false;</script> 
     
    19201920 
    19211921<script>explorer.outline.writeEnabled = true;</script> 
    1922 <dt><span class="decl">MDValue *  
     1922<dt><span class="decl">MDValue*  
    19231923<span class="currsymbol">opIndex</span> 
    19241924<script>explorer.outline.addDecl('opIndex');</script> 
     
    20982098            do not have any intrinsic name associated with them, and sometimes the compiler will generate a 
    20992099            name for an anonymous class.  For any classes that you create from native code, though, you'll 
    2100             probably given them a real name.</td></tr> 
     2100            probably give them a real name.</td></tr> 
    21012101<tr> 
    21022102<td nowrap valign="top" style="padding-right: 8px">baseClass</td> 
     
    21482148 
    21492149<script>explorer.outline.writeEnabled = true;</script> 
    2150 <dt><span class="decl">MDValue *  
     2150<dt><span class="decl">MDValue*  
    21512151<span class="currsymbol">opIndex</span> 
    21522152<script>explorer.outline.addDecl('opIndex');</script> 
    21532153 
    21542154(MDString <span class="funcparam">index</span>); 
    2155 <br>MDValue *  
     2155<br>MDValue*  
    21562156<span class="currsymbol">opIndex</span> 
    21572157<script>explorer.outline.addDecl('opIndex');</script> 
     
    24362436 
    24372437<script>explorer.outline.writeEnabled = true;</script> 
    2438 <dt><span class="decl">MDValue *  
     2438<dt><span class="decl">MDValue*  
    24392439<span class="currsymbol">opIn_r</span> 
    24402440<script>explorer.outline.addDecl('opIn_r');</script> 
    24412441 
    24422442(MDString <span class="funcparam">key</span>); 
    2443 <br>MDValue *  
     2443<br>MDValue*  
    24442444<span class="currsymbol">opIn_r</span> 
    24452445<script>explorer.outline.addDecl('opIn_r');</script> 
     
    25142514 
    25152515<script>explorer.outline.writeEnabled = true;</script> 
    2516 <dt><span class="decl">MDValue *  
     2516<dt><span class="decl">MDValue*  
    25172517<span class="currsymbol">opIndex</span> 
    25182518<script>explorer.outline.addDecl('opIndex');</script> 
    25192519 
    25202520(MDString <span class="funcparam">key</span>); 
    2521 <br>MDValue *  
     2521<br>MDValue*  
    25222522<span class="currsymbol">opIndex</span> 
    25232523<script>explorer.outline.addDecl('opIndex');</script> 
     
    25992599<script>explorer.outline.addDecl('opApply');</script> 
    26002600 
    2601 (int delegate(ref MDString, ref MDValue ) <span class="funcparam">dg</span>); 
     2601(int delegate(ref MDString, ref MDValue) <span class="funcparam">dg</span>); 
    26022602</span></dt> 
    26032603<script>explorer.outline.writeEnabled = false;</script> 
     
    26932693<dl> 
    26942694<script>explorer.outline.writeEnabled = true;</script> 
    2695 <dt><span class="decl">static Location  
     2695<dt><span class="decl">static Location  
    26962696<span class="currsymbol">opCall</span> 
    26972697<script>explorer.outline.addDecl('opCall');</script> 
     
    30643064<script>explorer.outline.addDecl('newClosure');</script> 
    30653065 
    3066 (int delegate(MDState, uint) <span class="funcparam">dg</span>, dchar[] <span class="funcparam">name</span>, MDValue [] <span class="funcparam">upvals</span> = null); 
     3066(int delegate(MDState, uint) <span class="funcparam">dg</span>, dchar[] <span class="funcparam">name</span>, MDValue[] <span class="funcparam">upvals</span> = null); 
    30673067<br>final MDClosure  
    30683068<span class="currsymbol">newClosure</span> 
    30693069<script>explorer.outline.addDecl('newClosure');</script> 
    30703070 
    3071 (int(* <span class="funcparam">func</span>)(MDState, uint), dchar[] <span class="funcparam">name</span>, MDValue [] <span class="funcparam">upvals</span> = null); 
     3071(int function(MDState, uint) <span class="funcparam">func</span>, dchar[] <span class="funcparam">name</span>, MDValue[] <span class="funcparam">upvals</span> = null); 
    30723072</span></dt> 
    30733073<script>explorer.outline.writeEnabled = false;</script> 
     
    32033203<script>explorer.outline.addDecl('initializeModule');</script> 
    32043204 
    3205 (MDState <span class="funcparam">s</span>, MDModuleDef <span class="funcparam">def</span>, MDValue [] <span class="funcparam">params</span>); 
     3205(MDState <span class="funcparam">s</span>, MDModuleDef <span class="funcparam">def</span>); 
    32063206</span></dt> 
    32073207<script>explorer.outline.writeEnabled = false;</script> 
     
    32233223<td>The module definition, which was compiled from source or loaded from a file.</td></tr> 
    32243224<tr> 
    3225 <td nowrap valign="top" style="padding-right: 8px">MDValue [] <span class="funcparam">params</span></td> 
     3225<td nowrap valign="top" style="padding-right: 8px">params</td> 
    32263226 
    32273227                
     
    36093609(T...)(ref MDValue <span class="funcparam">val</span>, dchar[] <span class="funcparam">name</span>, int <span class="funcparam">numReturns</span>, T <span class="funcparam">params</span>); 
    36103610<br>uint  
    3611 <span class="currsymbol"> 
    36123611<span class="currsymbol">callMethod</span> 
    36133612<script>explorer.outline.addDecl('callMethod');</script> 
    36143613 
    3615 </span> 
    3616 <script>explorer.outline.addDecl(' 
    3617 <span class="currsymbol">callMethod</span> 
    3618 <script>explorer.outline.addDecl('callMethod');</script> 
    3619  
    3620 ');</script> 
    3621  
    3622 (T...)(ref MDValue <span class="funcparam"><span class="funcparam">val</span></span>, MDString <span class="funcparam"><span class="funcparam">methodName</span></span>, int <span class="funcparam"><span class="funcparam">numReturns</span></span>, T <span class="funcparam"><span class="funcparam">params</span></span>); 
     3614(T...)(ref MDValue <span class="funcparam">val</span>, MDString <span class="funcparam">methodName</span>, int <span class="funcparam">numReturns</span>, T <span class="funcparam">params</span>); 
    36233615<br>uint  
    3624 <span class="currsymbol"> 
    36253616<span class="currsymbol">callMethodWith</span> 
    36263617<script>explorer.outline.addDecl('callMethodWith');</script> 
    36273618 
    3628 </span> 
    3629 <script>explorer.outline.addDecl(' 
    3630 <span class="currsymbol">callMethodWith</span> 
    3631 <script>explorer.outline.addDecl('callMethodWith');</script> 
    3632  
    3633 ');</script> 
    3634  
    3635 (T...)(ref MDValue <span class="funcparam"><span class="funcparam">val</span></span>, MDString <span class="funcparam"><span class="funcparam">methodName</span></span>, int <span class="funcparam"><span class="funcparam">numReturns</span></span>, MDValue <span class="funcparam"><span class="funcparam">context</span></span>, T <span class="funcparam"><span class="funcparam">params</span></span>); 
     3619(T...)(ref MDValue <span class="funcparam">val</span>, MDString <span class="funcparam">methodName</span>, int <span class="funcparam">numReturns</span>, MDValue <span class="funcparam">context</span>, T <span class="funcparam">params</span>); 
    36363620</span></dt> 
    36373621<script>explorer.outline.writeEnabled = false;</script> 
     
    38673851 
    38683852<script>explorer.outline.writeEnabled = true;</script> 
    3869 <dt><span class="decl">final MDValue []  
     3853<dt><span class="decl">final MDValue[]  
    38703854<span class="currsymbol">getParams</span> 
    38713855<script>explorer.outline.addDecl('getParams');</script> 
     
    39013885 
    39023886<script>explorer.outline.writeEnabled = true;</script> 
    3903 <dt><span class="decl">final MDValue []  
     3887<dt><span class="decl">final MDValue[]  
    39043888<span class="currsymbol">getAllParams</span> 
    39053889<script>explorer.outline.addDecl('getAllParams');</script> 
     
    39963980<script>explorer.outline.addDecl('throwRuntimeException');</script> 
    39973981 
    3998 (MDValue * <span class="funcparam">val</span>); 
     3982(MDValue* <span class="funcparam">val</span>); 
    39993983<br>final void  
    40003984<span class="currsymbol">throwRuntimeException</span> 
     
    41244108 
    41254109<script>explorer.outline.writeEnabled = true;</script> 
    4126 <dt><span class="decl">final MDValue  
     4110<dt><span class="decl">final MDValue  
    41274111<span class="currsymbol">idx</span> 
    41284112<script>explorer.outline.addDecl('idx');</script> 
     
    41564140 
    41574141<script>explorer.outline.writeEnabled = true;</script> 
    4158 <dt><span class="decl">final MDValue  
     4142<dt><span class="decl">final MDValue  
    41594143<span class="currsymbol">len</span> 
    41604144<script>explorer.outline.addDecl('len');</script> 
     
    41884172 
    41894173<script>explorer.outline.writeEnabled = true;</script> 
    4190 <dt><span class="decl">final MDValue  
     4174<dt><span class="decl">final MDValue  
    41914175<span class="currsymbol">slice</span> 
    41924176<script>explorer.outline.addDecl('slice');</script> 
     
    42204204 
    42214205<script>explorer.outline.writeEnabled = true;</script> 
    4222 <dt><span class="decl">final MDValue  
     4206<dt><span class="decl">final MDValue  
    42234207<span class="currsymbol">add</span> 
    42244208<script>explorer.outline.addDecl('add');</script> 
    42254209 
    42264210(ref MDValue <span class="funcparam">a</span>, ref MDValue <span class="funcparam">b</span>); 
    4227 <br>final MDValue  
     4211<br>final MDValue  
    42284212<span class="currsymbol">sub</span> 
    42294213<script>explorer.outline.addDecl('sub');</script> 
    42304214 
    42314215(ref MDValue <span class="funcparam">a</span>, ref MDValue <span class="funcparam">b</span>); 
    4232 <br>final MDValue  
     4216<br>final MDValue  
    42334217<span class="currsymbol">mul</span> 
    42344218<script>explorer.outline.addDecl('mul');</script> 
    42354219 
    42364220(ref MDValue <span class="funcparam">a</span>, ref MDValue <span class="funcparam">b</span>); 
    4237 <br>final MDValue  
     4221<br>final MDValue  
    42384222<span class="currsymbol">div</span> 
    42394223<script>explorer.outline.addDecl('div');</script> 
    42404224 
    42414225(ref MDValue <span class="funcparam">a</span>, ref MDValue <span class="funcparam">b</span>); 
    4242 <br>final MDValue  
     4226<br>final MDValue  
    42434227<span class="currsymbol">mod</span> 
    42444228<script>explorer.outline.addDecl('mod');</script> 
     
    42564240 
    42574241<script>explorer.outline.writeEnabled = true;</script> 
    4258 <dt><span class="decl">final MDValue  
     4242<dt><span class="decl">final MDValue  
    42594243<span class="currsymbol">neg</span> 
    42604244<script>explorer.outline.addDecl('neg');</script> 
     
    43084292 
    43094293<script>explorer.outline.writeEnabled = true;</script> 
    4310 <dt><span class="decl">final MDValue  
     4294<dt><span class="decl">final MDValue  
    43114295<span class="currsymbol">and</span> 
    43124296<script>explorer.outline.addDecl('and');</script> 
    43134297 
    43144298(ref MDValue <span class="funcparam">a</span>, ref MDValue <span class="funcparam">b</span>); 
    4315 <br>final MDValue  
     4299<br>final MDValue  
    43164300<span class="currsymbol">or</span> 
    43174301<script>explorer.outline.addDecl('or');</script> 
    43184302 
    43194303(ref MDValue <span class="funcparam">a</span>, ref MDValue <span class="funcparam">b</span>); 
    4320 <br>final MDValue  
     4304<br>final MDValue  
    43214305<span class="currsymbol">xor</span> 
    43224306<script>explorer.outline.addDecl('xor');</script> 
    43234307 
    43244308(ref MDValue <span class="funcparam">a</span>, ref MDValue <span class="funcparam">b</span>); 
    4325 <br>final MDValue  
     4309<br>final MDValue  
    43264310<span class="currsymbol">shl</span> 
    43274311<script>explorer.outline.addDecl('shl');</script> 
    43284312 
    43294313(ref MDValue <span class="funcparam">a</span>, ref MDValue <span class="funcparam">b</span>); 
    4330 <br>final MDValue  
     4314<br>final MDValue  
    43314315<span class="currsymbol">shr</span> 
    43324316<script>explorer.outline.addDecl('shr');</script> 
    43334317 
    43344318(ref MDValue <span class="funcparam">a</span>, ref MDValue <span class="funcparam">b</span>); 
    4335 <br>final MDValue  
     4319<br>final MDValue  
    43364320<span class="currsymbol">ushr</span> 
    43374321<script>explorer.outline.addDecl('ushr');</script> 
     
    43534337 
    43544338<script>explorer.outline.writeEnabled = true;</script> 
    4355 <dt><span class="decl">final MDValue  
     4339<dt><span class="decl">final MDValue  
    43564340<span class="currsymbol">com</span> 
    43574341<script>explorer.outline.addDecl('com');</script> 
     
    44104394 
    44114395<script>explorer.outline.writeEnabled = true;</script> 
    4412 <dt><span class="decl">final MDValue  
     4396<dt><span class="decl">final MDValue  
    44134397<span class="currsymbol">cat</span> 
    44144398<script>explorer.outline.addDecl('cat');</script> 
    44154399 
    4416 (MDValue [] <span class="funcparam">vals</span>); 
     4400(MDValue[] <span class="funcparam">vals</span>); 
    44174401</span></dt> 
    44184402<script>explorer.outline.writeEnabled = false;</script> 
     
    44314415<script>explorer.outline.addDecl('cateq');</script> 
    44324416 
    4433 (ref MDValue <span class="funcparam">dest</span>, MDValue [] <span class="funcparam">vals</span>); 
     4417(ref MDValue <span class="funcparam">dest</span>, MDValue[] <span class="funcparam">vals</span>); 
    44344418</span></dt> 
    44354419<script>explorer.outline.writeEnabled = false;</script> 
     
    45384522            Page was generated with 
    45394523            <img src="candydoc/img/candydoc.gif" style="vertical-align:middle; position:relative; top:-1px"> 
    4540             on Thu Feb 14 15:53:03 2008 
     4524            on Fri Jun 13 09:57:35 2008 
    45414525 
    45424526        </td></tr> 
  • branches/v2/docs/minid.utils.html

    r277 r317  
    230230<script>explorer.outline.addDecl('hasUnions');</script> 
    231231 
    232 (T,uint Idx = 0)</span></dt> 
     232(T,size_t Idx = 0)</span></dt> 
    233233<script>explorer.outline.writeEnabled = false;</script> 
    234234 
     
    670670 
    671671</dd> 
     672 
     673<script>explorer.outline.writeEnabled = true;</script> 
     674<dt><span class="decl">bool  
     675<span class="currsymbol">endsWith</span> 
     676<script>explorer.outline.addDecl('endsWith');</script> 
     677 
     678(T)(T[] <span class="funcparam">string</span>, T[] <span class="funcparam">pattern</span>); 
     679</span></dt> 
     680<script>explorer.outline.writeEnabled = false;</script> 
     681 
     682 
     683<dd>See if a string ends with another string.  Also useful. 
     684<br><br> 
     685 
     686</dd> 
     687 
     688<script>explorer.outline.writeEnabled = true;</script> 
     689<dt><span class="decl">template  
     690<span class="currsymbol">isFinal</span> 
     691<script>explorer.outline.addDecl('isFinal');</script> 
     692 
     693(T,char[] funcName)</span></dt> 
     694<script>explorer.outline.writeEnabled = false;</script> 
     695 
     696 
     697<dd>Given a class type and a method name, tells whether that method is final or not. 
     698Thanks Tomasz Stachowiak. 
     699