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

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

Issue 2161543002: [turbofan] Add support for eager/soft deoptimization reasons. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Do the ports properly 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 unified diff | Download patch
« no previous file with comments | « test/unittests/compiler/escape-analysis-unittest.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 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/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/compiler/graph.h" 8 #include "src/compiler/graph.h"
9 #include "src/compiler/schedule.h" 9 #include "src/compiler/schedule.h"
10 #include "src/flags.h" 10 #include "src/flags.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 int const virtual_register = i.second; 95 int const virtual_register = i.second;
96 if (sequence.IsFP(virtual_register)) { 96 if (sequence.IsFP(virtual_register)) {
97 EXPECT_FALSE(sequence.IsReference(virtual_register)); 97 EXPECT_FALSE(sequence.IsReference(virtual_register));
98 s.doubles_.insert(virtual_register); 98 s.doubles_.insert(virtual_register);
99 } 99 }
100 if (sequence.IsReference(virtual_register)) { 100 if (sequence.IsReference(virtual_register)) {
101 EXPECT_FALSE(sequence.IsFP(virtual_register)); 101 EXPECT_FALSE(sequence.IsFP(virtual_register));
102 s.references_.insert(virtual_register); 102 s.references_.insert(virtual_register);
103 } 103 }
104 } 104 }
105 for (int i = 0; i < sequence.GetFrameStateDescriptorCount(); i++) { 105 for (int i = 0; i < sequence.GetDeoptimizationEntryCount(); i++) {
106 s.deoptimization_entries_.push_back(sequence.GetFrameStateDescriptor( 106 s.deoptimization_entries_.push_back(
107 InstructionSequence::StateId::FromInt(i))); 107 sequence.GetDeoptimizationEntry(i).descriptor());
108 } 108 }
109 return s; 109 return s;
110 } 110 }
111 111
112 112
113 int InstructionSelectorTest::Stream::ToVreg(const Node* node) const { 113 int InstructionSelectorTest::Stream::ToVreg(const Node* node) const {
114 VirtualRegisters::const_iterator i = virtual_registers_.find(node->id()); 114 VirtualRegisters::const_iterator i = virtual_registers_.find(node->id());
115 CHECK(i != virtual_registers_.end()); 115 CHECK(i != virtual_registers_.end());
116 return i->second; 116 return i->second;
117 } 117 }
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 EXPECT_EQ(s.ToVreg(context2), s.ToVreg(call_instr->InputAt(14))); 621 EXPECT_EQ(s.ToVreg(context2), s.ToVreg(call_instr->InputAt(14)));
622 // Continuation. 622 // Continuation.
623 623
624 EXPECT_EQ(kArchRet, s[index++]->arch_opcode()); 624 EXPECT_EQ(kArchRet, s[index++]->arch_opcode());
625 EXPECT_EQ(index, s.size()); 625 EXPECT_EQ(index, s.size());
626 } 626 }
627 627
628 } // namespace compiler 628 } // namespace compiler
629 } // namespace internal 629 } // namespace internal
630 } // namespace v8 630 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/compiler/escape-analysis-unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698