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

Unified Diff: test/mjsunit/lithium/MulI.js

Issue 23452022: ARM: Improve integer multiplication. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/lithium/MulI.js
diff --git a/test/mjsunit/regress/regress-frame-details-null-receiver.js b/test/mjsunit/lithium/MulI.js
similarity index 67%
copy from test/mjsunit/regress/regress-frame-details-null-receiver.js
copy to test/mjsunit/lithium/MulI.js
index d15ed4d00ae774ad01406855fc42cb8c1dfbcc07..68588bd512849ab442d9c3e18fcb8246512801e1 100644
--- a/test/mjsunit/regress/regress-frame-details-null-receiver.js
+++ b/test/mjsunit/lithium/MulI.js
@@ -25,28 +25,46 @@
// (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: --expose-debug-as debug --allow-natives-syntax
-
-Debug = debug.Debug;
-var listened = false;
-
-function listener(event, exec_state, event_data, data) {
- if (event == Debug.DebugEvent.Exception) {
- for (var i = 0; i < exec_state.frameCount(); i++) {
- print(exec_state.frame(i).receiver());
- print(exec_state.frame(i).func().name());
- }
- }
- listened = true;
+// Flags: --allow-natives-syntax --no-use-osr
+
+function foo_smi(a, b) {
+ var result = a * b;
+ result += a * 35;
+ result += a * -1;
+ result += a * 1;
+ result += a * 0;
+ return result * a;
+}
+
+function foo_int(a, b) {
+ var result = a * b;
+ result += a * 35;
+ result += a * -1;
+ result += a * 1;
+ result += a * 0;
+ return result * a;
}
-Debug.setListener(listener);
-Debug.setBreakOnException();
+foo_smi(10, 5);
+var r1 = foo_smi(10, 5);
+%OptimizeFunctionOnNextCall(foo_smi);
+var r2 = foo_smi(10, 5);
-assertThrows(function() { delete null['foo']; });
+assertEquals(r1, r2);
-Debug.clearBreakOnException();
-Debug.setListener(null);
+foo_int(10, 21474800);
+var r3 = foo_int(10, 21474800);
+%OptimizeFunctionOnNextCall(foo_int);
+var r4 = foo_int(10, 21474800);
-assertTrue(listened);
+assertEquals(r3, r4);
+
+// Check overflow with -1 constant.
+function foo2(value) {
+ return value * -1;
+}
+foo2(-2147483600);
+foo2(-2147483600);
+%OptimizeFunctionOnNextCall(foo2);
+assertEquals(2147483648, foo2(-2147483648));
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698