Index: src/interpreter/bytecode-array-builder.cc |
diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc |
index 1429ebad7c854c0dab0fa38b6450fd20f2ca88d6..5c7c9b37284858da19e60cc4c3b8857f04f7e528 100644 |
--- a/src/interpreter/bytecode-array-builder.cc |
+++ b/src/interpreter/bytecode-array-builder.cc |
@@ -374,6 +374,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::CreateClosure( |
PretenureFlag tenured) { |
DCHECK(FitsInImm8Operand(tenured)); |
@@ -413,6 +426,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. |