Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 29.540.836 Times

Scheme2Js 20060718

  Date Added: June 19, 2010  |  Visits: 833


Report Broken Link
Printer Friendly Version

Product Homepage
Download (76 downloads)

Scheme2Js is a Scheme to Javascript compiler. While some effort has been spent on being as close as possible to R5rs, we concentrated mainly on efficiency. Usually Scheme2Js produces Javascript code, that is comparable to hand-written code. In order to achieve this performance, Scheme2Js is not completely R5rs compliant. In particular it lacks support for continuations, exact numbers and it treats tail recursion only partially. Scheme2Js provides several flags, that allow to modify the result: - --no-js-dot-notation disallows access to JavaScript fields with the dot-notation. This flag disables accesses of the form x.y like in document.getElementById. It is however still possible to access the is a valid expression using the js-field function. - --mutable-strings: in order to improve the performance of string-operations and to ease the interface between Scheme and JavaScript code, the default implementation maps Scheme strings to JavaScript strings. Contrary to Scheme strings, JavaScript strings are however immutable. This flag maps strings to a JavaScript class, that represents Scheme strings, that are mutable. The resulting code might be slightly slower, and it is more difficult to interface with Javascript code. - --encapsulate-parts encapsulates the program into an anonymous function. Only global variables are outside of this anonymous function. On one hand this introduces one function call to the anonymous function. But on the other hand most Javascript implementations should run faster with this optimization: usually hashtables are used to represent scopes in JavaScript. By using an anonymous function the programs variables are separated into their own smaller hashtable which (in theory) accelerates accesses to these variables. More importantly the variables are stored in their own hashtable, and not in the global hashtable, which is accessible by the global variable. It is extremely easy to indirectly modify the contents of global variables. Inlining or other common optimizations are hence impossible to do on global variables. By storing the programs variables in an anonymous function these optimizations become again possible. - --optimize-var-number reduces the number of variables used in the resulting JavaScript code. The code may run faster, but is more difficult to debug, as the variable names are lost and the same variable might be used several times. - --optimize-while: with this flag Scheme2Js optimizes common while loops. The unoptimized while loops are often of the form: while(true) { if(test) resVar = res; else { modify_loop_variable; continue; } break; } This optimization looks for these patterns and moves the test into the while loop: while(!test) { modify_loop_variable; } resVar = res; This optimization has been implemented only recently and is therefore not yet activated by default. - --verbose prints some information. - --no-inlining disables all function inlining (constants might still be inlined). - --inline-globals lets Scheme2Js inline global functions and constants. This might have two unwanted side-effects: for one, global variables are often used to transfer data between different modules. Some inlined functions are lost if there is no reference to them anymore. If global functions are to be used outside a module, one should not use this flag. (This behavior is likely to change in future versions of Scheme2Js.) - --unresolved-is-js: if a variable is unbound, the compiler will assume the variable comes from another module, or from JavaScript. See Section Scheme - Javascript for a more detailed discussion of the JavaScript Scheme interface. - --js-this provides the this variable within Scheme functions. This way, Scheme procedures can be used as methods of JavaScript objects. - --no-tailrec disables the tailrec to while-loop optimization. If you suspect a bug in the compilers way of translating tail-recs, you could try this flag. - --no-optimize-calls disables Scheme2Js inlining of binary or unary operations. For instance sci_plus(3, 5) is optimized to (3+5). This optimization is quite important, and theres usually no reason to disable it. - --no-optimize-consts disables the pre-constant calculation. Unless disabled (with this flag), compound constants are precalculated and their occurrences replaced by a reference to a variable holding the constant. This makes repeated accesses to these constants faster, but introduces new variables. - --no-optimize-boolify disables the boolify optimization. JavaScripts and Schemes boolify are not equivalent: JavaScript considers false, 0, null and undefined to be false, whereas Scheme only has #f. The unoptimized boolify therefore always adds the test against false: if (test !== false) ... If Scheme2Js can see, that the test itself is a boolean, it can remove the unnecessary !== false test. This flag disables this optimization. - --d STAGE prints a dot-file (see graphviz) of the AST after stage STAGE. Possible stages are: expand, tree, symbol, node-elim1, tail, inline, constant-propagation, rm-unused-vars, capture, node-elim2, while, (tt "statements"), node-elim3. Usually one doesnt need this flag, unless for debugging purposes. - --print-locs prints the original locations as comments to the JavaScript file. These locations are currently the character-offset from the beginning of the file. Whats New in This Release: - This release adds trampolines..

Requirements: No special requirements
Platforms: Linux
Keyword: Anonymous Function Compilers Flag Function Global Global Variables Javascript Code Programming Scheme Variable Variables
Users rating: 0/10

License: Freeware Size: 78.85 KB
More Reviews or Write Review

Development Tools  -  Multiple assignment 1.0
The function arg2vars serves for assigning of values from input argument(s) to variables declared in the output list in the place ofthe function calling. Not assigned output variables are empty, while superfluous arguments are cut to a number of...
10 KB  
Miscellaneous  -  Tail Call Optimization Decorator 1.0
This function decorates a function with tail call optimization. It does this by throwing an exception if it is it's own grandparent, and catching such exceptions to fake the tail call optimization. This function fails if the decorated function...
Form Processors  -  javascript GET VARIABLES 1.1
javascript GET VARIABLES allows you to read form variables from static HTML. Combined with the document.write() method, you can actually add dynamic content to regular HTML. Given a choice, server side processing of form variables is preferable.
10 KB  
Miscellaneous  -  PHP/JavaScript Data Translation 1.0
This project provides a PHP class for facilitating the translation of data variables and objects into JavaScript code for client-side processing on a website.
Games  -  Landminer 1.0.1
Landminer is a simple version of Minesweeper designed for iPhone and iPad. ? Double tap to reveal the tile below ? Press and hold on a tile to flag it as a mine ? Create new games with variable board size and mine density...
1024 KB  
Development Tools  -  Particle Swarm Optimization Simulation 1.0
An animated simulation of Particles in 2D searching for a global minima of a simple function using Particle Swarm Optimization algorithm
10 KB  
Libraries  -  vars::global 0.0.1
vars::global is a Perl module that tries to make global variables a little safer. SYNOPSIS # In the place/package where we want to create globals use vars::global create => qw( $foo @bar %baz ); # Add some more global symbols...
7.17 KB  
Libraries  -  Devel::TraceFuncs 0.1
Devel::TraceFuncs is a Perl module with trace function calls as they happen. SYNOPSIS Usage: require Devel::TraceFuncs; max_trace_depth 5; trace_file "foo.out"; trace_file $file_handle; sub foo { IN(my $f, "a message"); DEBUG...
4.1 KB  
Multimedia & Graphics  -  Function Plot 2D New
Function Plot 2D is a small, simple, Java based application specially designed to help you create function plots. Function Plot 2D lets you create a 2D plot, all you need to do is give an input function. for WindowsAll
Science  -  Gorgeous Karnaugh Free 0.9
Gorgeous Karnaugh software: 1) Removes slow, tedious and error prone pen and paper from your life; 2) Gives you a pretty good logic simplification tool; 3) Supports definition of logic function using truth table, from analytic form or by direct...
1.72 MB  
Linux Software  -  Polling Autodialer Software 3.4
ICTBroadcast Auto Dialer software has a survey campaign for telephone surveys and polls. This auto dialer software automatically dials a list of numbers and asks them a set of questions that they can respond to, by using their telephone keypad....
488 B  
Linux Software  -  Total Video Converter Mac Free 3.5.5
Total Video Converter Mac Free developed by EffectMatrix Ltd is the official legal version of Total Video Converter which was a globally recognized brand since 2006. Total Video Converter Mac Free is a free but powerful all-in-one video...
17.7 MB  
Linux Software  -  Skeith mod_log_sql Analyzer 2.10beta2
Skeith is a php based front end for analyzing logs for Apache using mod_log_sql.
47.5 KB  
Linux Software  -  SLAX 6.0+
Slax is a modern, portable, small and fast Linux operating system with a modular approach and outstanding design. Despite its small size, Slax provides a wide collection of pre-installed software for daily use, including a well organized graphical...
190 KB  
Linux Software  -  GTK+ 2.5
GTK+, which stands for the GIMP Toolkit, is a library for creating graphical user interfaces for the X Window System. It is designed to be small, efficient, and flexible. GTK+ is written in C with a very object-oriented approach. Language bindings...
60 MB  
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by, it is used to describe information about an application such as the name and...
327.68 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB