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