Closed
Bug 446382
Opened 17 years ago
Closed 16 years ago
String.prototype.split broken
Categories
(Tamarin Graveyard :: Tracing Virtual Machine, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: brbaker, Unassigned)
References
Details
(Keywords: flashplayer)
Attachments
(2 files, 1 obsolete file)
2.84 KB,
patch
|
dschaffe
:
review+
|
Details | Diff | Splinter Review |
1.94 KB,
patch
|
lhansen
:
review+
brbaker
:
review+
|
Details | Diff | Splinter Review |
An issue with skipping the delimiter has been fixed in tamarin-central and needs to be merged into tamarin-tracing
https://bugzilla.mozilla.org/show_bug.cgi?id=407156
trace("raaan".split("aa"));
traces: ["r","","n"]
expected: ["r","an"]
Flags: in-testsuite?
Flags: flashplayer-triage+
Comment 1•17 years ago
|
||
This patch is logically very similar to the patch for
https://bugzilla.mozilla.org/show_bug.cgi?id=407156
The main difference is that I've used a labeled continue statement to avoid the continue_loop1 flag. If that's a stylistic sin, let me know. I think it makes things cleaner.
At first I was tempted to get rid of the single-character delimiter special case, but the following test revealed the benefit of that optimization:
var i, n = 2000, arr = [];
for (i = 0; i < n; i++)
arr.push('foo');
var str = arr.join(',');
for (i = 0; i < n; i++)
str.split(',')
Without special case: 4.91s
With special case: 3.88s
Comment 2•17 years ago
|
||
Accidentally submitted the patch without the single-character optimization. I guess now you can see both versions, for what that's worth :)
Attachment #330660 -
Attachment is obsolete: true
Updated•17 years ago
|
Attachment #330661 -
Flags: review?(lhansen)
Updated•17 years ago
|
Attachment #330661 -
Flags: review?(brbaker)
Reporter | ||
Comment 3•17 years ago
|
||
Comment on attachment 330661 [details] [diff] [review]
proposed patch, with single-character delimiter optimization
I will only comment on the fact that I tried the patch in the sandbox (build #568) and it passed all of the tests including the testcase in this bug. I will leave it up to Lars to actually review the code changes.
Attachment #330661 -
Flags: review?(brbaker) → review+
Updated•17 years ago
|
Attachment #330661 -
Flags: review?(lhansen) → review+
Reporter | ||
Updated•16 years ago
|
Attachment #330554 -
Flags: review?(dschaffe)
Updated•16 years ago
|
Attachment #330554 -
Flags: review?(dschaffe) → review+
QE: does this work correctly in Tamarin Central? Please confirm that a test case covers this in the test suite.
Flags: flashplayer-triage+ → flashplayer-triage?
Reporter | ||
Comment 5•16 years ago
|
||
This is working in tamarin-central/redux and the testcase (patch #1) is in the source tree @
http://hg.mozilla.org/tamarin-redux/file/tip/test/acceptance/ecma3/String/split_407156.as
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Reporter | ||
Updated•16 years ago
|
Flags: in-testsuite? → in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•