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

Side by Side Diff: test/cctest/interpreter/test-interpreter.cc

Issue 2224343002: [interpreter] Collect type feedback in Add, Mul, Div and Mod. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixes test-interpreter/InterpreterParameter8. Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « src/interpreter/interpreter.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/execution.h" 7 #include "src/execution.h"
8 #include "src/handles.h" 8 #include "src/handles.h"
9 #include "src/interpreter/bytecode-array-builder.h" 9 #include "src/interpreter/bytecode-array-builder.h"
10 #include "src/interpreter/bytecode-array-iterator.h" 10 #include "src/interpreter/bytecode-array-iterator.h"
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 vector->GetIndex(slot3)) 494 vector->GetIndex(slot3))
495 .BinaryOperation(Token::Value::ADD, builder.Parameter(5), 495 .BinaryOperation(Token::Value::ADD, builder.Parameter(5),
496 vector->GetIndex(slot4)) 496 vector->GetIndex(slot4))
497 .BinaryOperation(Token::Value::ADD, builder.Parameter(6), 497 .BinaryOperation(Token::Value::ADD, builder.Parameter(6),
498 vector->GetIndex(slot5)) 498 vector->GetIndex(slot5))
499 .BinaryOperation(Token::Value::ADD, builder.Parameter(7), 499 .BinaryOperation(Token::Value::ADD, builder.Parameter(7),
500 vector->GetIndex(slot6)) 500 vector->GetIndex(slot6))
501 .Return(); 501 .Return();
502 Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(); 502 Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray();
503 503
504 InterpreterTester tester(handles.main_isolate(), bytecode_array); 504 InterpreterTester tester(handles.main_isolate(), bytecode_array, vector);
505 typedef Handle<Object> H; 505 typedef Handle<Object> H;
506 auto callable = tester.GetCallable<H, H, H, H, H, H, H, H>(); 506 auto callable = tester.GetCallable<H, H, H, H, H, H, H, H>();
507 507
508 Handle<Smi> arg1 = Handle<Smi>(Smi::FromInt(1), handles.main_isolate()); 508 Handle<Smi> arg1 = Handle<Smi>(Smi::FromInt(1), handles.main_isolate());
509 Handle<Smi> arg2 = Handle<Smi>(Smi::FromInt(2), handles.main_isolate()); 509 Handle<Smi> arg2 = Handle<Smi>(Smi::FromInt(2), handles.main_isolate());
510 Handle<Smi> arg3 = Handle<Smi>(Smi::FromInt(3), handles.main_isolate()); 510 Handle<Smi> arg3 = Handle<Smi>(Smi::FromInt(3), handles.main_isolate());
511 Handle<Smi> arg4 = Handle<Smi>(Smi::FromInt(4), handles.main_isolate()); 511 Handle<Smi> arg4 = Handle<Smi>(Smi::FromInt(4), handles.main_isolate());
512 Handle<Smi> arg5 = Handle<Smi>(Smi::FromInt(5), handles.main_isolate()); 512 Handle<Smi> arg5 = Handle<Smi>(Smi::FromInt(5), handles.main_isolate());
513 Handle<Smi> arg6 = Handle<Smi>(Smi::FromInt(6), handles.main_isolate()); 513 Handle<Smi> arg6 = Handle<Smi>(Smi::FromInt(6), handles.main_isolate());
514 Handle<Smi> arg7 = Handle<Smi>(Smi::FromInt(7), handles.main_isolate()); 514 Handle<Smi> arg7 = Handle<Smi>(Smi::FromInt(7), handles.main_isolate());
(...skipping 3796 matching lines...) Expand 10 before | Expand all | Expand 10 after
4311 auto callable = tester.GetCallable<>(); 4311 auto callable = tester.GetCallable<>();
4312 4312
4313 Handle<i::Object> return_value = callable().ToHandleChecked(); 4313 Handle<i::Object> return_value = callable().ToHandleChecked();
4314 CHECK(return_value->SameValue(*tests[i].second)); 4314 CHECK(return_value->SameValue(*tests[i].second));
4315 } 4315 }
4316 } 4316 }
4317 4317
4318 } // namespace interpreter 4318 } // namespace interpreter
4319 } // namespace internal 4319 } // namespace internal
4320 } // namespace v8 4320 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/interpreter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698