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

Unified Diff: test/compiler-unittests/instruction-selector-unittest.h

Issue 505133002: Unit test of instruction selection for calls with deoptimization. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments. Created 6 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 side-by-side diff with in-line comments
Download patch
Index: test/compiler-unittests/instruction-selector-unittest.h
diff --git a/test/compiler-unittests/instruction-selector-unittest.h b/test/compiler-unittests/instruction-selector-unittest.h
index 127cc1d479df10ccf367f31094908f8717ff9a61..80e5344dea3ed6545e87ca268d8e1e69e36dc083 100644
--- a/test/compiler-unittests/instruction-selector-unittest.h
+++ b/test/compiler-unittests/instruction-selector-unittest.h
@@ -26,7 +26,11 @@ class InstructionSelectorTest : public CompilerTest {
class Stream;
- enum StreamBuilderMode { kAllInstructions, kTargetInstructions };
+ enum StreamBuilderMode {
+ kAllInstructions,
+ kTargetInstructions,
+ kAllExceptNopInstructions
+ };
class StreamBuilder V8_FINAL : public RawMachineAssembler {
public:
@@ -146,6 +150,15 @@ class InstructionSelectorTest : public CompilerTest {
return UnallocatedOperand::cast(operand)->virtual_register();
}
+ FrameStateDescriptor* GetDeoptimizationEntry(int deoptimization_id) {
+ EXPECT_LT(deoptimization_id, GetDeoptimizationEntryCount());
+ return deoptimization_entries_[deoptimization_id];
+ }
+
+ int GetDeoptimizationEntryCount() {
+ return static_cast<int>(deoptimization_entries_.size());
+ }
+
private:
Constant ToConstant(const InstructionOperand* operand) const {
ConstantMap::const_iterator i;
@@ -170,6 +183,7 @@ class InstructionSelectorTest : public CompilerTest {
std::deque<Instruction*> instructions_;
std::set<int> doubles_;
std::set<int> references_;
+ std::deque<FrameStateDescriptor*> deoptimization_entries_;
};
base::RandomNumberGenerator rng_;

Powered by Google App Engine
This is Rietveld 408576698