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

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

Issue 2122183002: [Interpreter] Collect type feedback for calls in the bytecode handler (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updated cctest.status to mark the tests fail with ignition. Created 4 years, 5 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/cctest/cctest.status ('k') | test/cctest/test-compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/interpreter/test-interpreter.cc
diff --git a/test/cctest/interpreter/test-interpreter.cc b/test/cctest/interpreter/test-interpreter.cc
index 07a22b7fbe71648e006200e0e2a91165764a6644..dd725a727765cac57c86c365e15de49c21c730d0 100644
--- a/test/cctest/interpreter/test-interpreter.cc
+++ b/test/cctest/interpreter/test-interpreter.cc
@@ -798,10 +798,13 @@ static void TestInterpreterCall(TailCallMode tail_call_mode) {
i::FeedbackVectorSpec feedback_spec(&zone);
i::FeedbackVectorSlot slot = feedback_spec.AddLoadICSlot();
+ i::FeedbackVectorSlot call_slot = feedback_spec.AddCallICSlot();
Handle<i::TypeFeedbackVector> vector =
i::NewTypeFeedbackVector(isolate, &feedback_spec);
int slot_index = vector->GetIndex(slot);
+ int call_slot_index = -1;
+ call_slot_index = vector->GetIndex(call_slot);
Handle<i::String> name = factory->NewStringFromAsciiChecked("func");
name = factory->string_table()->LookupString(isolate, name);
@@ -812,9 +815,12 @@ static void TestInterpreterCall(TailCallMode tail_call_mode) {
0, 1);
builder.LoadNamedProperty(builder.Parameter(0), name, slot_index)
- .StoreAccumulatorInRegister(Register(0))
- .Call(Register(0), builder.Parameter(0), 1, 0, tail_call_mode)
- .Return();
+ .StoreAccumulatorInRegister(Register(0));
+
+ builder.Call(Register(0), builder.Parameter(0), 1, call_slot_index,
+ tail_call_mode);
+
+ builder.Return();
Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray();
InterpreterTester tester(handles.main_isolate(), bytecode_array, vector);
@@ -832,9 +838,10 @@ static void TestInterpreterCall(TailCallMode tail_call_mode) {
0, 1);
builder.LoadNamedProperty(builder.Parameter(0), name, slot_index)
- .StoreAccumulatorInRegister(Register(0))
- .Call(Register(0), builder.Parameter(0), 1, 0, tail_call_mode)
- .Return();
+ .StoreAccumulatorInRegister(Register(0));
+ builder.Call(Register(0), builder.Parameter(0), 1, call_slot_index,
+ tail_call_mode);
+ builder.Return();
Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray();
InterpreterTester tester(handles.main_isolate(), bytecode_array, vector);
@@ -861,9 +868,12 @@ static void TestInterpreterCall(TailCallMode tail_call_mode) {
.LoadLiteral(Smi::FromInt(51))
.StoreAccumulatorInRegister(Register(2))
.LoadLiteral(Smi::FromInt(11))
- .StoreAccumulatorInRegister(Register(3))
- .Call(Register(0), Register(1), 3, 0, tail_call_mode)
- .Return();
+ .StoreAccumulatorInRegister(Register(3));
+
+ builder.Call(Register(0), Register(1), 3, call_slot_index, tail_call_mode);
+
+ builder.Return();
+
Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray();
InterpreterTester tester(handles.main_isolate(), bytecode_array, vector);
@@ -905,9 +915,12 @@ static void TestInterpreterCall(TailCallMode tail_call_mode) {
.LoadLiteral(factory->NewStringFromAsciiChecked("i"))
.StoreAccumulatorInRegister(Register(10))
.LoadLiteral(factory->NewStringFromAsciiChecked("j"))
- .StoreAccumulatorInRegister(Register(11))
- .Call(Register(0), Register(1), 11, 0, tail_call_mode)
- .Return();
+ .StoreAccumulatorInRegister(Register(11));
+
+ builder.Call(Register(0), Register(1), 11, call_slot_index, tail_call_mode);
+
+ builder.Return();
+
Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray();
InterpreterTester tester(handles.main_isolate(), bytecode_array, vector);
« no previous file with comments | « test/cctest/cctest.status ('k') | test/cctest/test-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698