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

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

Serving Software Downloads in 956 Categories, Downloaded 49.479.837 Times

Scheme2Js 20060718

  Date Added: June 19, 2010  |  Visits: 1.065

Scheme2Js

Report Broken Link
Printer Friendly Version


Product Homepage
Download (92 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
USER REVIEWS
More Reviews or Write Review


SCHEME2JS RELATED
Development Tools  -  Temporary (or anonymous) function handles for ML 6
The anonymous function handle feature of ML 7 is a long-needed feature, and one that I have longed for since I began writing scripts in early ML 6.Unfortunately, I am still forced to use ML 6 most of the time, so I came up with a way to create...
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::FindGlobals 0.03
Devel::FindGlobals is a Perl module to find global variables and their size. SYNOPSIS use Devel::FindGlobals; print print_globals_sizes(); This module just runs around and over the symbol table, finds global variables, gets their sizes with...
3.07 KB  
Business  -  TecUtils 0.3.0
tecutils provides various utilities to accelerate development of programs design to use MySQL as a database and substitute the use of global variables.
20.48 KB  
Communication  -  entropy, joint entropy and conditional entropy function for n variables 1.0
for entropyH = entropy(S)this command will evaluate the entropy of S, S should be row matrixH = entropy([X;Y;Z])this command will find the joint entropy for the 3 variablesH = entropy([X,Y],[Z,W])this will find H(X,Y/Z,W).. you can use it for any...
10 KB  
HTML Utilities  -  django-globals 0.1.0
django-globals is a Django plugin that allow to define a thread specific global variables.
10.24 KB  
Libraries  -  Slay::Makefile 0.01
Slay::Makefile is a wrapper to Slay::Maker that reads the rules from a file. SYNOPSIS Slay::Maker is a make engine that uses perl declaration syntax for rules, including regular expressions for targets and anonymous subs for targets,...
13.31 KB  
Bug Trackers  -  Cspot 0.0.5
Cspot is a semantic annotator designed only for the C programming language. It is quite similar to cscope, but some more functionality. Cspot project can be used to find the declarations, definitions, and usages of functions, variables, macros,...
266.24 KB  
Programming  -  JNAerator 0.9.7
JNAerator (pronounce ???*?generator???*a*?) simply parses C / C++ & Objective-C headers and generates the corresponding BridJ, JNA and Rococoa Java interfaces. Features(see Roadmap for planned features) * Parses C, C++,...
5.62 MB  
Programming  -  Nasal 1.0
Nasal is a language that I wrote for use in a personal project. Ostensibly it was because I was frustrated with the dearth of small-but-complete embeddable scripting languages, but of course I really wrote it because it was fun. It is still...
102.4 KB  
NEW DOWNLOADS IN LINUX SOFTWARE, PROGRAMMING
Linux Software  -  EasyEDA PCB Designer for Linux 2.0.0
EasyEDA, a great web based EDA(Electronics Design Automation) tool, online PCB tool, online PCB software for electronics engineers, educators, students, makers and enthusiasts. Theres no need to install any software. Just open EasyEDA in any...
34.4 MB  
Linux Software  -  wpCache® WordPress HTTP Cache 1.9
wpCache® is a high-performance, distributed object, caching system application, generic in nature, but intended for use in speeding up dynamic web applications, by decreasing database load time. wpCache® decreases dramatically the page...
3.51 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  
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  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB