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

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

Issue 1295433002: [runtime] Remove useless IN builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE again. Remove unused ReplaceWithBuiltinCall. Created 5 years, 3 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
432 TEST(InlineIntrinsicIsArray) { 418 TEST(InlineIntrinsicIsArray) {
433 FunctionTester T( 419 FunctionTester T(
434 "(function () {" 420 "(function () {"
435 " var x = [1,2,3];" 421 " var x = [1,2,3];"
436 " function bar(s,t) { return %_IsArray(x); };" 422 " function bar(s,t) { return %_IsArray(x); };"
437 " return bar;" 423 " return bar;"
438 "})();", 424 "})();",
439 kInlineFlags); 425 kInlineFlags);
440 426
441 InstallAssertInlineCountHelper(CcTest::isolate()); 427 InstallAssertInlineCountHelper(CcTest::isolate());
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 " if (x == 1) return bar(42);" 552 " if (x == 1) return bar(42);"
567 " return x;" 553 " return x;"
568 " }" 554 " }"
569 " return foo;" 555 " return foo;"
570 "})();", 556 "})();",
571 kInlineFlags); 557 kInlineFlags);
572 558
573 InstallAssertInlineCountHelper(CcTest::isolate()); 559 InstallAssertInlineCountHelper(CcTest::isolate());
574 T.CheckCall(T.Val(42), T.Val(1)); 560 T.CheckCall(T.Val(42), T.Val(1));
575 } 561 }
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