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

Unified Diff: test/cctest/compiler/function-tester.h

Issue 1144063002: Cleanup interface descriptors to reflect that vectors are part of loads. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixes for test failures. Created 5 years, 7 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 | « src/x64/lithium-x64.cc ('k') | test/cctest/compiler/test-run-stubs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/x64/lithium-x64.cc ('k') | test/cctest/compiler/test-run-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698