Index: src/compiler/ast-graph-builder.cc |
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc |
index 6ca1a956dccd3f38d4b09da23372a572895ace4e..f1634eae0f155dcf3e5b18ea6c019fc18e493e5b 100644 |
--- a/src/compiler/ast-graph-builder.cc |
+++ b/src/compiler/ast-graph-builder.cc |
@@ -1696,9 +1696,12 @@ |
Node* closure = GetFunctionClosure(); |
// Create node to materialize a regular expression literal. |
- const Operator* op = javascript()->CreateLiteralRegExp( |
- expr->pattern(), expr->flags(), expr->literal_index()); |
- Node* literal = NewNode(op, closure); |
+ Node* literal_index = jsgraph()->Constant(expr->literal_index()); |
+ Node* pattern = jsgraph()->Constant(expr->pattern()); |
+ Node* flags = jsgraph()->Constant(expr->flags()); |
+ const Operator* op = |
+ javascript()->CallRuntime(Runtime::kCreateRegExpLiteral, 4); |
+ Node* literal = NewNode(op, closure, literal_index, pattern, flags); |
PrepareFrameState(literal, expr->id(), ast_context()->GetStateCombine()); |
ast_context()->ProduceValue(literal); |
} |