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

Unified Diff: src/interpreter/interpreter.cc

Issue 1472323002: [es6] Correct parsing of regular expression literal flags. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix oversight in interpreter 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 | « src/interpreter/bytecodes.h ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/interpreter.cc
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
index cf3f76ad58d1ab978c4eae9416f667bd3bd7b1c9..0c55ae79270af27e3fe3c0102795dc2aaa3f3435 100644
--- a/src/interpreter/interpreter.cc
+++ b/src/interpreter/interpreter.cc
@@ -1311,25 +1311,6 @@ void Interpreter::DoJumpIfUndefinedConstant(
}
-// CreateRegExpLiteral <idx> <flags_reg>
-//
-// Creates a regular expression literal for literal index <idx> with flags held
-// in <flags_reg> and the pattern in the accumulator.
-void Interpreter::DoCreateRegExpLiteral(
- compiler::InterpreterAssembler* assembler) {
- Node* pattern = __ GetAccumulator();
- Node* literal_index_raw = __ BytecodeOperandIdx(0);
- Node* literal_index = __ SmiTag(literal_index_raw);
- Node* flags_reg = __ BytecodeOperandReg(1);
- Node* flags = __ LoadRegister(flags_reg);
- Node* closure = __ LoadRegister(Register::function_closure());
- Node* result = __ CallRuntime(Runtime::kCreateRegExpLiteral, closure,
- literal_index, pattern, flags);
- __ SetAccumulator(result);
- __ Dispatch();
-}
-
-
void Interpreter::DoCreateLiteral(Runtime::FunctionId function_id,
compiler::InterpreterAssembler* assembler) {
Node* constant_elements = __ GetAccumulator();
@@ -1345,6 +1326,16 @@ void Interpreter::DoCreateLiteral(Runtime::FunctionId function_id,
}
+// CreateRegExpLiteral <idx> <flags>
+//
+// Creates a regular expression literal for literal index <idx> with <flags> and
+// the pattern in the accumulator.
+void Interpreter::DoCreateRegExpLiteral(
+ compiler::InterpreterAssembler* assembler) {
+ DoCreateLiteral(Runtime::kCreateRegExpLiteral, assembler);
+}
+
+
// CreateArrayLiteral <idx> <flags>
//
// Creates an array literal for literal index <idx> with flags <flags> and
« no previous file with comments | « src/interpreter/bytecodes.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698