5504 Commits

Author SHA1 Message Date
igor%mir2.org
16b39a9e68 Code to create invoker master instance is placed into Invoker itself since FunctionObject does not need to know which classes stays behind the implementation.
git-svn-id: svn://10.0.0.236/trunk@147908 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-13 16:04:20 +00:00
igor%mir2.org
e0c5fa0ac5 FunctionObject.convertArg is split into FunctionObject.getTypeTag() and FunctionObject.convertArg version taking that tag for better error reporting and performance since the tag can be cached and an expensive sequence of if and instanceof to check for the type would be replaced by a simple switch.
git-svn-id: svn://10.0.0.236/trunk@147907 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-13 16:02:35 +00:00
igor%mir2.org
809253fea6 Run ContextListener.contextCreated from Context.enter(), not Context constructor. In this way listeners will not be invoked for Context that are never associated with a thread and contextCreated will be more symmetric with Context.contextReleased.
git-svn-id: svn://10.0.0.236/trunk@147906 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-13 15:57:18 +00:00
igor%mir2.org
22554b0301 Inlining code into exceMethod to shrink code size.
git-svn-id: svn://10.0.0.236/trunk@147905 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-13 07:30:33 +00:00
igor%mir2.org
89d36c8d1c In getLength check for version of compiled function, not version from the current context for consistency.
git-svn-id: svn://10.0.0.236/trunk@147904 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-13 07:29:43 +00:00
igor%mir2.org
97717d0c21 In classOrNull and newInstanceOrNull catch and ignore LinkageError since it can be thrown if class links to unknown class.
git-svn-id: svn://10.0.0.236/trunk@147903 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-13 07:28:37 +00:00
igor%mir2.org
bae834d004 Added to build.xml the smalljar target to generate smalljs.jar. Its usage is documented in doc/footprint.html.
git-svn-id: svn://10.0.0.236/trunk@147891 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-12 13:45:41 +00:00
igor%mir2.org
ed628e2cd9 More optimizations to shrink code size.
git-svn-id: svn://10.0.0.236/trunk@147888 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-12 08:52:24 +00:00
igor%mir2.org
b64c3185b4 Inlining of private functions and reorganization to shrink code size to offset resent Rhino size growth
git-svn-id: svn://10.0.0.236/trunk@147879 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-11 20:29:32 +00:00
igor%mir2.org
51cde2c5f0 Using ScriptRuntime.splitSC to extract packages from semicolon-separated string instead of explicit code.
git-svn-id: svn://10.0.0.236/trunk@147878 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-11 20:27:08 +00:00
igor%mir2.org
63b43985ba Added ScriptRuntime.splitSC
git-svn-id: svn://10.0.0.236/trunk@147877 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-11 20:24:27 +00:00
igor%mir2.org
e1f73afe64 Change JavaScriptException to include source and line information in Throwable.getMessage()
git-svn-id: svn://10.0.0.236/trunk@147876 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-11 19:36:25 +00:00
igor%mir2.org
1356265a54 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.
git-svn-id: svn://10.0.0.236/trunk@147875 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-11 19:34:29 +00:00
dbaron%dbaron.org
b014526f98 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.
git-svn-id: svn://10.0.0.236/trunk@147874 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-11 19:01:43 +00:00
brendan%mozilla.org
09482f96d1 Split jsconfig.h JS_HAS_XDR macro for better code factoring.
git-svn-id: svn://10.0.0.236/trunk@147873 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-11 18:17:53 +00:00
dwitte%stanford.edu
45b91a5054 spelling fixes... s/debuging/debugging/. thanks to WeirdAl for the patch.
b=106386, p=ajvincent@juno.com, r=timeless, sr=bz.


git-svn-id: svn://10.0.0.236/trunk@147827 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-10 04:31:15 +00:00
brendan%mozilla.org
42a28f9704 Remove false comment (whew).
git-svn-id: svn://10.0.0.236/trunk@147823 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-10 01:46:55 +00:00
igor%mir2.org
0827e93aad BinaryDigitReader logic is inlined in ScriptRuntime.stringToNumber removing the need in the class.
git-svn-id: svn://10.0.0.236/trunk@147802 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-09 17:38:34 +00:00
peter%propagandism.org
edf9f70a86 Move voidable string into xpcom. Part of fix for bug 221387 (XPathExpression.createExpression doesn't throw NAMESPACE_ERR). r=bz, sr=dbaron.
git-svn-id: svn://10.0.0.236/trunk@147799 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-09 16:15:29 +00:00
igor%mir2.org
0087decd80 Use newly introduced Context.initStandardObjects(), not initStandardObjects(null) in the examples
git-svn-id: svn://10.0.0.236/trunk@147795 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-09 07:00:40 +00:00
igor%mir2.org
6117f71580 Use non-static functions in Shell
git-svn-id: svn://10.0.0.236/trunk@147794 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-09 07:00:01 +00:00
igor%mir2.org
d43995a795 Cosmetics: removal of end-of-line junk space
git-svn-id: svn://10.0.0.236/trunk@147793 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-09 06:57:12 +00:00
igor%mir2.org
c2caba2c31 Use newly introduced Context.initStandardObjects(), not initStandardObjects(null) in the documentation
git-svn-id: svn://10.0.0.236/trunk@147792 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-09 06:55:49 +00:00
igor%mir2.org
f078f25dcb dist depends on deepclean to prevent erroneous distribution builds when ant fails to detect source code dependencies and misses recompilation.
git-svn-id: svn://10.0.0.236/trunk@147791 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-09 06:44:38 +00:00
igor%mir2.org
8b299d4caf GlobalScope is a part of API now.
git-svn-id: svn://10.0.0.236/trunk@147790 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-09 06:42:30 +00:00
igor%mir2.org
6381786e45 Cosmetics: change argument order for package-private EcmaError constructor to it matchers other cases when a method takes line and column number.
git-svn-id: svn://10.0.0.236/trunk@147789 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-09 06:41:28 +00:00
igor%mir2.org
4371a82a15 Added version of Context.initStandardObjects that does not take scope as its argument.
git-svn-id: svn://10.0.0.236/trunk@147788 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-09 06:37:25 +00:00
brendan%mozilla.org
92cda301e0 Late-breaking security fix (221526, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@147718 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-07 23:02:29 +00:00
cls%seawood.org
3fc2e58791 What bryner said
git-svn-id: svn://10.0.0.236/trunk@147711 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-07 22:07:14 +00:00
bryner%brianryner.com
48d6c011d3 attempting to fix windows bustage
git-svn-id: svn://10.0.0.236/trunk@147706 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-07 21:18:57 +00:00
cls%seawood.org
ae91d9764c Case matters.
Fixing mingw cross-compiling bustage.


git-svn-id: svn://10.0.0.236/trunk@147702 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-07 20:39:25 +00:00
igor%mir2.org
9d776af273 Adding getParent() to omg.debug.DebuggableScript to allow to browse whole script function tree from any function.
git-svn-id: svn://10.0.0.236/trunk@147485 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-01 15:03:06 +00:00
igor%mir2.org
991c7fcbd9 Cosmetics: expanding tabs
git-svn-id: svn://10.0.0.236/trunk@147483 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-01 15:02:09 +00:00
igor%mir2.org
2b6dcc0402 Changing ScriptRuntime.initScript to return vois since it does not and should not change scope
git-svn-id: svn://10.0.0.236/trunk@147479 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-01 11:55:56 +00:00
igor%mir2.org
c13e11b967 Extending omj.debug.DebuggableScript interface with functions to access nested functions and check if it is top-level script.
git-svn-id: svn://10.0.0.236/trunk@147478 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-01 11:55:55 +00:00
BradleyJunk%cinci.rr.com
d67d8db36f Bug 220692 - Syntax error in /js/src/xpconnect/xpcmodule.cpp if MOZ_JSLOADER not defined. r=timeless, sr=brendan
git-svn-id: svn://10.0.0.236/trunk@147470 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-01 00:11:17 +00:00
pschwartau%netscape.com
9c04adfcc7 Initial add. Regression test for bug 39309.
git-svn-id: svn://10.0.0.236/trunk@147469 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-01 00:03:32 +00:00
pschwartau%netscape.com
70df8e84a4 Initial add. Regression test for bug 220584.
git-svn-id: svn://10.0.0.236/trunk@147433 18797224-902f-48f8-a5cc-f745e15eee43
2003-09-29 17:45:15 +00:00
igor%mir2.org
04685f84cb 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.


git-svn-id: svn://10.0.0.236/trunk@147412 18797224-902f-48f8-a5cc-f745e15eee43
2003-09-28 22:52:57 +00:00
igor%mir2.org
eaaf1c0f55 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.


git-svn-id: svn://10.0.0.236/trunk@147407 18797224-902f-48f8-a5cc-f745e15eee43
2003-09-28 20:01:27 +00:00
igor%mir2.org
b0787480a4 Self-documenting example
git-svn-id: svn://10.0.0.236/trunk@147406 18797224-902f-48f8-a5cc-f745e15eee43
2003-09-28 19:49:07 +00:00
igor%mir2.org
99abacac2c Added msg.adapter.zero.args
git-svn-id: svn://10.0.0.236/trunk@147403 18797224-902f-48f8-a5cc-f745e15eee43
2003-09-28 18:14:16 +00:00
igor%mir2.org
39e79a055a 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.


git-svn-id: svn://10.0.0.236/trunk@147402 18797224-902f-48f8-a5cc-f745e15eee43
2003-09-28 18:13:51 +00:00
igor%mir2.org
4efdb1d241 In ScriptRuntime.toInt32 check for Integer, not Byte when doing short-circuit optimization since Integer is always used to wrap int values.
git-svn-id: svn://10.0.0.236/trunk@147401 18797224-902f-48f8-a5cc-f745e15eee43
2003-09-28 16:03:10 +00:00
brendan%mozilla.org
20798cb331 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).
git-svn-id: svn://10.0.0.236/trunk@147349 18797224-902f-48f8-a5cc-f745e15eee43
2003-09-26 22:47:01 +00:00
pschwartau%netscape.com
db01cb48ad Improving readability.
git-svn-id: svn://10.0.0.236/trunk@147343 18797224-902f-48f8-a5cc-f745e15eee43
2003-09-26 19:37:15 +00:00
pschwartau%netscape.com
1e5360253e Initial add. Regression test for bug 220367.
git-svn-id: svn://10.0.0.236/trunk@147340 18797224-902f-48f8-a5cc-f745e15eee43
2003-09-26 19:24:58 +00:00
pschwartau%netscape.com
823408d1d8 Initial add. Regression test for bug 220362.
git-svn-id: svn://10.0.0.236/trunk@147338 18797224-902f-48f8-a5cc-f745e15eee43
2003-09-26 18:56:23 +00:00
igor%mir2.org
a16f2df119 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.


git-svn-id: svn://10.0.0.236/trunk@147337 18797224-902f-48f8-a5cc-f745e15eee43
2003-09-26 17:25:33 +00:00
brendan%mozilla.org
8885d091a9 Follow-up fix to clamp cx->stackLimit so it doesn't wrap (192414, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@147336 18797224-902f-48f8-a5cc-f745e15eee43
2003-09-26 17:22:14 +00:00