A general purpose, object-oriented script language that compiles into byte-code for a register based virtual machine. The language is quite similar to JavaScript, Java, C and C++ and is thus easy to learn / use.
Be the first to post a text review of JILRuntime/JewelScript. Rate and review a project by clicking thumbs up or thumbs down in the right column.
Updated project for use with JILRuntime / JewelScript v0.9.2.4.
2007-09-27 jewe Adapted projects to compiler API changes (merge of compiler API and runtime) Change to Compiler API: Compiler is now automatically constructed when calling JILInitialize() and terminated when calling JILTerminate() to simplify the API and reduce the risk of wrong usage. 2007-09-26 jewe Adding doxygen files to CVS, just so they arent lost 2007-09-25 jewe Added functions to dynamically add constant declarations to your class declaration when importing a native type: NTLDeclareConstantInt(), NTLDeclareVerbatim(), etc Rebranded JILVector. Raider is now Twix, and JILVector is now JILUnknown (without the *) Updated doxygen documentation and fixed a few type inconsistencies (using int instead of JILLong etc) Added possibility to define global class constants! This is especially useful in native types; 2007-09-24 jewe Fixed bug in string::trim() function 2007-09-23 jewe Added macros BEGIN_JILEXTERN / END_JILEXTERN so that it is possible to use the JILString and JILArray objects from C++ 2007-09-22 jewe Fixed serious bug in JILTermVM: not using correct handle indexes when releasing data handles. Restored lost changes to compiler API: removing JCLCompileAndRun(), renaming JCLCompileAndRunEx() to JCLCompileAndRun(), adding 'arguments' parameter to JCLAddAnonFunction() 2007-09-20 jewe Optimized performance of set and copy instructions with int and float 2007-09-19 jewe Added JILString_AppendCStr() 2007-09-17 jewe Added new native type message NTL_GetPackageString, allowing to import other classes before the native type class declaration is compiled Passing pointer to VM to NTLRegister and NTLUnregister messages to allow native types to register other native types when they are registered. 2007-09-16 jewe Added new API functions NTLLoadResource() and NTLFreeResource() Changed file read mode of default file input callback to binary Added new API function to set a callback to handle file input 2007-09-13 jewe Changed error message text to make it more clear Fixed bug: It was possible to define methods without declaring them inside the class declaration statement; re-added possibility to "up- cast" an array element to a distinctive type, for example arr[9].string::length 2007-09-12 jewe New operator sameref(), which compares the references of two expressions and returns true if they refer to the same object (handle) Added optimization for the case where a value is FIRST copied to a temp register, then moved from that temp register to a destination. 2007-09-10 jewe Fixed serious bug (leading to memory overwrite) JCLLink() continuing to link other functions if an error occurred, but no code is written to the VM for the function that produced the error. Fixed bug in compiler: Flag kClearFirst not specified in ToString() 2007-09-08 jewe Fixed bug in Optimization: opcode size not updated when replacing code in function OptimizeCombinePushPop() Added function to verify instruction tables 2007-09-07 jewe Bugfix in JCLCompile(): Using NULL for pName could cause crash Added new API function JCLLoadAndCompile() Fixed compiler new / delete counting bug Using same method of loading script code in p_import() than used in JCLLoadAndCompile() 2007-09-02 jewe Changed the way the list handles the 'set' instruction; the list is now assigned a deep copy of the source; it is no longer filled with references to the source lists elements Removed obsolete keyword 'long' Fixed bug when inheriting from interface: constructor name change was not correctly propagated to runtime's function segment Added compiler default constants class iterator: Fixed 'deleted' flag not copied when object is copied; removed wrong / unnecessary checks to the deleted flag Clearer error messages Changed how the array handles the 'set' instruction; the array object is now assigned a deep copy of the source, it is no longer filled with references to the sources elements Added intToVersion() function to string class 2007-05-02 jewe Renamed NTLSetArgLong() Fixed bug: Struct member not initialized in JILTable_Copy() Fixed operator + and += not working correctly on arrays (must check miElemRef now) Fixed bug introduced with "x + 1 / x - 1" expression optimization; 2007-03-29 jewe Fixed crash if passing null pointer to "safe" low level string functions 2007-02-25 jewe Updated doxygen documentation 2007-02-24 jewe Removed old JILGetFunctionByAddr(), moved JILFindFunctionFromAddr() from "jilcodelist" to "jilprogramming" and renamed it to JILGetFunctionByAddr() 2007-02-23 jewe Compiler: Fixed missing break statement in switch Fixed - cg_finish_intro() did not call JILCreateFunction() Fixed - JILGetFunctionByAddr() now works with the __init function Declared functions in "jilprogramming.h" JILEXTERN Fixed JILFindFunctionFromAddr() from "jilcodelist.h" not always working, added function size member to JILFunctionInfo to fix this; 2007-02-22 jewe Added optimization: In case of an expression "x - 1", "x - 2", "x + 1" or "x + 2", the compiler will use an "inc" or "dec" instruction, which is faster than a "moveh" and a "sub" / "add" instruction. Removed more references to unsafe strcpy, strncpy and sprintf functions. 2007-02-21 jewe Removed old 'alloca' instruction and renamed new 'allocam' instruction to 'alloca'. the new instruction is now always used to instantiate an array; "Up-cast" of an array element from typeless to a type has been addressed and should work again Additionally, up-cast of an element of a type-safe array to 'array' is tolerated to allow to access array members in multi-dimensional arrays (for example: myArray[0].array::length to get the size of a sub-array in a 2-dimensional array) 2007-02-20 jewe - Fixed a lot of issues caused by the latest code changes - Removed complete symbol table usage and JCLSym.h / c - Adapted and tested all scripts Again, vast amount of changes: - first early version of TYPE SAFE ARRAYS (yipee!) - operator new array can now construct multidimensional arrays, in the case of long, float and string arrays, the operator will even initialize all array elements with an instance - compiler cleanup: removed the "class index" and using the typeID directly to refer to classes All these changes have a large impact on the code base and the overall stability. There certainly are still a lot of bugs that can even lead to crashes or fatal compiler errors. 2007-02-19 jewe Bug-fix: access to 'this' itself did not compile, e.g. "foo& f = this;" Vastly improved expression parsing. Especially support of operator "." and "[]" after *ANY* value of appropriate type, even literals, works now. This is the first draft version and it can (most likely will) still have some bugs. 2007-02-17 jewe Vast amount of security changes (preventing buffer overruns); Cleaned up stdlib native type, moved functionality belonging to the array or string native types to "jilarray.c" and "jilstring.c", respectively. Fixed string not fully copied in symbol table and native type list Fixed calling wrong function for string::format (well, it was late...) 2007-02-16 jewe class table: Added Get and Set specialized for int keys Renamed NTLGetArgLong and NTLReturnLong 2007-02-15 jewe Fixed a few doxygen issues. Starting v0.9: Renamed type 'long' to 'int', however 'long' can still be used for the sake of compatibility -- for now! Renamed ALL classes and methods following a consistent naming scheme: - Every identifier name starts with a small letter - If an identifier name is composed out of multiple words, the first letter of each word (except the first one) is capitalized: theExampleIdentifier - If an identifier contains an abbreviation, e.g. "URL", it is treated as a word, meaning only the first letter is capitalized: getUrlString This naming scheme is now applied to all native types built into the JILRuntime library and all native types that come with the JILRunOnly project. Updated documentation Adding a new built-in type: table, which is a hash table class and supports the methods get() and set().
I have uploaded the next major version of the JewelScript scripting runtime. The library has been tested for several weeks and seems stable. NOTE however, that this release again contains a vast amount of changes and upgrading from earlier versions of the library will not be easy. Brief changes overview: 1) New language features - Type-safe arrays - Multi-dimensional array instantiation with operator new - Simpler access to multi-dimensional array elements - Built-in compiler constants - Operator sameref() - Global class member constants 2) New runtime features - Class table - New API functions JCLLoadAndCompile() JILSetFileInputProc() NTLLoadResource() NTLFreeResource() - Vastly improved byte-code debugging 3) Compiler / language changes - Compiler API changes JCLInitialize() / JCLTerminate() / JCLState* obsolete JCLCompileAndRun() replaced JCLAddAnonFunction() improved - Type 'int' replaces type 'long' - Vastly improved expression parsing - More code optimizations - Compiler bug fixes 4) Runtime changes - New naming scheme for built-in classes and functions - Security / stability changes - Array re-assignment behavior changed - List re-assignment behavior changed 5) Native type interface changes - New native type API functions / messages NTLTypeNameToTypeID() NTLLoadResource() NTLFreeResource() NTL_Register / NTL_Unregister now allow "packaging" NTL_GetPackageString - Native type dynamic class declaration For more detailed information, please refer to the "jewelscript_0.9_changes.pdf" document publish on the website.
JewelScript is a general purpose, object-oriented script language that compiles into code for a register based virtual machine. The source code is available for free under the zlib/libpng license. This is a serive release that fixes a compiler problem that prevented an array initializer expression to be converted directly into a string: string s = (string) { 10, 20, 30 };
Be the first person to add a text review.
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use
Thanks for your rating!
Would you also like to write a review?