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

5615 Коммитов

Автор SHA1 Сообщение Дата
brendan%mozilla.org bd08f327fb - 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 8f62320cc9 JS implemented in JS, initial checkin. 2004-02-03 03:28:54 +00:00
timeless%mozdev.org 54930f7d31 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 e25afaab16 Updating email address. 2004-01-31 01:04:51 +00:00
brendan%mozilla.org 2b519a425f 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 d3b31dac4f 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 39374a94f8 Updating JS_GetImplementationVersion() to date of latest JS release (67111). 2004-01-28 02:10:31 +00:00
brendan%mozilla.org 100f1fcc33 Brace style fascism. 2004-01-24 00:36:10 +00:00
brendan%mozilla.org a65f571381 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 0511192cec 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 a7573a8a91 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 7d76224ac8 Fixing JavaDoc comments 2004-01-18 21:23:53 +00:00
igor%mir2.org b224c3704c EvaluatorException and WrappedException are public API now 2004-01-18 21:21:41 +00:00
brendan%mozilla.org d754a6a75f 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 176a213396 Deprecating ClassNameHelper and ClassRepository in favor of new optimizer/ClassCompiler. 2004-01-17 21:52:30 +00:00
igor%mir2.org b629e258d7 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 134428fef2 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 0fc143dd7c 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 34ebe5f4c1 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 497a0f766c 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 a7050e5460 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 f26418ea3f Fixing typo in comments 2004-01-15 20:40:56 +00:00
igor%mir2.org 96ea5ea515 Patch from Alex Bitney to fix bug 230883 2004-01-15 20:10:54 +00:00
brendan%mozilla.org 1d61995445 Unify license comment per js/src/plify_jsdhash.sed, plus comment simplification. 2004-01-15 02:00:55 +00:00
brendan%mozilla.org 44dd443b8e 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 1bba00a7fc 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 d217b68005 Adding support for WinXP (copied from Win2k) 2004-01-09 20:15:27 +00:00
bsmedberg%covad.net d0f309943a 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 274ef7cd49 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 59ae0034a1 Fixing bug 229571 : code refactoring for speed optimization 2004-01-06 13:35:51 +00:00
igor%mir2.org 332cc13ae5 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 c98a6b4d3f - 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 5a06114b4c 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 cecef07869 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 ad1ae94ec1 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 5946f557e5 Don't JS_ReportOutOfMemory while holding script_filename_table_lock (r=self). 2003-12-30 07:54:09 +00:00
bsmedberg%covad.net b3ccee7f7d Bug 213910 - Implement Components.interfacesByID r=dbradley sr=jst 2003-12-28 04:37:57 +00:00
igor%mir2.org 75d4dec8ea Cosmetics: removal of tabs left by the previous commit 2003-12-27 21:36:00 +00:00
igor%mir2.org 3cab5b3e26 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 44e703307d 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 d4590c48fa Renaming Kit.badArg() -> Kit.argBug() for consistency with Kit.codeBug() 2003-12-27 09:38:57 +00:00
igor%mir2.org 65aea23579 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 10e91b97ff 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 32ebb1d38d 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 0f5c835578 Updating README to reflect addition of collect.cgi to mozilla/js/perf/. 2003-12-23 22:46:04 +00:00
pschwartau%netscape.com 04b20eb9ef 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 54f33f94ec Disable bogus error check for { followed by a digit (228087, r=shaver). 2003-12-23 17:05:24 +00:00
brendan%mozilla.org 7c6f47247d 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 f7d4b5b5f2 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 f5b40a54ca Add JS_GetObjectId, void cx->exception in JS_ClearPendingException (127418, r=shaver). 2003-12-22 06:10:51 +00:00