Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: test/mjsunit/math-floor-of-div.js

Issue 10382033: x86/x64 port of Math.floor(x/y) to use integer division for specific divisor (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« src/ia32/lithium-codegen-ia32.cc ('K') | « src/x64/lithium-x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 assertEquals(-min_int_in_array[0], 207 assertEquals(-min_int_in_array[0],
208 Math.floor((min_int_in_array[0] | 0) / -1)); 208 Math.floor((min_int_in_array[0] | 0) / -1));
209 } 209 }
210 210
211 test_div_deopt_minus_zero(); 211 test_div_deopt_minus_zero();
212 test_div_deopt_overflow(); 212 test_div_deopt_overflow();
213 %OptimizeFunctionOnNextCall(test_div_deopt_minus_zero); 213 %OptimizeFunctionOnNextCall(test_div_deopt_minus_zero);
214 %OptimizeFunctionOnNextCall(test_div_deopt_overflow); 214 %OptimizeFunctionOnNextCall(test_div_deopt_overflow);
215 test_div_deopt_minus_zero(); 215 test_div_deopt_minus_zero();
216 test_div_deopt_overflow(); 216 test_div_deopt_overflow();
217
Yang 2012/06/20 12:19:42 Please create a new test file called math-floor-of
Zheng Liu 2012/06/20 13:54:15 Done.
218 if (false) {
219 function test_div_no_deopt_minus_zero() {
220 var zero_in_array = [0];
221 assertTrue(0 === (Math.floor((zero_in_array[0] | 0) / -1) | 0));
222 }
223
224 test_div_no_deopt_minus_zero();
225 %OptimizeFunctionOnNextCall(test_div_no_deopt_minus_zero);
226 test_div_no_deopt_minus_zero();
227 assertTrue(2 != %GetOptimizationStatus(test_div_no_deopt_minus_zero));
228 }
OLDNEW
« src/ia32/lithium-codegen-ia32.cc ('K') | « src/x64/lithium-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698