Index: src/interpreter/bytecode-generator.cc |
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc |
index 95aceacaff3e4a9be8a85778ca7ea8616589988f..8d7b69690e8f45334d668a2c1527acd4fc9783b9 100644 |
--- a/src/interpreter/bytecode-generator.cc |
+++ b/src/interpreter/bytecode-generator.cc |
@@ -1635,6 +1635,7 @@ void BytecodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
RegisterAllocationScope inner_register_scope(this); |
Literal* key = property->key()->AsLiteral(); |
switch (property->kind()) { |
+ case ObjectLiteral::Property::SPREAD: |
case ObjectLiteral::Property::CONSTANT: |
UNREACHABLE(); |
case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
@@ -1783,6 +1784,13 @@ void BytecodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
builder()->CallRuntime(function_id, args); |
break; |
} |
+ case ObjectLiteral::Property::SPREAD: { |
+ RegisterList args = register_allocator()->NewRegisterList(2); |
+ builder()->MoveRegister(literal, args[0]); |
+ VisitForRegisterValue(property->value(), args[1]); |
+ builder()->CallRuntime(Runtime::kCopyDataProperties, args); |
+ break; |
+ } |
case ObjectLiteral::Property::PROTOTYPE: |
UNREACHABLE(); // Handled specially above. |
break; |