[Webkit-unassigned] [Bug 10878] Incorrect decompilation for "4..x"

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 9 19:26:12 PDT 2007


darin at apple.com changed:

           What    |Removed                     |Added
  Attachment #14441|review?                     |review-
               Flag|                            |

------- Comment #4 from darin at apple.com  2007-05-09 19:26 PDT -------
(From update of attachment 14441)
+    SourceStream(): groupIfNumber(false) {};

No semicolon needed here. We normally put a space before the colon that
introduces the initializer list.

+  groupIfNumber = false;
   str += s.ustring();
+  groupIfNumber = false;

Why do you need to set the variable twice here?

+  for (int i = 0; i = elision; i++)

This is wrong. The loop condition is an assignment statement. You'll end up
with an infinite loop. Why didn't a test case catch this? Also, why the change
at all? This seems to be an unnecessary change.

+  if (groupIfNumber) {
+    UChar ch('(');
+    str += UString(&ch, 1);
+  }

I think this would read nicer as:

    if (groupIfNumber)

No need to use a UChar local variable. You can use += if you prefer it over
append(), but I suggest "" instead of the UChar.

Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the webkit-unassigned mailing list