| 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 dc5825326d2e13941c3d16b2662371cbd1c76e8c..aac082840da9df43d4eba87e488c0fec13c29ce5 100644
|
| --- a/test/unittests/compiler/js-typed-lowering-unittest.cc
|
| +++ b/test/unittests/compiler/js-typed-lowering-unittest.cc
|
| @@ -1140,6 +1140,29 @@ TEST_F(JSTypedLoweringTest, JSCreateWithContext) {
|
|
|
|
|
| // -----------------------------------------------------------------------------
|
| +// JSCreateCatchContext
|
| +
|
| +
|
| +TEST_F(JSTypedLoweringTest, JSCreateCatchContext) {
|
| + Handle<String> name = factory()->length_string();
|
| + Node* const exception = Parameter(Type::Receiver());
|
| + Node* const closure = Parameter(Type::Function());
|
| + Node* const context = Parameter(Type::Any());
|
| + Node* const effect = graph()->start();
|
| + Node* const control = graph()->start();
|
| + Reduction r =
|
| + Reduce(graph()->NewNode(javascript()->CreateCatchContext(name), exception,
|
| + closure, context, effect, control));
|
| + ASSERT_TRUE(r.Changed());
|
| + EXPECT_THAT(r.replacement(),
|
| + IsFinishRegion(IsAllocate(IsNumberConstant(Context::SizeFor(
|
| + Context::MIN_CONTEXT_SLOTS + 1)),
|
| + IsBeginRegion(_), control),
|
| + _));
|
| +}
|
| +
|
| +
|
| +// -----------------------------------------------------------------------------
|
| // JSInstanceOf
|
| // Test that instanceOf is reduced if and only if the right-hand side is a
|
| // function constant. Functional correctness is ensured elsewhere.
|
|
|