Commit 575ca08a authored by ggaren@apple.com's avatar ggaren@apple.com

Rubber-stamped by Oliver Hunt.

        
        Landing a few layout tests from http://bugs.webkit.org/show_bug.cgi?id=14868
        Import variable lookup optimizations from KJS

        * fast/js/rehash-assign-expected.txt: Added.
        * fast/js/rehash-assign.html: Added.
        * fast/js/resize-array-assign-expected.txt: Added.
        * fast/js/resize-array-assign.html: Added.
        * fast/js/resources/rehash-assign.js: Added.
        * fast/js/resources/resize-array-assign.js: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27723 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 8142691c
2007-11-12 Geoffrey Garen <ggaren@apple.com>
Rubber-stamped by Oliver Hunt.
Landing a few layout tests from http://bugs.webkit.org/show_bug.cgi?id=14868
Import variable lookup optimizations from KJS
* fast/js/rehash-assign-expected.txt: Added.
* fast/js/rehash-assign.html: Added.
* fast/js/resize-array-assign-expected.txt: Added.
* fast/js/resize-array-assign.html: Added.
* fast/js/resources/rehash-assign.js: Added.
* fast/js/resources/resize-array-assign.js: Added.
2007-11-12 Geoffrey Garen <ggaren@apple.com>
Rubber-stamped by Oliver Hunt.
......
Tests that assignments to global variables behave properly when the property table is rehashed.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS 1 is 1
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<link rel="stylesheet" href="resources/js-test-style.css">
<script src="resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script src="resources/rehash-assign.js"></script>
<script src="resources/js-test-post.js"></script>
</body>
</html>
Tests that assignments into arrays behave properly after the array is resized.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS 1 is 1
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<link rel="stylesheet" href="resources/js-test-style.css">
<script src="resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script src="resources/resize-array-assign.js"></script>
<script src="resources/js-test-post.js"></script>
</body>
</html>
description("Tests that assignments to global variables behave properly when the property table is rehashed.");
var result;
result = (function() {
a = 0;
b = 1;
c = 2;
d = 3;
e = 4;
f = 5;
g = 6;
h = 7;
i = 8
j = 9;
k = 10;
l = 11;
m = 12;
n = 13;
o = 14;
p = 15;
q = 16;
r = 17;
s = 18;
t = 19;
u = 20;
v = 21;
w = 22;
x = 23;
y = 24;
z = 25;
aa = 0;
bb = 1;
cc = 2;
dd = 3;
ee = 4;
ff = 5;
gg = 6;
hh = 7;
ii = 8;
jj = 9;
kk = 10;
ll = 11;
mm = 12;
nn = 13;
oo = 14;
pp = 15;
qq = 16;
rr = 17;
ss = 18;
tt = 19;
uu = 20;
vv = 21;
ww = 22;
xx = 23;
yy = 24;
zz = 25;
aaa = 0;
bbb = 1;
ccc = 2;
ddd = 3;
eee = 4;
fff = 5;
ggg = 6;
hhh = 7;
iii = 8;
jjj = 9;
kkk = 10;
lll = 11;
mmm = 12;
nnn = 13;
ooo = 14;
ppp = 15;
qqq = 16;
rrr = 17;
sss = 18;
ttt = 19;
uuu = 20;
vvv = 21;
www = 22;
xxx = 23;
yyy = 24;
zzz = 25;
aaaa = 0;
bbbb = 1;
cccc = 2;
dddd = 3;
eeee = 4;
ffff = 5;
gggg = 6;
hhhh = 7;
iiii = 8;
jjjj = 9;
kkkk = 10;
llll = 11;
mmmm = 12;
nnnn = 13;
oooo = 14;
pppp = 15;
qqqq = 16;
rrrr = 17;
ssss = 18;
tttt = 19;
uuuu = 20;
vvvv = 21;
wwww = 22;
xxxx = 23;
yyyy = 24;
zzzz = 25;
return 1;
})();
shouldBe(result.toString(), "1");
var successfullyParsed = true;
description("Tests that assignments into arrays behave properly after the array is resized.")
function resize(X) {
X[9999] = 0;
return 1;
}
function getZerothEntry(X) {
return X[0];
}
var A = new Array();
A[0] = 0;
A[0] = resize(A);
shouldBe(getZerothEntry(A).toString(), "1");
var successfullyParsed = true;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment