blob: 40d5560da0539cbf084a9e1d1ef3fe3f1dc3544d [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<div id="description"></div>
<div id="console"></div>
<div id="parentNode">
<div id="previousSibling"></div><div id="target"><div id="firstChild"></div><div id="lastChild"></div></div><div id="nextSibling"></div>
</div>
<script>
description('Test DOMJIT accessor will be LICM-ed.');
function test() {
var div = document.createElement('div');
var ret = 0;
for (var i = 0; i < 1e4; ++i)
ret = div.nodeType;
return ret;
}
var result;
(function () {
for (var i = 0; i < 100; ++i) {
result = test();
shouldBe(`result`, `Node.ELEMENT_NODE`, true);
}
}());
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>