Index: src/interpreter/bytecode-generator.cc |
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc |
index d4755a6dde21d19ea87595b03e32f4bf4747e1dd..f857fc48e3d6b9cfb953ec0b8c5e40cde3081482 100644 |
--- a/src/interpreter/bytecode-generator.cc |
+++ b/src/interpreter/bytecode-generator.cc |
@@ -1042,12 +1042,9 @@ void BytecodeGenerator::VisitLiteral(Literal* expr) { |
void BytecodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) { |
// Materialize a regular expression literal. |
TemporaryRegisterScope temporary_register_scope(builder()); |
- Register flags = temporary_register_scope.NewRegister(); |
builder() |
- ->LoadLiteral(expr->flags()) |
- .StoreAccumulatorInRegister(flags) |
- .LoadLiteral(expr->pattern()) |
- .CreateRegExpLiteral(expr->literal_index(), flags); |
+ ->LoadLiteral(expr->pattern()) |
+ .CreateRegExpLiteral(expr->literal_index(), expr->flags()); |
execution_result()->SetResultInAccumulator(); |
} |