| Index: test/unittests/compiler/interpreter-assembler-unittest.cc
|
| diff --git a/test/unittests/compiler/interpreter-assembler-unittest.cc b/test/unittests/compiler/interpreter-assembler-unittest.cc
|
| index 7bc91ce994e2698ae7fe854ff6f73dc50eef9ca9..b6955d99162a72bf8fa9ba488d8f36974f956159 100644
|
| --- a/test/unittests/compiler/interpreter-assembler-unittest.cc
|
| +++ b/test/unittests/compiler/interpreter-assembler-unittest.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "src/compiler/graph.h"
|
| #include "src/compiler/node.h"
|
| +#include "src/unique.h"
|
| #include "test/unittests/compiler/compiler-test-utils.h"
|
| #include "test/unittests/compiler/node-test-utils.h"
|
|
|
| @@ -86,6 +87,32 @@ TARGET_TEST_F(InterpreterAssemblerTest, Dispatch) {
|
| }
|
|
|
|
|
| +TARGET_TEST_F(InterpreterAssemblerTest, Return) {
|
| + TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) {
|
| + InterpreterAssemblerForTest m(this, bytecode);
|
| + m.Return();
|
| + Graph* graph = m.GetCompletedGraph();
|
| +
|
| + Node* end = graph->end();
|
| + EXPECT_EQ(1, end->InputCount());
|
| + Node* tail_call_node = end->InputAt(0);
|
| +
|
| + EXPECT_EQ(CallDescriptor::kInterpreterDispatch,
|
| + m.call_descriptor()->kind());
|
| + Matcher<Unique<HeapObject>> exit_trampoline(
|
| + Unique<HeapObject>::CreateImmovable(
|
| + isolate()->builtins()->InterpreterExitTrampoline()));
|
| + EXPECT_THAT(
|
| + tail_call_node,
|
| + IsTailCall(m.call_descriptor(), IsHeapConstant(exit_trampoline),
|
| + IsParameter(Linkage::kInterpreterBytecodeOffsetParameter),
|
| + IsParameter(Linkage::kInterpreterBytecodeArrayParameter),
|
| + IsParameter(Linkage::kInterpreterDispatchTableParameter),
|
| + graph->start(), graph->start()));
|
| + }
|
| +}
|
| +
|
| +
|
| TARGET_TEST_F(InterpreterAssemblerTest, BytecodeArg) {
|
| TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) {
|
| InterpreterAssemblerForTest m(this, bytecode);
|
|
|