| Index: src/interpreter/bytecode-array-builder.cc
|
| diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc
|
| index 7fb5e949a11b815d860618265f8fed5a43124264..26b5414b3a6b79305c066696a13cc0ef1a6622c9 100644
|
| --- a/src/interpreter/bytecode-array-builder.cc
|
| +++ b/src/interpreter/bytecode-array-builder.cc
|
| @@ -389,6 +389,17 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::CreateClosure(
|
| }
|
|
|
|
|
| +BytecodeArrayBuilder& BytecodeArrayBuilder::CreateArguments(
|
| + CreateArgumentsType type) {
|
| + // TODO(rmcilroy): Consider passing the type as a bytecode operand rather
|
| + // than having two different bytecodes once we have better support for
|
| + // branches in the InterpreterAssembler.
|
| + Bytecode bytecode = BytecodeForCreateArguments(type);
|
| + Output(bytecode);
|
| + return *this;
|
| +}
|
| +
|
| +
|
| BytecodeArrayBuilder& BytecodeArrayBuilder::CreateRegExpLiteral(
|
| int literal_index, Register flags) {
|
| if (FitsInIdx8Operand(literal_index)) {
|
| @@ -990,6 +1001,21 @@ Bytecode BytecodeArrayBuilder::BytecodeForStoreGlobal(
|
|
|
|
|
| // static
|
| +Bytecode BytecodeArrayBuilder::BytecodeForCreateArguments(
|
| + CreateArgumentsType type) {
|
| + switch (type) {
|
| + case CreateArgumentsType::kMappedArguments:
|
| + return Bytecode::kCreateMappedArguments;
|
| + case CreateArgumentsType::kUnmappedArguments:
|
| + return Bytecode::kCreateUnmappedArguments;
|
| + default:
|
| + UNREACHABLE();
|
| + }
|
| + return static_cast<Bytecode>(-1);
|
| +}
|
| +
|
| +
|
| +// static
|
| bool BytecodeArrayBuilder::FitsInIdx8Operand(int value) {
|
| return kMinUInt8 <= value && value <= kMaxUInt8;
|
| }
|
|
|