| Index: test/unittests/compiler/js-typed-lowering-unittest.cc
|
| diff --git a/test/unittests/compiler/js-typed-lowering-unittest.cc b/test/unittests/compiler/js-typed-lowering-unittest.cc
|
| index 7e80cfd32d151c54975ca93c8f46982024152060..af6bfbecf99ca69eff501516694a99ac915bc186 100644
|
| --- a/test/unittests/compiler/js-typed-lowering-unittest.cc
|
| +++ b/test/unittests/compiler/js-typed-lowering-unittest.cc
|
| @@ -952,6 +952,27 @@ TEST_F(JSTypedLoweringTest, JSLoadNamedStringLength) {
|
| }
|
|
|
|
|
| +TEST_F(JSTypedLoweringTest, JSLoadNamedFunctionPrototype) {
|
| + VectorSlotPair feedback;
|
| + Handle<Name> name = factory()->prototype_string();
|
| + Handle<JSFunction> function = isolate()->object_function();
|
| + Handle<JSObject> function_prototype(JSObject::cast(function->prototype()));
|
| + Node* const receiver = Parameter(Type::Constant(function, zone()), 0);
|
| + Node* const vector = Parameter(Type::Internal(), 1);
|
| + Node* const context = Parameter(Type::Internal(), 2);
|
| + Node* const effect = graph()->start();
|
| + Node* const control = graph()->start();
|
| + TRACED_FOREACH(LanguageMode, language_mode, kLanguageModes) {
|
| + Reduction const r = Reduce(
|
| + graph()->NewNode(javascript()->LoadNamed(language_mode, name, feedback),
|
| + receiver, vector, context, EmptyFrameState(),
|
| + EmptyFrameState(), effect, control));
|
| + ASSERT_TRUE(r.Changed());
|
| + EXPECT_THAT(r.replacement(), IsHeapConstant(function_prototype));
|
| + }
|
| +}
|
| +
|
| +
|
| // -----------------------------------------------------------------------------
|
| // JSAdd
|
|
|
|
|