From 006ae96dab5d52b6b3f91ebb66f1c988de68ee15 Mon Sep 17 00:00:00 2001 From: titzer Date: Tue, 24 Mar 2015 12:02:48 -0700 Subject: [PATCH] Set test expectations prior to enabling --turbo-osr. R=mstarzinger@chromium.org BUG= Review URL: https://codereview.chromium.org/1018513003 Cr-Commit-Position: refs/heads/master@{#27425} --- test/cctest/test-api.cc | 9 ++++++ test/cctest/test-debug.cc | 1 + test/mjsunit/mjsunit.status | 5 +++ test/mjsunit/regress/regress-430201b.js | 43 +++++++++++++++++++++++++ 4 files changed, 58 insertions(+) create mode 100644 test/mjsunit/regress/regress-430201b.js diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc index 3ea67d8b9c..0714e404b4 100644 --- a/test/cctest/test-api.cc +++ b/test/cctest/test-api.cc @@ -19904,6 +19904,7 @@ class RequestInterruptTestWithFunctionCall isolate_, ShouldContinueCallback, v8::External::New(isolate_, this)); env_->Global()->Set(v8_str("ShouldContinue"), func); + i::FLAG_turbo_osr = false; // TODO(titzer): interrupts in TF loops. CompileRun("while (ShouldContinue()) { }"); } }; @@ -19919,6 +19920,7 @@ class RequestInterruptTestWithMethodCall isolate_, ShouldContinueCallback, v8::External::New(isolate_, this))); env_->Global()->Set(v8_str("Klass"), t->GetFunction()); + i::FLAG_turbo_osr = false; // TODO(titzer): interrupts in TF loops. CompileRun("var obj = new Klass; while (obj.shouldContinue()) { }"); } }; @@ -19934,6 +19936,7 @@ class RequestInterruptTestWithAccessor isolate_, ShouldContinueCallback, v8::External::New(isolate_, this))); env_->Global()->Set(v8_str("Klass"), t->GetFunction()); + i::FLAG_turbo_osr = false; // TODO(titzer): interrupts in TF loops. CompileRun("var obj = new Klass; while (obj.shouldContinue) { }"); } }; @@ -19951,6 +19954,7 @@ class RequestInterruptTestWithNativeAccessor v8::External::New(isolate_, this)); env_->Global()->Set(v8_str("Klass"), t->GetFunction()); + i::FLAG_turbo_osr = false; // TODO(titzer): interrupts in TF loops. CompileRun("var obj = new Klass; while (obj.shouldContinue) { }"); } @@ -19980,6 +19984,7 @@ class RequestInterruptTestWithMethodCallAndInterceptor env_->Global()->Set(v8_str("Klass"), t->GetFunction()); + i::FLAG_turbo_osr = false; // TODO(titzer): interrupts in TF loops. CompileRun("var obj = new Klass; while (obj.shouldContinue()) { }"); } @@ -20004,6 +20009,7 @@ class RequestInterruptTestWithMathAbs v8::External::New(isolate_, this))); i::FLAG_allow_natives_syntax = true; + i::FLAG_turbo_osr = false; // TODO(titzer): interrupts in TF loops. CompileRun("function loopish(o) {" " var pre = 10;" " while (o.abs(1) > 0) {" @@ -20087,6 +20093,7 @@ class RequestMultipleInterrupts : public RequestInterruptTestBase { isolate_, ShouldContinueCallback, v8::External::New(isolate_, this)); env_->Global()->Set(v8_str("ShouldContinue"), func); + i::FLAG_turbo_osr = false; // TODO(titzer): interrupts in TF loops. CompileRun("while (ShouldContinue()) { }"); } @@ -21607,6 +21614,7 @@ TEST(TurboAsmDisablesNeuter) { "Module(this, {}, buffer).load();" "buffer"; + i::FLAG_turbo_osr = false; // TODO(titzer): test requires eager TF. v8::Local result = CompileRun(load).As(); CHECK_EQ(should_be_neuterable, result->IsNeuterable()); @@ -21621,6 +21629,7 @@ TEST(TurboAsmDisablesNeuter) { "Module(this, {}, buffer).store();" "buffer"; + i::FLAG_turbo_osr = false; // TODO(titzer): test requires eager TF. result = CompileRun(store).As(); CHECK_EQ(should_be_neuterable, result->IsNeuterable()); } diff --git a/test/cctest/test-debug.cc b/test/cctest/test-debug.cc index 6f2d65be65..5929379663 100644 --- a/test/cctest/test-debug.cc +++ b/test/cctest/test-debug.cc @@ -6697,6 +6697,7 @@ TEST(ProcessDebugMessagesThreaded) { v8::FunctionTemplate::New(isolate, StartSendingCommands); env->Global()->Set(v8_str("start"), start->GetFunction()); + i::FLAG_turbo_osr = false; // TODO(titzer): interrupts in TF loops. CompileRun("start(); while (true) { }"); CHECK_EQ(20, counting_message_handler_counter); diff --git a/test/mjsunit/mjsunit.status b/test/mjsunit/mjsunit.status index 830617bbf8..885f7e0963 100644 --- a/test/mjsunit/mjsunit.status +++ b/test/mjsunit/mjsunit.status @@ -122,6 +122,11 @@ 'regress/regress-2318': [PASS, ['mode == debug', SKIP]], 'regress/regress-create-exception': [PASS, ['mode == debug', SKIP]], + ############################################################################## + # Too slow in debug mode for validation of elements. + 'regress/regress-430201': [PASS, ['mode == debug', SKIP]], + 'regress/regress-430201b': [PASS, ['mode == debug', SKIP]], + ############################################################################## # Too slow in debug mode for GC stress mode. 'regress/regress-crbug-217858': [PASS, ['mode == debug', SKIP]], diff --git a/test/mjsunit/regress/regress-430201b.js b/test/mjsunit/regress/regress-430201b.js new file mode 100644 index 0000000000..056504d1d7 --- /dev/null +++ b/test/mjsunit/regress/regress-430201b.js @@ -0,0 +1,43 @@ +// Copyright 2010 the V8 project authors. All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (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 --expose-gc + +(function() { + var array_1 = []; + + %SetFlags("--stress-compaction"); + for (var a = 0; a < 10000; a++) { array_1[a * 100] = 0; } + + gc(); + gc(); + + var array_2 = []; + for (var i = 0; i < 321361; i++) { + array_2[i] = String.fromCharCode(i)[0]; + } +})();