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

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

Issue 1705073005: CodeStubAssembler can generate code for builtins (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
Index: test/cctest/compiler/function-tester.h
diff --git a/test/cctest/compiler/function-tester.h b/test/cctest/compiler/function-tester.h
index b48b4d298adce13fbac90732374b13dd19ed8c57..77627086d74e95f4662c7334c6eddf034a83883d 100644
--- a/test/cctest/compiler/function-tester.h
+++ b/test/cctest/compiler/function-tester.h
@@ -42,6 +42,14 @@ class FunctionTester : public InitializedHandleScope {
CompileGraph(graph);
}
+ FunctionTester(int param_count, Handle<Code> code)
+ : isolate(main_isolate()),
+ function(NewFunction(BuildFunction(param_count).c_str())),
+ flags_(0) {
+ Compile(function);
+ function->ReplaceCode(*code);
+ }
+
FunctionTester(const CallInterfaceDescriptor& descriptor, Handle<Code> code)
: isolate(main_isolate()),
function(
@@ -64,6 +72,12 @@ class FunctionTester : public InitializedHandleScope {
return Execution::Call(isolate, function, undefined(), 2, args);
}
+ MaybeHandle<Object> Call(Handle<Object> a, Handle<Object> b,
+ Handle<Object> c) {
+ Handle<Object> args[] = {a, b, c};
+ return Execution::Call(isolate, function, undefined(), 3, args);
+ }
+
MaybeHandle<Object> Call(Handle<Object> a, Handle<Object> b, Handle<Object> c,
Handle<Object> d) {
Handle<Object> args[] = {a, b, c, d};

Powered by Google App Engine
This is Rietveld 408576698