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

Unified Diff: test/cctest/compiler/test-run-intrinsics.cc

Issue 2117273002: Revert of [intrinsic] Drop the %_ValueOf intrinsic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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/runtime/runtime-numbers.cc ('k') | test/mjsunit/compiler/regress-valueof.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-run-intrinsics.cc
diff --git a/test/cctest/compiler/test-run-intrinsics.cc b/test/cctest/compiler/test-run-intrinsics.cc
index 681891c91f522e4d9525ebf9f99f641cc60e863a..0ea611bade79a9f1e7f2d438aaec6cb610170e85 100644
--- a/test/cctest/compiler/test-run-intrinsics.cc
+++ b/test/cctest/compiler/test-run-intrinsics.cc
@@ -156,6 +156,16 @@
T.CheckCall(T.Val("aaa"), T.Val("aaa"), T.Val(0.0));
}
+
+TEST(ValueOf) {
+ FunctionTester T("(function(a) { return %_ValueOf(a); })", flags);
+
+ T.CheckCall(T.Val("a"), T.Val("a"));
+ T.CheckCall(T.Val("b"), T.NewObject("(new String('b'))"));
+ T.CheckCall(T.Val(123), T.Val(123));
+ T.CheckCall(T.Val(456), T.NewObject("(new Number(456))"));
+}
+
} // namespace compiler
} // namespace internal
} // namespace v8
« no previous file with comments | « src/runtime/runtime-numbers.cc ('k') | test/mjsunit/compiler/regress-valueof.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698