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

Unified Diff: test/unittests/compiler/js-intrinsic-lowering-unittest.cc

Issue 1809993002: Provide optimized support for the %GetOrdinaryHasInstance intrinsic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@bare-4774-fix
Patch Set: REBASE and nit. Created 4 years, 9 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/full-codegen/x64/full-codegen-x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/compiler/js-intrinsic-lowering-unittest.cc
diff --git a/test/unittests/compiler/js-intrinsic-lowering-unittest.cc b/test/unittests/compiler/js-intrinsic-lowering-unittest.cc
index 919c1b2237a1820d260d0d76fb11147fe321282e..c627ff42a195577236cd8dc449d9b28497d3dd1b 100644
--- a/test/unittests/compiler/js-intrinsic-lowering-unittest.cc
+++ b/test/unittests/compiler/js-intrinsic-lowering-unittest.cc
@@ -277,7 +277,6 @@ TEST_F(JSIntrinsicLoweringTest, InlineMathSqrt) {
// -----------------------------------------------------------------------------
// %_MathClz32
-
TEST_F(JSIntrinsicLoweringTest, InlineMathClz32) {
Node* const input = Parameter(0);
Node* const context = Parameter(1);
@@ -334,6 +333,23 @@ TEST_F(JSIntrinsicLoweringTest, InlineValueOf) {
AllOf(CaptureEq(&if_false0), IsIfFalse(CaptureEq(&branch0))))));
}
+// -----------------------------------------------------------------------------
+// %_GetOrdinaryHasInstance
+
+TEST_F(JSIntrinsicLoweringTest, InlineGetOrdinaryHasInstance) {
+ Node* const context = Parameter(0);
+ Node* const effect = graph()->start();
+ Node* const control = graph()->start();
+ Reduction const r = Reduce(graph()->NewNode(
+ javascript()->CallRuntime(Runtime::kInlineGetOrdinaryHasInstance, 0),
+ context, effect, control));
+ ASSERT_TRUE(r.Changed());
+ EXPECT_THAT(
+ r.replacement(),
+ IsLoadContext(
+ ContextAccess(0, Context::ORDINARY_HAS_INSTANCE_INDEX, true), _));
+}
+
} // namespace compiler
} // namespace internal
} // namespace v8
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698