Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Unified Diff: src/compiler/ast-graph-builder.cc

Issue 1478823002: Reland of [turbofan] Introduce proper JSCreateLiteralRegExp operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « no previous file | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698