Index: test/cctest/compiler/function-tester.h |
diff --git a/test/cctest/compiler/function-tester.h b/test/cctest/compiler/function-tester.h |
index 20efd1e304ad26096d2c94c4daf3b57c186b0b50..81f7a05ef03379de42ffefcffa74cea424ad94a2 100644 |
--- a/test/cctest/compiler/function-tester.h |
+++ b/test/cctest/compiler/function-tester.h |
@@ -40,9 +40,11 @@ class FunctionTester : public InitializedHandleScope { |
CHECK_EQ(0u, flags_ & ~supported_flags); |
} |
+ // TODO(turbofan): generalize FunctionTester to work with N arguments. Now, it |
+ // can handle up to four. |
explicit FunctionTester(Graph* graph) |
: isolate(main_isolate()), |
- function(NewFunction("(function(a,b){})")), |
+ function(NewFunction("(function(a,b,c,d){})")), |
flags_(0) { |
CompileGraph(graph); |
} |
@@ -55,6 +57,12 @@ class FunctionTester : public InitializedHandleScope { |
return Execution::Call(isolate, function, undefined(), 2, args, false); |
} |
+ MaybeHandle<Object> Call(Handle<Object> a, Handle<Object> b, Handle<Object> c, |
+ Handle<Object> d) { |
+ Handle<Object> args[] = {a, b, c, d}; |
+ return Execution::Call(isolate, function, undefined(), 4, args, false); |
+ } |
+ |
void CheckThrows(Handle<Object> a, Handle<Object> b) { |
TryCatch try_catch; |
MaybeHandle<Object> no_result = Call(a, b); |