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

Unified Diff: src/interpreter/interpreter.cc

Issue 2504153002: [TypeFeedbackVector] Root literal arrays in function literals slots (Closed)
Patch Set: REBASE. Created 4 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 | « src/interpreter/bytecodes.h ('k') | src/mips/interface-descriptors-mips.cc » ('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 89595062431b4519770d14edd533be85960dbdf7..1bfde83ab0a59d8648d00733782d4cae8458d123 100644
--- a/src/interpreter/interpreter.cc
+++ b/src/interpreter/interpreter.cc
@@ -2384,20 +2384,24 @@ void Interpreter::DoCreateObjectLiteral(InterpreterAssembler* assembler) {
}
}
-// CreateClosure <index> <tenured>
+// CreateClosure <index> <slot> <tenured>
//
// Creates a new closure for SharedFunctionInfo at position |index| in the
// constant pool and with the PretenureFlag <tenured>.
void Interpreter::DoCreateClosure(InterpreterAssembler* assembler) {
Node* index = __ BytecodeOperandIdx(0);
Node* shared = __ LoadConstantPoolEntry(index);
- Node* flags = __ BytecodeOperandFlag(1);
+ Node* flags = __ BytecodeOperandFlag(2);
Node* context = __ GetContext();
Label call_runtime(assembler, Label::kDeferred);
__ GotoUnless(__ IsSetWord32<CreateClosureFlags::FastNewClosureBit>(flags),
&call_runtime);
- __ SetAccumulator(FastNewClosureStub::Generate(assembler, shared, context));
+ Node* vector_index = __ BytecodeOperandIdx(1);
+ vector_index = __ SmiTag(vector_index);
+ Node* type_feedback_vector = __ LoadTypeFeedbackVector();
+ __ SetAccumulator(FastNewClosureStub::Generate(
+ assembler, shared, type_feedback_vector, vector_index, context));
__ Dispatch();
__ Bind(&call_runtime);
@@ -2405,8 +2409,12 @@ void Interpreter::DoCreateClosure(InterpreterAssembler* assembler) {
Node* tenured_raw =
__ DecodeWordFromWord32<CreateClosureFlags::PretenuredBit>(flags);
Node* tenured = __ SmiTag(tenured_raw);
- Node* result = __ CallRuntime(Runtime::kInterpreterNewClosure, context,
- shared, tenured);
+ type_feedback_vector = __ LoadTypeFeedbackVector();
+ vector_index = __ BytecodeOperandIdx(1);
+ vector_index = __ SmiTag(vector_index);
+ Node* result =
+ __ CallRuntime(Runtime::kInterpreterNewClosure, context, shared,
+ type_feedback_vector, vector_index, tenured);
__ SetAccumulator(result);
__ Dispatch();
}
« no previous file with comments | « src/interpreter/bytecodes.h ('k') | src/mips/interface-descriptors-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698