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

Side by Side Diff: test/unittests/compiler/instruction-selector-unittest.cc

Issue 1259203002: [turbofan] Implement tail calls with differing stack parameter counts (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix bugs in frameless tail calls Created 5 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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 "test/unittests/compiler/instruction-selector-unittest.h" 5 #include "test/unittests/compiler/instruction-selector-unittest.h"
6 6
7 #include "src/compiler/graph.h" 7 #include "src/compiler/graph.h"
8 #include "src/compiler/schedule.h" 8 #include "src/compiler/schedule.h"
9 #include "src/flags.h" 9 #include "src/flags.h"
10 #include "test/unittests/compiler/compiler-test-utils.h" 10 #include "test/unittests/compiler/compiler-test-utils.h"
(...skipping 23 matching lines...) Expand all
34 if (FLAG_trace_turbo) { 34 if (FLAG_trace_turbo) {
35 OFStream out(stdout); 35 OFStream out(stdout);
36 out << "=== Schedule before instruction selection ===" << std::endl 36 out << "=== Schedule before instruction selection ===" << std::endl
37 << *schedule; 37 << *schedule;
38 } 38 }
39 size_t const node_count = graph()->NodeCount(); 39 size_t const node_count = graph()->NodeCount();
40 EXPECT_NE(0u, node_count); 40 EXPECT_NE(0u, node_count);
41 Linkage linkage(call_descriptor()); 41 Linkage linkage(call_descriptor());
42 InstructionBlocks* instruction_blocks = 42 InstructionBlocks* instruction_blocks =
43 InstructionSequence::InstructionBlocksFor(test_->zone(), schedule); 43 InstructionSequence::InstructionBlocksFor(test_->zone(), schedule);
44 Frame frame(true);
44 InstructionSequence sequence(test_->isolate(), test_->zone(), 45 InstructionSequence sequence(test_->isolate(), test_->zone(),
45 instruction_blocks); 46 instruction_blocks, &frame);
46 SourcePositionTable source_position_table(graph()); 47 SourcePositionTable source_position_table(graph());
47 InstructionSelector selector(test_->zone(), node_count, &linkage, &sequence, 48 InstructionSelector selector(test_->zone(), node_count, &linkage, &sequence,
48 schedule, &source_position_table, 49 schedule, &source_position_table,
49 source_position_mode, features); 50 source_position_mode, features);
50 selector.SelectInstructions(); 51 selector.SelectInstructions();
51 if (FLAG_trace_turbo) { 52 if (FLAG_trace_turbo) {
52 OFStream out(stdout); 53 OFStream out(stdout);
53 PrintableInstructionSequence printable = { 54 PrintableInstructionSequence printable = {
54 RegisterConfiguration::ArchDefault(), &sequence}; 55 RegisterConfiguration::ArchDefault(), &sequence};
55 out << "=== Code sequence after instruction selection ===" << std::endl 56 out << "=== Code sequence after instruction selection ===" << std::endl
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 EXPECT_EQ(s.ToVreg(context2), s.ToVreg(call_instr->InputAt(14))); 607 EXPECT_EQ(s.ToVreg(context2), s.ToVreg(call_instr->InputAt(14)));
607 // Continuation. 608 // Continuation.
608 609
609 EXPECT_EQ(kArchRet, s[index++]->arch_opcode()); 610 EXPECT_EQ(kArchRet, s[index++]->arch_opcode());
610 EXPECT_EQ(index, s.size()); 611 EXPECT_EQ(index, s.size());
611 } 612 }
612 613
613 } // namespace compiler 614 } // namespace compiler
614 } // namespace internal 615 } // namespace internal
615 } // namespace v8 616 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698