Граф коммитов

6183 Коммитов

Автор SHA1 Сообщение Дата
tor%cs.brown.edu bd483bc79f Bug 153586 - Date.toLocaleString() not returning locale string.
r=jst, sr=brendan
2004-06-15 16:38:43 +00:00
igor%mir2.org 9c694e01db Make EvaluatorException(String) public for compatibility 2004-06-15 04:42:59 +00:00
brendan%mozilla.org 4c16bc81bb Give JSObjectOps.setRequiredSlot a JSBool return value so it can propagate errors (part of 245890, r=shaver). 2004-06-12 01:50:09 +00:00
cbiesinger%web.de 8efd04ae2e bug 245673 named literal strings should be const
r+sr=darin
2004-06-11 15:05:29 +00:00
brendan%mozilla.org d39ec979e8 Fix comment glitch pointed out by timeless (243359). 2004-06-11 06:30:14 +00:00
timeless%mozdev.org 37a203855b Bug 238712 nsMemoryImpl::Alloc (0) in XPCConvert::JSArray2Native
r=dbradley sr=brendan
2004-06-11 04:40:00 +00:00
brendan%mozilla.org afcd3248aa Add support for XUL preprocessor line/file coercion (243359, r=bryner). 2004-06-11 00:55:59 +00:00
pschwartau%netscape.com 9e2dcfe43d Updating JS_GetImplementationVersion() to date of latest JS release (67111) 2004-06-09 23:08:07 +00:00
brendan%mozilla.org 3376e7fb87 Back out patch for bug 245890 for now. 2004-06-09 19:39:53 +00:00
igor%mir2.org 7b30a5de99 Fixing regression after previous commit for bug 245882: when used as top scope ImporterTopLevel should not define constructor property not to hide Object.prototype.constructor. 2004-06-09 17:01:01 +00:00
igor%mir2.org a8ca02b455 1. IdFunction.methodId is no longer public as some old Java compilers have troubles with it and accessor method has to be used instead.
2. IdFunction constructor now takes scope argument as well to prevent initialization bugs.
2004-06-09 12:54:04 +00:00
igor%mir2.org 89f5fdbbf7 The last commit made Rhino uncompilable! Fixing that. 2004-06-09 08:25:59 +00:00
igor%mir2.org 7bc79c031f Implementing bug 245882: now ImporterTopLevel can be constructed from JavaScript using JavaImporter to allow to have class and package collections without namespace polluting. 2004-06-09 07:36:31 +00:00
igor%mir2.org 49246d9273 Work on bug 245882: check that scope is not this when setting scope chain
to prevent scope chain loops.
2004-06-08 23:30:30 +00:00
igor%mir2.org bdfcefdff8 Default implemetation of toSource now lives in ScriptRuntime to allow its
reuse in othr objects.
2004-06-08 23:28:32 +00:00
igor%mir2.org e565588063 Yet another change in IdFunction: now its constructor takes arity argument
which removes the need to have separated methodArity in IdFunctionMaster
intertface. The method, however, has to be preseved in IdScriptable since it
is used to find which arity should be used during IdFunction construction.
2004-06-08 22:25:57 +00:00
brendan%mozilla.org 9c20990405 Avoid overparenthesizing function expressions (245795, r=shaver). 2004-06-08 22:15:23 +00:00
brendan%mozilla.org 2fb1c2ba8d Fix bug caused by bug 165201's checkin, where regexp-valued slots in function object clones might dangle after GC (245890, r=shaver). 2004-06-08 21:58:52 +00:00
igor%mir2.org 7be4658c39 Using IdFunction in place of JIFunction in NativeJavaTopPackage 2004-06-08 15:29:34 +00:00
igor%mir2.org 4ab02a8202 Changin IdFunction/IdFunctionMaster iteraction:
1. execMethod and methodArity in IdFunctionMaster do not receive methodId explicitly but rather through the IdFunction instance. To ensure fastest access to method id it is made pubic final field.

2. IdFunction allows to associate an internal tag with itself that allows not to worry about id clashes and simply check for object tag before doing method dispatch.
2004-06-08 14:23:35 +00:00
igor%mir2.org 9409fd1750 JIFunction was wrong idea at the end: it is better to stick with IdFunction and teach it missed functionality. The patch changes JavaAdapter to use IdFunction for its constructor call. 2004-06-08 12:38:20 +00:00
igor%mir2.org 87e6a1e09c API to set global SecurityController is moved to SecurityController not to clatter Context. 2004-06-08 11:09:40 +00:00
igor%mir2.org f3d3d1d14a Work on bug 244492: RhinoException is the new common base class for all exceptions. 2004-06-07 16:40:28 +00:00
igor%mir2.org 78729bc8b9 Switch to using Context.javaToJS instead of Context.toObject 2004-06-07 10:35:22 +00:00
igor%mir2.org 8404a66bdf setGlobalSecurityController should be static 2004-06-07 10:34:22 +00:00
igor%mir2.org a58e08501c Introduction of ContextAction interface as a safe alternative for Context.enter/Context.exit. All usages of Context.enter/Context.exit in Rhino are replaced by
Context.call(new ContextAction() {
	public Object run(Context cx) { ... }
});
or similar alternatives.

It prevents bugs with missed Context.exit and provides room for optimization of Context association with current thread and simplify implementation of safe environment for execution of untrusted applets and scripts.

In addition, Rhino now supports global SecurityController that take precedence over any per/Context controllers so the application can setup the controller once and for all.
2004-06-06 15:33:59 +00:00
igor%mir2.org 08117caf7c ContextFactory is a new API class 2004-06-06 09:28:18 +00:00
brendan%mozilla.org 4a82e223c0 Use a GC root by definition, not result, when calling js_Interpret from js_Execute (245570, r=shaver, sr=jst, a=dbaron). 2004-06-05 01:38:13 +00:00
igor%mir2.org 60c0074729 added ContextFactory which is used to create Context instances in JavaAdapter when there is no Context associated with the current thread. 2004-06-04 17:54:42 +00:00
igor%mir2.org ca73e6aad1 Better JavaDoc comments for FEATURE_ constants 2004-06-04 17:51:27 +00:00
igor%mir2.org 46aea95d99 Allow to disable special treatment of __proto__ and __parent__ via overriding Context.hasFeature(). 2004-06-04 14:57:31 +00:00
igor%mir2.org 29355807c9 Use consistent naming for property manipulation functions in ScriptRuntime and drop no longer used scope argument for ScriptRuntime.setProp that acts on strings. 2004-06-04 06:58:03 +00:00
cbiesinger%web.de c67fd1044d bug 244156 disable PCH when whole program optimization is enabled
patch by Stephen Walker <sdwalker@myrealbox.com> r=bsmedberg
2004-06-03 20:31:47 +00:00
brendan%mozilla.org 77ebb056ef ECMA fix: Date.prototype instanceof Date should be false (245113, r=shaver). 2004-06-02 21:24:17 +00:00
brendan%mozilla.org 8423c683b6 Fix [null].toSource() to produce [null], not [] (245148, r=shaver). 2004-06-02 21:10:00 +00:00
igor%mir2.org 5a88756821 Code to create references to manipulate with __proto__ and __parent__ is moved to ScriptRuntime.specialReference not to expose too much implementation details 2004-06-02 14:56:25 +00:00
igor%mir2.org a5438d7003 Changing Refrence.set(Object) to return Object to return the real stored value. 2004-06-02 11:33:09 +00:00
igor%mir2.org 4db86ff03e Pass __proto__ and __parent__ special properties to code generation as strings to allow to support application-specific special properties without altering code generation. 2004-06-02 09:13:12 +00:00
igor%mir2.org 2c7e977b7e Allow Rhino embeddings to support function as left-hand-side extension via overriding BaseFunction.specialCall(). 2004-06-01 16:04:18 +00:00
igor%mir2.org ef83ead18b Making invalid left hand of assignment runtime reference error instead of syntax error as dictated by ECMAScript. Now interpreter/class compiler generates code that calls ScriptRuntime.genericReference() that in turn throws the error. 2004-05-31 15:49:19 +00:00
igor%mir2.org 2361dfc4fe Work on bug 243057:
Introduction of support for calling function in reference context so with native functions code like f(args) = something or x.y(args)++ would be allowed.

The changes added necessary changes to parser and code generation but at runtime currently any such usage would throw an exception.
2004-05-31 14:51:20 +00:00
igor%mir2.org a3039484fe For prefix and postfix ++/-- use mask flags instead of enumeration to denote postfix/prefix and ++/-- operation. 2004-05-31 13:03:16 +00:00
igor%mir2.org 991ba5a998 Optimize ++name and --name similarly to name++ and name-- via special runtime support 2004-05-31 12:09:39 +00:00
igor%mir2.org dbadb64388 Optimizing ++x.y and --x.y in the same way as x.y++ and x.y-- via special runtime support 2004-05-31 08:18:38 +00:00
igor%mir2.org 047a15067a Introduction of generic Reference class to support latter constructions like f(args) = y and f(args)++. For now it is used to implement __proto__ and __parent__ special properties so x.__proto__++ now works 2004-05-31 07:18:52 +00:00
igor%mir2.org 067167b599 ++x[y] is optimized in the same way as x[y]++ via special runtime support 2004-05-30 15:54:21 +00:00
igor%mir2.org b79f99d123 Using negative nimbers for interpreter-specific tokens to allow for 256 bytecodes without using 0xFF & conversion 2004-05-30 14:21:07 +00:00
igor%mir2.org 0b398922b2 Added JavaDocs for Kit.initCauseOrIgnore 2004-05-29 09:37:48 +00:00
igor%mir2.org bf11211950 Make code to call Throwable.initCause via reflection previously located in WrappedException publically available in Kit.java 2004-05-29 08:55:41 +00:00
igor%mir2.org 13742bf7e3 Follow conventinal code practics of throwing IllegalArgumentException, IllegalStateException directly instead of using additional helper methods for it. 2004-05-29 08:54:24 +00:00
igor%mir2.org b32204397b Patch from Merten Schumman <Merten.Schumman@asg.com> to add Main.mainEmbedded(String) which is a version of Main.main without System.in/err/out redirection. It simplifies life for embeddings. 2004-05-28 14:19:11 +00:00
igor%mir2.org 745d21a64a Final implementation of GUI/debug implementation internals separation. Now the newly introduced Dim.java (Dim: Debug IMplementation) depends only on GuiCallback and contains all iteractions with Rhino. 2004-05-27 11:26:59 +00:00
igor%mir2.org 376d1c704f exitAction is moved to DebugGui 2004-05-27 10:34:44 +00:00
igor%mir2.org a33c5804bd Prepare to remove dependancy of core debugger implementation on GUI: introduction of GuiCallback interface that DebugGui implements. 2004-05-27 10:21:24 +00:00
igor%mir2.org 8ebd78d480 Work on 244492: JavaScriptException extends RuntimeException 2004-05-26 11:54:10 +00:00
igor%mir2.org 2859645f27 Make sure that Context.getSourcePositionFromStack never returns negative numbers and uses 0 to indicate absence of line information. It accounts for differences between JVMs when dealing with incomplete debug information. 2004-05-26 11:03:03 +00:00
igor%mir2.org d5073b98f0 In JavaScriptException constructor do not call ScriptableObjec.toString(value) since it may potentially trigger script execution for objects defining toString method which in turn may throw exceptions.
Instead for Scriptable arguments prints their [Object className] form which is provided by the new ScriptRuntime.defaultObjectToString(Scriptable) method.
2004-05-25 15:39:28 +00:00
igor%mir2.org 5951c62a93 Added JavaDoc link to a better way of wrapping exceptions then using WrappedException constructor 2004-05-24 10:11:23 +00:00
igor%mir2.org 1b43332683 Restoring public constructor for WrappedException for compatibility with Batik. 2004-05-24 07:53:06 +00:00
igor%mir2.org 34ab13be2a Change Arguments.getIds to include argument indexes when getAll is true. It allows not to have a tailored getIds in the debugger. 2004-05-23 17:34:44 +00:00
igor%mir2.org 6e88856ae7 Fixing JavaDoc comments 2004-05-23 17:32:32 +00:00
igor%mir2.org 72e2855e0d 1. Reorganize debugger to move all code that interacts with the engine into Main.java while all GUI logic now presents in DebugGui
2. Move downloaded files for swing tree table into downloaded directory and adjust build files accordingly.
2004-05-23 16:15:09 +00:00
igor%mir2.org 52e39ba59a Make sure that for Rhino-generated exceptions Throwable.getMessage() contains script file and line information. 2004-05-23 14:32:07 +00:00
igor%mir2.org 35bdebcd32 Make EcmaError to follow the same pattern as JavaScriptException
and EvaluatorException for getMessage() methods: it provides error message
with script source/line information.
2004-05-23 09:50:20 +00:00
igor%mir2.org df54b03026 Switch to line info extraction through single top script processing 2004-05-22 23:19:56 +00:00
igor%mir2.org 7d46eb7a55 Splitting Main.java into Main.java and GUI-related DebugGui.java 2004-05-21 15:06:36 +00:00
igor%mir2.org 5655ee2688 Split Main class into Main and DebugGui to have better debugger/gui separation 2004-05-21 14:25:21 +00:00
igor%mir2.org 7515cd34c9 Move all logic to open source window at the end of compilation to single update action. 2004-05-21 12:04:47 +00:00
igor%mir2.org 3ed08b1008 1. Fixing reporting for calls to undefined: stringReg is not suitable for function names if function contains arguments. So Token.NEW/Token.CALL comes with index of potential function name.
2. If debug information is not generated, Context.interpreterLineIndex could contain garbage from previous function invocation leading to ArrayIndexOfBound. Now Context.interpreterLineIndex is initialized at the interpreter entrance and getSourcePositionFromStack checks against absent line numbers.
2004-05-21 11:43:38 +00:00
igor%mir2.org f368c16d77 Move logic to show exception dialog into EnterInterrupt action 2004-05-21 11:27:59 +00:00
igor%mir2.org d88a5e1d65 Test file 2004-05-21 10:53:19 +00:00
igor%mir2.org 1cffb3a028 I changed StackFrame.onLineChange to access breakFlag directly which allowed to remove global context hashtable 2004-05-21 01:20:48 +00:00
igor%mir2.org 2e4ae80a06 Merge various GUI initializations during breakpoint hit into single action 2004-05-21 01:10:04 +00:00
igor%mir2.org 8ae85161c4 Removal of manThread: breakFlag can do its job just fine 2004-05-21 00:17:45 +00:00
igor%mir2.org fbaa640d80 Replace Context switching during eval for interrupted threads by thread communication so all evals happens on the original thread. 2004-05-21 00:11:24 +00:00
brendan%mozilla.org 22e1909c71 Fix PushBackTrackState so it doesn't assume double backtrack stack size suffices to hold the new result (243174, r=shaver). 2004-05-19 02:15:26 +00:00
igor%mir2.org 05210d03cd To make variable access faster the form of getvar/setvar with var index
encoded in bytecode is reintroduced.
2004-05-18 22:33:41 +00:00
brendan%mozilla.org 6e0a15694f Report error on extra quantifier after term (197451, r=shaver). 2004-05-18 20:53:02 +00:00
igor%mir2.org 8bc0a7f9ea Added more fast index load instructions and removed 0xFF & when extracting bytecode as all byte codes are less then 128. 2004-05-18 15:02:26 +00:00
igor%mir2.org 738378172f In the interpreter loop comparision operations are represented by separated optimized do_cmp. 2004-05-18 12:19:25 +00:00
igor%mir2.org 9fd2427028 To make loading of strings into string register faster I added Icode_REG_STR_C[01023] that directly loads the string at the given index. 2004-05-18 11:19:30 +00:00
timeless%mozdev.org 7b5970dc1f Bug 243621 Standardize QueryInterface without throw
r=neil sr=darin
2004-05-17 23:38:25 +00:00
brendan%mozilla.org efd36dca8b Fix IDENTIFIER resolution to use in, not hasOwnProperty, since we are metacircular on __proto__. 2004-05-17 23:10:53 +00:00
igor%mir2.org 86c9c1fc8c Removal of 32K restriction on the length of the maximum jump offset.
Now interpreter uses UintMap to store jump targets spanning more then 32K
of bytecode.
2004-05-17 21:36:47 +00:00
igor%mir2.org e2a31f83bc Reorganization in jumping code to make the following patch to drop 32K
jump length restriction smaller
2004-05-17 19:19:18 +00:00
igor%mir2.org e89f165b2a Remove 256 limit on number of variable using index prefix for all variable
operations. To offset small performance loss for variable access new
index prefixes operation REG_IND_C[0123] are added to load 0,1,2,3 as index
value with one bytecode.
2004-05-17 17:57:43 +00:00
igor%mir2.org b566c7d2db For GETPROP/SETPROP use explicit name prefix to load property name instead
of pusshing property to stack
2004-05-17 17:29:12 +00:00
igor%mir2.org 41c7c76181 Remove 256 limit on number of local slots using REG_IND* prefixes to load the
slot index
2004-05-17 16:27:39 +00:00
brendan%mozilla.org c96a9fbdf6 Back out compileFile, don't need it given i/o + Script. 2004-05-17 16:21:51 +00:00
igor%mir2.org 2f55f98a05 Splitting name_and_this bytecode into name_fast_this and name_slow_this to
avoid flag reading during simple function calls
2004-05-17 15:58:48 +00:00
igor%mir2.org 95e0a08f17 Use the same of specal index prefix byte code for [] and {} literals 2004-05-17 14:55:45 +00:00
igor%mir2.org 322032e9bd Elimination of 64K restriction limit for various index-based opcodes. Now
they are prefixed with special Icode_REG_IND* that load the index of proper
size.
2004-05-17 14:34:29 +00:00
igor%mir2.org 4af6590fd5 Removal of 64K limit of total number of strings per script/function: now
string operands are preloaded with special LOAD_STR opcodes that handles full
int indexes
2004-05-17 13:07:49 +00:00
igor%mir2.org 5f6be5d271 In the interpreter loop avoid code duplication for calling instruction
observer after each jump: now all tsuch code blocks are merged into generic
code that follows the interpreter switch
2004-05-17 11:44:42 +00:00
igor%mir2.org 43cae3f598 Another small modifications to Interpreter to make the following patches
smaller: replacing all brek in the main switch of the interpreter with
"continue Loop"
2004-05-16 21:01:00 +00:00
igor%mir2.org 849ab4f57e In the interpreter loop increment pc immediately after icode read to avoid
ever adding +1 in post byte codes with arguments
2004-05-16 14:02:26 +00:00
igor%mir2.org 3414a5d0bf Inside the interpreter loop merger many almost identical icode
implementations into common block that use additional ifs to distinguish
between icode. It allows to shrink the ever growing Interpreter.interpret()
2004-05-16 13:30:53 +00:00
igor%mir2.org 056ad2e0d8 New implementation of ARRAYLIT and OBJECTLIT that does not requires stack
space to hold all literals values before they are copied to a temporary array
to pass to ScriptRuntime functions. The new code populates array during values
calculations.
2004-05-15 17:28:22 +00:00
igor%mir2.org aa3b4192c7 Quote property names in object literals produced by toSource() if they
coincide with reserved keywords.
2004-05-15 17:23:06 +00:00
igor%mir2.org 61f8b426d6 Use special parse nodes for array and object literals to generate more compact
bytecode both for interpreter and compiler to have faster [] and {} literals.
It also fixes the bug of accessing local variables Array/Object for the
literals instead of top-scope objects.
2004-05-14 22:47:44 +00:00
brendan%mozilla.org dcf3e0d32b Check in workaround for VC7.net bug (242518, r=self). 2004-05-14 17:16:00 +00:00
brendan%mozilla.org c8e9fb3e91 Fix empty trailing alternative code to handle unterminated parens around the alternation (243389, r/sr=igor/shaver). 2004-05-14 04:06:28 +00:00
brendan%mozilla.org 81b340cc56 My version of igor@fastmail.fm's fix to check backref overflow (bug 230216, r/sr=igor/shaver). 2004-05-14 00:10:29 +00:00
jst%mozilla.jstenback.com d04e544a80 Fixing more of bug 243484. Eliminate extra string copy when XPConnect converts from UTF-8 strings to JS strings. r+sr=darin@meer.net 2004-05-13 21:54:11 +00:00
timeless%mozdev.org f4eb07a19f Fixing code for CAUTIOUS_SCRIPTHOOK (not part of the build), broken by changes for
Bug 208030 JS errors report incorrect line numbers in the source code
2004-05-13 06:04:09 +00:00
igor%mir2.org de3ba2521a Use code similar to optimizer when generating call sequences to avoid tree mutations during code generation 2004-05-12 22:39:40 +00:00
igor%mir2.org 3afab15941 1. Fixing bug of forgotten updates to itsWithNesting
2. Optimization for calls like name() which similar to the optimizer code
2004-05-12 20:03:23 +00:00
igor%mir2.org e175972a27 New function ScriptRuntime.notFoundError to throw error on missed properties
instead of scattered duplicated code
2004-05-12 19:59:57 +00:00
igor%mir2.org 46cd4fd5b5 Removal of Token.GETBASE, Token.GETTHIS, Token.PARENT, Token.NEWTEMP, Token.USETEMP, Node.TEMP_PROP, Node.FIXUPS_PROP, Node.USES_PROP constants which are no longer used after the last changes 2004-05-12 15:00:41 +00:00
igor%mir2.org 05139b4bdc Instead of transforming parser tree to apply special treatment for call nodes, do that only during code generation . 2004-05-12 13:02:40 +00:00
igor%mir2.org 97e2293d87 Refactoring Codegen.visitCall: preprae for the following switch to generate call without transformer modifications 2004-05-12 10:34:46 +00:00
brendan%mozilla.org 52117a0765 Make dynamically defined getters and setters enumerable (per afri posting to m.jseng; consistent with original getter=/setter= support in jsinterp.c). 2004-05-12 00:44:23 +00:00
igor%mir2.org 36506b6d8f Improve error messages for the optimizer when accessing undefined values 2004-05-11 10:06:51 +00:00
brendan%mozilla.org 5208e259ab Add compileFile function to help bz's plan for tinderbox-driven JS syntax checking. 2004-05-11 02:13:47 +00:00
brendan%mozilla.org f8dee927c3 Pick up fix for NSPR bug 162786. 2004-05-11 01:45:20 +00:00
igor%mir2.org 48a87534dc Cleanup of hasVarsInRegs 2004-05-10 16:45:02 +00:00
igor%mir2.org 68438dbe11 Apply direct call optimization only for functions that do not need activation. 2004-05-10 15:28:32 +00:00
igor%mir2.org 7b2dbf7fe4 Determine functions that require activation during parsing and not in NodeTransformer 2004-05-10 13:39:14 +00:00
igor%mir2.org 7f4cc16750 Removal of checks for unitialized lVal.getJRegister(): the registers are always initialized in prelude. 2004-05-10 05:24:29 +00:00
igor%mir2.org 7d090a52e4 Removal of JavaVariable interface in favor of simple method in ClassFileWriter. It allowed to shrink OptLocalVariable and made other code simpler. 2004-05-09 22:09:03 +00:00
igor%mir2.org a6a43f6660 Clenup the usage of getJRegister/assignJRegister 2004-05-09 21:07:08 +00:00
igor%mir2.org f68eda4ed6 Move all logic regarding establishing type of variable into Block.java 2004-05-09 21:06:20 +00:00
igor%mir2.org 834c918c5b Removal of no longer used LASTUSE property and corresponding optimizer code 2004-05-09 12:38:45 +00:00
igor%mir2.org fcf8a09a72 Remove code for CSE optimisation: it was used only to merger this.property calls but this optimisation changes program semantic if property is controlled by native getter. 2004-05-09 10:14:01 +00:00
igor%mir2.org c8f630ac9c OptLocalVariable cleanup: under optimization GETVAR/SETVAR nodes always has a reference to them 2004-05-08 22:24:02 +00:00
igor%mir2.org 1969c19d54 Remove markLiveAcrossCall functionality that was never used for any optimizations 2004-05-08 21:05:00 +00:00
igor%mir2.org 2bf943fd1f Merge addToken/addString into single addString 2004-05-08 19:21:37 +00:00
igor%mir2.org c8c34c5baa Optimization of ++/-- and merge separated postIncrement/postDecrement to single postIncrDecr to remove too much code duplication 2004-05-07 15:05:11 +00:00
igor%mir2.org 73e79d7653 FatBlock is moved to Block as a private class 2004-05-07 15:03:39 +00:00
igor%mir2.org 605d32ffea Added addPush(boolean) 2004-05-07 15:00:17 +00:00
brendan%mozilla.org 0b7cee1356 Add JS_DefineUCFunction (rs=jst). 2004-05-07 03:21:30 +00:00
timeless%mozdev.org 79be43deb8 Bug 224650 nsXPCOM.h included twice
patch by d_king@xtra.co.nz r=edburns sr=brendan
2004-04-30 16:46:33 +00:00
brendan%mozilla.org c2a43dd064 Reload onbranch after possible native function calls (241050, r=shaver). 2004-04-30 02:43:50 +00:00
brendan%mozilla.org 9d3150f208 Typo in comment fixed. 2004-04-29 21:54:20 +00:00
BradleyJunk%cinci.rr.com 59a5ac1c48 Bug 223536 - Exposing XPConnect jsval <-> nsIVariant to conversion functionality. r=dbradley, sr=jst 2004-04-24 10:26:27 +00:00
cbiesinger%web.de 40806135bf bug 241329, allow compiling spidermonkey with openwatcom
r=brendan
2004-04-23 19:07:40 +00:00
brendan%mozilla.org 4f32d680a7 Forgot to serialize/deserialize JSRegExp.cloneIndex, and rev XUL FastLoad file version (240404, r+sr=shaver). 2004-04-22 16:00:48 +00:00
igor%mir2.org bb8d328be9 Extend optimization ==, !=, ===, !== against null to check null presence on any side of the test. 2004-04-21 12:00:27 +00:00
brendan%mozilla.org 53be0fb09c Sigh, go back to requiring a native object for the global object in FindConstructor, to unbreak lazy class init. 2004-04-20 18:02:49 +00:00
igor%mir2.org 388341c850 Fix max stack calculations in dcpLoadAsObject/dcpLoadAsNunber and optimize visitIfJumpRelOp to take advantage of the fact that left and right numerical operands force numeric context. 2004-04-20 13:00:08 +00:00
brendan%mozilla.org ecaa3142d5 Fix intN vs. jsword leftover confusion in context-thread API. 2004-04-20 02:21:27 +00:00
BradleyJunk%cinci.rr.com 12f367678e Ok, I'm going to try this again, patch confused me. This should now be properly backed out 2004-04-19 20:23:29 +00:00
BradleyJunk%cinci.rr.com 41d61aee14 Bah, I checked in the wrong patch, sorry, backing out 2004-04-19 20:11:36 +00:00
BradleyJunk%cinci.rr.com a093a5222d Bug 223536 - Exposing XPConnect jsval <-> nsIVariant to conversion functionality
r=dbradley, sr=jst
2004-04-19 20:05:39 +00:00
gerv%gerv.net c40f4f93a2 Bug 236613: change to MPL/LGPL/GPL tri-license. 2004-04-18 22:01:16 +00:00
igor%mir2.org b4bb88c434 Reuse code to generate optimized if jumps for boolean operations that return Boolean instance 2004-04-18 20:29:41 +00:00
igor%mir2.org 86dc2db1c0 Cleanups:
1. Added addObjectToDouble() to replace explicit code generation for object to double convertion.
2. nodeIsDirectCallParameter returns dcp register to avoid double look up of OptVariable
2004-04-18 16:29:12 +00:00
igor%mir2.org fafc53aace Layout cosmetics 2004-04-18 16:26:32 +00:00
igor%mir2.org 09018e0533 Trust JVM to implement "<=" and "<" according to JVM specs and replace code like
d1 == d1 && d2 == d2 && d1 < d2
with simple
    d1 < d2

That in turn allows to simplify code generation and remove OptRuntime.cmp_ functions.
2004-04-18 14:53:34 +00:00
igor%mir2.org 719bb92768 Trust JVM to implement "<=" and "<" according to JVM specs and replace code like
d1 == d1 && d2 == d2 && d1 < d2
with simple
    d1 < d2
2004-04-18 14:52:22 +00:00
igor%mir2.org 2e97a7df33 Remove commented out code to treat integer specially: it is not applicable any longer in any case. 2004-04-18 14:49:50 +00:00
igor%mir2.org d79eb6342f Work on bug 238649: no more support for ClassNameHelper and friends 2004-04-18 12:15:07 +00:00
igor%mir2.org aee55ce695 Worj on bug 238649: removal of NotAFunctionException 2004-04-18 09:30:30 +00:00
bryner%brianryner.com 4f8b5bf9d4 deCOMtaminate nsIScriptObjectPrincipal (bug 240745). This also fixes some code in nsCrypto.cpp that sems to have been mis-braced (I don't think it was working as intended). r+sr=jst. 2004-04-18 00:28:47 +00:00
igor%mir2.org 3c290b16dd 1. Change cmp_* functions to return boolean, not int, to simplify code.
2. Move optimizer-only functions from ScriptRuntime.java to optimizer/OptRuntime.java
3. Add ScriptRuntime.wrapBoolean to wrap boolean value and use it in the optimizer
2004-04-16 07:38:20 +00:00
timeless%mozdev.org b2ea8efcd1 Fixing build and nspr links 2004-04-15 21:36:33 +00:00
brendan%mozilla.org ab01252a97 More cloned function object fixing: don't convert a jsval to a JSFunction, then back up via fun->object -- that leads to the clone-parent, when the value may be the clone we want (240577, r=shaver). 2004-04-15 21:01:24 +00:00
timeless%mozdev.org 193d430cd1 Bug 240500 JS_DefineFunctions APIDoc for return is wrong
r=brendan
2004-04-15 16:20:34 +00:00
brendan%mozilla.org 4a5cf84f5a Fix old watchpoint function vs. clone bug (240577) and undo bogus strict warning from lazy class init (240404 in part). 2004-04-15 09:05:46 +00:00
brendan%mozilla.org 1ffe713a4d Hackaround for bug 240404. 2004-04-15 08:11:55 +00:00
igor%mir2.org 0adf35e44c 1. Throw IllegalArgumentException instead of EvaluatorException when argument does not belong to JS runtime types.
2. Optimize eq and shallowEq in ScriptRuntime to share code with optimized versions in Interpreter.
2004-04-14 14:50:24 +00:00
igor%mir2.org 9b208813a2 Layout cosmetics 2004-04-14 14:46:58 +00:00
igor%mir2.org 3b157b025b Support for Date.now() 2004-04-14 11:04:55 +00:00
brendan%mozilla.org 60d357b121 Er, let's try caillon's patch (bug 240458, r=me). 2004-04-14 02:36:37 +00:00
brendan%mozilla.org 33d26d4dbe Fix cosmetic bug pointed out by caillon, passing JS_FALSE rather than 0 to js_DecompileValueGenerator (API change wasn't tracked long ago). 2004-04-14 02:35:34 +00:00
cbiesinger%web.de 2d3ae47264 fixing win32 bustage 2004-04-13 19:54:44 +00:00
brendan%mozilla.org 050e65e574 - Improve global variable performance from 3x slower to 1.2x slower than
locals (169559, r=shaver).
- Also fix longstanding bug where global regexps in precompiled scripts were
  wrongly shared among threads/contexts (165201, r=shaver).
- Also fix strict-aliasing gcc warning causes (206599, r=bryner).
2004-04-13 01:25:17 +00:00
brendan%mozilla.org 3fcd745be6 Fix from Sterling Bates <whoelse.sterlingbates.com> for JS_ValueToInt32. 2004-04-09 23:58:26 +00:00
brendan%mozilla.org c469ee708b Trivial followup fix to 127418 based on m.jseng feedback, r/a=me. 2004-04-09 01:05:56 +00:00
brendan%mozilla.org b604830d48 Oops... 2004-04-07 00:17:44 +00:00
brendan%mozilla.org 3cc36be074 Avoid invading JS namespace with global (239122 followup). 2004-04-07 00:02:50 +00:00
darin%meer.net 61f597aa92 fixes bug 239661 "xpconnect.xpt should be included in dist/gre" r=cls a=chofmann 2004-04-06 04:25:48 +00:00
kyle.yuan%sun.com 1da55256d2 Bug 239122 Liveconnect can be used to read any file on user's filesystem
enabling UniversalBrowserRead only during js calling applet
r=jst, sr=brendan, a=chofmann
2004-04-06 03:15:55 +00:00
timeless%mozdev.org c905473cea Fixing line endings to appease openwatcom's nmake
this is spidermonkey standalone
2004-04-04 19:46:38 +00:00
brendan%mozilla.org 60c94d4f43 Tolerate asymmetric/request-less lock nesting, as happens with Mozilla DOM code (229200, r=shaver, a=chofmann). 2004-04-03 22:21:03 +00:00
brendan%mozilla.org 126f14de93 My edits to timeless's patch for bug 238303, to fix warnings (r/a=me). 2004-04-03 22:11:11 +00:00
pedemont%us.ibm.com fbd12cf233 Bug 237183, Add FP exception handler to OS/2, r=brendan, a=mkaply 2004-03-31 16:38:54 +00:00
igor%mir2.org 31c7e1f54c Fixing bug 58118 : long overdue commit of patch from Mike McCabe, mike+mozilla@meer.net 2004-03-30 12:48:29 +00:00
igor%mir2.org 023446d6c0 Since new x in Java never returns null, the check for null in date_format was redundant. 2004-03-30 10:35:42 +00:00
brendan%mozilla.org 1ae219610b Parallel fix to SpiderMonkey's bug 238945, to automatically insert ; after do-while on any error token. 2004-03-30 03:25:17 +00:00
brendan%mozilla.org 3e24461b4b Do automatic semicolon insertion after do-while loops for any error token, contrary to ECMA-262, to match almost a decade's worth of practice (238945, r=shaver, a=chofmann). 2004-03-30 03:20:03 +00:00
igor%mir2.org 0a8394388f Faster implementation of MonthFromTime and DateFromTime:
1. Use day / 30 as month estimate with the following adjustment via switch()
2. Reuse year from day calculations in IsLeapYear
2004-03-29 15:19:04 +00:00
igor%mir2.org 7c417cd5e9 Fixing bug 239068: proper initialization of parent scope for functions of constructors. 2004-03-29 15:15:34 +00:00
igor%mir2.org 2306ff9f68 DaysInYear is replaced by IsLeapYear since the former was used only to determine if a particular was leap or not 2004-03-29 14:16:23 +00:00
igor%mir2.org f394ba49d0 Cosmetics: layout fixes 2004-03-29 12:30:24 +00:00
igor%mir2.org cd59bcde60 Starting 1.5R5.1 development 2004-03-29 12:29:11 +00:00
brendan%mozilla.org a0a4104364 Fix js_LookupCompileTimeConstant to respect shadowing properties (238881, r=shaver, a=chofmann). 2004-03-29 01:11:24 +00:00
igor%mir2.org 03828224aa Fixing 238823 : throw explicit IllegalArgumentException when JS source for Context.compileFunction does not contain single JS function statement instead of producing silent empty functions or throwing obscure NullPointerExceptions 2004-03-27 09:35:22 +00:00
igor%mir2.org d48d5df72a Better formating 2004-03-26 13:01:17 +00:00
igor%mir2.org 5c2d316845 Fixing bug 238699 : refactoring to expose simpler code generation API caused to select wrong code path when compiling functions 2004-03-26 12:42:00 +00:00
timeless%mozdev.org 66e24de929 Bug 238393 DRefTool analysis for jsd files
r=rginda a=asa
2004-03-26 07:27:05 +00:00
igor%mir2.org e1c579fdb8 Explicit date in Context.getImplementationVersion() for 1.5R5 release 2004-03-25 20:37:32 +00:00
igor%mir2.org 1ac053c5c4 Reflecting 1.5R5 release 2004-03-25 19:45:56 +00:00
igor%mir2.org de1e1ac301 Starting 1.5R6 2004-03-25 17:58:03 +00:00
igor%mir2.org 60759708f4 Removal of macbuild support: its Mac OS X time after all 2004-03-25 17:39:21 +00:00
igor%mir2.org 1174d12c74 Info about commercial support 2004-03-25 15:46:40 +00:00
igor%mir2.org 71ca64f861 *** empty log message *** 2004-03-25 11:04:04 +00:00
timeless%mozdev.org 9a35017588 Bug 238393 DRefTool analysis for jsd files
r=rginda
GC_MARK_DEBUG is not part of the build...
2004-03-24 23:25:30 +00:00
igor%mir2.org e1e41ac43c Preparations for 1.5R5 2004-03-24 15:52:55 +00:00
igor%mir2.org 732c7ab109 Updates to reflect new extension to allow to pass function to Java method expecting interface: now interface with multiple methods are allowed as long as all methods has the same signature 2004-03-24 15:44:19 +00:00
igor%mir2.org 6311b232ca Finalizing 223435 : function can be converted to Java interface with more then one method as long as all methods has the same signature. 2004-03-24 14:15:37 +00:00
brendan%mozilla.org 48d2c413b7 Forgot to tag JS_Lock and JS_Unlock as DEPRECATED. 2004-03-24 01:36:57 +00:00
brendan%mozilla.org 5983925bc7 Fix typo. 2004-03-24 01:29:45 +00:00
brendan%mozilla.org 5211731b08 Fix up request model docs a bit, spurred by conversation in m.jseng with Bob Kline <bkline@rksystems.com>. 2004-03-23 21:12:28 +00:00
igor%mir2.org 27c2350055 More work on bug 223435 : pass method name for the interface as the last parameter to JS function so it can use for debug purposes 2004-03-23 16:24:32 +00:00
timeless%mozdev.org ef689acbd2 Bug 238305 jsd doesn't build on windows if JS_MARK_DEBUG is set
r=rginda
not part of the build...
2004-03-23 05:33:09 +00:00
timeless%mozdev.org 522fe209a2 Bug 238058 Crash [@js_GetStringBytes] from venkman
r=rginda a=brendan
2004-03-23 05:13:09 +00:00
brendan%mozilla.org 6fe7b3ef71 Fix broken-since-rev-3.6.4.11 forelem normal-termination stack cleanup code-gen (174709, r=shaver, a=chofmann). 2004-03-23 02:09:38 +00:00
igor%mir2.org 9c0a6e0861 Making BaseFunction.decompile package private: any new public function will always find its users even if the usage is broken. It was public to allow calls from debugger but simple call to Context.toString() would do the same job. 2004-03-18 13:37:29 +00:00
igor%mir2.org 4c26393708 RUnit Software now includes a link on their page about JS (Declaimer: I work there!) 2004-03-18 13:32:52 +00:00
igor%mir2.org 6b102cf976 Added RUnit Software 2004-03-17 18:36:57 +00:00
igor%mir2.org 50cd6c7c8c Fixing bug 237771 : allow to transfer toSource implementation to different objects 2004-03-17 18:36:39 +00:00
brendan%mozilla.org c5cfd19722 Fix function after var redeclaration to avoid overincrementing fun->nvars (237461, r=shaver, a=chofmann). 2004-03-15 03:41:49 +00:00
caillon%redhat.com 3f278d9aef fixing bug 146458 - Liveconnect calls fail if applet's codebase is in different domain.
Use the domain of the page, like we do for script.
r=jst, sr=brendan, a=dbaron
2004-03-13 20:52:39 +00:00
timeless%mozdev.org 19d389776b Bug 106386 Correct misspellings in source code
patch by ajvincent@juno.com r=timeless sr=alecf
2004-03-10 05:34:40 +00:00
brendan%mozilla.org faa4736e7d Fix bogus error report and redundant test, enforce style fascism, eliminate warnings (227705, 230397, r=igor). 2004-03-10 03:34:59 +00:00
igor%mir2.org 209e4801b3 Documenting new Context seal API and fixing obvious English mistakes. 2004-03-09 23:34:30 +00:00
brendan%mozilla.org a75d2166a7 Better version of last fix, thanks to dbradley. 2004-03-09 04:25:12 +00:00
brendan%mozilla.org 7efa66b62f Detect size_t overflow (r=shaver, sr=jst, 236618). 2004-03-08 20:51:40 +00:00
igor%mir2.org e47574df7e Updated file with license info from Eugene Aresteanu :
> Hi,
>
> Does it look right now?
>
> Regards,
> Eugene
>
> -----Original Message-----
> From: Igor Bukanov [mailto:igor@fastmail.fm]
> Sent: Friday, March 05, 2004 10:07 AM
> To: eugene aresteanu
> Subject: Re: Rhino and license for Messages_fr.properties
>
>
> eugene aresteanu wrote:
>
>>Hello,
>>
>>Here it is.  I hope it is right.
>>Why do you say the default Messages.properties lacks notices?
>>I used the header of Messages.properties as a template.
>
>
> Sorry for not been clear, but what I wanted to say is that did not have
> triple MPL/GPL/LGPL but rather the old NPL/GPL pair. Could you update
> the file one more time using
> http://www.mozilla.org/MPL/boilerplate-1.1/mpl-tri-license-sh as template?
>
> Regards, Igor
2004-03-05 19:17:43 +00:00
igor%mir2.org 2cac059a8a Resolving bug 236117 : new API to seal Context 2004-03-03 19:59:25 +00:00
igor%mir2.org 6a15c2b2bb Resolving bug 236193: require enetered Context for compilation 2004-03-03 11:20:33 +00:00
brendan%mozilla.org 57b160d3af Fix HasFinalReturn to cope with fall-thru in switch cases (235930, r=shaver). 2004-03-03 05:25:28 +00:00
brendan%mozilla.org 8ae50b8280 Save the next end of line char pointer into userbuf in case it's far away, and avoid searching for it repeatedly, when dealing with inputs with very long lines (218511, r=shaver). 2004-03-03 01:50:46 +00:00
igor%mir2.org 7cc3ebfd9c Making javaToJS static to match the rest of API 2004-03-01 19:19:47 +00:00
brendan%mozilla.org 6c9f42d9fa Fiddle comment. 2004-02-25 22:34:53 +00:00
timeless%mozdev.org 2119ac88aa Bug 123584 JavaScript engine should use malloc/realloc/free consistently
Removing the unused JS_MALLOC macro per brendan
2004-02-25 14:05:29 +00:00
timeless%mozdev.org df707c9788 Bug 123584 JavaScript engine should use malloc/realloc/free consistently
Removing the unused JS_NEW and JS_DELETE macros per brendan
2004-02-25 14:01:24 +00:00
timeless%mozdev.org ff7704d674 Bug 123584 JavaScript engine should use malloc/realloc/free consistently
Replace JS_DELETE with free/JS_smprintf_free
r=rogerl
2004-02-25 13:33:42 +00:00
timeless%mozdev.org 3352558cdd Treat bug "numbers" which aren't numbers as links instead of prepending a url base
similar to runtests.pl:js_print_bugnumber

Problem input:
           Testcase ecma_2/RegExp/properties-001.js failed Bug Number http://scopus/bugsplat/show_bug.cgi?id=346000
2004-02-25 13:01:29 +00:00
brendan%mozilla.org effdf8506f Use label local in Statement; eliminate somewhat arbitrary empty lines. 2004-02-25 09:06:36 +00:00
jst%mozilla.jstenback.com a589ac3ec2 Fixing bogus assert on startup for DEBUG_xpc_hacker people. Not part of the default build. 2004-02-24 22:50:46 +00:00
brendan%mozilla.org f09979b677 Duh. 2004-02-24 21:23:45 +00:00
igor%mir2.org cf09991901 Fixing JavaDoc 2004-02-24 07:20:49 +00:00
igor%mir2.org d02a51ad4c Making NativeScript package private: if this will be controversial, then the public status can be restored 2004-02-24 07:19:56 +00:00
kyle.yuan%sun.com c7236a9370 Bug 200016 Crash accessing Java package from JS
r=xiaobin.lu, sr=brendan
Block accessing to sun.plugin package
2004-02-24 03:18:09 +00:00
brendan%mozilla.org 9be47ec08d s/compile/parse/ -- compile is overgeneral, especially in light of what's next. 2004-02-24 03:04:40 +00:00
brendan%mozilla.org eb90e6eae3 Simplify consts generation slightly. 2004-02-24 03:03:33 +00:00
brendan%mozilla.org 4b6cb095da Add ecmaStrictMode to CompilerContext. 2004-02-22 07:21:55 +00:00
brendan%mozilla.org 3f2c089f48 Move script_filename_table into JSRuntime where it belongs (235145, r=shaver). 2004-02-22 03:21:15 +00:00
dbaron%dbaron.org 761fbd40e7 Backing out brendan's checkin due to tinderbox orange. 2004-02-22 01:11:47 +00:00
brendan%mozilla.org f536555ceb Move script_filename_table into JSRuntime where it belongs (235145, r=shaver). 2004-02-21 19:41:52 +00:00
cls%seawood.org d44793ecbe Add support for cross-compiling to mingw.
Bug #222013 r=bryner
2004-02-20 22:14:14 +00:00
timeless%mozdev.org 110ba9e499 Bug 235035 change nsIRunnable.Run to nsIRunnable.run
r=dougt sr=darin
2004-02-20 21:34:57 +00:00
brendan%mozilla.org 1f4d1acecd Elaborate reference error message; fix iloop in __hasInstance__. 2004-02-20 07:35:28 +00:00
timeless%mozdev.org 51c9e399dd Bug 234703 mClassInfoFlags is always 0 instead of using the XPCWrappedNativeProto(..., ClassInfoFlags, ...) value
r=jst sr=bz moa=dbradley
2004-02-19 15:20:39 +00:00
darin%meer.net 8c818ed6c3 landing string defragmentation patch for bug 231995, r/sr=dbaron,jst,dougt 2004-02-19 02:44:03 +00:00
nboyd%atg.com 07d97e2bfb Remove "pre" from a candidate build. 2004-02-18 17:28:40 +00:00
igor%mir2.org 765d9c1f9e Preparations for 1.5R5 2004-02-18 12:24:27 +00:00
brendan%mozilla.org 6a7bb61959 t.scanOperand should be true by default, eliminating scanForOperand bloat. 2004-02-17 08:43:48 +00:00
timeless%mozdev.org 7de15d2110 Bug 233335 XP_PC still referenced in jssh.c
Use defined()
2004-02-16 18:27:06 +00:00
brendan%mozilla.org 2426ec2edc s/this/v/g in getValue. 2004-02-16 16:55:40 +00:00
brendan%mozilla.org 402cc46636 - Add source and cursor properties to SyntaxError exceptions.
- Rework labeled statements to fix chicken-and-egg problem with BREAK to label
  completion type targeting.
- Unify next-statement non-expression token cases and default: in Expression.
2004-02-16 02:38:19 +00:00
brendan%mozilla.org f99569416a - Fix global.String to convert its argument to string type when called as
a function.
- Rework labeled statements to fix chicken-and-egg problem with BREAK to label
  completion type targeting.
- Avoid defining Function.prototype.__call__, __construct__, and
  __hasInstance__ once they're set, to avoid storing host-uninterpretable
  target function objects in those properties.
- Fix evaluate to throw a host exception if returning to the host interpreter.
2004-02-16 02:15:27 +00:00
brendan%mozilla.org ce04728b4d Fully bootstrapped, but host still can't apply target functions. 2004-02-14 21:58:10 +00:00
brendan%mozilla.org 20d6618029 Fix Expression to work with Statement's automatic semicolon insertion logic. 2004-02-14 21:56:41 +00:00
leaf%mozilla.org b12f6038f2 bug 226380. backout code that breaks ActiveX plugin properties, a=chofmann 2004-02-14 01:01:08 +00:00
igor%mir2.org b796a6fb8d Preparations for 15R5 release. 2004-02-13 18:50:51 +00:00
igor%mir2.org 0bdc147fa8 Fixing NativeGlobal.encode: it was broken for chars beyond 0xFFFF as it sb.setLength(k) was called after k was increased to consume the second char from UTF-16 encoding to build UCS-4. 2004-02-12 19:05:47 +00:00
igor%mir2.org 52f8463b7d Preparations for 1.5R5 2004-02-12 18:13:00 +00:00
brendan%mozilla.org 21766deb5a Fix Expression to stop on : only if hookLevel is not elevated. 2004-02-11 08:30:20 +00:00
brendan%mozilla.org 6e82d5c043 Checkpoint, still not quite metacircularly bootstrapped. 2004-02-11 07:57:19 +00:00
brendan%mozilla.org 129485cc28 Fix two nits in last checkin. 2004-02-11 07:51:50 +00:00
brendan%mozilla.org 43b10e36e5 NARCISSUS ifdefs and related general fixes (r=shaver). 2004-02-11 07:21:59 +00:00
jst%mozilla.jstenback.com 8b6dc1c3ca Fixing bug 233307. deCOMtaminating nsIScript* and related interfaces. r+sr=bryner@brianryner.com. 2004-02-09 22:48:53 +00:00
igor%mir2.org 83ea5840cf Fixing bug 233274: for/in loop goes through array elements in wrong order
Fix: populate ids array in NativeArray with dense indexes first

Since array literals in Rhino creates instances of NativeArray with the
internal dense array containing literal elements, the patch changes
NativeArray.getIds to return ids array with dense indexes coming first and
indexes for elements added later after that.
2004-02-06 20:16:36 +00:00
igor%mir2.org d51a78039d Adding backward compatibility to SecurityController so it can be used with Rhino 1.5R4.1 subclasses 2004-02-05 15:10:52 +00:00
kyle.yuan%sun.com 47c14cbcf6 Bug 110584 Missing call to jsj_ExitJava
use |break| instead of |return| in |switch|
r=xiaobin.lu, sr=brendan
2004-02-04 02:01:54 +00:00
brendan%mozilla.org 6dcc130f14 - ECMA-prescribed {DontEnum} attributes for length on empty arg list, and on
<any-function>.prototype.constructor.
- Put rarely-set default properties in prototypes.
- Improve a couple of comments.
2004-02-03 23:58:03 +00:00
brendan%mozilla.org 1314cb7e3b JS implemented in JS, initial checkin. 2004-02-03 03:28:54 +00:00
timeless%mozdev.org 4b7614b9e5 Bug 137193 Debug Mozilla aborts when JSObject.call("func", args) and args is zero-length array
r=kyle sr=brendan
2004-02-02 19:10:33 +00:00
pschwartau%netscape.com ada7af9670 Updating email address. 2004-01-31 01:04:51 +00:00
brendan%mozilla.org a4c8ed8073 More bug 231518 followup: non-identifier as well as reserved-id property names must be quoted/indexed, not dotted (r=shaver). 2004-01-30 20:34:23 +00:00
igor%mir2.org 2c61e81ef1 Fixing bug 210605 again: for now re-throw Error instances as is without wrapping them into WrappedException so scripts would not be able to catch them. 2004-01-29 17:04:31 +00:00
pschwartau%netscape.com 0b1928388d Updating JS_GetImplementationVersion() to date of latest JS release (67111). 2004-01-28 02:10:31 +00:00
brendan%mozilla.org 33034c57d6 Brace style fascism. 2004-01-24 00:36:10 +00:00
brendan%mozilla.org 55630ce326 Fix quoting/escaping of non-ASCII chars and reserved ids in all property access cases (231518, r=shaver). 2004-01-23 17:52:03 +00:00
dbaron%dbaron.org 28185204c6 Print more information about nsXPCWrappedJS objects in GC_MARK_DEBUG. b=231384 r=brendan sr=bryner 2004-01-21 21:09:18 +00:00
igor%mir2.org a8722e4591 Removal support for deprecated getTargetClassFileName/setTargetClassFileName: they throw exception instead of calling a special proxy to avoid having probably unused any more class. If this is not true, then the methods should be restored. 2004-01-18 21:26:34 +00:00
igor%mir2.org 14b2b0415b Fixing JavaDoc comments 2004-01-18 21:23:53 +00:00
igor%mir2.org e9111c411d EvaluatorException and WrappedException are public API now 2004-01-18 21:21:41 +00:00
brendan%mozilla.org a522d30c20 Fix bug reported by Adrian Klein <master@dragosan.net> where o['if'] is decompiled as o.if. 2004-01-18 18:31:34 +00:00
igor%mir2.org 197d8abe67 Deprecating ClassNameHelper and ClassRepository in favor of new optimizer/ClassCompiler. 2004-01-17 21:52:30 +00:00
igor%mir2.org 9ab50b8455 optimizer.ClassCompiler provides new simple API for generating of class files from scripts that does not require to create Context instances.
The jsc tool is updated to use the new interface instead of using ClassNamehelper and friends.
2004-01-17 21:02:32 +00:00
igor%mir2.org 3077885e6a 1. optimizer/Codegen now just generates byte code classes, the instantiation of classes is done in a separated class optimizer/ClassCompiler. This is done to provide in future a simple interface to generate class files instead of complicated ClassNameHelper and friends implementation.
2. Parser now stores TokenStream instance in its field instead of having it present in each and every method signature. It allowed to simplify interaction between Parser and IRFactory where the later now uses Parser.reportError so parser van recover from syntax errors and provide better error reporting.
2004-01-16 18:20:22 +00:00
igor%mir2.org 81a158c7f7 Added setters for properties of CompilerEnvirons.java so it can be initialized
without having Context object.
2004-01-16 16:09:07 +00:00
igor%mir2.org 621907e4db Renaming Context.hrowAsUncheckedException to Context.throwAsScriptRuntimeEx to better reflect its purpose, providing better documentation and making sure it throws only instances of EcmaError and EvaluatorException. 2004-01-16 15:14:25 +00:00
igor%mir2.org 4449f64a14 Fixing bug 228336 :
This is a Rhino version of Brandan's patch from attachment 138844, bug 228087
plus code to fix overflow problem reported in bug 230216.
2004-01-16 15:11:31 +00:00
igor%mir2.org 8c221d45d5 throwAsUncheckedException is moved from ScriptRuntime to Context as a useful API to use in external applications. 2004-01-15 20:41:57 +00:00
igor%mir2.org f1a0d67e37 Fixing typo in comments 2004-01-15 20:40:56 +00:00
igor%mir2.org b6b301b603 Patch from Alex Bitney to fix bug 230883 2004-01-15 20:10:54 +00:00
brendan%mozilla.org cd83246f90 Unify license comment per js/src/plify_jsdhash.sed, plus comment simplification. 2004-01-15 02:00:55 +00:00
brendan%mozilla.org 77f1b56db2 Anything that starts like a {min,max} quantifier but doesn't parse as one is taken as a flat string to match (228087, r=shaver). 2004-01-12 21:10:26 +00:00
timeless%mozdev.org 506e4848b0 Bug 230522 warning C4047: 'return' : 'foo *' differs in levels of in direction from 'int'
rs=brendan
2004-01-11 17:26:30 +00:00
timeless%mozdev.org 50e3161311 Adding support for WinXP (copied from Win2k) 2004-01-09 20:15:27 +00:00
bsmedberg%covad.net 1f4ab81acd Continuing to land the PACKAGING_20030906_BRANCH for bug 20640. Not part of the build, yet. 2004-01-07 13:37:00 +00:00
bsmedberg%covad.net f0bfff2628 Beginning to land the PACKAGING_20030906_BRANCH for bug 20640. Not part of the build, yet. 2004-01-07 01:22:31 +00:00
igor%mir2.org 5422230263 Fixing bug 229571 : code refactoring for speed optimization 2004-01-06 13:35:51 +00:00
igor%mir2.org dfe5836b42 Move details of parsing/code generation from Context to interpreter/optimizer to allow more pluggable compilation interface. 2004-01-05 13:22:40 +00:00
brendan%mozilla.org a3ab882200 - Eliminate WellTerminated by coalescing its call sites to the end of Statement and inlining it there. This adds a tiny bit of overhead in some cases, due to
the ON_CURRENT_LINE check, which can be proven redundant for cases such as the
debugger statement.  But the cost should be in the noise, and code size wins.

- Remove bogus lastExprType argument to WellTerminated and eliminate its only
use, in parsing an expression statement.  Also eliminate the WellTerminated
check after a function "statement" (which could be a top-level declaration, or
an instance of our function statement extension, e.g. 'if (x) function f(){}',
neither of which should require semicolon termination).

The intent of the lastExprType parameter, the WellTerminated call from the
TOK_FUNCTION case, the call from the default expression-statement case, and the
#if JS_HAS_LEXICAL_CLOSURE code in WellTerminated appears to have been to allow
'function f(){} function g(){}' for JS versions < 1.2, and to forbid it as an
error otherwise, requiring a semicolon in between the function declarations.
But in fact ECMA and good sense should allow as many function declarations on
a line as you please, optionally followed by other statements, and without
requiring semicolons after function declarations.

Since this change removes an error case, I don't expect any incompatibility
bugs to be reported.

- Coalescing/inlining WellTerminated meant removing its call from MatchLabel,
called by the break and continue cases in Statement.

- The debugger keyword could be used without a semicolon terminator to make it
a statement, as in 'debugger 1 + 2;', parsed as a debugger statement followed
by an expression statement -- which seems quite wrong (ECMA reserves debugger
but does not specify its usage).

This bug arose due to the early return at the end of the TOK_DEBUGGER case.
Although that case called WellTerminated, because it returned rather than broke
from the main switch, it failed to match an explicit semicolon terminator (if
present), making 'debugger; 1 + 2;' parse as three statements, with the first
semicolon becoming an empty statement (contrary to ECMA automatic semicolon
insertion rules).
2004-01-05 07:47:49 +00:00
brendan%mozilla.org e9dafb918b Use macroized version of dbaron's fix for >65535 line script parsing bug (229006, r=shaver). 2004-01-03 18:19:51 +00:00
brendan%mozilla.org 6ee2318f17 Fix SCRIPT_FIND_CATCH_START to cope with exceptions thrown from prolog bytecodes (206199, r=shaver, a=asa). 2003-12-31 02:53:02 +00:00
technutz%netscape.net 45f084d02f MinGW bustage fix from bug 213910's landing. Patch by bsmedberg@covad.net. r=dbaron, sr=brendan 2003-12-30 17:53:17 +00:00
brendan%mozilla.org fbab0d1506 Don't JS_ReportOutOfMemory while holding script_filename_table_lock (r=self). 2003-12-30 07:54:09 +00:00
bsmedberg%covad.net b92b94f688 Bug 213910 - Implement Components.interfacesByID r=dbradley sr=jst 2003-12-28 04:37:57 +00:00
igor%mir2.org 34be2a53ad Cosmetics: removal of tabs left by the previous commit 2003-12-27 21:36:00 +00:00
igor%mir2.org a00caa1df4 Decompling parsing from code generation: compiler instances are created only when parsing tree is build. 2003-12-27 21:32:35 +00:00
igor%mir2.org 44815cf659 Initial patch to separate parsing from code generation: changing IRFactory so it can be created in Context. 2003-12-27 09:53:57 +00:00
igor%mir2.org c33fda9fe0 Renaming Kit.badArg() -> Kit.argBug() for consistency with Kit.codeBug() 2003-12-27 09:38:57 +00:00
igor%mir2.org 907cfb3edd Moving parsing code from FunctionNode.finishParsing to IRFactory to have better overview of parsing code. The optimizer now calls explicitly OptFunctionNode initialization instead of overriding FunctionNode.finishParsing in OptFunctionNode. 2003-12-26 17:17:21 +00:00
igor%mir2.org 9df6ce9622 Functions to report synatx errors are moved from TokenStream to Interpreter to remove dependancy on TokenStream in NodeTransformer. 2003-12-26 14:01:21 +00:00
igor%mir2.org b95d0b49fc Dropping scope argument from Context.compileString/compileReader since it is no longer used as Script instances are scope independent.
For compatibility the old form of Context.compileReader is preserved but marked as deprecated.
2003-12-25 22:37:57 +00:00
pschwartau%netscape.com 1a6a2b4e1c Updating README to reflect addition of collect.cgi to mozilla/js/perf/. 2003-12-23 22:46:04 +00:00
pschwartau%netscape.com dff48d551c Initial add. This is a CGI script that jsPerformance.pl can log results to. 2003-12-23 22:44:51 +00:00
brendan%mozilla.org 89a646c433 Disable bogus error check for { followed by a digit (228087, r=shaver). 2003-12-23 17:05:24 +00:00
brendan%mozilla.org 981b41757a Footprint wins: disable export/import from js1.5, fuse common code before a given jump target in js_Invoke, avoid unnecessary subtraction when enforcing ARGC_LIMIT. Also, clean up comment nits. 2003-12-22 06:15:14 +00:00
brendan%mozilla.org 2c463b266c Add an assertion to catch an embedding API usage error mentioned recently on m.jseng. 2003-12-22 06:13:07 +00:00
brendan%mozilla.org 1f9f878d5c Add JS_GetObjectId, void cx->exception in JS_ClearPendingException (127418, r=shaver). 2003-12-22 06:10:51 +00:00
nboyd%atg.com e6f3918cce Contribution from earestea@scanpak.com. 2003-12-18 20:55:30 +00:00
nboyd%atg.com bf80b55723 Add Aviva info. 2003-12-18 16:53:32 +00:00
pschwartau%netscape.com 0553a335c1 Adding more cases 2003-12-16 03:13:04 +00:00
pschwartau%netscape.com 3ad0e92e54 Correcting an error. 2003-12-13 23:52:12 +00:00
pschwartau%netscape.com 582a04129a Correcting an error. 2003-12-13 23:41:09 +00:00
pschwartau%netscape.com a07fb73695 Adding more cases. 2003-12-13 23:32:10 +00:00
pschwartau%netscape.com d899b26ebc Correcting a typo. 2003-12-13 19:37:43 +00:00
pschwartau%netscape.com 43f38f73d2 Text README for jsPerformance.pl. 2003-12-13 19:35:14 +00:00
pschwartau%netscape.com 555681f1dc Trying to correct initial checkin via admin -kb (these are binary files and should have been added to CVS via add -kb). 2003-12-13 19:25:53 +00:00
pschwartau%netscape.com 064bff6e40 Initial add. Regression testcase for bug 228087. 2003-12-12 23:29:16 +00:00
brendan%mozilla.org 9f4a2c578c Followup patch to cope with lightweight function calls (direct or via natives) to exec (227432, r=shaver, a=dbaron). 2003-12-10 00:24:13 +00:00
igor%mir2.org db872e25ca Message about overcapacity 2003-12-09 19:23:25 +00:00
igor%mir2.org c595d35c2c Cosmetics: removal of tabs 2003-12-09 19:22:58 +00:00
igor%mir2.org 941efb0ba0 To avoid bad performance when joining array with few small strings, js_join precalculate the resulting string size. 2003-12-09 19:22:11 +00:00
pschwartau%netscape.com 01a728a459 Correcting format from .bmp to .jpg 2003-12-08 23:25:47 +00:00
pschwartau%netscape.com 2fa27cb959 Changing from folder.gif to folder.jpg. 2003-12-08 22:25:20 +00:00
pschwartau%netscape.com 6312981b2b Image needed for README-jsPerformance.html. 2003-12-08 22:23:23 +00:00
pschwartau%netscape.com 67bf5eadef Deleting folder.gif in favor of folder.jpg 2003-12-08 22:19:08 +00:00
pschwartau%netscape.com 0712e6f42c Initial add. JS shell performance test by mazielobo@netscape.com. 2003-12-08 18:59:19 +00:00
pschwartau%netscape.com 037eed19af Initial add. Performance-test utility functions by mazielobo@netscape.com. 2003-12-08 18:51:41 +00:00
pschwartau%netscape.com 02cc21e1a1 Images needed for README-jsPerformance.html. 2003-12-08 18:46:10 +00:00
pschwartau%netscape.com af95681e8b Adaptation by mazielobo@netscape.com of JS Engine test driver (jsDriver.pl by rginda@netscape.com), to run performance tests. 2003-12-08 18:44:55 +00:00
igor%mir2.org 46332c00f3 Replacing custom buffer management in replace code with the standard StringBuffer 2003-12-08 17:10:23 +00:00
igor%mir2.org 60ad0a0479 Inlining LabelTable into Interpreter and ClassFileWriter: to support jumps spanning over 64K in Interpreter in future LabelTable should be modified significantly and complexity of shared code would not justify it. In addition such inlining actually decrese total code size. 2003-12-08 14:16:53 +00:00
igor%mir2.org 78da35a9b1 Merger ReplaceData and MatchData helper classes into GlobData to reduce code size and rename helper methods to follow SpiderMonkey closely. 2003-12-08 13:24:49 +00:00
igor%mir2.org fb1fe49783 Fixing missed cleanup of old values stored in RegExpImpl.parens: now it has type SubString[] and reinitialized after running regexps and see bug 220367. 2003-12-07 21:56:29 +00:00
igor%mir2.org ca014a7d90 Patch to fix bug 223451 :
Check for unbalanced ) and fix for ArrayIndexOutOfBoundsException

Check for unbalanced ')' is done differently then in SM since rhino uses
recursive version of SM code while fix for ArrayIndexOutOfBoundsException is
just a variation of my patch for bug 227705 in SM.
2003-12-07 16:00:38 +00:00
igor%mir2.org 95222003f7 Fixing bug 225926 : patch from Roger Lawrence 2003-12-07 15:35:40 +00:00
igor%mir2.org 7e44cf82d2 Fixing bug 225366 : port of SM patch 2003-12-05 23:22:10 +00:00
brendan%mozilla.org 9bb5765d5d Fix Script.prototype.exec called from native code (227432, r=shaver, a=asa). 2003-12-05 04:21:05 +00:00
pschwartau%netscape.com 1efcceef2f Initial add. Regression test for bug 226517 by Igor Bukanov. 2003-12-04 19:19:07 +00:00
igor%mir2.org 83c4281829 In Object.toSource implementation if property is not valid Java identifier, print it as 'escaped_property' so the property will read as proper Java string. 2003-12-04 15:47:03 +00:00