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

Unified Diff: src/runtime.cc

Issue 14471041: Implement support for Math.imul in Crankshaft. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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
« src/math.js ('K') | « src/runtime.h ('k') | test/mjsunit/math-imul.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index a45caf4d4286f04ff7c1084d90d95ce2fa9181f1..5f6fce46524d04c0593ac9535f5e5370b70b780a 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -6271,6 +6271,16 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberMod) {
}
+RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberImul) {
+ NoHandleAllocation ha(isolate);
+ ASSERT(args.length() == 2);
+
+ CONVERT_NUMBER_CHECKED(int32_t, x, Int32, args[0]);
+ CONVERT_NUMBER_CHECKED(int32_t, y, Int32, args[1]);
+ return isolate->heap()->NumberFromInt32(x * y);
+}
+
+
RUNTIME_FUNCTION(MaybeObject*, Runtime_StringAdd) {
NoHandleAllocation ha(isolate);
ASSERT(args.length() == 2);
« src/math.js ('K') | « src/runtime.h ('k') | test/mjsunit/math-imul.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698