Index: src/interpreter/bytecode-array-builder.cc |
diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc |
index 7d8089b90b6e39bfd023dd8afbe883a791d0f45f..357ea0b4de2bda41ef546aced0896bb96bf94a3c 100644 |
--- a/src/interpreter/bytecode-array-builder.cc |
+++ b/src/interpreter/bytecode-array-builder.cc |
@@ -589,16 +589,6 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::CreateArguments( |
return *this; |
} |
-BytecodeArrayBuilder& BytecodeArrayBuilder::CreateRestArguments(int index) { |
- size_t index_entry = |
- GetConstantPoolEntry(Handle<Object>(Smi::FromInt(index), isolate_)); |
- // This will always be the first entry in the constant pool, since the rest |
- // arguments object is created at the start of the function just after |
- // creating the arguments object. |
- CHECK(FitsInIdx8Operand(index_entry)); |
- Output(Bytecode::kCreateRestArguments, static_cast<uint8_t>(index_entry)); |
- return *this; |
-} |
BytecodeArrayBuilder& BytecodeArrayBuilder::CreateRegExpLiteral( |
Handle<String> pattern, int literal_index, int flags) { |
@@ -1617,7 +1607,6 @@ Bytecode BytecodeArrayBuilder::BytecodeForStoreLookupSlot( |
return static_cast<Bytecode>(-1); |
} |
- |
// static |
Bytecode BytecodeArrayBuilder::BytecodeForCreateArguments( |
CreateArgumentsType type) { |
@@ -1626,9 +1615,10 @@ Bytecode BytecodeArrayBuilder::BytecodeForCreateArguments( |
return Bytecode::kCreateMappedArguments; |
case CreateArgumentsType::kUnmappedArguments: |
return Bytecode::kCreateUnmappedArguments; |
- default: |
- UNREACHABLE(); |
+ case CreateArgumentsType::kRestParameter: |
+ return Bytecode::kCreateRestParameter; |
} |
+ UNREACHABLE(); |
return static_cast<Bytecode>(-1); |
} |