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

Unified Diff: test/cctest/test-api.cc

Issue 836093007: split api call stubs into accessor and function call stubs (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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/macro-assembler-x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index dac6935e92b688c3e89852157ad034612af8dc12..dbf1493034d469f726229e160fb6a090e6f4985b 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -23618,13 +23618,36 @@ Local<Object> ApiCallOptimizationChecker::callee;
int ApiCallOptimizationChecker::count = 0;
-TEST(TestFunctionCallOptimization) {
+TEST(FunctionCallOptimization) {
i::FLAG_allow_natives_syntax = true;
ApiCallOptimizationChecker checker;
checker.RunAll();
}
+static void EmptyCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {}
+
+
+TEST(FunctionCallOptimizationMultipleArgs) {
+ i::FLAG_allow_natives_syntax = true;
+ LocalContext context;
+ v8::Isolate* isolate = context->GetIsolate();
+ v8::HandleScope scope(isolate);
+ Handle<Object> global = context->Global();
+ Local<v8::Function> function = Function::New(isolate, EmptyCallback);
+ global->Set(v8_str("x"), function);
+ CompileRun(
+ "function x_wrap() {\n"
+ " for (var i = 0; i < 5; i++) {\n"
+ " x(1,2,3);\n"
+ " }\n"
+ "}\n"
+ "x_wrap();\n"
+ "%OptimizeFunctionOnNextCall(x_wrap);"
+ "x_wrap();\n");
+}
+
+
static const char* last_event_message;
static int last_event_status;
void StoringEventLoggerCallback(const char* message, int status) {
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698