Index: src/interpreter/bytecode-array-builder.cc |
diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc |
index d99d0db7569ac74830dd27f75dbf1fbefac15fbe..98fd507a6bb783185cd38456c6e5aff26e725f20 100644 |
--- a/src/interpreter/bytecode-array-builder.cc |
+++ b/src/interpreter/bytecode-array-builder.cc |
@@ -371,6 +371,19 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::CreateArrayLiteral( |
} |
+BytecodeArrayBuilder& BytecodeArrayBuilder::CreateObjectLiteral( |
+ int literal_index, int flags) { |
+ DCHECK(FitsInImm8Operand(flags)); // Flags should fit in 8 bytes. |
+ if (FitsInIdx8Operand(literal_index)) { |
+ Output(Bytecode::kCreateObjectLiteral, static_cast<uint8_t>(literal_index), |
+ static_cast<uint8_t>(flags)); |
+ } else { |
+ UNIMPLEMENTED(); |
+ } |
+ return *this; |
+} |
+ |
+ |
BytecodeArrayBuilder& BytecodeArrayBuilder::PushContext(Register context) { |
Output(Bytecode::kPushContext, context.ToOperand()); |
return *this; |
@@ -414,6 +427,12 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::CastAccumulatorToBoolean() { |
} |
+BytecodeArrayBuilder& BytecodeArrayBuilder::CastAccumulatorToName() { |
+ Output(Bytecode::kToName); |
+ return *this; |
+} |
+ |
+ |
BytecodeArrayBuilder& BytecodeArrayBuilder::Bind(BytecodeLabel* label) { |
if (label->is_forward_target()) { |
// An earlier jump instruction refers to this label. Update it's location. |