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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « src/x64/builtins-x64.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "test/cctest/compiler/function-tester.h" 7 #include "test/cctest/compiler/function-tester.h"
8 8
9 #if V8_TURBOFAN_TARGET 9 #if V8_TURBOFAN_TARGET
10 10
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 " %SetInlineBuiltinFlag(foo);" 519 " %SetInlineBuiltinFlag(foo);"
520 " %SetInlineBuiltinFlag(baz);" 520 " %SetInlineBuiltinFlag(baz);"
521 " return bar;" 521 " return bar;"
522 "})();", 522 "})();",
523 kBuiltinInlineFlags); 523 kBuiltinInlineFlags);
524 524
525 InstallAssertInlineCountHelper(CcTest::isolate()); 525 InstallAssertInlineCountHelper(CcTest::isolate());
526 T.CheckCall(T.true_value()); 526 T.CheckCall(T.true_value());
527 } 527 }
528 528
529
530 TEST(StrongModeArity) {
531 FLAG_turbo_deoptimization = true;
532 FLAG_strong_mode = true;
533 FunctionTester T(
534 "(function () {"
535 " function foo(x, y) { 'use strong'; return x; }"
536 " function bar(x, y) { return foo(x); }"
537 " return bar;"
538 "})();",
539 kInlineFlags);
540 T.CheckThrows(T.undefined(), T.undefined());
541 }
542
543
544 TEST(StrongModeArityOuter) {
545 FLAG_turbo_deoptimization = true;
546 FLAG_strong_mode = true;
547 FunctionTester T(
548 "(function () {"
549 " 'use strong';"
550 " function foo(x, y) { return x; }"
551 " function bar(x, y) { return foo(x); }"
552 " return bar;"
553 "})();",
554 kInlineFlags);
555 T.CheckThrows(T.undefined(), T.undefined());
556 }
529 #endif // V8_TURBOFAN_TARGET 557 #endif // V8_TURBOFAN_TARGET
OLDNEW
« 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