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

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

Issue 1115263004: [strong] Check arity of functions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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/x64/builtins-x64.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-run-inlining.cc
diff --git a/test/cctest/compiler/test-run-inlining.cc b/test/cctest/compiler/test-run-inlining.cc
index a6d76e4d578b9ebe4624324cf6ba027f36c40253..61f3b62e89e49856f8ae4914178c4e764e2553d1 100644
--- a/test/cctest/compiler/test-run-inlining.cc
+++ b/test/cctest/compiler/test-run-inlining.cc
@@ -526,4 +526,32 @@ TEST(InlineNestedBuiltin) {
T.CheckCall(T.true_value());
}
+
+TEST(StrongModeArity) {
+ FLAG_turbo_deoptimization = true;
+ FLAG_strong_mode = true;
+ FunctionTester T(
+ "(function () {"
+ " function foo(x, y) { 'use strong'; return x; }"
+ " function bar(x, y) { return foo(x); }"
+ " return bar;"
+ "})();",
+ kInlineFlags);
+ T.CheckThrows(T.undefined(), T.undefined());
+}
+
+
+TEST(StrongModeArityOuter) {
+ FLAG_turbo_deoptimization = true;
+ FLAG_strong_mode = true;
+ FunctionTester T(
+ "(function () {"
+ " 'use strong';"
+ " function foo(x, y) { return x; }"
+ " function bar(x, y) { return foo(x); }"
+ " return bar;"
+ "})();",
+ kInlineFlags);
+ T.CheckThrows(T.undefined(), T.undefined());
+}
#endif // V8_TURBOFAN_TARGET
« no previous file with comments | « src/x64/builtins-x64.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698