Commit Graph

5373 Commits

Author SHA1 Message Date
igor%mir2.org
3cc6308b48 Using ScriptRuntime.splitSC to extract packages from semicolon-separated string instead of explicit code. 2003-10-11 20:27:08 +00:00
igor%mir2.org
0a5b59efe7 Added ScriptRuntime.splitSC 2003-10-11 20:24:27 +00:00
igor%mir2.org
bb5d66ddc1 Change JavaScriptException to include source and line information in Throwable.getMessage() 2003-10-11 19:36:25 +00:00
igor%mir2.org
6935fd4558 Optimization: for line counting use offset of line icode of interpreter instead of the line itself. In this way interpreter does not need to read encoded line data on each line marker which can occur quite frequently. 2003-10-11 19:34:29 +00:00
dbaron%dbaron.org
d13a4dc44c I am not sure what brendan meant to do, but making JS_HAS_XDR always be the same as it was before the previous checkin should get the Mozilla client working again. 2003-10-11 19:01:43 +00:00
brendan%mozilla.org
1221cd0a72 Split jsconfig.h JS_HAS_XDR macro for better code factoring. 2003-10-11 18:17:53 +00:00
dwitte%stanford.edu
7a2d3ff642 spelling fixes... s/debuging/debugging/. thanks to WeirdAl for the patch.
b=106386, p=ajvincent@juno.com, r=timeless, sr=bz.
2003-10-10 04:31:15 +00:00
brendan%mozilla.org
ea5c7f67be Remove false comment (whew). 2003-10-10 01:46:55 +00:00
igor%mir2.org
fe83dbd84d BinaryDigitReader logic is inlined in ScriptRuntime.stringToNumber removing the need in the class. 2003-10-09 17:38:34 +00:00
peter%propagandism.org
9059682e5b Move voidable string into xpcom. Part of fix for bug 221387 (XPathExpression.createExpression doesn't throw NAMESPACE_ERR). r=bz, sr=dbaron. 2003-10-09 16:15:29 +00:00
igor%mir2.org
4f020527c8 Use newly introduced Context.initStandardObjects(), not initStandardObjects(null) in the examples 2003-10-09 07:00:40 +00:00
igor%mir2.org
13d75fc940 Use non-static functions in Shell 2003-10-09 07:00:01 +00:00
igor%mir2.org
2aa3f1b663 Cosmetics: removal of end-of-line junk space 2003-10-09 06:57:12 +00:00
igor%mir2.org
99ad0b5fed Use newly introduced Context.initStandardObjects(), not initStandardObjects(null) in the documentation 2003-10-09 06:55:49 +00:00
igor%mir2.org
a738d7b424 dist depends on deepclean to prevent erroneous distribution builds when ant fails to detect source code dependencies and misses recompilation. 2003-10-09 06:44:38 +00:00
igor%mir2.org
a95f9c4651 GlobalScope is a part of API now. 2003-10-09 06:42:30 +00:00
igor%mir2.org
0c39c2bd7b Cosmetics: change argument order for package-private EcmaError constructor to it matchers other cases when a method takes line and column number. 2003-10-09 06:41:28 +00:00
igor%mir2.org
75e6970c55 Added version of Context.initStandardObjects that does not take scope as its argument. 2003-10-09 06:37:25 +00:00
brendan%mozilla.org
40b84ab879 Late-breaking security fix (221526, r=shaver). 2003-10-07 23:02:29 +00:00
cls%seawood.org
f1c0224f36 What bryner said 2003-10-07 22:07:14 +00:00
bryner%brianryner.com
dffdfd622c attempting to fix windows bustage 2003-10-07 21:18:57 +00:00
cls%seawood.org
5c61023297 Case matters.
Fixing mingw cross-compiling bustage.
2003-10-07 20:39:25 +00:00
igor%mir2.org
2593ae88cb Adding getParent() to omg.debug.DebuggableScript to allow to browse whole script function tree from any function. 2003-10-01 15:03:06 +00:00
igor%mir2.org
2ab3731f6d Cosmetics: expanding tabs 2003-10-01 15:02:09 +00:00
igor%mir2.org
002127495a Changing ScriptRuntime.initScript to return vois since it does not and should not change scope 2003-10-01 11:55:56 +00:00
igor%mir2.org
c3fc6c32a5 Extending omj.debug.DebuggableScript interface with functions to access nested functions and check if it is top-level script. 2003-10-01 11:55:55 +00:00
BradleyJunk%cinci.rr.com
65bc76fe1e Bug 220692 - Syntax error in /js/src/xpconnect/xpcmodule.cpp if MOZ_JSLOADER not defined. r=timeless, sr=brendan 2003-10-01 00:11:17 +00:00
pschwartau%netscape.com
18aa61bacd Initial add. Regression test for bug 39309. 2003-10-01 00:03:32 +00:00
pschwartau%netscape.com
de6f7a3a8b Initial add. Regression test for bug 220584. 2003-09-29 17:45:15 +00:00
igor%mir2.org
f8232c4663 Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=220584 :
Script() result has no prototype and scope chains

Fix: initialize scope and prototype for Script instances in
NativeScript.jsConstructor

If Script is called as a constructor, it will get the proper parent and
prototype from the generic code to initialize newly constructed objects but if
it is called as a function, then it is the responsibility of the call
implementation to do the job.
2003-09-28 22:52:57 +00:00
igor%mir2.org
b74c0ad822 Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=220362 :
Local functions lose scope when called from outside (compiled with dynamic scopes, optlevel >= 0)

Fix: ignore dynamic scope for nested functions and functions declared within
the with statement.

The patch makes optimizer to behave in the same way as the interpreter does
with regard to dynamic scope: it ignores it for nested functions and functions
declared under with statements. Now parser checks for such functions and set
new flag itsIgnoreDynamicScope in FunctionNode. The flag then checked both by
interpreter and optimizer during byte code generation.

The patch also changes slightly interaction between changing dynamic scope flag
and interpreted Script instances. Currently the dynamic flag is read during
script execution but patch changes interpreter to behave exactly as the
optimizer does: the dynamic flag only affect script compilation, changes in its
value does not affect already compiled scripts.
2003-09-28 20:01:27 +00:00
igor%mir2.org
1ef13c34c6 Self-documenting example 2003-09-28 19:49:07 +00:00
igor%mir2.org
caa446bcc0 Added msg.adapter.zero.args 2003-09-28 18:14:16 +00:00
igor%mir2.org
b976cc3dce JavaAdapter.createAdapterCode now takes the function name to function arity instead of Scriptable object. It allows to remove a hack from optimizer/Codegen where it created a temporary Scriptable just to populate it with FunctionNode as a source of arity values thus violating requirement on types of JS values.
The rest of JavaAdapter code is updated to use the ned form of the method as well.
2003-09-28 18:13:51 +00:00
igor%mir2.org
0335328a4b In ScriptRuntime.toInt32 check for Integer, not Byte when doing short-circuit optimization since Integer is always used to wrap int values. 2003-09-28 16:03:10 +00:00
brendan%mozilla.org
553f7df961 Redo thread/process stack size checking and API to avoid having to guess/fudge; instead, require embedders to advise explicitly, for fudge-free limits and backward API compatibility (192414, r=shaver). 2003-09-26 22:47:01 +00:00
pschwartau%netscape.com
2bf2a57dd4 Improving readability. 2003-09-26 19:37:15 +00:00
pschwartau%netscape.com
769b832c24 Initial add. Regression test for bug 220367. 2003-09-26 19:24:58 +00:00
pschwartau%netscape.com
59648663bd Initial add. Regression test for bug 220362. 2003-09-26 18:56:23 +00:00
igor%mir2.org
fc51c3df0e Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=220367 :
Fix: if in RegExpImpl.getParenSubString parens.get(i) is null, return
emptySubstring

If a branch of | with capturing () does not match , then RegExpImpl.parens will
contain null for corresponding $<group-number> according to code in
NativeRegExp.executeRegExp(). The current code does not check for a possible
null in RegExpImpl.parens when calling toString and the patch fixes that by
making sure that getParenSubString return SubString.emptySubString in such
cases.
2003-09-26 17:25:33 +00:00
brendan%mozilla.org
34313f0f12 Follow-up fix to clamp cx->stackLimit so it doesn't wrap (192414, r=shaver). 2003-09-26 17:22:14 +00:00
brendan%mozilla.org
7cb2529128 Check in my version of a patch to avoid thread or process stack overflow from Igor Bukanov <igor@fastmail.fm> (192414, r=shaver). 2003-09-24 16:49:58 +00:00
igor%mir2.org
9aed8fe664 Use ScriptableObject.getPropertyIds(jsObj) to get all object ids instead of explicit working throw prototype chain. 2003-09-24 13:35:52 +00:00
igor%mir2.org
0924111af4 Optimization in getPropertyIds: since Scriptable.getIds returns unique ids, check against id duplication only if prototype chain contains more then one object with enumerable ids. It this way there is no need to allocate hash map in the common case of objects without enumerable properties on the prototype chain. 2003-09-24 13:32:42 +00:00
igor%mir2.org
f04a8dec42 Optimization in IdEnumeration: since Scriptable.getIds returns unique ids, check against id duplication only if prototype chain contains more then one object with enumerable ids. It this way there is no need to allocate hash map in the common case of objects without enumerable properties on the prototype chain. 2003-09-24 13:29:17 +00:00
brendan%mozilla.org
2497aed559 Eliminate unnecessary local variable. 2003-09-23 00:07:24 +00:00
brendan%mozilla.org
fa18fa1e14 Don't finish temp and code arena-pools in JS_GC, in case it's nesting in the compiler via the debugger (131712, r=rginda, sr=shaver). 2003-09-19 18:36:50 +00:00
igor%mir2.org
7546dbbac4 Use special subclasses of Node to represent various jumps and control structures to avoid allocating of property objects for frequently occurring parse tree nodes. 2003-09-18 16:20:32 +00:00
igor%mir2.org
7848633a4a Mark parse subtree for finally statement with Token.FINALLY instead of using special property to mark USETEMP node. 2003-09-17 13:43:12 +00:00
igor%mir2.org
8df24a01d8 Addressing http://bugzilla.mozilla.org/show_bug.cgi?id=219055 :
Delay creation of NativeError wrapper for EcmaError until the exception is caught in the script.
2003-09-16 16:08:55 +00:00