Replace loops by OptimizeFunctionOnNextCall in regress-1085 and regress-1210.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7800 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 30c16971
......@@ -25,11 +25,14 @@
// (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 correct checks for negative zero.
// This test relies on specific type feedback for Math.min.
function f(x) { return 1 / Math.min(1, x); }
for (var i=0; i<1000000; i++) f(1);
for (var i = 0; i < 5; ++i) f(1);
%OptimizeFunctionOnNextCall(f);
%OptimizeFunctionOnNextCall(Math.min);
assertEquals(-Infinity, f(-0));
......@@ -44,7 +44,7 @@ function test() {
}
// Run enough to optimize assuming global 'a' is a smi.
for (var i = 0; i < 1000000; ++i) test(0);
for (var i = 0; i < 10; ++i) test(0);
%OptimizeFunctionOnNextCall(test);
test(0);
......
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