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

Unified Diff: src/interpreter/interpreter.cc

Issue 1475823003: [runtime] First step to sanitize regexp literal creation. (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
Index: src/interpreter/interpreter.cc
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
index 12b7d3da0fc4f22867bde0e833d0a910b644055b..cf3f76ad58d1ab978c4eae9416f667bd3bd7b1c9 100644
--- a/src/interpreter/interpreter.cc
+++ b/src/interpreter/interpreter.cc
@@ -1323,10 +1323,8 @@ void Interpreter::DoCreateRegExpLiteral(
Node* flags_reg = __ BytecodeOperandReg(1);
Node* flags = __ LoadRegister(flags_reg);
Node* closure = __ LoadRegister(Register::function_closure());
- Node* literals_array =
- __ LoadObjectField(closure, JSFunction::kLiteralsOffset);
- Node* result = __ CallRuntime(Runtime::kMaterializeRegExpLiteral,
- literals_array, literal_index, pattern, flags);
+ Node* result = __ CallRuntime(Runtime::kCreateRegExpLiteral, closure,
+ literal_index, pattern, flags);
__ SetAccumulator(result);
__ Dispatch();
}

Powered by Google App Engine
This is Rietveld 408576698