Commit Graph

123 Commits

Author SHA1 Message Date
mrbkap%gmail.com
5fda27c80f Instead of having a source note per variable type, use a single source note with an immediate operand. bug 336378, r=brendan
git-svn-id: svn://10.0.0.236/trunk@198230 18797224-902f-48f8-a5cc-f745e15eee43
2006-05-22 23:33:57 +00:00
brendan%mozilla.org
2fb9f8c051 First big wave of js1.7 changes (326466, 336376, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@198099 18797224-902f-48f8-a5cc-f745e15eee43
2006-05-20 22:27:28 +00:00
mrbkap%gmail.com
685578b30f Make typeof (0, undef) throw a reference error. bug 333728, r=brendan
git-svn-id: svn://10.0.0.236/trunk@195611 18797224-902f-48f8-a5cc-f745e15eee43
2006-04-27 23:49:51 +00:00
brendan%mozilla.org
9cef5307bc Awesome patch from Andreas <mqmq87@web.de> to avoid creating unnecessary objects for primitives being operated on via methods (334261, r=me).
git-svn-id: svn://10.0.0.236/trunk@195575 18797224-902f-48f8-a5cc-f745e15eee43
2006-04-27 17:58:55 +00:00
brendan%mozilla.org
aedfa6257b Major simplification to jsconfig.h, dropping support for all ancient bug config and almost all pre-ECMA-Edition-3 feature config (325951, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@195469 18797224-902f-48f8-a5cc-f745e15eee43
2006-04-26 21:33:01 +00:00
brendan%mozilla.org
d2a185a15e Fix int constant precedent (333541, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@194471 18797224-902f-48f8-a5cc-f745e15eee43
2006-04-16 05:10:10 +00:00
mrbkap%gmail.com
bba9e77fad Fix a silly typo decompiling the setting of the default xml namespace. bug 331558, patch by Erik Fabert <jerfa@email.it>, r=mrbkap
git-svn-id: svn://10.0.0.236/trunk@192923 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-24 18:32:11 +00:00
mrbkap%gmail.com
49124b6aa3 Don't add unnecessary quotes to the rhs of the descendant operator. bug 321547, r=brendan
git-svn-id: svn://10.0.0.236/trunk@192837 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-23 05:36:20 +00:00
brendan%mozilla.org
b90cad137e Warning fix for MSVC.
git-svn-id: svn://10.0.0.236/trunk@192742 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-22 01:37:27 +00:00
igor%mir2.org
0d4537fff4 Bug 328664: In js_DecompileValueGenerator search the stack for the value to decompile from the top to bottom to pick up the copy and corresponding code that was pushed to the stack most recently. r=brendan
git-svn-id: svn://10.0.0.236/trunk@192420 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-15 16:44:24 +00:00
timeless%mozdev.org
0e4edfb847 Bug 329530 Out of memory crash when calling fn.toString where fn is a deeply nested function
patch by jerfa@email.it r=brendan


git-svn-id: svn://10.0.0.236/trunk@192271 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-13 17:00:18 +00:00
daumling%adobe.com
7c66b3845b Bug 318402: Replaced JS_STRINGS_ARE_UTF* with JS_C_STRING_ARE_UTF8
git-svn-id: svn://10.0.0.236/trunk@190546 18797224-902f-48f8-a5cc-f745e15eee43
2006-02-19 17:52:56 +00:00
daumling%adobe.com
9891c7b67f Bug 315974: JSprintf functions cannot print jschar characters and strings
git-svn-id: svn://10.0.0.236/trunk@190520 18797224-902f-48f8-a5cc-f745e15eee43
2006-02-18 07:13:16 +00:00
brendan%mozilla.org
ca9e056bfb Fix JSOP_CLOSURE failure to set todo to do-nothing value (326453, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@189433 18797224-902f-48f8-a5cc-f745e15eee43
2006-02-08 20:53:37 +00:00
brendan%mozilla.org
c873c0403c Fix foo += bar for undefined foo to throw, not bind foo to undefined (321757, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@188600 18797224-902f-48f8-a5cc-f745e15eee43
2006-01-31 20:53:30 +00:00
igor%mir2.org
caf466b112 Bug 319719: JS scanner checks for keywords using pregenerated C source
avoiding the cost of atomizing keyword strings. This is an updated version
of the previous rather bad commit to address Makefile issues. r=brendan


git-svn-id: svn://10.0.0.236/trunk@188224 18797224-902f-48f8-a5cc-f745e15eee43
2006-01-26 08:47:51 +00:00
igor%mir2.org
9e4fecd594 Reverting commit for bug 319719: Makefile changes broke too much builds.
git-svn-id: svn://10.0.0.236/trunk@188012 18797224-902f-48f8-a5cc-f745e15eee43
2006-01-22 21:08:05 +00:00
igor%mir2.org
d7acf1f679 Bug 319719: JS scanner checks for keywords using pregenerated C source
avoiding the cost of atomizing keyword strings. r=brendan


git-svn-id: svn://10.0.0.236/trunk@187990 18797224-902f-48f8-a5cc-f745e15eee43
2006-01-22 01:14:20 +00:00
igor%mir2.org
185501413d Bug 323765: VarPrefix is thread-safe now. r=brendan
git-svn-id: svn://10.0.0.236/trunk@187749 18797224-902f-48f8-a5cc-f745e15eee43
2006-01-18 11:17:21 +00:00
igor%mir2.org
f30f3386cc Implementing bug 322001:
JSFunction is shrinked via removal of nref field
and moving interreter-only or native-only fields into union. r=brendan


git-svn-id: svn://10.0.0.236/trunk@187167 18797224-902f-48f8-a5cc-f745e15eee43
2006-01-09 08:26:26 +00:00
brendan%mozilla.org
51d771ae0d Allow set-call, grouped, and e4x LHS in for-in loop (321874, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@187166 18797224-902f-48f8-a5cc-f745e15eee43
2006-01-09 05:14:52 +00:00
brendan%mozilla.org
8494b10ef8 Fix up disassembly of 24-bit-immediate formats (DEBUG-only 316862, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@186894 18797224-902f-48f8-a5cc-f745e15eee43
2006-01-04 05:53:16 +00:00
shaver%mozilla.org
caaaeca6af Bug 319490: return in finally should clear pending exceptions. r=mrbkap,
sr=brendan.


git-svn-id: svn://10.0.0.236/trunk@186549 18797224-902f-48f8-a5cc-f745e15eee43
2005-12-24 01:09:19 +00:00
igor%mir2.org
d3ea2b8636 Fix for bug 312138:
js_HeapSort terminates as soon as sort function indicates so. r=brendan


git-svn-id: svn://10.0.0.236/trunk@184755 18797224-902f-48f8-a5cc-f745e15eee43
2005-11-16 10:02:57 +00:00
mrbkap%gmail.com
c52b3336a1 bug 232182: Allow SpiderMonkey to deal with UTF-8 strings (controlled by a define). Patch from Michael Daumling <daumling@adobe.com>. r=shaver
git-svn-id: svn://10.0.0.236/trunk@184170 18797224-902f-48f8-a5cc-f745e15eee43
2005-11-05 01:06:30 +00:00
timeless%mozdev.org
c95aba664f Bug 313803 uneval() on func with embedded object with getter or setter has unmatched parenthesis
patch by colin@theblakes.com r=mrbkap sr=brendan


git-svn-id: svn://10.0.0.236/trunk@183040 18797224-902f-48f8-a5cc-f745e15eee43
2005-10-26 05:23:50 +00:00
brendan%mozilla.org
98cc36b67e Parenthesize to avoid warning.
git-svn-id: svn://10.0.0.236/trunk@182689 18797224-902f-48f8-a5cc-f745e15eee43
2005-10-21 05:00:28 +00:00
brendan%mozilla.org
1c8c9a9006 Followup fix to suppress function:: in decompiler output unless it was explicitly used in JS source (312196, r/sr=mrbkap/shaver).
git-svn-id: svn://10.0.0.236/trunk@182611 18797224-902f-48f8-a5cc-f745e15eee43
2005-10-20 19:43:06 +00:00
brendan%mozilla.org
4e0f9f6b7d Make __noSuchMethod__ work with E4X (312196, r/sr=mrbkap/shaver).
git-svn-id: svn://10.0.0.236/trunk@182305 18797224-902f-48f8-a5cc-f745e15eee43
2005-10-15 07:30:59 +00:00
brendan%mozilla.org
d30c3db22a Fix 310425 (r=mrbkap) and check in Igor's fix for 311497 (r=me).
git-svn-id: svn://10.0.0.236/trunk@181834 18797224-902f-48f8-a5cc-f745e15eee43
2005-10-09 06:09:21 +00:00
mrbkap%gmail.com
f23775985b bug 284032: Make sure to get the right fp when skipping over native frames in the DVG. Patch from Brendan. r=mrbkap
git-svn-id: svn://10.0.0.236/trunk@181241 18797224-902f-48f8-a5cc-f745e15eee43
2005-09-30 00:19:48 +00:00
timeless%mozdev.org
ad5af693e6 Bug 307469 jsopcode.c doesn't build w/ !JS_HAS_XML_SUPPORT
r=brendan


git-svn-id: svn://10.0.0.236/trunk@179858 18797224-902f-48f8-a5cc-f745e15eee43
2005-09-08 18:54:43 +00:00
mrbkap%gmail.com
ec686a8d55 bug 305883: Protect against the empty XML list to fix a crash when emitting code for |<></>|. Also fix the decompiler to handle XMLLists correctly. r=brendan
git-svn-id: svn://10.0.0.236/trunk@179068 18797224-902f-48f8-a5cc-f745e15eee43
2005-08-26 18:34:41 +00:00
brendan%mozilla.org
c769380e0b Put E4X-only stuff within #if JS_HAS_XML_SUPPORT.
git-svn-id: svn://10.0.0.236/trunk@178317 18797224-902f-48f8-a5cc-f745e15eee43
2005-08-19 23:35:30 +00:00
mrbkap%gmail.com
073f829a1a bug 302531: QuoteString doesn't deal with not outputting anything. Also fix some whitespace nits. r=shaver a=brendan
git-svn-id: svn://10.0.0.236/trunk@176790 18797224-902f-48f8-a5cc-f745e15eee43
2005-07-28 18:16:30 +00:00
mrbkap%gmail.com
5973774e54 bug 302412: Make sure to call QuoteString on XML strings so non-ASCII strings get properly escaped. Prefer to use small precedences instead of the op = JSOP_NOP hack in the decompiler. JSOP_JSEXPR is a bad name for a bytecode, use the more-consistent name JSOP_STARTXMLEXPR. r+a=brendan
git-svn-id: svn://10.0.0.236/trunk@176720 18797224-902f-48f8-a5cc-f745e15eee43
2005-07-28 00:38:40 +00:00
mrbkap%gmail.com
daf2306f91 bug 302097: E4X toString incorrectly quotes JS tag expressions that are used as attributes. r+a=shaver
git-svn-id: svn://10.0.0.236/trunk@176679 18797224-902f-48f8-a5cc-f745e15eee43
2005-07-27 16:10:26 +00:00
mrbkap%gmail.com
843d045531 bug 301692: E4X toString quotes the returned XML string. r+a=shaver
git-svn-id: svn://10.0.0.236/trunk@176633 18797224-902f-48f8-a5cc-f745e15eee43
2005-07-26 20:43:09 +00:00
mrbkap%gmail.com
1fbc85ce3b bug 111816: Function.prototype.toString returns extra newlines. Moving the newlines into Decompile to preserve the output of new Script().toString(). r=shaver sr+a=brendan
git-svn-id: svn://10.0.0.236/trunk@175050 18797224-902f-48f8-a5cc-f745e15eee43
2005-06-23 16:30:25 +00:00
timeless%mozdev.org
41d4039631 Bug 292400 JS_VERSION 148 doesn't build
r=brendan a=asa


git-svn-id: svn://10.0.0.236/trunk@173140 18797224-902f-48f8-a5cc-f745e15eee43
2005-05-06 21:42:39 +00:00
timeless%mozdev.org
b1ff4651bf Bug 292398 JS_VERSION 140 doesn't build
r=brendan a=asa


git-svn-id: svn://10.0.0.236/trunk@173136 18797224-902f-48f8-a5cc-f745e15eee43
2005-05-06 21:25:45 +00:00
brendan%mozilla.org
aae99a8a67 Allow up to 2^23 literals in a script (155081, r=shaver, a=me).
git-svn-id: svn://10.0.0.236/trunk@172641 18797224-902f-48f8-a5cc-f745e15eee43
2005-04-23 02:14:20 +00:00
brendan%mozilla.org
bac15332de Clamp fun->{nargs,nvars}, an old bug laid to rest (290575, r=shaver, a=me).
git-svn-id: svn://10.0.0.236/trunk@172371 18797224-902f-48f8-a5cc-f745e15eee43
2005-04-17 16:01:28 +00:00
brendan%mozilla.org
dc77a335e5 Specialize for QARG and QVAR types within JOF_NAME format in js_DecompileValueGenerator (281487, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@169629 18797224-902f-48f8-a5cc-f745e15eee43
2005-02-23 02:40:40 +00:00
brendan%mozilla.org
3677e7a705 Propagate a flag induced by JSOPTION_XML into script and context version fields, for proper run- and compile-time consistency (275742, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@167006 18797224-902f-48f8-a5cc-f745e15eee43
2004-12-24 00:03:59 +00:00
brendan%mozilla.org
555021e00b - Added strict warning "reference to undefined XML name {0}" to cope with
ECMA-357 botch where * or @b or (given valid namespace reference n) n::id
  results in undefined, instead of a TypeError.

- Lazily bootstrap AnyName and AttributeName classes, instead of leaving the
  former uninitialized, and initializing the latter only if QName is init'ed.
  These classes, representing ECMA-357 internal types, must be initialized
  in order to string conversion and default value on them to return useful
  results.  So this change also requires the shared qname_toString to cope
  with these classes, which ape QName in having a JSXMLQName as private data.

- Revise Filtering Predicate Expressions bytecode schema to avoid bogo-script
  creating in js_FilterXMLObject.  With a new JSOP_ENDFILTER bytecode acting
  in lieu of JSOP_POPV, but also exiting the nested js_Interpret() call, the
  runtime can avoid trying to fake a JSScript for the subsequence of script
  bytecode in parens in x.(e), that contains the bytecode for e plus the pop
  or endfilter op.

  This requires a historic reparameterization of js_Interpret to take the
  starting pc!  I cleaned up order of declaration, use, and useless init nits
  for a few variables while messing with it.

- Based on the above change, fix the decompiler to handle filtered predicate
  expressions -- that code was stubbed out till now, and I forgot to go back.
  All better now, especially thanks to JSOP_ENDFILTER.

- Also while fixing filtered predicates, eliminate the useless TOK_RP parse
  node above the parenthesized expression, to avoid a JSOP_GROUP bytecode.

- Fix js_GetAttributeNameObject so it doesn't take over its QName parameter's
  object and rebind it to an object of class AttributeName -- instead, clone
  the qn if necessary.  This is important to cope with the errata, noticed a
  while ago but finally recorded:

9.2.1.2 Step 2(e)(i, ii),
9.2.1.2 Step 7(e)(i),
9.2.1.3 Step 2(b)(ii)(1)(a)
        All uses of a.[[Name]] for an attribute a in these sections that pass
        that QName object to [[Delete]] must pass an AttributeName cloned from
        a.[[Name]].  The [[Name]] internal property is always a QName instance
        and never an AttributeName or AnyName instance.  But [[Delete]] will
        not operate on x.[[Attributes]] when given a QName by these sections,
        so a child could be wrongly deleted instead of the attribute of the
        same name.

  This rework exposed a bug in the XML.prototype.name() impl, where it was
  returning an AttributeName, not a QName, for attribute-class XML objects.
  Clearly wrong -- the E4X spec makes plain early on that [[Name]] is always
  a QName -- but the spec and e4x testsuite seemed to require it due to the
  above-noted errata.


git-svn-id: svn://10.0.0.236/trunk@166845 18797224-902f-48f8-a5cc-f745e15eee43
2004-12-18 02:28:21 +00:00
brendan%mozilla.org
f28e3637eb Expand tabs.
git-svn-id: svn://10.0.0.236/trunk@166467 18797224-902f-48f8-a5cc-f745e15eee43
2004-12-09 01:32:19 +00:00
brendan%mozilla.org
036b7c131b E4X, configured off, code-complete.
git-svn-id: svn://10.0.0.236/trunk@165420 18797224-902f-48f8-a5cc-f745e15eee43
2004-11-17 07:43:01 +00:00
brendan%mozilla.org
e1d64a36be Initial E4X check-in, configured off (246441, rs=shaver).
git-svn-id: svn://10.0.0.236/trunk@163236 18797224-902f-48f8-a5cc-f745e15eee43
2004-10-05 10:19:07 +00:00
brendan%mozilla.org
e86875f709 Fix catch decompilation, again (245308, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@161455 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-29 18:00:24 +00:00