Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 391350 - Incorrect type inference for array and object literals
: Incorrect type inference for array and object literals
Product: Rhino
Classification: Components
Component: Compiler (show other bugs)
: 1.6R6
: x86 Linux
: -- normal (vote)
: ---
Assigned To: Norris Boyd
Depends on:
  Show dependency treegraph
Reported: 2007-08-08 05:31 PDT by Norris Boyd
Modified: 2007-08-08 05:38 PDT (History)
0 users
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

Proposed patch (1.14 KB, patch)
2007-08-08 05:31 PDT, Norris Boyd
no flags Details | Diff | Splinter Review

Description Norris Boyd 2007-08-08 05:31:44 PDT
Created attachment 275765 [details] [diff] [review]
Proposed patch

The program

function f() {
  var x = {a:1,b:2};
  return x.a;

will print "undefined" for optimization level 1 instead of 1 due to the optimizer incorrectly assuming the object literal in the tree is an operator with two number type operands that must thus produce a number.
Comment 1 Norris Boyd 2007-08-08 05:38:43 PDT

Checking in src/org/mozilla/javascript/optimizer/;
/cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/optimizer/,v  <--
new revision:; previous revision: 1.37

Note You need to log in before you can comment on or make changes to this bug.