Motorola Development Community

Member Login

Quick Search



Development Hacking, development, scripts etc


Reply
  #1  
Old 07-24-2008
redice's Avatar
MotoFans NWBE
 
Join Date: Jan 2008
Posts: 12
Thanks: 4
Thanked 4 Times in 2 Posts
Send a message via ICQ to redice Send a message via AIM to redice
Default Success port SpiderMonkey (JavaScript engine) for A1200

Success port SpiderMonkey (JavaScript c engine) shell for A1200.

SpiderMonkey is Gecko's JavaScript engine written in C. It is used in various Mozilla products, including Firefox, and is available under MPL/GPL/LGPL tri-license.

see SpiderMonkey - MDC

Execute the shell (Konsole or telnet to phone):
# ./js
js> help()
JavaScript-C 1.7.0 2007-10-03
Command Usage Description
======= ===== ===========
version version([number]) Get or set JavaScript version number
options options([option ...]) Get or toggle JavaScript options
load load(['foo.js' ...]) Load files named by string arguments
readline readline() Read a single line from stdin
print print([exp ...]) Evaluate and print expressions
help help([name ...]) Display usage and help messages
quit quit() Quit the shell
gc gc() Run the garbage collector
trap trap([fun, [pc,]] exp) Trap bytecode execution
untrap untrap(fun[, pc]) Remove a trap
line2pc line2pc([fun,] line) Map line number to PC
pc2line pc2line(fun[, pc]) Map PC to line number
stringsAreUtf8 stringsAreUTF8() Check if strings are UTF-8 encoded
testUtf8 testUTF8(mode) Perform UTF-8 tests (modes are 1 to 4)
throwError throwError() Throw an error from JS_ReportError
dis dis([fun]) Disassemble functions into bytecodes
dissrc dissrc([fun]) Disassemble functions with source lines
notes notes([fun]) Show source notes for functions
tracing tracing([toggle]) Turn tracing on or off
stats stats([string ...]) Dump 'arena', 'atom', 'global' stats
build build() Show build date and time
clear clear([obj]) Clear properties of object
intern intern(str) Internalize str in the atom table
clone clone(fun[, scope]) Clone function object
seal seal(obj[, deep]) Seal object, or object graph if deep
getpda getpda(obj) Get the property descriptors for obj
getslx getslx(obj) Get script line extent
toint32 toint32(n) Testing hook for JS_ValueToInt32
evalcx evalcx(s[, o]) Evaluate s in optional sandbox object o
if (s == '' && !o) return new o with eager standard classes
if (s == 'lazy' && !o) return new o with lazy standard classes
js>
js> quit()
#


Run a javascript file:

# ./js test.js
...
Attached Files
File Type: zip js.zip (364.1 KB, 83 views)
File Type: zip test.js.zip (255 Bytes, 59 views)
__________________
Embedded linux lover
Reply With Quote
The Following 3 Users Say Thank You to redice For This Useful Post:
amin (08-29-2008), g4m3rz (07-28-2008), liiv (07-26-2008)
  #2  
Old 07-24-2008
BruceLee's Avatar
Moto Fans SENR
 
Join Date: Jan 2008
Location: Romania
Posts: 646
Thanks: 45
Thanked 148 Times in 90 Posts
Default

hope you don't mind.. i'll add this in scribi.. it's an interpreter collection
LINK
Reply With Quote
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Native Games ScummVM 0.11.1 A1200/E6 port Lubomyr A1200/E6 Gameloads 95 07-28-2010 09:33 AM
Native Games OpenTTD a1200/e6 port Lubomyr A1200/E6 Gameloads 25 08-22-2009 06:12 PM
Port Opie to A1200 redhat Development 1 04-14-2009 06:40 PM
can“t make pc engine install in my a1200 omarius A1200 General Chat 1 02-21-2007 06:23 PM
Anyone willing to port GAIM to A1200? estrauss Bounty Projects 2 12-15-2006 04:20 PM

 
Advertisement

Partner Links