| 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 << "]";
|
| + }
|
| }
|
| }
|
|
|
|
|