Patch fixes issue of not ignoring UNICODE format characters in match
and peek methods, adds explicit assertions checks for code assumptions
and makes handling of ASCII '\r', '\n' and UNICODE U+2028, U+2029 line
ends uniform.
It was rather tricky to fix format character issue and I spend some
time figuring out what TokenStream assumes about LineBuffer that
breaks my initial thoughts on the patch in cases like very long
sequences of format characters that do not fit in the buffer. I
fixed that but it made the code rather unclear so I put explicit
checks for assumptions/preconditions to help with debugging.
I added Context.check flag to turn on/off these checks and
Context.codeBug to throw an exception in case of check violations,
and also modified UintMap to use them instead of the private
flags there.
It would be nice to add some tests about format characters to the test
suite with checks similar to "eval('1 =\u200C= 1') == true" and
"eval('.\u200C1') == 0.1".
git-svn-id: svn://10.0.0.236/trunk@102914 18797224-902f-48f8-a5cc-f745e15eee43
Hi, Norris!
I have found few problems with NativeArraj.java.
1. jsSet_length requires that the new length value should be an instance of Number. But according to Ecma 15.4.5.1, item 12-13, an error should be thrown only if ToUint32(length_value) != ToNumber(length_value). Here is a simple test that demonstrates it:
Array(5).length = new Number(1)
It currenly throws an exception.
2. jsSet_length when executing the code marked with "// assume that the representation is sparse" effectively removes all properties with values less then the current length when String is used to represent its value. Note that simply changing lines "if (d == d && d < length) delete(id);" to "if (d == d && d >= longVal) delete(id);" is not good because it would remove properties like "4.5" or "007", the full array index check has to be used instead.
Here is a test case that catches the problem:
var BIG_INDEX = 4294967290;
var a = Array(BIG_INDEX);
a[BIG_INDEX - 1] = 'a';
a[BIG_INDEX - 10000] = 'b';
a[BIG_INDEX - 0.5] = 'c';
a.length = BIG_INDEX - 5000;
var s = '';
for (var i in a) s += a[i];
print('s="'+s+'"');
this should print s='cb' (or 'bc': EcmaScript does not fix the order), but currently it gives s=''.
3. There are race conditions in jsSet_length and getIds.
The first contains:
if (hasElem(this, i))
ScriptRuntime.delete(this, new Long(i));
which would lead to call to delete in the Array prototype if 2 threads would invoke this code. Simply calling ScriptableObject.delete without any checks for existence is enough here.
getIds assumes that the count of present elements in the dense array does not change, which is not true when another thread deletes elements from dense.
The attached patch fixes these issues.
Regards, Igor
git-svn-id: svn://10.0.0.236/trunk@102913 18797224-902f-48f8-a5cc-f745e15eee43
there are a certain # of results present in the list.
r=sspitzer, ducarroz
sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@102905 18797224-902f-48f8-a5cc-f745e15eee43
change the alert wording
99150 r/sr=bienvenu Make rename Cyrus imap folder work correctly for '/'
git-svn-id: svn://10.0.0.236/trunk@102900 18797224-902f-48f8-a5cc-f745e15eee43
fixed unfiled bug in mksymlink (trying to symlink if dir exists in
unix dirs, trying to symlink if either dir or symlink exists)
fixed bug in header , debug flag not passed into mksymlinks
fixed bug in header , always-yes flag not passed into mksymlinks
added email option -ml for qa_stat - only sends hyperlink to result.html
fixed unfiled bug NT backward compatibility test failures
removed unnecessary hostnamesetting from anything but nssqa
changed handeling of pass/fail in backward compatibility test
evaluation, started fix of bugs 97209 and 98219
git-svn-id: svn://10.0.0.236/trunk@102896 18797224-902f-48f8-a5cc-f745e15eee43
r=cls
Because other platforms then Unix use the Unix build system, add Makefile.ins to some win
directories so platforms can choose to use the win versions of files
git-svn-id: svn://10.0.0.236/trunk@102893 18797224-902f-48f8-a5cc-f745e15eee43
Implement some basic certificate routines.
Define some of the PKI types.
Implement some trust domain routines, but only for testing purposes.
Allow for building as shared library.
git-svn-id: svn://10.0.0.236/trunk@102891 18797224-902f-48f8-a5cc-f745e15eee43
amount of implemented code does little more than basic initialization of
a module and loading of a module's slots and tokens.
git-svn-id: svn://10.0.0.236/trunk@102889 18797224-902f-48f8-a5cc-f745e15eee43
and deleted an unnecessary if. The patch is contributed by
timeless@mac.com.
git-svn-id: svn://10.0.0.236/trunk@102887 18797224-902f-48f8-a5cc-f745e15eee43
Patch by Christian Reis <kiko@async.com.br>
r= caillon@returnzero.com, jake@acutex.net
git-svn-id: svn://10.0.0.236/trunk@102884 18797224-902f-48f8-a5cc-f745e15eee43