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

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

Issue 1503963002: [Interpreter] Adds wide variant of CreateLiterals. Adds CreateLiterals to BytecodeGraphBuilder. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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/interpreter/bytecode-array-builder.h » ('j') | src/interpreter/bytecode-array-builder.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/bytecode-graph-builder.cc
diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc
index 5f963770075659cb1939025cf35861bd8235407c..98f4cf1f83e5123bf39a10ed4d08f07cd530006a 100644
--- a/src/compiler/bytecode-graph-builder.cc
+++ b/src/compiler/bytecode-graph-builder.cc
@@ -704,19 +704,37 @@ void BytecodeGraphBuilder::VisitCreateUnmappedArguments(
void BytecodeGraphBuilder::VisitCreateRegExpLiteral(
const interpreter::BytecodeArrayIterator& iterator) {
- UNIMPLEMENTED();
+ Node* closure = GetFunctionClosure();
+ const Operator* op = javascript()->CreateLiteralRegExp(
+ Handle<String>::cast(iterator.GetConstantForIndexOperand(0)),
+ iterator.GetImmediateOperand(2), iterator.GetIndexOperand(1));
rmcilroy 2015/12/07 14:33:22 Could you pull out the iterator.GetXXX() to named
mythria 2015/12/07 15:11:18 Done.
+ Node* literal = NewNode(op, closure);
+ AddEmptyFrameStateInputs(literal);
+ environment()->BindAccumulator(literal);
}
void BytecodeGraphBuilder::VisitCreateArrayLiteral(
const interpreter::BytecodeArrayIterator& iterator) {
- UNIMPLEMENTED();
+ Node* closure = GetFunctionClosure();
+ const Operator* op = javascript()->CreateLiteralArray(
+ Handle<FixedArray>::cast(iterator.GetConstantForIndexOperand(0)),
+ iterator.GetImmediateOperand(2), iterator.GetIndexOperand(1));
+ Node* literal = NewNode(op, closure);
+ AddEmptyFrameStateInputs(literal);
+ environment()->BindAccumulator(literal);
}
void BytecodeGraphBuilder::VisitCreateObjectLiteral(
const interpreter::BytecodeArrayIterator& iterator) {
- UNIMPLEMENTED();
+ Node* closure = GetFunctionClosure();
+ const Operator* op = javascript()->CreateLiteralObject(
+ Handle<FixedArray>::cast(iterator.GetConstantForIndexOperand(0)),
+ iterator.GetImmediateOperand(2), iterator.GetIndexOperand(1));
+ Node* literal = NewNode(op, closure);
+ AddEmptyFrameStateInputs(literal);
+ environment()->BindAccumulator(literal);
}
« no previous file with comments | « no previous file | src/interpreter/bytecode-array-builder.h » ('j') | src/interpreter/bytecode-array-builder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698