Changes between Version 2 and Version 3 of JSC


Ignore:
Timestamp:
Jul 1, 2009 4:06:41 PM (15 years ago)
Author:
bfulgham@webkit.org
Comment:

Add information about built-in functions.

Legend:

Unmodified
Added
Removed
Modified
  • JSC

    v2 v3  
    1717
    1818=== Built-In Functions ===
    19 {{{quit()}}}::
    20   Quit the interpreter
    21 {{{load('[FileName]')}}}::
    22   Load and execute the specified external JavaScript file 'FileName'.  If the run is successful, it will return the final value of the script.
     19 {{{checkSyntax('[FileName]')}}}::
     20   Check the syntax of the specified external JavaScript file {{{[FileName]}}}.
     21 {{{debug(term)}}}::
     22   Prints a human-readable version of the passed argument.
     23 {{{gc()}}}::
     24   Perform a garbage collection.  It will return {{{undefined}}}.
     25 {{{load('[FileName]')}}}::
     26   Load and execute the specified external JavaScript file {{{[FileName]}}}.  If the run is successful, it will return the final value of the script.
     27 {{{quit()}}}::
     28   Quit the interpreter
     29 {{{readline()}}}::
     30   Read data from stdin.  Mainly useful for writing test routines.
    2331{{{run('[FileName]')}}}::
    24   Load and execute the specified external JavaScript file 'FileName'.  If the run is successful, it will return the elapsed milliseconds for the run.
     32   Load and execute the specified external JavaScript file {{{[FileName]}}}.  If the run is successful, it will return the elapsed milliseconds for the run.
     33 {{{version()}}}::
     34   Currently does nothing.  It will return {{{undefined}}}.
    2535
    2636
     
    4151> 15.3 / 18 * 27.1 * (Math.ceil(1.3) * Math.exp(2.3) * Math.log (1.223) * Math.sin(32.22))
    425266.6192983328985
    43 >
     53> quit()
    4454}}}
    4555
     
    5060> add3(3)
    51616
    52 >
     62> var foo = readline();
     63abcdefg
     64undefined
     65> foo
     66abcdefg
     67> quit()
    5368}}}
    5469