| Index: src/interpreter/bytecode-array-builder.cc
|
| diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc
|
| index 7f0fe60c4453a737df5511b95d620d4f14e81d2c..eb4ef36bae0493609d44fab7a496ffd95af08125 100644
|
| --- a/src/interpreter/bytecode-array-builder.cc
|
| +++ b/src/interpreter/bytecode-array-builder.cc
|
| @@ -593,8 +593,6 @@ bool BytecodeArrayBuilder::NeedToBooleanCast() {
|
| }
|
| PreviousBytecodeHelper previous_bytecode(*this);
|
| switch (previous_bytecode.GetBytecode()) {
|
| - case Bytecode::kToBoolean:
|
| - UNREACHABLE();
|
| // If the previous bytecode puts a boolean in the accumulator return true.
|
| case Bytecode::kLdaTrue:
|
| case Bytecode::kLdaFalse:
|
| @@ -617,38 +615,6 @@ bool BytecodeArrayBuilder::NeedToBooleanCast() {
|
| }
|
|
|
|
|
| -BytecodeArrayBuilder& BytecodeArrayBuilder::CastAccumulatorToBoolean() {
|
| - if (!LastBytecodeInSameBlock()) {
|
| - Output(Bytecode::kToBoolean);
|
| - return *this;
|
| - }
|
| - // If the previous bytecode puts a boolean in the accumulator
|
| - // there is no need to emit an instruction.
|
| - if (NeedToBooleanCast()) {
|
| - PreviousBytecodeHelper previous_bytecode(*this);
|
| - switch (previous_bytecode.GetBytecode()) {
|
| - // If the previous bytecode is a constant evaluate it and return false.
|
| - case Bytecode::kLdaZero: {
|
| - LoadFalse();
|
| - break;
|
| - }
|
| - case Bytecode::kLdaSmi8: {
|
| - LoadBooleanConstant(previous_bytecode.GetOperand(0) != 0);
|
| - break;
|
| - }
|
| - case Bytecode::kLdaConstant: {
|
| - Handle<Object> object = previous_bytecode.GetConstantForIndexOperand(0);
|
| - LoadBooleanConstant(object->BooleanValue());
|
| - break;
|
| - }
|
| - default:
|
| - Output(Bytecode::kToBoolean);
|
| - }
|
| - }
|
| - return *this;
|
| -}
|
| -
|
| -
|
| BytecodeArrayBuilder& BytecodeArrayBuilder::CastAccumulatorToJSObject() {
|
| Output(Bytecode::kToObject);
|
| return *this;
|
|
|