timeless%mozdev.org
cf5137d786
Bug 131275 JS_AddRoot could provide a default root name if you define NAME_ALL_GC_ROOTS
...
r=brendan
git-svn-id: svn://10.0.0.236/trunk@138415 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-25 03:29:24 +00:00
mstoltz%netscape.com
d154fba3a0
Bug 146873 - Check JS Enabled status before calling from java into JS. r=jst, sr=heikki.
...
git-svn-id: svn://10.0.0.236/trunk@138404 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-25 01:37:47 +00:00
pschwartau%netscape.com
9ed50d7fad
Oops; back out last change. No sense in try...catch if the code you're trying isn't hidden inside an eval string!
...
git-svn-id: svn://10.0.0.236/trunk@138385 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-24 22:33:01 +00:00
timeless%mozdev.org
f7ef5f09c3
Bug 140031 Change jstypes.h to use __declspec instead of _declspec
...
r=rogerl
git-svn-id: svn://10.0.0.236/trunk@138375 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-24 21:37:54 +00:00
timeless%mozdev.org
cfaef6db79
Bug 75405 js benchmarks need strict mode cleaning
...
patch by petejc@collab.net r=rogerl
git-svn-id: svn://10.0.0.236/trunk@138374 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-24 21:37:37 +00:00
timeless%mozdev.org
f9040a0aec
Bug 186937 JSLL_UCMP missing from !JS_HAVE_LONG_LONG builds
...
patch by scole@planetweb.com r=brendan
git-svn-id: svn://10.0.0.236/trunk@138373 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-24 21:37:23 +00:00
pschwartau%netscape.com
5eedd0c371
Add a try...catch around the recursion test to catch 'too much recursion' exceptions. They are OK; we are only testing against crashes in this test.
...
git-svn-id: svn://10.0.0.236/trunk@138359 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-24 20:04:07 +00:00
timeless%mozdev.org
5996495cab
Bug 188398 JavaScript Engine doesn't work well for dates after 2038 on Windows
...
r=rogerl
git-svn-id: svn://10.0.0.236/trunk@138355 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-24 19:20:24 +00:00
timeless%mozdev.org
6e5c6bbae3
Bug 134728 mozJSComponentLoader::UnloadAll => JSCLAutoContext::JSCLAutoContext Getting service @mozilla.org/js/xpc/ContextStack;1 on shutdown.
...
r=dbradley sr=brendan
git-svn-id: svn://10.0.0.236/trunk@138287 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-23 07:03:11 +00:00
seawood%netscape.com
e084af4726
Use va_copy if available for VARARGS_ASSIGN
...
Bug #187180 r=blizzard sr=brendan
git-svn-id: svn://10.0.0.236/trunk@138284 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-23 06:59:39 +00:00
brendan%mozilla.org
c015bd7650
Cleanup GC_CALLBACK blunder (190813 followup, r=shaver).
...
git-svn-id: svn://10.0.0.236/trunk@138241 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-22 22:56:57 +00:00
pschwartau%netscape.com
1d270c9ea1
Initial add. Regression test for bug 194364.
...
git-svn-id: svn://10.0.0.236/trunk@138123 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-21 22:07:21 +00:00
brendan%mozilla.org
384d098f5a
Fix from pthomas@suse.de (Philipp Thomas) for 64-bit conflict between ptrdiff_t and JS_BIT/JSUint32 (r=shaver, a=dbaron).
...
git-svn-id: svn://10.0.0.236/trunk@138046 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-20 22:23:03 +00:00
igor%mir2.org
a610080bbe
Parsing changes: for regular expression literals construct a tree node with regular expression number during parsing instead of generating a special subtree that is converted to such node during tree transformation.
...
git-svn-id: svn://10.0.0.236/trunk@138032 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-20 13:11:21 +00:00
igor%mir2.org
3ee698473e
Praising changes: remove direct access to VariableTable in ScriptOrFnNode and instead provide methods to access its functionality. In this way VariableTable can be changed without affecting the rest of code.
...
git-svn-id: svn://10.0.0.236/trunk@138031 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-20 09:18:12 +00:00
igor%mir2.org
242ee9fb63
More parser internal changes: move all logic to initialize variable table to ScriptOrFnNode.finishParsing and its overrides in FunctionNode/OptFunctionNode so it will be constructed during parsing to avoid checks for function types in NodeTransformer.
...
git-svn-id: svn://10.0.0.236/trunk@138002 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-19 23:50:42 +00:00
mkaply%us.ibm.com
aa39c633e3
#193611
...
r=rginda, sr=brendan, a=dbaron
Set the MAX_INTERP_LEVEL for OS/2 to something lower than 1000 (250)
git-svn-id: svn://10.0.0.236/trunk@137987 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-19 21:19:54 +00:00
dbradley%netscape.com
431f0bd49e
Bug 192281 - Error calling IDispatch.setCallback on active-x control. This patch turns on wrapping of JS objects by an IDispatch interface. All changes are outside of Mozilla build. r=adamlock, sr=jst, a=dbaron
...
git-svn-id: svn://10.0.0.236/trunk@137983 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-19 15:19:22 +00:00
igor%mir2.org
5ea134dca7
During parsing collect all nested function in script or function directly into array in ScriptOrFnNode. In this way there is no need to walk over tree to find nested functions during tree transformation since the function nodes are available directly.
...
git-svn-id: svn://10.0.0.236/trunk@137979 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-19 14:50:30 +00:00
igor%mir2.org
32e9e44378
Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=193700 :
...
Attempts to access/modify properties of null or undefined are explicitly checked to include in error messages the property name so it would be possible on error in x.y.z to know if it is x or y that was undefined or null.
Inspired by suggestion from Russell Gold.
git-svn-id: svn://10.0.0.236/trunk@137972 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-19 08:51:51 +00:00
pschwartau%netscape.com
926e9a853e
Correcting a typo in the test that had made it pass vacuously.
...
git-svn-id: svn://10.0.0.236/trunk@137967 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-19 01:51:38 +00:00
pschwartau%netscape.com
3f28db4b71
Correcting a typo in the test that had made it pass vacuously.
...
git-svn-id: svn://10.0.0.236/trunk@137965 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-19 01:43:27 +00:00
brendan%mozilla.org
f1a58a1ae6
Hack around OBJ_ENUMERATE design flaw that requires the property iterator object to root its parent slot (193393, r=shaver, a=asa).
...
git-svn-id: svn://10.0.0.236/trunk@137943 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-18 20:08:21 +00:00
igor%mir2.org
b17cbd7458
Allow to set null for sourceName, encodedSource and originalSource
...
git-svn-id: svn://10.0.0.236/trunk@137928 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-18 00:52:34 +00:00
pschwartau%netscape.com
866fe0c426
Initial add. Regression test for bug 193555.
...
git-svn-id: svn://10.0.0.236/trunk@137911 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-17 23:08:59 +00:00
pschwartau%netscape.com
4511c6f624
Initial add. Regression test for bug 193418.
...
git-svn-id: svn://10.0.0.236/trunk@137909 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-17 22:24:26 +00:00
igor%mir2.org
893de0bda2
Store number of locals as a field in ScriptOrFnNode and not as int node property.
...
git-svn-id: svn://10.0.0.236/trunk@137900 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-17 17:41:04 +00:00
igor%mir2.org
438fa8a3b6
Store function array inside ScriptOrFnNode as field, not as a node property.
...
git-svn-id: svn://10.0.0.236/trunk@137899 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-17 17:39:26 +00:00
igor%mir2.org
2f0802c692
Pass ScriptOrFnNode explicitly to function expecting script or function top node and fix OptTransformer problem where it marked nested functions of function as suitable for direct call optimization which was caused by removal of parameter name subtree in FunctionNode.
...
git-svn-id: svn://10.0.0.236/trunk@137898 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-17 17:34:20 +00:00
dbradley%netscape.com
9d67742b3f
Bug 140852 (160602) - String(819187200000) == '8191871:0000' in xpcshell, browser. r=seawood, a=brendan
...
git-svn-id: svn://10.0.0.236/trunk@137893 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-17 13:02:08 +00:00
igor%mir2.org
ea23065719
Introduction of ScriptOrFnNode as a Node to represent scripts and a base class for FunctionNode so it can be used to store variable tables, line information, regular expressions etc. instead of using special Node properties.
...
git-svn-id: svn://10.0.0.236/trunk@137892 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-17 08:51:00 +00:00
igor%mir2.org
8d56f6596b
Removal of a separated tree walking phase in NodeTransformer to collect variables as this is done now during parsing
...
git-svn-id: svn://10.0.0.236/trunk@137879 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-17 00:10:24 +00:00
igor%mir2.org
d0d7c03d34
Adjusted to refer to 1.5R4 as the last release
...
git-svn-id: svn://10.0.0.236/trunk@137878 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-17 00:06:06 +00:00
igor%mir2.org
5a6ac10701
Fixing links
...
git-svn-id: svn://10.0.0.236/trunk@137877 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-17 00:05:27 +00:00
igor%mir2.org
35f4eceae2
Remove code duplication when reporting syntax errors in NodeTransformer, ToekStream, IRFactory and Parser and add a method to create FunctionNode to Interpreter/Codegen to remove the need to have OptIRFactory.
...
git-svn-id: svn://10.0.0.236/trunk@137876 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-16 20:28:56 +00:00
igor%mir2.org
e2c90906fc
*** empty log message ***
...
git-svn-id: svn://10.0.0.236/trunk@137875 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-16 20:28:55 +00:00
locka%iol.ie
0de672ed16
Fix blacklist/whitelist registry code in COM connect. b=193256 r=dbradley sr=alecf a=dbaron
...
git-svn-id: svn://10.0.0.236/trunk@137874 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-16 19:50:14 +00:00
igor%mir2.org
15d575d2ac
Creating and filling VariableTable directly during parsing phase and then accessing it in NodeTransformer. It still does not remove the need to have a separated walk through the tree for variables but now it only checks for function name / variable name clashes.
...
And http://bugzilla.mozilla.org/show_bug.cgi?id=193555 is now fixed as well.
git-svn-id: svn://10.0.0.236/trunk@137862 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-16 11:34:54 +00:00
igor%mir2.org
f1a981a3e3
Do explicit parsing of function expression statements so a correct function type will be passed to IRFactory during node creation and fix incorrect code generation when FEATURE_MEMBER_EXPR_AS_FUNCTION_NAME is true.
...
I also added explicit flags to Parser: languageVersion and allowMemberExprAsFunctionName and set them from Context. In this way Parser can be used without Context which is useful for debugging.
git-svn-id: svn://10.0.0.236/trunk@137861 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-15 23:30:02 +00:00
igor%mir2.org
770f2aefee
VariableTable changes toward removal of a separated NodeTransformer pass over the parser tree for variable initialization: the code to support a table of optimized variables for functions in the optimizer is moved to optimizer/OptFunctionNode and VariableTable holds only parameters/variables names now. It allowed to simplify VariableTable initialization in NodeTransformer.
...
git-svn-id: svn://10.0.0.236/trunk@137859 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-15 21:35:58 +00:00
igor%mir2.org
68a133ed21
Remove synchronization on Context instances as Context should only be accessed from one thread.
...
git-svn-id: svn://10.0.0.236/trunk@137858 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-15 21:23:54 +00:00
igor%mir2.org
2d7d66fc2e
Decoupling JavaAdapter from ClassRepository logic: JavaAdapter.createAdapterClass is replaced by JavaAdapter.createAdapterCode which just generates byte array with the adapter class file code and Codegen then passes this array to ClassRepository to save the class if necessary. In this way if repository do not need to load classes, adapter class will not be loaded at all.
...
git-svn-id: svn://10.0.0.236/trunk@137853 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-15 17:47:13 +00:00
igor%mir2.org
028d325296
ClassNameHelper cleanup:
...
1. It is not passed as a parameter to Interpreter/Codegen, instead Codegen access it directly when necessary.
2. ClassNameHelper.reset method is removed as inherently thread unsafe and data that should be used during compilation of single script is stored in Codegen itself.
3. Instead of a special DefaultClassRepository null is used to indicate that generated classes should not be stored and JavaAdapter is modified to take ClassRepository as a parameter, not ClassNameHelper.
git-svn-id: svn://10.0.0.236/trunk@137850 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-15 14:21:33 +00:00
igor%mir2.org
092d661e20
When parsing function parameters, collect all parameters names into array instead of generating a separated syntax subtree for them.
...
git-svn-id: svn://10.0.0.236/trunk@137849 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-15 13:54:22 +00:00
igor%mir2.org
71467dd4e9
Remove the last argument "args" from generateInit as it is never used.
...
git-svn-id: svn://10.0.0.236/trunk@137848 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-15 13:05:38 +00:00
igor%mir2.org
1f59aed911
Make Optimizer class a package private and turn most of its methods into private ones.
...
git-svn-id: svn://10.0.0.236/trunk@137847 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-15 12:56:21 +00:00
igor%mir2.org
f83c6e9144
I changed PreorderNodeIterator so a pattern for its usage will be:
...
PreorderNodeIterator iter = new PreorderNodeIterator();
for (iter.start(tree); !iter.done(); iter.next()) {
Node node = iter.getCurrent();
...
}
instead of
PreorderNodeIterator iter = tree.getPreorderIterator();
Node node;
while ((node = iter.nextNode()) != null) {
}
to allow for more flexible usage and added PreorderNodeIterator.nextSkipSubtree to skip iteration of the last visited node subtree which allows to have simple code in Optimizer.buildStatementList when iterating over statements.
git-svn-id: svn://10.0.0.236/trunk@137846 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-15 12:47:45 +00:00
igor%mir2.org
5306e7db78
Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=193418 :
...
The bug caused by a missed check in StmtNodeIterator.nextNode for a possible null result of findFirstInterestingNode inside the search loop which made search to stop preliminary with non-empty stack.
The changes fixe this and integrate StmtNodeIterator into
Optimizer.buildStatementList as StmtNodeIterator was used only by
buildStatementList and the new version is simpler.
git-svn-id: svn://10.0.0.236/trunk@137845 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-15 10:33:31 +00:00
igor%mir2.org
34304f5463
Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=191276 :
...
The reason for the bug was that omj/optimizer/Optimizer.java when optimizing code for this[name] (see GETELEM switch, line 665) assumed a number context for GETELEM index node unconditionally which is wrong.
The fix uses number context only if [] argument is known for sure to be a number.
git-svn-id: svn://10.0.0.236/trunk@137832 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-14 23:56:34 +00:00
igor%mir2.org
ff97fb4bbc
Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=192288 :
...
The bug was caused by a double call to Codegen.addNumberConstant, the first
time correctly from Codegen.visitLiteral and the second time wrongfully from
the loop in emitConstantDudeInitializers where loop index should be used
instead of calling addNumberConstant. As addNumberConstant would return the
same index for same numbers, the bug surfaces only with NaN as
addNumberConstant does not recognizes already added NaN. The bug also visible
only with optimization set to 1 or higher since only then constant folding can
produce NaN literal.
The fix removes the second call to addNumberConstant and uses
ScriptRuntime.NaNobj for NaNs.
git-svn-id: svn://10.0.0.236/trunk@137831 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-14 23:53:32 +00:00