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

Side by Side Diff: test/cctest/compiler/test-run-inlining.cc

Issue 1288923002: Revert of [runtime] Remove useless IN builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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/runtime/runtime-object.cc ('k') | test/cctest/compiler/test-run-intrinsics.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 "src/frames-inl.h" 7 #include "src/frames-inl.h"
8 #include "test/cctest/compiler/function-tester.h" 8 #include "test/cctest/compiler/function-tester.h"
9 9
10 using namespace v8::internal; 10 using namespace v8::internal;
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 " function bar(s,t) { return %_IsSmi(x); };" 408 " function bar(s,t) { return %_IsSmi(x); };"
409 " return bar;" 409 " return bar;"
410 "})();", 410 "})();",
411 kInlineFlags); 411 kInlineFlags);
412 412
413 InstallAssertInlineCountHelper(CcTest::isolate()); 413 InstallAssertInlineCountHelper(CcTest::isolate());
414 T.CheckCall(T.true_value(), T.Val(12), T.Val(4)); 414 T.CheckCall(T.true_value(), T.Val(12), T.Val(4));
415 } 415 }
416 416
417 417
418 TEST(InlineIntrinsicIsNonNegativeSmi) {
419 FunctionTester T(
420 "(function () {"
421 " var x = 42;"
422 " function bar(s,t) { return %_IsNonNegativeSmi(x); };"
423 " return bar;"
424 "})();",
425 kInlineFlags);
426
427 InstallAssertInlineCountHelper(CcTest::isolate());
428 T.CheckCall(T.true_value(), T.Val(12), T.Val(4));
429 }
430
431
418 TEST(InlineIntrinsicIsArray) { 432 TEST(InlineIntrinsicIsArray) {
419 FunctionTester T( 433 FunctionTester T(
420 "(function () {" 434 "(function () {"
421 " var x = [1,2,3];" 435 " var x = [1,2,3];"
422 " function bar(s,t) { return %_IsArray(x); };" 436 " function bar(s,t) { return %_IsArray(x); };"
423 " return bar;" 437 " return bar;"
424 "})();", 438 "})();",
425 kInlineFlags); 439 kInlineFlags);
426 440
427 InstallAssertInlineCountHelper(CcTest::isolate()); 441 InstallAssertInlineCountHelper(CcTest::isolate());
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 " if (x == 1) return bar(42);" 566 " if (x == 1) return bar(42);"
553 " return x;" 567 " return x;"
554 " }" 568 " }"
555 " return foo;" 569 " return foo;"
556 "})();", 570 "})();",
557 kInlineFlags); 571 kInlineFlags);
558 572
559 InstallAssertInlineCountHelper(CcTest::isolate()); 573 InstallAssertInlineCountHelper(CcTest::isolate());
560 T.CheckCall(T.Val(42), T.Val(1)); 574 T.CheckCall(T.Val(42), T.Val(1));
561 } 575 }
OLDNEW
« no previous file with comments | « src/runtime/runtime-object.cc ('k') | test/cctest/compiler/test-run-intrinsics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698