Fix timeout and a small bug in a regression test.

Review URL: http://codereview.chromium.org/7085031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8106 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent e0985887
......@@ -25,6 +25,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
// Test const initialization and assignments.
function f() {
var x = 42;
......@@ -40,11 +42,14 @@ function g() {
return x;
}
for (var i = 0; i < 1000000; i++) {
for (var i = 0; i < 5; i++) {
f();
g();
}
%OptimizeFunctionOnNextCall(f);
%OptimizeFunctionOnNextCall(g);
assertEquals(42, f());
assertEquals(42, g());
......@@ -55,6 +60,9 @@ function h(a, b) {
return r + X;
}
for (var i=0; i<10000000; i++) f(1,2);
for (var i = 0; i < 5; i++) h(1,2);
%OptimizeFunctionOnNextCall(h);
assertEquals(45, h(1,2));
assertEquals("foo742", h("foo", 7));
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