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

Unified Diff: src/code-stubs.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/code-stubs.h ('k') | src/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.cc
diff --git a/src/code-stubs.cc b/src/code-stubs.cc
index 8345912cf79220428ae3541726b267ceb3b1e67d..ecd25e1b0bc76c67b8db7d76cfed9391cb00b02b 100644
--- a/src/code-stubs.cc
+++ b/src/code-stubs.cc
@@ -2438,6 +2438,8 @@ void GetPropertyStub::GenerateAssembly(
// static
compiler::Node* FastNewClosureStub::Generate(CodeStubAssembler* assembler,
compiler::Node* shared_info,
+ compiler::Node* feedback_vector,
+ compiler::Node* slot,
compiler::Node* context) {
typedef compiler::Node Node;
typedef compiler::CodeAssembler::Label Label;
@@ -2551,14 +2553,14 @@ compiler::Node* FastNewClosureStub::Generate(CodeStubAssembler* assembler,
// Initialize the rest of the function.
Node* empty_fixed_array =
assembler->HeapConstant(factory->empty_fixed_array());
- Node* empty_literals_array =
- assembler->HeapConstant(factory->empty_literals_array());
assembler->StoreObjectFieldNoWriteBarrier(result, JSObject::kPropertiesOffset,
empty_fixed_array);
assembler->StoreObjectFieldNoWriteBarrier(result, JSObject::kElementsOffset,
empty_fixed_array);
+ Node* literals_array = assembler->LoadFixedArrayElement(
+ feedback_vector, slot, 0, CodeStubAssembler::SMI_PARAMETERS);
assembler->StoreObjectFieldNoWriteBarrier(result, JSFunction::kLiteralsOffset,
- empty_literals_array);
+ literals_array);
assembler->StoreObjectFieldNoWriteBarrier(
result, JSFunction::kPrototypeOrInitialMapOffset,
assembler->TheHoleConstant());
@@ -2584,11 +2586,13 @@ compiler::Node* FastNewClosureStub::Generate(CodeStubAssembler* assembler,
void FastNewClosureStub::GenerateAssembly(
compiler::CodeAssemblerState* state) const {
- typedef compiler::Node Node;
CodeStubAssembler assembler(state);
+ typedef compiler::Node Node;
Node* shared = assembler.Parameter(Descriptor::kSharedFunctionInfo);
Node* context = assembler.Parameter(Descriptor::kContext);
- assembler.Return(Generate(&assembler, shared, context));
+ Node* vector = assembler.Parameter(Descriptor::kVector);
+ Node* slot = assembler.Parameter(Descriptor::kSlot);
+ assembler.Return(Generate(&assembler, shared, vector, slot, context));
}
// static
« no previous file with comments | « src/code-stubs.h ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698