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

Unified Diff: test/unittests/interpreter/interpreter-assembler-unittest.cc

Issue 1698273003: [es6] [interpreter] Add tail calls support to Ignition. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@tco-turbo-2
Patch Set: Fixed Bytecodes::IsCallOrNew() Created 4 years, 10 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 | « test/unittests/interpreter/bytecode-array-builder-unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/interpreter/interpreter-assembler-unittest.cc
diff --git a/test/unittests/interpreter/interpreter-assembler-unittest.cc b/test/unittests/interpreter/interpreter-assembler-unittest.cc
index e5f9f67094e6a93f5cf4e8782bae59dd55cc6ce4..940d93e6bc4f996b03e961e5f6c191f5f2f0e51c 100644
--- a/test/unittests/interpreter/interpreter-assembler-unittest.cc
+++ b/test/unittests/interpreter/interpreter-assembler-unittest.cc
@@ -643,21 +643,27 @@ TARGET_TEST_F(InterpreterAssemblerTest, CallRuntime) {
}
TARGET_TEST_F(InterpreterAssemblerTest, CallJS) {
- TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) {
- InterpreterAssemblerForTest m(this, bytecode);
- Callable builtin = CodeFactory::InterpreterPushArgsAndCall(isolate());
- Node* function = m.Int32Constant(0);
- Node* first_arg = m.Int32Constant(1);
- Node* arg_count = m.Int32Constant(2);
- Node* context =
- m.Parameter(InterpreterDispatchDescriptor::kContextParameter);
- Node* call_js = m.CallJS(function, context, first_arg, arg_count);
- EXPECT_THAT(
- call_js,
- IsCall(_, IsHeapConstant(builtin.code()), arg_count, first_arg,
- function,
- IsParameter(InterpreterDispatchDescriptor::kContextParameter), _,
- _));
+ TailCallMode tail_call_modes[] = {TailCallMode::kDisallow,
+ TailCallMode::kAllow};
+ TRACED_FOREACH(TailCallMode, tail_call_mode, tail_call_modes) {
+ TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) {
+ InterpreterAssemblerForTest m(this, bytecode);
+ Callable builtin =
+ CodeFactory::InterpreterPushArgsAndCall(isolate(), tail_call_mode);
+ Node* function = m.Int32Constant(0);
+ Node* first_arg = m.Int32Constant(1);
+ Node* arg_count = m.Int32Constant(2);
+ Node* context =
+ m.Parameter(InterpreterDispatchDescriptor::kContextParameter);
+ Node* call_js =
+ m.CallJS(function, context, first_arg, arg_count, tail_call_mode);
+ EXPECT_THAT(
+ call_js,
+ IsCall(_, IsHeapConstant(builtin.code()), arg_count, first_arg,
+ function,
+ IsParameter(InterpreterDispatchDescriptor::kContextParameter),
+ _, _));
+ }
}
}
« no previous file with comments | « test/unittests/interpreter/bytecode-array-builder-unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698