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

Unified Diff: test/cctest/interpreter/bytecode-expectations-printer.cc

Issue 2310103002: [Interpreter] Remove constant pool type in tests (Closed)
Patch Set: Remove warning for pool type Created 4 years, 3 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/cctest/interpreter/bytecode-expectations-printer.cc
diff --git a/test/cctest/interpreter/bytecode-expectations-printer.cc b/test/cctest/interpreter/bytecode-expectations-printer.cc
index 3db8fea2ef7b6829f0cccdaf940f630ef5f7578d..2d5be4d3cb10b8bab41c32f645c6a7b2eb55e6ec 100644
--- a/test/cctest/interpreter/bytecode-expectations-printer.cc
+++ b/test/cctest/interpreter/bytecode-expectations-printer.cc
@@ -224,32 +224,21 @@ void BytecodeExpectationsPrinter::PrintV8String(std::ostream& stream,
void BytecodeExpectationsPrinter::PrintConstant(
std::ostream& stream, i::Handle<i::Object> constant) const {
- switch (const_pool_type_) {
- case ConstantPoolType::kString:
- CHECK(constant->IsString());
+ if (constant->IsSmi()) {
+ stream << "Smi [";
+ i::Smi::cast(*constant)->SmiPrint(stream);
+ stream << "]";
+ } else {
+ stream << i::HeapObject::cast(*constant)->map()->instance_type();
+ if (constant->IsHeapNumber()) {
+ stream << " [";
+ i::HeapNumber::cast(*constant)->HeapNumberPrint(stream);
+ stream << "]";
+ } else if (constant->IsString()) {
+ stream << " [";
PrintV8String(stream, i::String::cast(*constant));
- break;
- case ConstantPoolType::kNumber:
- if (constant->IsSmi()) {
- i::Smi::cast(*constant)->SmiPrint(stream);
- } else if (constant->IsHeapNumber()) {
- i::HeapNumber::cast(*constant)->HeapNumberPrint(stream);
- } else {
- UNREACHABLE();
- }
- break;
- case ConstantPoolType::kMixed:
- if (constant->IsSmi()) {
- stream << "kInstanceTypeDontCare";
- } else {
- stream << "InstanceType::"
- << i::HeapObject::cast(*constant)->map()->instance_type();
- }
- break;
- case ConstantPoolType::kUnknown:
- default:
- UNREACHABLE();
- return;
+ stream << "]";
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698