Changeset 97

Show
Ignore:
Timestamp:
12/25/07 07:10:00 (1 year ago)
Author:
dan.lewis
Message:

Major changes to makefile.
Restructured folders a bit.
Now builds a lib.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.9/makefile

    r96 r97  
    1414################# Variables ################# 
    1515 
    16 DFLAGS=-O -release -quiet -c 
    17 LFLAGS=/ma 
    18 OBJS=value.obj main.obj methods.obj structure.obj text.obj test.obj 
    19 SRC=value.d main.d methods.d structure.d text.d test.d 
     16DFLAGS=-O -release -quiet -c -Isource 
     17LFLAGS=/ma/NOL 
     18OBJS=bin\value.obj bin\methods.obj bin\structure.obj bin\text.obj bin\test.obj 
    2019 
    2120################# Make Rules ################ 
    2221 
    23 walnut.exe : 
    24     rcc -r -32 source\icon.rc -otemporary\icon.res 
    25     cd source 
    26     dmd $(DFLAGS) -od..\temporary $(SRC) 
    27     cd ..\temporary 
    28     lib -c ..\walnut.lib $(OBJS) 
    29     dmd -L$(LFLAGS) ..\walnut.exe $(OBJS) icon.res 
    30     cd .. 
     22defaulttarget: bin\walnut.lib bin\walnut.exe 
    3123 
    32 walnut.lib : walnut.exe 
     24bin\walnut.lib : $(OBJS) 
     25    lib -c bin\walnut.lib $(OBJS) 
    3326 
    34 value.obj : value.d 
    35     dmd -c $(DFLAGS) -inline value.d 
     27bin\walnut.exe : bin\walnut.lib bin\main.obj 
     28    rcc -r -32 source\icon.rc -osource\icon.res 
     29    dmd bin\walnut.exe -L$(LFLAGS) bin\main.obj bin\walnut.lib source\icon.res 
     30 
     31bin\main.obj : source\main.d 
     32    dmd -c $(DFLAGS) -odbin source\main.d 
     33 
     34bin\methods.obj : source\methods.d 
     35    dmd -c $(DFLAGS) -inline -odbin source\methods.d 
     36 
     37bin\structure.obj : source\structure.d 
     38    dmd -c $(DFLAGS) -odbin source\structure.d 
     39 
     40bin\test.obj : source\test.d 
     41    dmd -c $(DFLAGS) -odbin source\test.d 
     42 
     43bin\text.obj : source\text.d 
     44    dmd -c $(DFLAGS) -odbin source\text.d 
     45 
     46bin\value.obj : source\value.d 
     47    dmd -c $(DFLAGS) -inline -odbin source\value.d 
    3648 
    3749################### Utilities ################ 
    38  
    39 defaulttarget: walnut.exe 
    4050 
    4151release: 
    4252    make clean 
    4353    make 
    44     cd temporary 
    45     del $(OBJS) 
    46     cd .. 
    4754 
    4855clean: 
    49     cd temporary 
    50     del $(OBJS) walnut.map 
    51     cd .. 
    52     del walnut.bak 
    53  
    54 test:  
    55     rcc -r -32 source\icon.rc -otemporary\icon.res 
    56     cd source 
    57     dmd -unittest $(DFLAGS) -od..\temporary $(SRC) 
    58     cd ..\temporary 
    59     lib -c ..\walnut.lib $(OBJS) 
    60     dmd -L$(LFLAGS) ..\walnut.exe $(OBJS) icon.res 
    61     cd .. 
     56    del /Q bin\*.* 
    6257 
    6358doc: 
    6459    cd source 
    65     dmd -D $(DFLAGS) -Dd..\documentation -od..\temporary $(SRC) 
     60    dmd -D $(DFLAGS) -Dd..\documentation 
    6661    cd .. 
    6762 
     
    6964    del backupSource.7z 
    7065    cd source 
    71     7z a ..\backupSource.7z $(SRC) icon.res ..\win32.mak ..\linux.mak ..\documentation\license.txt ..\documentation\readme.txt 
     66    7z a ..\backupSource.7z $(SRC) icon.res ..\makefile ..\documentation\license.txt ..\documentation\readme.txt 
    7267    cd .. 
  • branches/1.9/source/main.d

    r95 r97  
    1616    structure, 
    1717    text; 
     18 
     19pragma(lib,"bin\\walnut.lib"); 
    1820 
    1921enum EXIT { 
  • branches/1.9/source/methods.d

    r96 r97  
    3939    Synopsis: Global_eval is called to evaluate a buffer of source code.  The method is used even to evaluate file contents; the main script. 
    4040*/ 
    41 static Value Global_eval(inout Value self, inout Value cc, Value[] arguments ...) { 
     41static Value Global_eval(Value self, Value cc, Value[] arguments ...) { 
    4242    if(!arguments.length || arguments[0].type != TYPE.STRING) 
    4343        return UNDEFINED; 
     
    321321    Synopsis: Global_parseInt is called to cast a string into an integer. 
    322322*/ 
    323 static Value Global_parseInt(inout Value self, inout Value cc, Value[] arguments ...) { 
     323static Value Global_parseInt(Value self, Value cc, Value[] arguments ...) { 
    324324    uint base; 
    325325    char* s; 
     
    343343    Synopsis: Global_parseFloat is called to cast a string into a double. 
    344344*/ 
    345 static Value Global_parseFloat(inout Value self, inout Value cc, Value[] arguments ...) { 
     345static Value Global_parseFloat(Value self, Value cc, Value[] arguments ...) { 
    346346    if(arguments.length) 
    347347        return cast(Value) arguments[0].toDouble(); 
     
    356356    Synopsis:  
    357357*/ 
    358 static Value Global_escape(inout Value self, inout Value cc, Value[] arguments ...) { 
     358static Value Global_escape(Value self, Value cc, Value[] arguments ...) { 
    359359    return UNDEFINED; 
    360360} 
     
    367367    Synopsis:  
    368368*/ 
    369 static Value Global_unescape(inout Value self, inout Value cc, Value[] arguments ...) { 
     369static Value Global_unescape(Value self, Value cc, Value[] arguments ...) { 
    370370    return UNDEFINED; 
    371371} 
     
    377377    Synopsis:  
    378378*/ 
    379 static Value Global_isNaN(inout Value self, inout Value cc, Value[] arguments ...) { 
     379static Value Global_isNaN(Value self, Value cc, Value[] arguments ...) { 
    380380    return cast(Value) (arguments.length && arguments[0].toDouble() != double.nan? true : false); 
    381381} 
     
    387387    Synopsis:  
    388388*/ 
    389 static Value Global_isFinite(inout Value self, inout Value cc, Value[] arguments ...) { 
     389static Value Global_isFinite(Value self, Value cc, Value[] arguments ...) { 
    390390    return cast(Value) (arguments.length && isfinite(arguments[0].toDouble)? true : false ); 
    391391} 
     
    397397    Synopsis:  
    398398*/ 
    399 static Value Global_decodeURI(inout Value self, inout Value cc, Value[] arguments ...) { 
     399static Value Global_decodeURI(Value self, Value cc, Value[] arguments ...) { 
    400400    scope(failure) return UNDEFINED; 
    401401    return cast(Value) decode(arguments[0].toString()); 
     
    408408    Synopsis:  
    409409*/ 
    410 static Value Global_decodeURIComponent(inout Value self, inout Value cc, Value[] arguments ...) { 
     410static Value Global_decodeURIComponent(Value self, Value cc, Value[] arguments ...) { 
    411411    scope(failure) return UNDEFINED; 
    412412    return cast(Value) decodeComponent(arguments[0].toString()); 
     
    419419    Synopsis:  
    420420*/ 
    421 static Value Global_encodeURI(inout Value self, inout Value cc, Value[] arguments ...) { 
     421static Value Global_encodeURI(Value self, Value cc, Value[] arguments ...) { 
    422422    scope(failure) return UNDEFINED; 
    423423    return cast(Value) encode(arguments[0].toString()); 
     
    430430    Synopsis:  
    431431*/ 
    432 static Value Global_encodeURIComponent(inout Value self, inout Value cc, Value[] arguments ...) { 
     432static Value Global_encodeURIComponent(Value self, Value cc, Value[] arguments ...) { 
    433433    scope(failure) return UNDEFINED; 
    434434    return cast(Value) encodeComponent(arguments[0].toString()); 
     
    441441    Synopsis:  
    442442*/ 
    443 static Value Global_Object(inout Value self, inout Value cc, Value[] arguments ...) { 
     443static Value Global_Object(Value self, Value cc, Value[] arguments ...) { 
    444444    return Object_prototype_constructor(self,cc,arguments); 
    445445} 
     
    451451    Synopsis: Is perfectly equivalent to "new Object()" 
    452452*/ 
    453 static Value Object_prototype_constructor(inout Value self, inout Value cc, Value[] arguments ...) { 
     453static Value Object_prototype_constructor(Value self, Value cc, Value[] arguments ...) { 
    454454    Value v; 
    455455    v.type = TYPE.OBJECT; 
     
    465465    on all types. 
    466466*/ 
    467 static Value Object_prototype_toString(inout Value self, inout Value cc, Value[] arguments ...) { 
     467static Value Object_prototype_toString(Value self, Value cc, Value[] arguments ...) { 
    468468    return cast(Value) self.toString(); 
    469469} 
     
    475475    Synopsis: 
    476476*/ 
    477 static Value Object_prototype_toSource(inout Value self, inout Value cc, Value[] arguments ...) { 
     477static Value Object_prototype_toSource(Value self, Value cc, Value[] arguments ...) { 
    478478    char[] buffer = "{"; 
    479479    bool any = false; 
     
    497497    Synopsis: 
    498498*/ 
    499 static Value Object_prototype_valueOf(inout Value self, inout Value cc, Value[] arguments ...) { 
     499static Value Object_prototype_valueOf(Value self, Value cc, Value[] arguments ...) { 
    500500    return self[TEXT___value__]; 
    501501} 
     
    507507    Synopsis: 
    508508*/ 
    509 static Value Object_prototype_hasOwnProperty(inout Value self, inout Value cc, Value[] arguments ...) { 
     509static Value Object_prototype_hasOwnProperty(Value self, Value cc, Value[] arguments ...) { 
    510510    if(!arguments.length) 
    511511        return FALSE; 
     
    519519    Synopsis: 
    520520*/ 
    521 static Value Object_prototype_isPrototypeOf(inout Value self, inout Value cc, Value[] arguments ...) { 
     521static Value Object_prototype_isPrototypeOf(Value self, Value cc, Value[] arguments ...) { 
    522522    if(self.type == TYPE.OBJECT && arguments.length) { 
    523523        Value current = arguments[0]; 
     
    537537    Synopsis: 
    538538*/ 
    539 static Value Object_prototype_propertyIsEnumerable(inout Value self, inout Value cc, Value[] arguments ...) { 
     539static Value Object_prototype_propertyIsEnumerable(Value self, Value cc, Value[] arguments ...) { 
    540540    if(!arguments.length) 
    541541        return FALSE; 
     
    544544 
    545545/** 
    546     BUGS: Binds null at Value.nf, cannot generate a function from arguments. 
     546    BUGS: Binds null at Value.f, cannot generate a function from arguments. 
    547547    Standards: ECMA 15.3.1 
    548548    Arguments: arguments[0] = String or Function 
     
    550550    Synopsis: 
    551551*/ 
    552 static Value Global_Function(inout Value self, inout Value cc, Value[] arguments ...) { 
     552static Value Global_Function(Value self, Value cc, Value[] arguments ...) { 
    553553    Value v; 
    554554    v.type = TYPE.FUNCTION; 
    555     v.nf = null; 
     555    v.f = null; 
    556556    return v; 
    557557} 
    558558 
    559559/** 
    560     BUGS: Binds null at Value.nf, cannot generate a function from arguments. 
     560    BUGS: Binds null at Value.f, cannot generate a function from arguments. 
    561561    Standards: ECMA 15.3.2.1 
    562562    Arguments: arguments[0] = String or Function 
     
    564564    Synopsis: 
    565565*/ 
    566 static Value Function_prototype_constructor(inout Value self, inout Value cc, Value[] arguments ...) { 
     566static Value Function_prototype_constructor(Value self, Value cc, Value[] arguments ...) { 
    567567    Value o, v; 
    568568    o.type = TYPE.OBJECT; 
    569569    o[TEXT_prototype] = Global[TEXT_Function][TEXT_prototype]; 
    570570    o[TEXT___value__].type = TYPE.FUNCTION; 
    571     o[TEXT___value__].nf = null; 
     571    o[TEXT___value__].f = null; 
    572572    return o; 
    573573} 
     
    580580    Synopsis: 
    581581*/ 
    582 static Value Function_prototype_apply(inout Value self, inout Value cc, Value[] arguments ...) { 
     582static Value Function_prototype_apply(Value self, Value cc, Value[] arguments ...) { 
    583583    return UNDEFINED; 
    584584} 
     
    591591    Synopsis: 
    592592*/ 
    593 static Value Function_prototype_call(inout Value self, inout Value cc, Value[] arguments ...) { 
     593static Value Function_prototype_call(Value self, Value cc, Value[] arguments ...) { 
    594594    if(self.type == TYPE.FUNCTION) 
    595         return self.nf(self,cc,arguments); 
     595        return self.f(self,cc,arguments); 
    596596} 
    597597 
     
    602602    Synopsis: 
    603603*/ 
    604 static Value Global_Array(inout Value self, inout Value cc, Value[] arguments ...) { 
     604static Value Global_Array(Value self, Value cc, Value[] arguments ...) { 
    605605    /// ECMA 15.4.1.1 
    606606    return Array_prototype_constructor(self,cc,arguments); 
     
    613613    Synopsis: 
    614614*/ 
    615 static Value Array_prototype_constructor(inout Value self, inout Value cc, Value[] arguments ...) { 
     615static Value Array_prototype_constructor(Value self, Value cc, Value[] arguments ...) { 
    616616    Value o; 
    617617    Value[] v; 
     
    633633    Synopsis: 
    634634*/ 
    635 static Value Array_prototype_toLocaleString(inout Value self, inout Value cc, Value[] arguments ...) { 
     635static Value Array_prototype_toLocaleString(Value self, Value cc, Value[] arguments ...) { 
    636636    char[] r = "["; 
    637637    char c = ','; // this character needs to be locale "list separator" 
     
    653653    Synopsis: 
    654654*/ 
    655 static Value Array_prototype_toSource(inout Value self, inout Value cc, Value[] arguments ...) { 
     655static Value Array_prototype_toSource(Value self, Value cc, Value[] arguments ...) { 
    656656    char[] r = "["; 
    657657    if(self.a.length) { 
     
    672672    Synopsis: 
    673673*/ 
    674 static Value Array_prototype_concat(inout Value self, inout Value cc, Value[] arguments ...) { 
     674static Value Array_prototype_concat(Value self, Value cc, Value[] arguments ...) { 
    675675    for(int i = 0; i < arguments.length; i++) { 
    676676        if(arguments[i].type == TYPE.ARRAY) { 
     
    689689    Synopsis: 
    690690*/ 
    691 static Value Array_prototype_join(inout Value self, inout Value cc, Value[] arguments ...) { 
     691static Value Array_prototype_join(Value self, Value cc, Value[] arguments ...) { 
    692692    char[] s = ""; 
    693693    if(arguments.length) 
     
    707707    Synopsis: 
    708708*/ 
    709 static Value Array_prototype_pop(inout Value self, inout Value cc, Value[] arguments ...) { 
     709static Value Array_prototype_pop(Value self, Value cc, Value[] arguments ...) { 
    710710    if(!self.a.length) 
    711711        return UNDEFINED; 
     
    721721    Synopsis: 
    722722*/ 
    723 static Value Array_prototype_push(inout Value self, inout Value cc, Value[] arguments ...) { 
     723static Value Array_prototype_push(Value self, Value cc, Value[] arguments ...) { 
    724724    self.a[$..(arguments.length+$)] = arguments[]; 
    725725    return self; 
     
    732732    Synopsis: 
    733733*/ 
    734 static Value Array_prototype_reverse(inout Value self, inout Value cc, Value[] arguments ...) { 
     734static Value Array_prototype_reverse(Value self, Value cc, Value[] arguments ...) { 
    735735    self.a.reverse; 
    736736    return self; 
     
    743743    Synopsis: 
    744744*/ 
    745 static Value Array_prototype_shift(inout Value self, inout Value cc, Value[] arguments ...) { 
     745static Value Array_prototype_shift(Value self, Value cc, Value[] arguments ...) { 
    746746    if(!self.a.length) 
    747747        return UNDEFINED; 
     
    757757    Synopsis: 
    758758*/ 
    759 static Value Array_prototype_slice(inout Value self, inout Value cc, Value[] arguments ...) { 
     759static Value Array_prototype_slice(Value self, Value cc, Value[] arguments ...) { 
    760760    if(!arguments.length) 
    761761        return UNDEFINED; 
     
    775775    Synopsis: 
    776776*/ 
    777 static Value Array_prototype_sort(inout Value self, inout Value cc, Value[] arguments ...) { 
     777static Value Array_prototype_sort(Value self, Value cc, Value[] arguments ...) { 
    778778    if(arguments.length && arguments[0].type == TYPE.FUNCTION) { 
    779         // sort using arguments[0].nf as the comparison function. 
     779        // sort using arguments[0].f as the comparison function. 
    780780        return self; 
    781781    } 
     
    790790    Synopsis: 
    791791*/ 
    792 static Value Array_prototype_splice(inout Value self, inout Value cc, Value[] arguments ...) { 
     792static Value Array_prototype_splice(Value self, Value cc, Value[] arguments ...) { 
    793793    if(!arguments.length) 
    794794        return self; 
     
    817817    Synopsis: 
    818818*/ 
    819 static Value Array_prototype_unshift(inout Value self, inout Value cc, Value[] arguments ...) { 
     819static Value Array_prototype_unshift(Value self, Value cc, Value[] arguments ...) { 
    820820    Value[] a; 
    821821    a.length = (arguments.length + self.a.length); 
     
    831831    Synopsis: 
    832832*/ 
    833 static Value Global_String(inout Value self, inout Value cc, Value[] arguments ...) { 
     833static Value Global_String(Value self, Value cc, Value[] arguments ...) { 
    834834    return cast(Value) (arguments.length? arguments[0].toString() : TEXT_); 
    835835} 
     
    841841    Synopsis: 
    842842*/ 
    843 static Value String_prototype_constructor(inout Value self, inout Value cc, Value[] arguments ...) { 
     843static Value String_prototype_constructor(Value self, Value cc, Value[] arguments ...) { 
    844844    Value o; 
    845845    o.type = TYPE.OBJECT; 
     
    855855    Synopsis: 
    856856*/ 
    857 static Value String_fromCharCode(inout Value self, inout Value cc, Value[] arguments ...) { 
     857static Value String_fromCharCode(Value self, Value cc, Value[] arguments ...) { 
    858858    Value v; 
    859859    v.type = TYPE.STRING; 
     
    870870    Synopsis: 
    871871*/ 
    872 static Value String_prototype_charAt(inout Value self, inout Value cc, Value[] arguments ...) { 
     872static Value String_prototype_charAt(Value self, Value cc, Value[] arguments ...) { 
    873873    if(arguments.length) 
    874874        return cast(Value) self.toString()[arguments[0].toInteger()]; 
     
    881881    Synopsis: 
    882882*/ 
    883 static Value String_prototype_charCodeAt(inout Value self, inout Value cc, Value[] arguments ...) { 
     883static Value String_prototype_charCodeAt(Value self, Value cc, Value[] arguments ...) { 
    884884    if(arguments.length) 
    885885        return cast(Value) cast(int) self.toString()[arguments[0].toInteger()]; 
     
    892892    Synopsis: 
    893893*/ 
    894 static Value String_prototype_concat(inout Value self, inout Value cc, Value[] arguments ...) { 
     894static Value String_prototype_concat(Value self, Value cc, Value[] arguments ...) { 
    895895    Value v = self.toString(); 
    896896    foreach(Value arg; arguments) { 
     
    906906    Synopsis: 
    907907*/ 
    908 static Value String_prototype_indexOf(inout Value self, inout Value cc, Value[] arguments ...) { 
     908static Value String_prototype_indexOf(Value self, Value cc, Value[] arguments ...) { 
    909909    if(arguments.length) { 
    910910        if(arguments.length > 1) 
     
    920920    Synopsis: 
    921921*/ 
    922 static Value String_prototype_lastIndexOf(inout Value self, inout Value cc, Value[] arguments ...) { 
     922static Value String_prototype_lastIndexOf(Value self, Value cc, Value[] arguments ...) { 
    923923    if(arguments.length) { 
    924924        if(arguments.length > 1) 
     
    935935    Synopsis: 
    936936*/ 
    937 static Value String_prototype_localeCompare(inout Value self, inout Value cc, Value[] arguments ...) { 
     937static Value String_prototype_localeCompare(Value self, Value cc, Value[] arguments ...) { 
    938938    return UNDEFINED; 
    939939} 
     
    946946    Synopsis: 
    947947*/ 
    948 static Value String_prototype_match(inout Value self, inout Value cc, Value[] arguments ...) { 
     948static Value String_prototype_match(Value self, Value cc, Value[] arguments ...) { 
    949949    if(arguments.length && arguments[0].type == TYPE.REGEXP) { 
    950950        char[][] m = arguments[0].r.match(self.toString()); 
     
    964964    Synopsis: 
    965965*/ 
    966 static Value String_prototype_replace(inout Value self, inout Value cc, Value[] arguments ...) { 
     966static Value String_prototype_replace(Value self, Value cc, Value[] arguments ...) { 
    967967    if(arguments.length > 1) { 
    968968        if(arguments[0].type == TYPE.REGEXP) 
     
    979979    Synopsis: 
    980980*/ 
    981 static Value String_prototype_search(inout Value self, inout Value cc, Value[] arguments ...) { 
     981static Value String_prototype_search(Value self, Value cc, Value[] arguments ...) { 
    982982    if(arguments.length && arguments[0].type == TYPE.REGEXP) 
    983983        return cast(Value) arguments[0].r.find(self.toString()); 
     
    991991    Synopsis: 
    992992*/ 
    993 static Value String_prototype_slice(inout Value self, inout Value cc, Value[] arguments ...) { 
     993static Value String_prototype_slice(Value self, Value cc, Value[] arguments ...) { 
    994994    if(!arguments.length) 
    995995        return UNDEFINED; 
     
    10081008    Synopsis: 
    10091009*/ 
    1010 static Value String_prototype_split(inout Value self, inout Value cc, Value[] arguments ...) { 
     1010static Value String_prototype_split(Value self, Value cc, Value[] arguments ...) { 
    10111011    Value[] a = []; 
    10121012    int i,j,k, lim = int.max; 
     
    10521052    Synopsis: 
    10531053*/ 
    1054 static Value String_prototype_substr(inout Value self, inout Value cc, Value[] arguments ...) { 
     1054static Value String_prototype_substr(Value self, Value cc, Value[] arguments ...) { 
    10551055    int s, len; 
    10561056    if(arguments.length) { 
     
    10731073    Synopsis: 
    10741074*/ 
    1075 static Value String_prototype_substring(inout Value self, inout Value cc, Value[] arguments ...) { 
     1075static Value String_prototype_substring(Value self, Value cc, Value[] arguments ...) { 
    10761076    int s, x, e = self.s.length; 
    10771077    if(arguments.length) { 
     
    10981098    Synopsis: 
    10991099*/ 
    1100 static Value String_prototype_toLowerCase(inout Value self, inout Value cc, Value[] arguments ...) { 
     1100static Value String_prototype_toLowerCase(Value self, Value cc, Value[] arguments ...) { 
    11011101    return cast(Value) std.string.tolower(self.toString()); 
    11021102} 
     
    11081108    Synopsis: 
    11091109*/ 
    1110 static Value String_prototype_toLocaleLowerCase(inout Value self, inout Value cc, Value[] arguments ...) { 
     1110static Value String_prototype_toLocaleLowerCase(Value self, Value cc, Value[] arguments ...) { 
    11111111    foreach(char c; self.toString()) { 
    11121112        c = std.uni.toUniLower(c); 
     
    11211121    Synopsis: 
    11221122*/ 
    1123 static Value String_prototype_toUpperCase(inout Value self, inout Value cc, Value[] arguments ...) { 
     1123static Value String_prototype_toUpperCase(Value self, Value cc, Value[] arguments ...) { 
    11241124    return cast(Value) std.string.toupper(self.toString()); 
    11251125} 
     
    11311131    Synopsis: 
    11321132*/ 
    1133 static Value String_prototype_toLocaleUpperCase(inout Value self, inout Value cc, Value[] arguments ...) { 
     1133static Value String_prototype_toLocaleUpperCase(Value self, Value cc, Value[] arguments ...) { 
    11341134    foreach(char c; self.toString()) { 
    11351135        c = std.uni.toUniUpper(c); 
     
    11441144    Synopsis: returns a boolean value for the value provided. 
    11451145*/ 
    1146 static Value Global_Boolean(inout Value self, inout Value cc, Value[] arguments ...){ 
     1146static Value Global_Boolean(Value self, Value cc, Value[] arguments ...){ 
    11471147    return (arguments.length && arguments[0].b)? TRUE : FALSE; 
    11481148} 
     
    11541154    Synopsis: Creates an Object containing a boolean value. 
    11551155*/ 
    1156 static Value Boolean_prototype_constructor(inout Value self, inout Value cc, Value[] arguments ...){ 
     1156static Value Boolean_prototype_constructor(Value self, Value cc, Value[] arguments ...){ 
    11571157    Value o; 
    11581158    o.type = TYPE.OBJECT; 
     
    11681168    Synopsis: returns a numerical value for the value provided. 
    11691169*/ 
    1170 static Value Global_Number(inout Value self, inout Value cc, Value[] arguments ...) { 
     1170static Value Global_Number(Value self, Value cc, Value[] arguments ...) { 
    11711171    return cast(Value) (arguments.length? arguments[0].toDouble() : 0.0); 
    11721172} 
     
    11781178    Synopsis: Creates an Object containing a numerical value. 
    11791179*/ 
    1180 static Value Number_prototype_constructor(inout Value self, inout Value cc, Value[] arguments ...) { 
     1180static Value Number_prototype_constructor(Value self, Value cc, Value[] arguments ...) { 
    11811181    Value o; 
    11821182    o.type = TYPE.OBJECT; 
     
    11931193    Synopsis: 
    11941194*/ 
    1195 static Value Number_prototype_toFixed(inout Value self, inout Value cc, Value[] arguments ...) { 
     1195static Value Number_prototype_toFixed(Value self, Value cc, Value[] arguments ...) { 
    11961196    if(!arguments.length || arguments[0].toDouble() == double.nan) 
    11971197        return cast(Value) double.nan; 
     
    12061206    Synopsis: 
    12071207*/ 
    1208 static Value Number_prototype_toExponential(inout Value self, inout Value cc, Value[] arguments ...) { 
     1208static Value Number_prototype_toExponential(Value self, Value cc, Value[] arguments ...) { 
    12091209    if(!arguments.length || arguments[0].toDouble() == double.nan) 
    12101210        return cast(Value) double.nan; 
     
    12191219    Synopsis: 
    12201220*/ 
    1221 static Value Number_prototype_toPrecision(inout Value self, inout Value cc, Value[] arguments ...) { 
     1221static Value Number_prototype_toPrecision(Value self, Value cc, Value[] arguments ...) { 
    12221222    if(!arguments.length || arguments[0].toDouble() == double.nan) 
    12231223        return cast(Value) double.nan; 
     
    12311231    Synopsis: 
    12321232*/ 
    1233 static Value Math_abs(inout Value self, inout Value cc, Value[] arguments ...) { 
     1233static Value Math_abs(Value self, Value cc, Value[] arguments ...) { 
    12341234    return cast(Value) (arguments.length? fabs(arguments[0].toDouble()) : double.nan); 
    12351235} 
     
    12411241    Synopsis: 
    12421242*/ 
    1243 static Value Math_acos(inout Value self, inout Value cc, Value[] arguments ...) { 
     1243static Value Math_acos(Value self, Value cc, Value[] arguments ...) { 
    12441244    return cast(Value) (arguments.length? acos(arguments[0].toDouble()) : double.nan); 
    12451245} 
     
    12511251    Synopsis: 
    12521252*/ 
    1253 static Value Math_asin(inout Value self, inout Value cc, Value[] arguments ...) { 
     1253static Value Math_asin(Value self, Value cc, Value[] arguments ...) { 
    12541254    return cast(Value) (arguments.length? asin(arguments[0].toDouble()) : double.nan); 
    12551255} 
     
    12611261    Synopsis: 
    12621262*/ 
    1263 static Value Math_atan(inout Value self, inout Value cc, Value[] arguments ...) { 
     1263static Value Math_atan(Value self, Value cc, Value[] arguments ...) { 
    12641264    return cast(Value) (arguments.length? atan(arguments[0].toDouble()) : double.nan); 
    12651265} 
     
    12711271    Synopsis: 
    12721272*/ 
    1273 static Value Math_atan2(inout Value self, inout Value cc, Value[] arguments ...) { 
     1273static Value Math_atan2(Value self, Value cc, Value[] arguments ...) { 
    12741274    return cast(Value) (arguments.length >= 2? atan2(arguments[0].toDouble(), arguments[1].toDouble()) : double.nan); 
    12751275} 
     
    12811281    Synopsis: 
    12821282*/ 
    1283 static Value Math_ceil(inout Value self, inout Value cc, Value[] arguments ...) { 
     1283static Value Math_ceil(Value self, Value cc, Value[] arguments ...) { 
    12841284    return cast(Value) (arguments.length? ceil(arguments[0].toDouble()) : double.nan); 
    12851285} 
     
    12911291    Synopsis: 
    12921292*/ 
    1293 static Value Math_cos(inout Value self, inout Value cc, Value[] arguments ...) { 
     1293static Value Math_cos(Value self, Value cc, Value[] arguments ...) { 
    12941294    return cast(Value) (arguments.length? cos(arguments[0].toDouble()) : double.nan); 
    12951295} 
     
    13011301    Synopsis: 
    13021302*/ 
    1303 static Value Math_exp(inout Value self, inout Value cc, Value[] arguments ...) { 
     1303static Value Math_exp(Value self, Value cc, Value[] arguments ...) { 
    13041304    return cast(Value) (arguments.length? exp(arguments[0].toDouble()) : double.nan); 
    13051305} 
     
    13111311    Synopsis: 
    13121312*/ 
    1313 static Value Math_floor(inout Value self, inout Value cc, Value[] arguments ...) { 
     1313static Value Math_floor(Value self, Value cc, Value[] arguments ...) { 
    13141314    return cast(Value) (arguments.length? std.math.floor(arguments[0].toDouble()) : double.nan); 
    13151315} 
     
    13211321    Synopsis: 
    13221322*/ 
    1323 static Value Math_log(inout Value self, inout Value cc, Value[] arguments ...) { 
     1323static Value Math_log(Value self, Value cc, Value[] arguments ...) { 
    13241324    return cast(Value) (arguments.length? log(arguments[0].toDouble()) : double.nan); 
    13251325} 
     
    13311331    Synopsis: 
    13321332*/ 
    1333 static Value Math_max(inout Value self, inout Value cc, Value[] arguments ...) { 
     1333static Value Math_max(Value self, Value cc, Value[] arguments ...) { 
    13341334    Value max = -double.infinity; 
    13351335    foreach(Value v; arguments){ 
     
    13491349    Synopsis: 
    13501350*/ 
    1351 static Value Math_min(inout Value self, inout Value cc, Value[] arguments ...) { 
     1351static Value Math_min(Value self, Value cc, Value[] arguments ...) { 
    13521352    Value min = double.infinity; 
    13531353    foreach(Value v; arguments){ 
     
    13671367    Synopsis: 
    13681368*/ 
    1369 static Value Math_pow(inout Value self, inout Value cc, Value[] arguments ...) { 
     1369static Value Math_pow(Value self, Value cc, Value[] arguments ...) { 
    13701370    return cast(Value) (arguments.length >= 2? std.math.pow(arguments[0].toDouble(), arguments[1].toDouble()) : double.nan); 
    13711371} 
     
    13781378    Synopsis: 
    13791379*/ 
    1380 static Value Math_random(inout Value self, inout Value cc, Value[] arguments ...) { 
     1380static Value Math_random(Value self, Value cc, Value[] arguments ...) { 
    13811381    ulong x = std.random.rand(); 
    13821382    x <<= 21; 
     
    13941394    Synopsis: 
    13951395*/ 
    1396 static Value Math_round(inout Value self, inout Value cc, Value[] arguments ...) { 
     1396static Value Math_round(Value self, Value cc, Value[] arguments ...) { 
    13971397    if(!arguments.length) 
    13981398        return cast(Value) double.nan; 
     
    14061406    Synopsis: 
    14071407*/ 
    1408 static Value Math_sin(inout Value self, inout Value cc, Value[] arguments ...) { 
     1408static Value Math_sin(Value self, Value cc, Value[] arguments ...) { 
    14091409    return cast(Value) (arguments.length? sin(arguments[0].toDouble()) : double.nan); 
    14101410} 
     
    14161416    Synopsis: 
    14171417*/ 
    1418 static Value Math_sqrt(inout Value self, inout Value cc, Value[] arguments ...) { 
     1418static Value Math_sqrt(Value self, Value cc, Value[] arguments ...) { 
    14191419    return cast(Value) (arguments.length? sqrt(arguments[0].toDouble()) : double.nan); 
    14201420} 
     
    14261426    Synopsis: 
    14271427*/ 
    1428 static Value Math_tan(inout Value self, inout Value cc, Value[] arguments ...) { 
     1428static Value Math_tan(Value self, Value cc, Value[] arguments ...) { 
    14291429    return cast(Value) (arguments.length? tan(arguments[0].toDouble()) : double.nan); 
    14301430} 
     
    14361436    Synopsis: 
    14371437*/ 
    1438 static Value Global_Date(inout Value self, inout Value cc, Value[] arguments ...) { 
     1438static Value Global_Date(Value self, Value cc, Value[] arguments ...) { 
    14391439    d_time t = UTCtoLocalTime(getUTCtime()); 
    14401440    return cast(Value) std.date.toString(t); 
     
    14481448    Synopsis: 
    14491449*/ 
    1450 static Value Date_prototype_constructor(inout Value self, inout Value cc, Value[] arguments ...) { 
     1450static Value Date_prototype_constructor(Value self, Value cc, Value[] arguments ...) { 
    14511451    Value o; 
    14521452    o.type = TYPE.OBJECT; 
     
    14831483    Synopsis: 
    14841484*/ 
    1485 static Value Date_parse(inout Value self, inout Value cc, Value[] arguments ...) { 
     1485static Value Date_parse(Value self, Value cc, Value[] arguments ...) { 
    14861486    return cast(Value) (arguments.length? parse(arguments[0].toString()) : d_time_nan); 
    14871487} 
     
    14931493    Synopsis: 
    14941494*/ 
    1495 static Value Date_UTC(inout Value self, inout Value cc, Value[] arguments ...) { 
     1495static Value Date_UTC(Value self, Value cc, Value[] arguments ...) { 
    14961496    d_time y,m,d,h,mn,s,ms,type; 
    14971497    for(int i = 0; i < arguments.length & 7; i++) { 
     
    15211521    Synopsis: 
    15221522*/ 
    1523 static Value Date_prototype_toDateString(inout Value self, inout Value cc, Value[] arguments ...) { 
     1523static Value Date_prototype_toDateString(Value self, Value cc, Value[] arguments ...) { 
    15241524    return cast(Value) toDateString(LocalTimetoUTC(self.toDate())); 
    15251525} 
     
    15311531    Synopsis: 
    15321532*/ 
    1533 static Value Date_prototype_toTimeString(inout Value self, inout Value cc, Value[] arguments ...) { 
     1533static Value Date_prototype_toTimeString(Value self, Value cc, Value[] arguments ...) { 
    15341534    return cast(Value) toTimeString(LocalTimetoUTC(self.toDate())); 
    15351535} 
     
    15411541    Synopsis: 
    15421542*/ 
    1543 static Value Date_prototype_toLocaleString(inout Value self, inout Value cc, Value[] arguments ...) { 
     1543static Value Date_prototype_toLocaleString(Value self, Value cc, Value[] arguments ...) { 
    15441544    return cast(Value) std.date.toString(self.toDate()); 
    15451545} 
     
    15511551    Synopsis: 
    15521552*/ 
    1553 static Value Date_prototype_toLocaleDateString(inout Value self, inout Value cc, Value[] arguments ...) { 
     1553static Value Date_prototype_toLocaleDateString(Value self, Value cc, Value[] arguments ...) { 
    15541554    return cast(Value) toDateString(self.toDate()); 
    15551555} 
     
    15611561    Synopsis: 
    15621562*/ 
    1563 static Value Date_prototype_toLocaleTimeString(inout Value self, inout Value cc, Value[] arguments ...) { 
     1563static Value Date_prototype_toLocaleTimeString(Value self, Value cc, Value[] arguments ...) { 
    15641564    return cast(Value) toTimeString(self.toDate()); 
    15651565} 
     
    15711571    Synopsis: 
    15721572*/ 
    1573 static Value Date_prototype_getTime(inout Value self, inout Value cc, Value[] arguments ...) { 
     1573static Value Date_prototype_getTime(Value self, Value cc, Value[] arguments ...) { 
    15741574    return cast(Value) self.toDate(); 
    15751575} 
     
    15821582    Synopsis: 
    15831583*/ 
    1584 static Value Date_prototype_getFullYear(inout Value self, inout Value cc, Value[] arguments ...) { 
     1584static Value Date_prototype_getFullYear(Value self, Value cc, Value[] arguments ...) { 
    15851585    Value v = self.toDate(); 
    15861586    v = (v.dt != d_time_nan? YearFromTime(UTCtoLocalTime(v.dt)) : d_time_nan); 
     
    15941594    Synopsis: 
    15951595*/ 
    1596 static Value Date_prototype_getUTCFullYear(inout Value self, inout Value cc, Value[] arguments ...) { 
     1596static Value Date_prototype_getUTCFullYear(Value self, Value cc, Value[] arguments ...) { 
    15971597    Value v = self.toDate(); 
    15981598    v = (v.dt != d_time_nan? YearFromTime(v.dt) : d_time_nan); 
     
    16061606    Synopsis: 
    16071607*/ 
    1608 static Value Date_prototype_getMonth(inout Value self, inout Value cc, Value[] arguments ...) { 
     1608static Value Date_prototype_getMonth(Value self, Value cc, Value[] arguments ...) { 
    16091609    Value v = self.toDate(); 
    16101610    v = (v.dt != d_time_nan? MonthFromTime(UTCtoLocalTime(v.dt)) : d_time_nan); 
     
    16181618    Synopsis: 
    16191619*/ 
    1620 static Value Date_prototype_getUTCMonth(inout Value self, inout Value cc, Value[] arguments ...) { 
     1620static Value Date_prototype_getUTCMonth(Value self, Value cc, Value[] arguments ...) { 
    16211621    Value v = self.toDate(); 
    16221622    v = (v.dt != d_time_nan? YearFromTime(v.dt) : d_time_nan); 
     
    16301630    Synopsis: 
    16311631*/ 
    1632 static Value Date_prototype_getDate(inout Value self, inout Value cc, Value[] arguments ...) { 
     1632static Value Date_prototype_getDate(Value self, Value cc, Value[] arguments ...) { 
    16331633    Value v = self.toDate(); 
    16341634    v = (v.dt != d_time_nan? DateFromTime(UTCtoLocalTime(v.dt)) : d_time_nan); 
     
    16421642    Synopsis: 
    16431643*/ 
    1644 static Value Date_prototype_getUTCDate(inout Value self, inout Value cc, Value[] arguments ...) { 
     1644static Value Date_prototype_getUTCDate(Value self, Value cc, Value[] arguments ...) { 
    16451645    Value v = self.toDate(); 
    16461646    v = (v.dt != d_time_nan? YearFromTime(v.dt) : d_time_nan); 
     
    16541654    Synopsis: 
    16551655*/ 
    1656 static Value Date_prototype_getDay(inout Value self, inout Value cc, Value[] arguments ...) { 
     1656static Value Date_prototype_getDay(Value self, Value cc, Value[] arguments ...) { 
    16571657    Value v = self.toDate(); 
    16581658    v = (v.dt != d_time_nan? WeekDay(UTCtoLocalTime(v.dt)) : d_time_nan); 
     
    16661666    Synopsis: 
    16671667*/ 
    1668 static Value Date_prototype_getUTCDay(inout Value self, inout Value cc, Value[] arguments ...) { 
     1668static Value Date_prototype_getUTCDay(Value self, Value cc, Value[] arguments ...) { 
    16691669    Value v = self.toDate(); 
    16701670    v = (v.dt != d_time_nan? WeekDay(v.dt) : d_time_nan); 
     
    16781678    Synopsis: 
    16791679*/ 
    1680 static Value Date_prototype_getHours(inout Value self, inout Value cc, Value[] arguments ...) { 
     1680static Value Date_prototype_getHours(Value self, Value cc, Value[] arguments ...) { 
    16811681    Value v = self.toDate(); 
    16821682    v = (v.dt != d_time_nan? HourFromTime(UTCtoLocalTime(v.dt)) : d_time_nan); 
     
    16901690    Synopsis: 
    16911691*/ 
    1692 static Value Date_prototype_getUTCHours(inout Value self, inout Value cc, Value[] arguments ...) { 
     1692static Value Date_prototype_getUTCHours(Value self, Value cc, Value[] arguments ...) { 
    16931693    Value v = self.toDate(); 
    16941694    v = (v.dt != d_time_nan? HourFromTime(v.dt) : d_time_nan); 
     
    17021702    Synopsis: 
    17031703*/ 
    1704 static Value Date_prototype_getMinutes(inout Value self, inout Value cc, Value[] arguments ...) { 
     1704static Value Date_prototype_getMinutes(Value self, Value cc, Value[] arguments ...) { 
    17051705    Value v = self.toDate(); 
    17061706    v = (v.dt != d_time_nan? MinFromTime(UTCtoLocalTime(v.dt)) : d_time_nan); 
     
    17141714    Synopsis: 
    17151715*/ 
    1716 static Value Date_prototype_getUTCMinutes(inout Value self, inout Value cc, Value[] arguments ...) { 
     1716static Value Date_prototype_getUTCMinutes(Value self, Value cc, Value[] arguments ...) { 
    17171717    Value v = self.toDate(); 
    17181718    v = (v.dt != d_time_nan? MinFromTime(v.dt) : d_time_nan); 
     
    17261726    Synopsis: 
    17271727*/ 
    1728 static Value Date_prototype_getSeconds(inout Value self, inout Value cc, Value[] arguments ...) { 
     1728static Value Date_prototype_getSeconds(Value self, Value cc, Value[] arguments ...) { 
    17291729    Value v = self.toDate(); 
    17301730    v = (v.dt != d_time_nan? SecFromTime(UTCtoLocalTime(v.dt)) : d_time_nan); 
     
    17381738    Synopsis: 
    17391739*/ 
    1740 static Value Date_prototype_getUTCSeconds(inout Value self, inout Value cc, Value[] arguments ...) { 
     1740static Value Date_prototype_getUTCSeconds(Value self, Value cc, Value[] arguments ...) { 
    17411741    Value v = self.toDate(); 
    17421742    v = (v.dt != d_time_nan? SecFromTime(v.dt) : d_time_nan); 
     
    17501750    Synopsis: 
    17511751*/ 
    1752 static Value Date_prototype_getMilliseconds(inout Value self, inout Value cc, Value[] arguments ...) { 
     1752static Value Date_prototype_getMilliseconds(Value self, Value cc, Value[] arguments ...) { 
    17531753    Value v = self.toDate(); 
    17541754    v = (v.dt != d_time_nan? msFromTime(UTCtoLocalTime(v.dt)) : d_time_nan); 
     
    17621762    Synopsis: 
    17631763*/ 
    1764 static Value Date_prototype_getUTCMilliseconds(inout Value self, inout Value cc, Value[] arguments ...) { 
     1764static Value Date_prototype_getUTCMilliseconds(Value self, Value cc, Value[] arguments ...) { 
    17651765    Value v = self.toDate(); 
    17661766    v = (v.dt != d_time_nan? msFromTime(v.dt) : d_time_nan); 
     
    17741774    Synopsis: 
    17751775*/ 
    1776 static Value Date_prototype_getTimezoneOffset(inout Value self, inout Value cc, Value[] arguments ...) { 
     1776static Value Date_prototype_getTimezoneOffset(Value self, Value cc, Value[] arguments ...) { 
    17771777    Value v = self.toDate(); 
    17781778    v.dt = ((v.dt - UTCtoLocalTime(v.dt)) / 60_000); 
     
    17861786    Synopsis: 
    17871787*/ 
    1788 static Value Date_prototype_setTime(inout Value self, inout Value cc, Value[] arguments ...) { 
     1788static Value Date_prototype_setTime(Value self, Value cc, Value[] arguments ...) { 
    17891789    self = (arguments.length? arguments[0].toDate() : d_time_nan); 
    17901790    return self; 
     
    17971797    Synopsis: 
    17981798*/ 
    1799 static Value Date_prototype_setMilliseconds(inout Value self, inout Value cc, Value[] arguments ...) { 
     1799static Value Date_prototype_setMilliseconds(Value self, Value cc, Value[] arguments ...) { 
    18001800    d_time t, t2, ms; 
    18011801    if(!arguments.length) 
     
    18161816    Synopsis: 
    18171817*/ 
    1818 static Value Date_prototype_setUTCMilliseconds(inout Value self, inout Value cc, Value[] arguments ...) { 
     1818static Value Date_prototype_setUTCMilliseconds(Value self, Value cc, Value[] arguments ...) { 
    18191819    d_time t, t2, ms; 
    18201820    if(!arguments.length) 
     
    18351835    Synopsis: 
    18361836*/ 
    1837 static Value Date_prototype_setSeconds(inout Value self, inout Value cc, Value[] arguments ...) { 
     1837static Value Date_prototype_setSeconds(Value self, Value cc, Value[] arguments ...) { 
    18381838    d_time s,ms,t,t2; 
    18391839    if(self.dt != d_time_nan) { 
     
    18631863    Synopsis: 
    18641864*/ 
    1865 static Value Date_prototype_setUTCSeconds(inout Value self, inout Value cc, Value[] arguments ...) { 
     1865static Value Date_prototype_setUTCSeconds(Value self, Value cc, Value[] arguments ...) { 
    18661866    d_time s,ms,t,t2; 
    18671867    if(self.dt != d_time_nan) { 
     
    18911891    Synopsis: 
    18921892*/ 
    1893 static Value Date_prototype_setMinutes(inout Value self, inout Value cc, Value[] arguments ...) { 
     1893static Value Date_prototype_setMinutes(Value self, Value cc, Value[] arguments ...) { 
    18941894    d_time m,s,ms,t,t2; 
    18951895    if(self.dt != d_time_nan) { 
     
    19251925    Synopsis: 
    19261926*/ 
    1927 static Value Date_prototype_setUTCMinutes(inout Value self, inout Value cc, Value[] arguments ...) { 
     1927static Value Date_prototype_setUTCMinutes(Value self, Value cc, Value[] arguments ...) { 
    19281928    d_time m,s,ms,t,t2; 
    19291929    if(self.dt != d_time_nan) {